mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-06 04:31:08 +00:00
one cannot allocate a global, until one is done initializing the global pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22568 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
88aad145a5
commit
2b3b89c28e
@ -91,17 +91,17 @@ JITMemoryManager::JITMemoryManager(bool useGOT) {
|
||||
ConstantBase = reinterpret_cast<unsigned char*>(ConstBlock.base());
|
||||
GlobalBase = reinterpret_cast<unsigned char*>(GVBlock.base());
|
||||
|
||||
//Allocate the GOT just like a global array
|
||||
GOTBase = NULL;
|
||||
if (useGOT)
|
||||
GOTBase = allocateGlobal(sizeof(void*) * 8192, 8);
|
||||
|
||||
// Allocate stubs backwards from the base, allocate functions forward
|
||||
// from the base.
|
||||
CurStubPtr = CurFunctionPtr = FunctionBase + 512*1024;// Use 512k for stubs
|
||||
|
||||
CurConstantPtr = ConstantBase + ConstBlock.size();
|
||||
CurGlobalPtr = GlobalBase + GVBlock.size();
|
||||
|
||||
//Allocate the GOT just like a global array
|
||||
GOTBase = NULL;
|
||||
if (useGOT)
|
||||
GOTBase = allocateGlobal(sizeof(void*) * 8192, 8);
|
||||
}
|
||||
|
||||
JITMemoryManager::~JITMemoryManager() {
|
||||
|
Loading…
Reference in New Issue
Block a user