mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Add support for the returnaddress and frameaddress intrinsics
llvm-svn: 11433
This commit is contained in:
parent
7ab8db4907
commit
b8ecb673d1
@ -1157,6 +1157,8 @@ void CWriter::lowerIntrinsics(Module &M) {
|
||||
case Intrinsic::va_start:
|
||||
case Intrinsic::va_copy:
|
||||
case Intrinsic::va_end:
|
||||
case Intrinsic::returnaddress:
|
||||
case Intrinsic::frameaddress:
|
||||
// We directly implement these intrinsics
|
||||
break;
|
||||
default:
|
||||
@ -1205,6 +1207,16 @@ void CWriter::visitCallInst(CallInst &I) {
|
||||
writeOperand(I.getOperand(1));
|
||||
Out << ")";
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user