[PATCH] D29235: [X86] Added INT1 instruction and fixed register usage.

Chris Ray via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 19:29:36 PST 2017


cray added inline comments.


================
Comment at: lib/Target/X86/X86InstrSystem.td:35
+// Interrupt and SysCall Instructions.
+let Uses = [ESP, EFLAGS], Defs = [ESP, EFLAGS] in {
+  def INTO : I<0xce, RawFrm, (outs), (ins), "into", []>;
----------------
craig.topper wrote:
> The instructions don't really modify ESP or EFLAGS. I would expect them to be restored when the interrupt handler returned. So from the perspective of the code with the INT insturction they aren't changed.
The flags are pushed onto the stack, and if the INT causes an exception they will not be popped from the stack when the exception handler is called.  
I can put together an example of this if you would like.


Repository:
  rL LLVM

https://reviews.llvm.org/D29235





More information about the llvm-commits mailing list