diff options
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcV9CodeEmitter.h')
| -rw-r--r-- | llvm/lib/Target/Sparc/SparcV9CodeEmitter.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/llvm/lib/Target/Sparc/SparcV9CodeEmitter.h b/llvm/lib/Target/Sparc/SparcV9CodeEmitter.h index 6680a9c7fc9..15cb13ccd41 100644 --- a/llvm/lib/Target/Sparc/SparcV9CodeEmitter.h +++ b/llvm/lib/Target/Sparc/SparcV9CodeEmitter.h @@ -16,8 +16,8 @@ class MachineInstr; class MachineOperand; class SparcV9CodeEmitter : public MachineFunctionPass { - MachineCodeEmitter *MCE; - TargetMachine *TM; + TargetMachine &TM; + MachineCodeEmitter &MCE; BasicBlock *currBB; // Tracks which instruction references which BasicBlock @@ -25,16 +25,17 @@ class SparcV9CodeEmitter : public MachineFunctionPass { std::pair<unsigned*,MachineInstr*> > > BBRefs; // Tracks where each BasicBlock starts std::map<BasicBlock*, long> BBLocations; + // Tracks locations of Constants which are laid out in memory (e.g. FP) - std::map<const Constant*, void*> ConstantMap; + // But we also need to map Constants to ConstantPool indices + std::map<const Constant*, unsigned> ConstantMap; public: - SparcV9CodeEmitter(TargetMachine *tm, MachineCodeEmitter &M) { - MCE = &M; - TM = tm; - } + SparcV9CodeEmitter(TargetMachine &T, MachineCodeEmitter &M); + ~SparcV9CodeEmitter(); bool runOnMachineFunction(MachineFunction &F); + void emitWord(unsigned Val); /// Function generated by the CodeEmitterGenerator using TableGen /// @@ -43,16 +44,9 @@ public: private: int64_t getMachineOpValue(MachineInstr &MI, MachineOperand &MO); unsigned getValueBit(int64_t Val, unsigned bit); - - void emitConstant(unsigned Val, unsigned Size); - void emitBasicBlock(MachineBasicBlock &MBB); - void emitInstruction(MachineInstr &MI); - - void* convertAddress(intptr_t Addr, bool isPCRelative); void* getGlobalAddress(GlobalValue *V, MachineInstr &MI, bool isPCRelative); - }; #endif |

