]> granicus.if.org Git - llvm/commit
[mips] Fix decoding of microMIPS JALX instruction
authorSimon Atanasyan <simon@atanasyan.com>
Mon, 9 Sep 2019 17:28:45 +0000 (17:28 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Mon, 9 Sep 2019 17:28:45 +0000 (17:28 +0000)
commitc77e934735772651445c1c98e1daa802bfdae615
treed87b4ab7bb519738c8852b3ef896dcc6ab71f66b
parent6d3a2c9e60de135a74bd91285a8f2ce212b0648a
[mips] Fix decoding of microMIPS JALX instruction

microMIPS jump and link exchange instruction stores a target in a
26-bits field. Despite other microMIPS JAL instructions these bits
are target address shifted right 2 bits [1]. The patch fixes the
JALX instruction decoding and uses 2-bit shift.

[1] MIPS Architecture for Programmers Volume II-B: The microMIPS32 Instruction Set

Differential Revision: https://reviews.llvm.org/D67320

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371428 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/Disassembler/MipsDisassembler.cpp
lib/Target/Mips/MicroMipsInstrInfo.td
test/MC/Disassembler/Mips/micromips32r3/valid-el.txt
test/MC/Disassembler/Mips/micromips32r3/valid.txt