[PATCH] D12498: X86: add an interrupt calling convention
Peter Marheine via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 07:43:52 PDT 2015
tari added a comment.
The hardware provides only up to one parameter, unless I've missed some major point. I think software interrupt calling conventions would be best left to some other work (if even they're well-defined enough to be worth trying to support).
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:2517
@@ +2516,3 @@
+ if (!isLegal)
+ report_fatal_error("X86 interrupts may take only one i32 argument");
+ }
----------------
delena wrote:
> Why? X86 interrupts receive up to 6 parameters.
I believe you're thinking of BIOS interrupts or such, which have their own (different) calling convention? I only handle the error code pushed by hardware, which is placed on the stack (and is only sometimes present- see Figure 6-4 in Volume 3 of the [[ https://www-ssl.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-manual-325462.html | Intel Software Developer's Manual ]]).
Software interrupts typically take more parameters in registers, but then the calling convention is completely different (there's no error code, some registers become caller-saved..).
Repository:
rL LLVM
http://reviews.llvm.org/D12498
More information about the llvm-commits
mailing list