[PATCH] D12498: X86: add an interrupt calling convention

Peter Marheine via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 11:53:51 PST 2015


tari added inline comments.

================
Comment at: lib/Target/X86/X86CallingConv.td:711
@@ -710,1 +710,3 @@
 
+def CC_X86_Intr : CallingConv<[
+  // Error codes aren't necessarily 32 bits wide, but fill a 32-bit slot.
----------------
aaboud wrote:
> I think we need to define argument convention for x86-32 and another for x86-64.
> X86-32: the arguments need to have size 4 and alignment 4
> X86-64: the arguments need to have size 8 and alignment 8
> 
> Also, why do we need to promote types to i32? Do we expect to have smaller types? Should not that be considered as illegal interrupt?
According to the AMD documentation, the error code in long mode (x86-64) is still 32 bits wide, but is padded to 64 bits when placed on the stack. So the handling of the error code from a user's perspective is the same in both 32- and 64-bit code.

Arguments that are not 32 bits wide should probably be made illegal, yes.


Repository:
  rL LLVM

http://reviews.llvm.org/D12498





More information about the llvm-commits mailing list