【发布时间】:2019-09-09 10:18:57
【问题描述】:
在 x86-64-psABI(https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-1.0.pdf) 的 3.2.3 章节中,它定义了一些与 AMD64 寄存器对应的类。
1)SSE和SSEUP有什么区别? SSEUP 说“该类由适合向量寄存器的类型组成,可以在它的高字节中传递和返回”“可以在它的高字节中传递和返回”是什么意思?
2)X87 X87UP 和COMPLEX_X87 有什么区别?他们看起来一模一样。
3.2.3 Parameter Passing
After the argument values have been computed, they are placed either in regis- ters or pushed on the stack. The way how values are passed is described in the following sections.
Definitions We first define a number of classes to classify arguments. The classes are corresponding to AMD64 register classes and defined as:
INTEGER This class consists of integral types that fit into one of the general purpose registers.
SSE The class consists of types that fit into a vector register.
SSEUP Theclassconsistsoftypesthatfitintoavectorregisterandcanbepassed
and returned in the upper bytes of it.
X87, X87UP These classes consists of types that will be returned via the x87 FPU.
COMPLEX_X87 This class consists of types that will be returned via the x87 FPU.
NO_CLASS This class is used as initializer in the algorithms. It will be used for padding and empty structures and unions.
MEMORY This class consists of types that will be passed and returned in memory via the stack.
【问题讨论】:
标签: parameter-passing x86-64 abi