diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-09-02 06:51:36 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-09-02 06:51:36 +0000 |
commit | 34f3a962b028a18a622ca3604cc8ed3c76360936 (patch) | |
tree | b7e88c46ceb78327445e40d6a2fc4df977c164d4 /llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp | |
parent | ee29c9c2fc21dda0016343838e8730f413690a83 (diff) | |
download | bcm5719-llvm-34f3a962b028a18a622ca3604cc8ed3c76360936.tar.gz bcm5719-llvm-34f3a962b028a18a622ca3604cc8ed3c76360936.zip |
Change getBinaryCodeForInstr prototype. First operand MachineInstr& should be const. Make corresponding changes.
llvm-svn: 55623
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp b/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp index 2dfdda3cde6..3326cf7f16d 100644 --- a/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp +++ b/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp @@ -38,7 +38,7 @@ namespace { /// getMachineOpValue - evaluates the MachineOperand of a given MachineInstr /// - int getMachineOpValue(MachineInstr &MI, MachineOperand &MO); + unsigned getMachineOpValue(const MachineInstr &MI, const MachineOperand &MO); void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<MachineModuleInfo>(); @@ -68,7 +68,7 @@ namespace { /// CodeEmitterGenerator using TableGen, produces the binary encoding for /// machine instructions. /// - unsigned getBinaryCodeForInstr(MachineInstr &MI); + unsigned getBinaryCodeForInstr(const MachineInstr &MI); }; char PPCCodeEmitter::ID = 0; } @@ -100,10 +100,10 @@ void PPCCodeEmitter::emitBasicBlock(MachineBasicBlock &MBB) { MCE.StartMachineBasicBlock(&MBB); for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end(); I != E; ++I){ - MachineInstr &MI = *I; + const MachineInstr &MI = *I; switch (MI.getOpcode()) { default: - MCE.emitWordBE(getBinaryCodeForInstr(*I)); + MCE.emitWordBE(getBinaryCodeForInstr(MI)); break; case TargetInstrInfo::DBG_LABEL: case TargetInstrInfo::EH_LABEL: @@ -121,9 +121,10 @@ void PPCCodeEmitter::emitBasicBlock(MachineBasicBlock &MBB) { } } -int PPCCodeEmitter::getMachineOpValue(MachineInstr &MI, MachineOperand &MO) { +unsigned PPCCodeEmitter::getMachineOpValue(const MachineInstr &MI, + const MachineOperand &MO) { - intptr_t rv = 0; // Return value; defaults to 0 for unhandled cases + unsigned rv = 0; // Return value; defaults to 0 for unhandled cases // or things that get fixed up later by the JIT. if (MO.isRegister()) { rv = PPCRegisterInfo::getRegisterNumbering(MO.getReg()); |