aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-05 22:56:11 +0000
committerChris Lattner <sabre@nondot.org>2010-02-05 22:56:11 +0000
commit8f60e4d679003235d6e4ac2f5f03eb757a84dde8 (patch)
treec5e2c73681dc68e1765d4a5b69657a30f852a065
parent3f1118310eddbbc0d5972e8564c7ac9b91464a33 (diff)
fix incorrect encoding of SBB8mi that Kevin noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95448 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86InstrInfo.td4
-rw-r--r--test/MC/AsmParser/X86/x86_32-encoding.s5
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td
index d604c176b1..0844bf9bd5 100644
--- a/lib/Target/X86/X86InstrInfo.td
+++ b/lib/Target/X86/X86InstrInfo.td
@@ -3028,8 +3028,8 @@ let isTwoAddress = 0 in {
def SBB32mr : I<0x19, MRMDestMem, (outs), (ins i32mem:$dst, GR32:$src2),
"sbb{l}\t{$src2, $dst|$dst, $src2}",
[(store (sube (load addr:$dst), GR32:$src2), addr:$dst)]>;
- def SBB8mi : Ii32<0x80, MRM3m, (outs), (ins i8mem:$dst, i8imm:$src2),
- "sbb{b}\t{$src2, $dst|$dst, $src2}",
+ def SBB8mi : Ii8<0x80, MRM3m, (outs), (ins i8mem:$dst, i8imm:$src2),
+ "sbb{b}\t{$src2, $dst|$dst, $src2}",
[(store (sube (loadi8 addr:$dst), imm:$src2), addr:$dst)]>;
def SBB16mi : Ii16<0x81, MRM3m, (outs), (ins i16mem:$dst, i16imm:$src2),
"sbb{w}\t{$src2, $dst|$dst, $src2}",
diff --git a/test/MC/AsmParser/X86/x86_32-encoding.s b/test/MC/AsmParser/X86/x86_32-encoding.s
index 3afdccaf95..5161527ff0 100644
--- a/test/MC/AsmParser/X86/x86_32-encoding.s
+++ b/test/MC/AsmParser/X86/x86_32-encoding.s
@@ -1,5 +1,8 @@
// RUN: llvm-mc -triple i386-unknown-unknown %s -show-encoding | FileCheck %s
fisttpl 3735928559(%ebx,%ecx,8)
-
# CHECK: encoding: [0xdb,0x8c,0xcb,0xef,0xbe,0xad,0xde]
+
+sbbb $0xfe,0xdeadbeef(%ebx,%ecx,8)
+
+# CHECK: encoding: [0x80,0x9c,0xcb,0xef,0xbe,0xad,0xde,0xfe] \ No newline at end of file