mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
[Orc] Move delta-handling for trampoline sizes into the resolver block.
This is the first step towards adding a target-independent callback handler API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233049 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -56,7 +56,7 @@ public:
|
||||
// Moving the trampoline ID back to the available list first means there's at
|
||||
// least one available trampoline if the compile action triggers a request for
|
||||
// a new one.
|
||||
AvailableTrampolines.push_back(I->first - TargetT::CallSize);
|
||||
AvailableTrampolines.push_back(I->first);
|
||||
auto CallbackHandler = std::move(I->second);
|
||||
ActiveTrampolines.erase(I);
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
CompileCallbackInfo getCompileCallback(FunctionType &FT) {
|
||||
TargetAddress TrampolineAddr = getAvailableTrampolineAddr(FT.getContext());
|
||||
auto &CallbackHandler =
|
||||
this->ActiveTrampolines[TrampolineAddr + TargetT::CallSize];
|
||||
this->ActiveTrampolines[TrampolineAddr];
|
||||
Constant *AddrIntVal =
|
||||
ConstantInt::get(Type::getInt64Ty(FT.getContext()), TrampolineAddr);
|
||||
Constant *AddrPtrVal =
|
||||
|
||||
@@ -32,8 +32,6 @@ public:
|
||||
/// @brief Get a label name from the given index.
|
||||
typedef std::function<std::string(unsigned)> LabelNameFtor;
|
||||
|
||||
static const unsigned CallSize = 6;
|
||||
|
||||
/// @brief Insert the requested number of trampolines into the given module.
|
||||
/// @param M Module to insert the call block into.
|
||||
/// @param NumCalls Number of calls to create in the call block.
|
||||
|
||||
Reference in New Issue
Block a user