mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
Moved definition of invertPPCBranchOpcode() into PowerPCInstrInfo class.
Patch by Nate Begeman. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15281 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
999d9cfde5
commit
8aebe9f96c
@ -14,8 +14,9 @@
|
|||||||
#ifndef POWERPCINSTRUCTIONINFO_H
|
#ifndef POWERPCINSTRUCTIONINFO_H
|
||||||
#define POWERPCINSTRUCTIONINFO_H
|
#define POWERPCINSTRUCTIONINFO_H
|
||||||
|
|
||||||
#include "llvm/Target/TargetInstrInfo.h"
|
#include "PowerPC.h"
|
||||||
#include "PowerPCRegisterInfo.h"
|
#include "PowerPCRegisterInfo.h"
|
||||||
|
#include "llvm/Target/TargetInstrInfo.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
@ -79,6 +80,18 @@ public:
|
|||||||
virtual bool isMoveInstr(const MachineInstr& MI,
|
virtual bool isMoveInstr(const MachineInstr& MI,
|
||||||
unsigned& sourceReg,
|
unsigned& sourceReg,
|
||||||
unsigned& destReg) const;
|
unsigned& destReg) const;
|
||||||
|
|
||||||
|
static unsigned invertPPCBranchOpcode(unsigned Opcode) {
|
||||||
|
switch (Opcode) {
|
||||||
|
default: assert(0 && "Unknown PPC32 branch opcode!");
|
||||||
|
case PPC32::BEQ: return PPC32::BNE;
|
||||||
|
case PPC32::BNE: return PPC32::BEQ;
|
||||||
|
case PPC32::BLT: return PPC32::BGE;
|
||||||
|
case PPC32::BGE: return PPC32::BLT;
|
||||||
|
case PPC32::BGT: return PPC32::BLE;
|
||||||
|
case PPC32::BLE: return PPC32::BGT;
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user