1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

r76102 added the MachineCodeEmitter::processDebugLoc call and called it from

the X86 Emitter.  This patch extends that to the rest of the targets that can
write to a MachineCodeEmitter: ARM, Alpha, and PPC.

llvm-svn: 76211
This commit is contained in:
Jeffrey Yasskin 2009-07-17 18:49:39 +00:00
parent cfd362eb0e
commit 1669f312b5
3 changed files with 4 additions and 6 deletions

View File

@ -337,6 +337,8 @@ template<class CodeEmitter>
void Emitter<CodeEmitter>::emitInstruction(const MachineInstr &MI) {
DOUT << "JIT: " << (void*)MCE.getCurrentPCValue() << ":\t" << MI;
MCE.processDebugLoc(MI.getDebugLoc());
NumEmitted++; // Keep track of the # of mi's emitted
switch (MI.getDesc().TSFlags & ARMII::FormMask) {
default: {
@ -1422,4 +1424,3 @@ void Emitter<CodeEmitter>::emitMiscInstruction(const MachineInstr &MI) {
}
#include "ARMGenCodeEmitter.inc"

View File

@ -72,8 +72,6 @@ namespace {
return "Alpha Machine Code Emitter";
}
void emitInstruction(const MachineInstr &MI);
private:
void emitBasicBlock(MachineBasicBlock &MBB);
};
@ -118,6 +116,7 @@ void Emitter<CodeEmitter>::emitBasicBlock(MachineBasicBlock &MBB) {
for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end();
I != E; ++I) {
const MachineInstr &MI = *I;
MCE.processDebugLoc(MI.getDebugLoc());
switch(MI.getOpcode()) {
default:
MCE.emitWordLE(getBinaryCodeForInstr(*I));
@ -245,5 +244,3 @@ unsigned AlphaCodeEmitter::getMachineOpValue(const MachineInstr &MI,
}
#include "AlphaGenCodeEmitter.inc"

View File

@ -133,6 +133,7 @@ void Emitter<CodeEmitter>::emitBasicBlock(MachineBasicBlock &MBB) {
for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end(); I != E; ++I){
const MachineInstr &MI = *I;
MCE.processDebugLoc(MI.getDebugLoc());
switch (MI.getOpcode()) {
default:
MCE.emitWordBE(getBinaryCodeForInstr(MI));
@ -275,4 +276,3 @@ unsigned PPCCodeEmitter::getMachineOpValue(const MachineInstr &MI,
}
#include "PPCGenCodeEmitter.inc"