mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
XCore target: remove incorrect DebugLoc entries from prologue
Summary: This was causing the prologue_end to be incorrectly positioned. Differential Revision: http://reviews.llvm.org/D4122 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212318 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -373,7 +373,8 @@ void XCoreInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
|
||||
const TargetRegisterInfo *TRI) const
|
||||
{
|
||||
DebugLoc DL;
|
||||
if (I != MBB.end()) DL = I->getDebugLoc();
|
||||
if (I != MBB.end() && !I->isDebugValue())
|
||||
DL = I->getDebugLoc();
|
||||
MachineFunction *MF = MBB.getParent();
|
||||
const MachineFrameInfo &MFI = *MF->getFrameInfo();
|
||||
MachineMemOperand *MMO =
|
||||
@@ -395,7 +396,8 @@ void XCoreInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
|
||||
const TargetRegisterInfo *TRI) const
|
||||
{
|
||||
DebugLoc DL;
|
||||
if (I != MBB.end()) DL = I->getDebugLoc();
|
||||
if (I != MBB.end() && !I->isDebugValue())
|
||||
DL = I->getDebugLoc();
|
||||
MachineFunction *MF = MBB.getParent();
|
||||
const MachineFrameInfo &MFI = *MF->getFrameInfo();
|
||||
MachineMemOperand *MMO =
|
||||
@@ -440,7 +442,8 @@ MachineBasicBlock::iterator XCoreInstrInfo::loadImmediate(
|
||||
MachineBasicBlock::iterator MI,
|
||||
unsigned Reg, uint64_t Value) const {
|
||||
DebugLoc dl;
|
||||
if (MI != MBB.end()) dl = MI->getDebugLoc();
|
||||
if (MI != MBB.end() && !MI->isDebugValue())
|
||||
dl = MI->getDebugLoc();
|
||||
if (isImmMskBitp(Value)) {
|
||||
int N = Log2_32(Value) + 1;
|
||||
return BuildMI(MBB, MI, dl, get(XCore::MKMSK_rus), Reg).addImm(N);
|
||||
|
||||
Reference in New Issue
Block a user