aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/X86/X86InstrInfo.td8
-rw-r--r--test/MC/AsmParser/X86/x86_32-encoding.s13
2 files changed, 17 insertions, 4 deletions
diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td
index befff27dd6..a2754eac21 100644
--- a/lib/Target/X86/X86InstrInfo.td
+++ b/lib/Target/X86/X86InstrInfo.td
@@ -753,11 +753,11 @@ def PUSH32rmm: I<0xFF, MRM6m, (outs), (ins i32mem:$src), "push{l}\t$src",[]>;
}
let Defs = [ESP], Uses = [ESP], neverHasSideEffects = 1, mayStore = 1 in {
-def PUSH32i8 : Ii8<0x6a, RawFrm, (outs), (ins i8imm:$imm),
- "push{l}\t$imm", []>;
-def PUSH32i16 : Ii16<0x68, RawFrm, (outs), (ins i16imm:$imm),
+def PUSHi8 : Ii8<0x6a, RawFrm, (outs), (ins i32i8imm:$imm),
"push{l}\t$imm", []>;
-def PUSH32i32 : Ii32<0x68, RawFrm, (outs), (ins i32imm:$imm),
+def PUSHi16 : Ii16<0x68, RawFrm, (outs), (ins i16imm:$imm),
+ "push{w}\t$imm", []>, OpSize;
+def PUSHi32 : Ii32<0x68, RawFrm, (outs), (ins i32imm:$imm),
"push{l}\t$imm", []>;
}
diff --git a/test/MC/AsmParser/X86/x86_32-encoding.s b/test/MC/AsmParser/X86/x86_32-encoding.s
index b5472ca49c..475632cb78 100644
--- a/test/MC/AsmParser/X86/x86_32-encoding.s
+++ b/test/MC/AsmParser/X86/x86_32-encoding.s
@@ -9984,3 +9984,16 @@ pshufb CPI1_0(%rip), %xmm1
// CHECK: bsrw 305419896, %bx
// CHECK: encoding: [0x66,0x0f,0xbd,0x1d,0x78,0x56,0x34,0x12]
bsrw 305419896, %bx
+
+// radr://7901779
+// CHECK: pushl $127
+// CHECK: encoding: [0x6a,0xfe]
+ pushl $127
+
+// CHECK: pushw $254
+// CHECK: encoding: [0x66,0x68,0xfe,0x00]
+ pushw $254
+
+// CHECK: pushl $254
+// CHECK: encoding: [0x68,0xfe,0x00,0x00,0x00]
+ pushl $254