AMD has an ABI specification that describes the calling convention to use on x86-64. All OSes follow it, except for Windows which has it's own x86-64 calling convention. Why?
Does anyone know the technical, historical, or political reasons for this difference, or is it purely a matter of NIHsyndrome?
I understand that different OSes may have different needs for higher level things, but that doesn't explain why for example the register parameter passing order on Windows is rcx - rdx …
我正在阅读这本书:"计算机系统 - 程序员视角".我发现,在x86-64架构中,我们仅限于6个积分参数,这些参数将被传递给寄存器中的函数.下一个参数将在堆栈上传递.
而且,第一个最多8个FP或矢量args以xmm0..7传递.
为什么不使用浮点寄存器来存储下一个参数,即使参数不是单/双精度变量?
将数据存储在寄存器中比将其存储到存储器然后从存储器中读取它会更有效(据我所知).