Lines Matching defs:Thunk
517 Function *Thunk = Function::Create(X64Ty, GlobalValue::LinkOnceODRLinkage, 0,
519 Thunk->setCallingConv(CallingConv::ARM64EC_Thunk_X64);
520 Thunk->setSection(".wowthk$aa");
521 Thunk->setComdat(M->getOrInsertComdat(EntryThunkName));
523 Thunk->addFnAttr("frame-pointer", "all");
525 BasicBlock *BB = BasicBlock::Create(M->getContext(), "", Thunk);
534 (F->isVarArg() ? 5 : Thunk->arg_size()) - ThunkArgOffset;
540 Value *Arg = Thunk->getArg(i + ThunkArgOffset);
565 Thunk->addParamAttr(5, Attribute::InReg);
566 Value *Arg = Thunk->getArg(5);
575 Value *Callee = Thunk->getArg(0);
582 Thunk->addParamAttr(1, SRetAttr);
588 IRB.CreateStore(RetVal, IRB.CreateBitCast(Thunk->getArg(1), PtrTy));
604 return Thunk;
652 Function *Thunk = buildExitThunk(F->getFunctionType(), F->getAttributes());
655 {B.CreateBitCast(F, B.getPtrTy()), B.CreateBitCast(Thunk, B.getPtrTy())});
766 Function *Thunk = buildExitThunk(CB->getFunctionType(), CB->getAttributes());
770 B.CreateBitCast(Thunk, B.getPtrTy())},
881 Function *Thunk = buildPatchableThunk(A, FnsMap[A]);
882 ThunkMapping.push_back({Thunk, A, Arm64ECThunkType::GuestExit});
887 for (ThunkInfo &Thunk : ThunkMapping) {
889 {ConstantExpr::getBitCast(Thunk.Src, PtrTy),
890 ConstantExpr::getBitCast(Thunk.Dst, PtrTy),
891 ConstantInt::get(M->getContext(), APInt(32, uint8_t(Thunk.Kind)))}));