[LoongArch] Fix typo that SP should be R3 but not R2
This commit is contained in:
parent
64aff3632f
commit
dd018b96d4
|
|
@ -59,7 +59,8 @@ static MCAsmInfo *createLoongArchMCAsmInfo(const MCRegisterInfo &MRI,
|
||||||
const MCTargetOptions &Options) {
|
const MCTargetOptions &Options) {
|
||||||
MCAsmInfo *MAI = new LoongArchMCAsmInfo(TT);
|
MCAsmInfo *MAI = new LoongArchMCAsmInfo(TT);
|
||||||
|
|
||||||
MCRegister SP = MRI.getDwarfRegNum(LoongArch::R2, true);
|
// Initial state of the frame pointer is sp(r3).
|
||||||
|
MCRegister SP = MRI.getDwarfRegNum(LoongArch::R3, true);
|
||||||
MCCFIInstruction Inst = MCCFIInstruction::cfiDefCfa(nullptr, SP, 0);
|
MCCFIInstruction Inst = MCCFIInstruction::cfiDefCfa(nullptr, SP, 0);
|
||||||
MAI->addInitialFrameState(Inst);
|
MAI->addInitialFrameState(Inst);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue