summaryrefslogtreecommitdiff
path: root/lib/Target/SystemZ/Disassembler
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-11-13 16:57:53 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-11-13 16:57:53 +0000
commit541c5de2fb57b2f459f0ec49f33a0ecce3532acd (patch)
tree33f14bf5f3dc7b3198a668625c93ff35076acead /lib/Target/SystemZ/Disassembler
parent1a362619f8f74267776a93f101ef32b69b53f5b3 (diff)
downloadllvm-541c5de2fb57b2f459f0ec49f33a0ecce3532acd.tar.gz
llvm-541c5de2fb57b2f459f0ec49f33a0ecce3532acd.tar.bz2
llvm-541c5de2fb57b2f459f0ec49f33a0ecce3532acd.tar.xz
[SystemZ] Add the general form of BCR
At the moment this is just the MC support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194585 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ/Disassembler')
-rw-r--r--lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp b/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp
index fc7fbf98f5..fc3c38d2f3 100644
--- a/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp
+++ b/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp
@@ -48,14 +48,11 @@ extern "C" void LLVMInitializeSystemZDisassembler() {
}
static DecodeStatus decodeRegisterClass(MCInst &Inst, uint64_t RegNo,
- const unsigned *Regs,
- bool isAddress = false) {
+ const unsigned *Regs) {
assert(RegNo < 16 && "Invalid register");
- if (!isAddress || RegNo) {
- RegNo = Regs[RegNo];
- if (RegNo == 0)
- return MCDisassembler::Fail;
- }
+ RegNo = Regs[RegNo];
+ if (RegNo == 0)
+ return MCDisassembler::Fail;
Inst.addOperand(MCOperand::CreateReg(RegNo));
return MCDisassembler::Success;
}
@@ -87,7 +84,7 @@ static DecodeStatus DecodeGR128BitRegisterClass(MCInst &Inst, uint64_t RegNo,
static DecodeStatus DecodeADDR64BitRegisterClass(MCInst &Inst, uint64_t RegNo,
uint64_t Address,
const void *Decoder) {
- return decodeRegisterClass(Inst, RegNo, SystemZMC::GR64Regs, true);
+ return decodeRegisterClass(Inst, RegNo, SystemZMC::GR64Regs);
}
static DecodeStatus DecodeFP32BitRegisterClass(MCInst &Inst, uint64_t RegNo,