mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-05 18:28:29 +00:00
Add support for llvm.setjmp and longjmp. Only 3 SingleSource/UnitTests fail now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19404 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
906b20a1d7
commit
64e14b1679
@ -569,6 +569,7 @@ void SelectionDAGLowering::visitStore(StoreInst &I) {
|
||||
}
|
||||
|
||||
void SelectionDAGLowering::visitCall(CallInst &I) {
|
||||
const char *RenameFn = 0;
|
||||
if (Function *F = I.getCalledFunction())
|
||||
switch (F->getIntrinsicID()) {
|
||||
case 0: break; // Not an intrinsic.
|
||||
@ -584,6 +585,8 @@ void SelectionDAGLowering::visitCall(CallInst &I) {
|
||||
// readport, writeport, readio, writeio
|
||||
assert(0 && "This intrinsic is not implemented yet!");
|
||||
return;
|
||||
case Intrinsic::setjmp: RenameFn = "setjmp"; break;
|
||||
case Intrinsic::longjmp: RenameFn = "longjmp"; break;
|
||||
case Intrinsic::memcpy: visitMemCpy(I); return;
|
||||
case Intrinsic::memset: visitMemSet(I); return;
|
||||
case Intrinsic::memmove: visitMemMove(I); return;
|
||||
@ -594,7 +597,11 @@ void SelectionDAGLowering::visitCall(CallInst &I) {
|
||||
return;
|
||||
}
|
||||
|
||||
SDOperand Callee = getValue(I.getOperand(0));
|
||||
SDOperand Callee;
|
||||
if (!RenameFn)
|
||||
Callee = getValue(I.getOperand(0));
|
||||
else
|
||||
Callee = DAG.getExternalSymbol(RenameFn, TLI.getPointerTy());
|
||||
std::vector<std::pair<SDOperand, const Type*> > Args;
|
||||
|
||||
for (unsigned i = 1, e = I.getNumOperands(); i != e; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user