mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
[Sparc] Add initial implementation of MC Code emitter for sparc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198533 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -72,6 +72,11 @@ private:
|
||||
unsigned getMachineOpValue(const MachineInstr &MI,
|
||||
const MachineOperand &MO) const;
|
||||
|
||||
unsigned getCallTargetOpValue(const MachineInstr &MI,
|
||||
unsigned) const;
|
||||
unsigned getBranchTargetOpValue(const MachineInstr &MI,
|
||||
unsigned) const;
|
||||
|
||||
void emitWord(unsigned Word);
|
||||
|
||||
unsigned getRelocation(const MachineInstr &MI,
|
||||
@ -181,6 +186,18 @@ unsigned SparcCodeEmitter::getMachineOpValue(const MachineInstr &MI,
|
||||
llvm_unreachable("Unable to encode MachineOperand!");
|
||||
return 0;
|
||||
}
|
||||
unsigned SparcCodeEmitter::getCallTargetOpValue(const MachineInstr &MI,
|
||||
unsigned opIdx) const {
|
||||
const MachineOperand MO = MI.getOperand(opIdx);
|
||||
return getMachineOpValue(MI, MO);
|
||||
}
|
||||
|
||||
unsigned SparcCodeEmitter::getBranchTargetOpValue(const MachineInstr &MI,
|
||||
unsigned opIdx) const {
|
||||
const MachineOperand MO = MI.getOperand(opIdx);
|
||||
return getMachineOpValue(MI, MO);
|
||||
}
|
||||
|
||||
unsigned SparcCodeEmitter::getRelocation(const MachineInstr &MI,
|
||||
const MachineOperand &MO) const {
|
||||
|
||||
|
Reference in New Issue
Block a user