mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
JumpTable support! What this represents is working asm and jit support for
x86 and ppc for 100% dense switch statements when relocations are non-PIC. This support will be extended and enhanced in the coming days to support PIC, and less dense forms of jump tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27947 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -56,6 +56,7 @@ namespace {
|
||||
{ return 0; }
|
||||
|
||||
uint64_t getConstantPoolEntryAddress(unsigned Num) { return 0; }
|
||||
uint64_t getJumpTableEntryAddress(unsigned Num) { return 0; }
|
||||
uint64_t getCurrentPCValue() { return 0; }
|
||||
uint64_t getCurrentPCOffset() { return 0; }
|
||||
};
|
||||
@@ -97,7 +98,14 @@ namespace {
|
||||
void emitConstantPool(MachineConstantPool *MCP) {
|
||||
MCE.emitConstantPool(MCP);
|
||||
}
|
||||
|
||||
void initJumpTableInfo(MachineJumpTableInfo *MJTI) {
|
||||
MCE.initJumpTableInfo(MJTI);
|
||||
}
|
||||
void emitJumpTableInfo(MachineJumpTableInfo *MJTI,
|
||||
std::map<MachineBasicBlock*,uint64_t> &MBBM) {
|
||||
MCE.emitJumpTableInfo(MJTI, MBBM);
|
||||
}
|
||||
|
||||
void startFunctionStub(unsigned StubSize) {
|
||||
MCE.startFunctionStub(StubSize);
|
||||
}
|
||||
@@ -146,7 +154,9 @@ namespace {
|
||||
uint64_t getConstantPoolEntryAddress(unsigned Num) {
|
||||
return MCE.getConstantPoolEntryAddress(Num);
|
||||
}
|
||||
|
||||
uint64_t getJumpTableEntryAddress(unsigned Num) {
|
||||
return MCE.getJumpTableEntryAddress(Num);
|
||||
}
|
||||
virtual unsigned char* allocateGlobal(unsigned size, unsigned alignment)
|
||||
{ return MCE.allocateGlobal(size, alignment); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user