|
_attribute__ is a keyword, it is a C language extension of gcc, and regparm(0) means that parameters are not passed from the register. If it is __attribute__((regparm(3))),
Then when the function is called, the parameters are not passed through the stack, but directly placed in the register, and the called function directly takes the parameters from the register
Add the macro asmlinkage before the function definition to indicate that these functions pass parameters through the stack instead of through registers. When the gcc compiler calls c language functions during assembly
There are two ways to pass parameters: one is through the stack, and the other is through the register. Registers are used by default. If you want to call c language functions during your assembly process and want to pass parameters through the stack, you must add the macro asmlinkage before the function when you define the c function |
|