[llvm-commits] [llvm] r42335 - in /llvm/trunk/lib/Target/X86: X86InstrInfo.td X86InstrX86-64.td

Evan Cheng evan.cheng at apple.com
Tue Sep 25 18:29:07 PDT 2007


Author: evancheng
Date: Tue Sep 25 20:29:06 2007
New Revision: 42335

URL: http://llvm.org/viewvc/llvm-project?rev=42335&view=rev
Log:
Add pushf{d|q}, popf{d|q} to push and pop EFLAGS register.

Modified:
    llvm/trunk/lib/Target/X86/X86InstrInfo.td
    llvm/trunk/lib/Target/X86/X86InstrX86-64.td

Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=42335&r1=42334&r2=42335&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Tue Sep 25 20:29:06 2007
@@ -424,13 +424,16 @@
                  (outs), (ins), "leave", []>;
 
 let Defs = [ESP], Uses = [ESP] in {
-def POP32r   : I<0x58, AddRegFrm,
-                 (outs GR32:$reg), (ins), "pop{l}\t$reg", []>;
+def POP32r   : I<0x58, AddRegFrm, (outs GR32:$reg), (ins), "pop{l}\t$reg", []>;
 
-def PUSH32r  : I<0x50, AddRegFrm,
-                 (outs), (ins GR32:$reg), "push{l}\t$reg", []>;
+def PUSH32r  : I<0x50, AddRegFrm, (outs), (ins GR32:$reg), "push{l}\t$reg",[]>;
 }
 
+let Defs = [ESP, EFLAGS], Uses = [ESP] in
+def POPD     : I<0x9D, RawFrm, (outs), (ins), "popfd", []>;
+let Defs = [ESP], Uses = [ESP, EFLAGS] in
+def PUSHFD   : I<0x9C, RawFrm, (outs), (ins), "pushfd", []>;
+
 def MovePCtoStack : I<0, Pseudo, (outs), (ins piclabel:$label),
                       "call\t$label", []>;
 

Modified: llvm/trunk/lib/Target/X86/X86InstrX86-64.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrX86-64.td?rev=42335&r1=42334&r2=42335&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrX86-64.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrX86-64.td Tue Sep 25 20:29:06 2007
@@ -123,6 +123,11 @@
                  (outs), (ins GR64:$reg), "push{q}\t$reg", []>;
 }
 
+let Defs = [RSP, EFLAGS], Uses = [RSP] in
+def POPQ     : I<0x9D, RawFrm, (outs), (ins), "popfq", []>, REX_W;
+let Defs = [RSP], Uses = [RSP, EFLAGS] in
+def PUSHFQ   : I<0x9C, RawFrm, (outs), (ins), "pushfq", []>;
+
 def LEA64_32r : I<0x8D, MRMSrcMem,
                   (outs GR32:$dst), (ins lea64_32mem:$src),
                   "lea{l}\t{$src|$dst}, {$dst|$src}",





More information about the llvm-commits mailing list