llvm.org GIT mirror llvm / 0d82fe7
Add retw and lretw instructions. Also, fix Intel syntax parsing for all ret instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154468 91177308-0d34-0410-b5e6-96231b3b80d8 Charles Davis 8 years ago
5 changed file(s) with 41 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
2020 def RET : I <0xC3, RawFrm, (outs), (ins variable_ops),
2121 "ret",
2222 [(X86retflag 0)], IIC_RET>;
23 def RETW : I <0xC3, RawFrm, (outs), (ins variable_ops),
24 "ret{w}",
25 [], IIC_RET>, OpSize;
2326 def RETI : Ii16<0xC2, RawFrm, (outs), (ins i16imm:$amt, variable_ops),
2427 "ret\t$amt",
2528 [(X86retflag timm:$amt)], IIC_RET_IMM>;
2629 def RETIW : Ii16<0xC2, RawFrm, (outs), (ins i16imm:$amt, variable_ops),
27 "retw\t$amt",
30 "ret{w}\t$amt",
2831 [], IIC_RET_IMM>, OpSize;
2932 def LRETL : I <0xCB, RawFrm, (outs), (ins),
30 "lretl", [], IIC_RET>;
33 "{l}ret{l|f}", [], IIC_RET>;
34 def LRETW : I <0xCB, RawFrm, (outs), (ins),
35 "{l}ret{w|f}", [], IIC_RET>, OpSize;
3136 def LRETQ : RI <0xCB, RawFrm, (outs), (ins),
32 "lretq", [], IIC_RET>;
37 "{l}ret{q|f}", [], IIC_RET>;
3338 def LRETI : Ii16<0xCA, RawFrm, (outs), (ins i16imm:$amt),
34 "lret\t$amt", [], IIC_RET>;
39 "{l}ret{l|f}\t$amt", [], IIC_RET>;
3540 def LRETIW : Ii16<0xCA, RawFrm, (outs), (ins i16imm:$amt),
36 "lretw\t$amt", [], IIC_RET>, OpSize;
41 "{l}ret{w|f}\t$amt", [], IIC_RET>, OpSize;
3742 }
3843
3944 // Unconditional branches.
9898 # CHECK: iretq
9999 0x48 0xcf
100100
101 # CHECK: ret
102 0x66 0xc3
103
104 # CHECK: retf
105 0x66 0xcb
106
4141
4242 // CHECK: encoding: [0x0f,0xc2,0xd1,0x01]
4343 cmpltps XMM2, XMM1
44
45 // CHECK: encoding: [0xc3]
46 ret
47
48 // CHECK: encoding: [0xcb]
49 retf
50
51 // CHECK: encoding: [0xc2,0x08,0x00]
52 ret 8
53
54 // CHECK: encoding: [0xca,0x08,0x00]
55 retf 8
56
989989 // CHECK: xchgl %ecx, %eax
990990 // CHECK: encoding: [0x91]
991991 xchgl %eax, %ecx
992
993 // CHECK: retw
994 // CHECK: encoding: [0x66,0xc3]
995 retw
996
997 // CHECK: lretw
998 // CHECK: encoding: [0x66,0xcb]
999 lretw
4848
4949 // CHECK: ret
5050 ret
51
52 // CHECK: retw
53 retw
5154
5255 // FIXME: Check that this matches SUB32ri8
5356 // CHECK: subl $1, %eax
840843 lretq // CHECK: lretq # encoding: [0x48,0xcb]
841844 lretl // CHECK: lretl # encoding: [0xcb]
842845 lret // CHECK: lretl # encoding: [0xcb]
846 lretw // CHECK: lretw # encoding: [0x66,0xcb]
843847
844848 // rdar://8403907
845849 sysret