mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
Revert 93499. After discussion with Chris we agreed
FrameIndexes should be lowered, but the same way as everything else (target dependent) rather than in a special hacked way. The lowering needs to be done for eventual purposes of Dwarf generation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93530 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -25,7 +25,6 @@
|
|||||||
#include "llvm/Support/FormattedStream.h"
|
#include "llvm/Support/FormattedStream.h"
|
||||||
#include "llvm/Support/Mangler.h"
|
#include "llvm/Support/Mangler.h"
|
||||||
#include "llvm/ADT/SmallString.h"
|
#include "llvm/ADT/SmallString.h"
|
||||||
#include "llvm/Analysis/DebugInfo.h"
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
|
||||||
@ -421,25 +420,6 @@ void X86AsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) {
|
|||||||
case TargetInstrInfo::GC_LABEL:
|
case TargetInstrInfo::GC_LABEL:
|
||||||
printLabel(MI);
|
printLabel(MI);
|
||||||
return;
|
return;
|
||||||
case TargetInstrInfo::DEBUG_VALUE: {
|
|
||||||
if (!VerboseAsm)
|
|
||||||
return;
|
|
||||||
O << '\t' << MAI->getCommentString() << "DEBUG_VALUE: ";
|
|
||||||
// cast away const; DIetc do not take const operands for some reason
|
|
||||||
DIVariable V((MDNode*)(MI->getOperand(2).getMetadata()));
|
|
||||||
O << V.getName();
|
|
||||||
O << " <- ";
|
|
||||||
if (MI->getOperand(0).getType()==MachineOperand::MO_Register)
|
|
||||||
printOperand(MI, 0);
|
|
||||||
else {
|
|
||||||
assert(MI->getOperand(0).getType()==MachineOperand::MO_Immediate);
|
|
||||||
int64_t imm = MI->getOperand(0).getImm();
|
|
||||||
O << '[' << ((imm<0) ? "EBP" : "ESP+") << imm << ']';
|
|
||||||
}
|
|
||||||
O << "+";
|
|
||||||
printOperand(MI, 1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
case TargetInstrInfo::INLINEASM:
|
case TargetInstrInfo::INLINEASM:
|
||||||
printInlineAsm(MI);
|
printInlineAsm(MI);
|
||||||
return;
|
return;
|
||||||
|
@ -591,15 +591,6 @@ X86RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
|
|||||||
int FrameIndex = MI.getOperand(i).getIndex();
|
int FrameIndex = MI.getOperand(i).getIndex();
|
||||||
unsigned BasePtr;
|
unsigned BasePtr;
|
||||||
|
|
||||||
// DEBUG_VALUE has a special representation, and is only robust enough to
|
|
||||||
// represent SP(or BP) +- offset addressing modes. We rewrite the
|
|
||||||
// FrameIndex to be a constant; implicitly positive constants are relative
|
|
||||||
// to ESP and negative ones to EBP.
|
|
||||||
if (MI.getOpcode()==TargetInstrInfo::DEBUG_VALUE) {
|
|
||||||
MI.getOperand(i).ChangeToImmediate(getFrameIndexOffset(MF, FrameIndex));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (needsStackRealignment(MF))
|
if (needsStackRealignment(MF))
|
||||||
BasePtr = (FrameIndex < 0 ? FramePtr : StackPtr);
|
BasePtr = (FrameIndex < 0 ? FramePtr : StackPtr);
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user