| Index: src/IceTargetLoweringMIPS32.cpp
|
| diff --git a/src/IceTargetLoweringMIPS32.cpp b/src/IceTargetLoweringMIPS32.cpp
|
| index cca3962750704964c7742990968db0570a809dbf..a15241f76d31c649eb8113605d148325d177f279 100644
|
| --- a/src/IceTargetLoweringMIPS32.cpp
|
| +++ b/src/IceTargetLoweringMIPS32.cpp
|
| @@ -4428,11 +4428,18 @@ void TargetMIPS32::lowerIntrinsicCall(const InstIntrinsicCall *Instr) {
|
| return;
|
| }
|
| case Intrinsics::Stacksave: {
|
| - UnimplementedLoweringError(this, Instr);
|
| + Variable *SP = getPhysicalRegister(RegMIPS32::Reg_SP);
|
| + _mov(Dest, SP);
|
| return;
|
| }
|
| case Intrinsics::Stackrestore: {
|
| - UnimplementedLoweringError(this, Instr);
|
| + if (getFlags().getUseSandboxing()) {
|
| + UnimplementedLoweringError(this, Instr);
|
| + return;
|
| + }
|
| + Variable *Val = legalizeToReg(Instr->getArg(0));
|
| + Variable *SP = getPhysicalRegister(RegMIPS32::Reg_SP);
|
| + _mov_redefined(SP, Val);
|
| return;
|
| }
|
| case Intrinsics::Trap: {
|
|
|