summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-04-30 13:14:14 +0000
committerTim Northover <tnorthover@apple.com>2014-04-30 13:14:14 +0000
commitd53a671354a3bb4cd218513978e53193c7b6773e (patch)
tree4b3c0d0cd0f54a27fec779264a8f3021c086f4ac /llvm/lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp
parent20ad359b77767cf588f7025271bad5ca8a0bd82e (diff)
downloadbcm5719-llvm-d53a671354a3bb4cd218513978e53193c7b6773e.tar.gz
bcm5719-llvm-d53a671354a3bb4cd218513978e53193c7b6773e.zip
AArch64/ARM64: expunge CPSR from the sources
AArch64 does not have a CPSR register in the same way that AArch32 does. Most of its compiler-relevant roles have been taken over by the more specific NZCV register (representing just the flags set by normal instructions). Its system control functions still remain, but are now under the pseudo-register referred to as "PSTATE". They're accessed via various MRS & MSR instructions described in the reference manual. llvm-svn: 207645
Diffstat (limited to 'llvm/lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp')
-rw-r--r--llvm/lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/llvm/lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp b/llvm/lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp
index 2ada4a4cf9e..0fc559c5cf7 100644
--- a/llvm/lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp
+++ b/llvm/lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp
@@ -137,9 +137,10 @@ static DecodeStatus DecodeBaseAddSubImm(llvm::MCInst &Inst, uint32_t insn,
static DecodeStatus DecodeUnconditionalBranch(llvm::MCInst &Inst, uint32_t insn,
uint64_t Address,
const void *Decoder);
-static DecodeStatus DecodeSystemCPSRInstruction(llvm::MCInst &Inst,
- uint32_t insn, uint64_t Address,
- const void *Decoder);
+static DecodeStatus DecodeSystemPStateInstruction(llvm::MCInst &Inst,
+ uint32_t insn,
+ uint64_t Address,
+ const void *Decoder);
static DecodeStatus DecodeTestAndBranch(llvm::MCInst &Inst, uint32_t insn,
uint64_t Address, const void *Decoder);
static DecodeStatus DecodeSIMDLdStPost(llvm::MCInst &Inst, uint32_t insn,
@@ -1408,20 +1409,20 @@ static DecodeStatus DecodeUnconditionalBranch(llvm::MCInst &Inst, uint32_t insn,
return Success;
}
-static DecodeStatus DecodeSystemCPSRInstruction(llvm::MCInst &Inst,
- uint32_t insn, uint64_t Addr,
- const void *Decoder) {
+static DecodeStatus DecodeSystemPStateInstruction(llvm::MCInst &Inst,
+ uint32_t insn, uint64_t Addr,
+ const void *Decoder) {
uint64_t op1 = fieldFromInstruction(insn, 16, 3);
uint64_t op2 = fieldFromInstruction(insn, 5, 3);
uint64_t crm = fieldFromInstruction(insn, 8, 4);
- uint64_t cpsr_field = (op1 << 3) | op2;
+ uint64_t pstate_field = (op1 << 3) | op2;
- Inst.addOperand(MCOperand::CreateImm(cpsr_field));
+ Inst.addOperand(MCOperand::CreateImm(pstate_field));
Inst.addOperand(MCOperand::CreateImm(crm));
bool ValidNamed;
- (void)ARM64PState::PStateMapper().toString(cpsr_field, ValidNamed);
+ (void)ARM64PState::PStateMapper().toString(pstate_field, ValidNamed);
return ValidNamed ? Success : Fail;
}
OpenPOWER on IntegriCloud