[mips] Fix encoding of BAL instruction. Also, fix assembler test case which
authorAkira Hatanaka <ahatanaka@mips.com>
Fri, 21 Dec 2012 23:13:59 +0000 (23:13 +0000)
committerAkira Hatanaka <ahatanaka@mips.com>
Fri, 21 Dec 2012 23:13:59 +0000 (23:13 +0000)
was not catching the error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170953 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Mips/MipsInstrInfo.td
test/MC/Mips/mips-jump-instructions.s

index cfbcf831415ec41abede19a707c74599b78a795d..6603dff05de3e5e6acb8fea0cb1b3137952923db 100644 (file)
@@ -859,7 +859,7 @@ def BGTZ    : CBranchZero<"bgtz", setgt, CPURegs>, BGEZ_FM<7, 0>;
 def BLEZ    : CBranchZero<"blez", setle, CPURegs>, BGEZ_FM<6, 0>;
 def BLTZ    : CBranchZero<"bltz", setlt, CPURegs>, BGEZ_FM<1, 0>;
 
-let rt = 0, rs = 0, isBranch = 1, isTerminator = 1, isBarrier = 1,
+let rt = 0x11, rs = 0, isBranch = 1, isTerminator = 1, isBarrier = 1,
     hasDelaySlot = 1, Defs = [RA] in
 def BAL_BR: FI<0x1, (outs), (ins brtarget:$imm16), "bal\t$imm16", [], IIBranch>;
 
index 998be418d2049cf4a836d7e76dafda8fce49a37d..58250f306e87980aa6f7f5108cdb83f15b6a5d7d 100644 (file)
@@ -23,7 +23,7 @@
 # CHECK:   nop                    # encoding: [0x00,0x00,0x00,0x00]
 # CHECK:   bne $9, $6, 1332       # encoding: [0x34,0x05,0x26,0x15]
 # CHECK:   nop                    # encoding: [0x00,0x00,0x00,0x00]
-# CHECK:   bal     1332           # encoding: [0x34,0x05,0x00,0x04]
+# CHECK:   bal     1332           # encoding: [0x34,0x05,0x11,0x04]
 # CHECK:   nop                    # encoding: [0x00,0x00,0x00,0x00]
          b 1332
          nop