PR9377: Handle x86 str with register operand in a way consistent with gas.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126970 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eli Friedman 2011-03-04 00:10:17 +00:00
parent e7147dba73
commit ac39bd534b
2 changed files with 17 additions and 4 deletions

View File

@ -207,10 +207,15 @@ def LSL64rr : RI<0x03, MRMSrcReg, (outs GR64:$dst), (ins GR64:$src),
def INVLPG : I<0x01, MRM7m, (outs), (ins i8mem:$addr), "invlpg\t$addr", []>, TB;
def STRr : I<0x00, MRM1r, (outs GR16:$dst), (ins),
"str{w}\t{$dst}", []>, TB;
def STRm : I<0x00, MRM1m, (outs i16mem:$dst), (ins),
"str{w}\t{$dst}", []>, TB;
def STR16r : I<0x00, MRM1r, (outs GR16:$dst), (ins),
"str{w}\t{$dst}", []>, TB, OpSize;
def STR32r : I<0x00, MRM1r, (outs GR32:$dst), (ins),
"str{l}\t{$dst}", []>, TB;
def STR64r : RI<0x00, MRM1r, (outs GR64:$dst), (ins),
"str{q}\t{$dst}", []>, TB;
def STRm : I<0x00, MRM1m, (outs i16mem:$dst), (ins),
"str{w}\t{$dst}", []>, TB;
def LTRr : I<0x00, MRM3r, (outs), (ins GR16:$src),
"ltr{w}\t{$src}", []>, TB;
def LTRm : I<0x00, MRM3m, (outs), (ins i16mem:$src),

View File

@ -816,3 +816,11 @@ pshufw $90, %mm4, %mm0
// CHECK: loopne 0
// CHECK: encoding: [0xe0,A]
loopnz 0
// CHECK: strw
// CHECK: encoding: [0x66,0x0f,0x00,0xc8]
str %ax
// CHECK: strl
// CHECK: encoding: [0x0f,0x00,0xc8]
str %eax