mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-25 13:27:52 +00:00
The new ARM disassembler disassembles "bx lr" as a special BX_ret instruction so target specific analysis isn't needed anymore.
llvm-svn: 137151
This commit is contained in:
parent
2443a29f51
commit
ed2b147693
@ -165,11 +165,6 @@ namespace {
|
||||
class ARMMCInstrAnalysis : public MCInstrAnalysis {
|
||||
public:
|
||||
ARMMCInstrAnalysis(const MCInstrInfo *Info) : MCInstrAnalysis(Info) {}
|
||||
virtual bool isBranch(const MCInst &Inst) const {
|
||||
// Don't flag "bx lr" as a branch.
|
||||
return MCInstrAnalysis::isBranch(Inst) && (Inst.getOpcode() != ARM::BX ||
|
||||
Inst.getOperand(0).getReg() != ARM::LR);
|
||||
}
|
||||
|
||||
virtual bool isUnconditionalBranch(const MCInst &Inst) const {
|
||||
// BCCs with the "always" predicate are unconditional branches.
|
||||
@ -185,11 +180,6 @@ public:
|
||||
return MCInstrAnalysis::isConditionalBranch(Inst);
|
||||
}
|
||||
|
||||
virtual bool isReturn(const MCInst &Inst) const {
|
||||
// Recognize "bx lr" as return.
|
||||
return Inst.getOpcode() == ARM::BX && Inst.getOperand(0).getReg()==ARM::LR;
|
||||
}
|
||||
|
||||
uint64_t evaluateBranch(const MCInst &Inst, uint64_t Addr,
|
||||
uint64_t Size) const {
|
||||
// We only handle PCRel branches for now.
|
||||
|
Loading…
x
Reference in New Issue
Block a user