diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-03-13 22:49:39 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-03-13 22:49:39 +0000 |
commit | 859c9dc867960c88db326d8ee16870a518457ec0 (patch) | |
tree | e04c31f32cfa9eac47276dcbd72b7ca10f3b86f6 | |
parent | 5691e74f97fc8cad671d50450ad986347875e1d1 (diff) |
X86: Fix ADD64i32 encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98457 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86Instr64bit.td | 4 | ||||
-rw-r--r-- | test/MC/AsmParser/X86/x86_64-new-encoder.s | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/X86/X86Instr64bit.td b/lib/Target/X86/X86Instr64bit.td index 9824b2e3c2..ed9eb5798a 100644 --- a/lib/Target/X86/X86Instr64bit.td +++ b/lib/Target/X86/X86Instr64bit.td @@ -464,8 +464,8 @@ let neverHasSideEffects = 1 in { let Defs = [EFLAGS] in { -def ADD64i32 : RI<0x05, RawFrm, (outs), (ins i32imm:$src), - "add{q}\t{$src, %rax|%rax, $src}", []>; +def ADD64i32 : RIi32<0x05, RawFrm, (outs), (ins i32imm:$src), + "add{q}\t{$src, %rax|%rax, $src}", []>; let isTwoAddress = 1 in { let isConvertibleToThreeAddress = 1 in { diff --git a/test/MC/AsmParser/X86/x86_64-new-encoder.s b/test/MC/AsmParser/X86/x86_64-new-encoder.s index 56ec0b3899..797558a81e 100644 --- a/test/MC/AsmParser/X86/x86_64-new-encoder.s +++ b/test/MC/AsmParser/X86/x86_64-new-encoder.s @@ -24,3 +24,6 @@ movq $12, foo(%rip) // CHECK: movq $12, foo(%rip) // CHECK: encoding: [0x48,0xc7,0x05,A,A,A,A,0x0c,0x00,0x00,0x00] // CHECK: fixup A - offset: 3, value: foo-8, kind: reloc_riprel_4byte + +// CHECK: addq $-424, %rax # encoding: [0x48,0x05,0x58,0xfe,0xff,0xff] +addq $-424, %rax |