mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 03:32:10 +00:00
Add support for the returnaddress and frameaddress intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11433 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4a6f9a40b7
commit
fe1554a080
@ -1157,6 +1157,8 @@ void CWriter::lowerIntrinsics(Module &M) {
|
|||||||
case Intrinsic::va_start:
|
case Intrinsic::va_start:
|
||||||
case Intrinsic::va_copy:
|
case Intrinsic::va_copy:
|
||||||
case Intrinsic::va_end:
|
case Intrinsic::va_end:
|
||||||
|
case Intrinsic::returnaddress:
|
||||||
|
case Intrinsic::frameaddress:
|
||||||
// We directly implement these intrinsics
|
// We directly implement these intrinsics
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -1205,6 +1207,16 @@ void CWriter::visitCallInst(CallInst &I) {
|
|||||||
writeOperand(I.getOperand(1));
|
writeOperand(I.getOperand(1));
|
||||||
Out << ")";
|
Out << ")";
|
||||||
return;
|
return;
|
||||||
|
case Intrinsic::returnaddress:
|
||||||
|
Out << "__builtin_return_address(";
|
||||||
|
writeOperand(I.getOperand(1));
|
||||||
|
Out << ")";
|
||||||
|
return;
|
||||||
|
case Intrinsic::frameaddress:
|
||||||
|
Out << "__builtin_frame_address(";
|
||||||
|
writeOperand(I.getOperand(1));
|
||||||
|
Out << ")";
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
visitCallSite(&I);
|
visitCallSite(&I);
|
||||||
|
@ -1157,6 +1157,8 @@ void CWriter::lowerIntrinsics(Module &M) {
|
|||||||
case Intrinsic::va_start:
|
case Intrinsic::va_start:
|
||||||
case Intrinsic::va_copy:
|
case Intrinsic::va_copy:
|
||||||
case Intrinsic::va_end:
|
case Intrinsic::va_end:
|
||||||
|
case Intrinsic::returnaddress:
|
||||||
|
case Intrinsic::frameaddress:
|
||||||
// We directly implement these intrinsics
|
// We directly implement these intrinsics
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -1205,6 +1207,16 @@ void CWriter::visitCallInst(CallInst &I) {
|
|||||||
writeOperand(I.getOperand(1));
|
writeOperand(I.getOperand(1));
|
||||||
Out << ")";
|
Out << ")";
|
||||||
return;
|
return;
|
||||||
|
case Intrinsic::returnaddress:
|
||||||
|
Out << "__builtin_return_address(";
|
||||||
|
writeOperand(I.getOperand(1));
|
||||||
|
Out << ")";
|
||||||
|
return;
|
||||||
|
case Intrinsic::frameaddress:
|
||||||
|
Out << "__builtin_frame_address(";
|
||||||
|
writeOperand(I.getOperand(1));
|
||||||
|
Out << ")";
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
visitCallSite(&I);
|
visitCallSite(&I);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user