From 5af763cb2ad96f557f88acdb11a710e7c7256800 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 11 Oct 2013 19:05:08 +0000 Subject: [PATCH] Mips: Disassemble sign-extended 64 bit immediates properly. This doesn't change the meaning of the output, but makes look right. PR17539. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192483 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Mips/MipsInstrInfo.td | 4 +++- test/MC/Disassembler/Mips/mips64.txt | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Target/Mips/MipsInstrInfo.td b/lib/Target/Mips/MipsInstrInfo.td index cdc1bae777b..c7487000c41 100644 --- a/lib/Target/Mips/MipsInstrInfo.td +++ b/lib/Target/Mips/MipsInstrInfo.td @@ -262,7 +262,9 @@ def uimm20 : Operand { def uimm10 : Operand { } -def simm16_64 : Operand; +def simm16_64 : Operand { + let DecoderMethod = "DecodeSimm16"; +} // Unsigned Operand def uimm5 : Operand { diff --git a/test/MC/Disassembler/Mips/mips64.txt b/test/MC/Disassembler/Mips/mips64.txt index 2ccef834e87..f3d2d100cae 100644 --- a/test/MC/Disassembler/Mips/mips64.txt +++ b/test/MC/Disassembler/Mips/mips64.txt @@ -2,6 +2,9 @@ # CHECK: daddiu $11, $26, 31949 0x67 0x4b 0x7c 0xcd +# CHECK: daddiu $sp, $sp, -32 +0x67 0xbd 0xff 0xe0 + # CHECK: daddu $26, $1, $11 0x00 0x2b 0xd0 0x2d