diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2004-12-03 06:57:14 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-12-03 06:57:14 +0000 |
commit | 1d656455829c491aba63b7101e0a5207370aefb9 (patch) | |
tree | fe84168b00cf209b2e7907bfcb2b6fc496ea6a76 | |
parent | 776b80503f64b7fe1db163ce2da5a6e495383261 (diff) | |
download | external_llvm-1d656455829c491aba63b7101e0a5207370aefb9.zip external_llvm-1d656455829c491aba63b7101e0a5207370aefb9.tar.gz external_llvm-1d656455829c491aba63b7101e0a5207370aefb9.tar.bz2 |
This code rotted - change it to call abort() until someone wants
to rewrite this to use relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18453 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/Sparc/SparcV8CodeEmitter.cpp | 28 | ||||
-rw-r--r-- | lib/Target/SparcV8/SparcV8CodeEmitter.cpp | 28 |
2 files changed, 4 insertions, 52 deletions
diff --git a/lib/Target/Sparc/SparcV8CodeEmitter.cpp b/lib/Target/Sparc/SparcV8CodeEmitter.cpp index 2e43c43..76c854b 100644 --- a/lib/Target/Sparc/SparcV8CodeEmitter.cpp +++ b/lib/Target/Sparc/SparcV8CodeEmitter.cpp @@ -140,32 +140,8 @@ int64_t SparcV8CodeEmitter::getMachineOpValue(MachineInstr &MI, rv = MO.getImmedValue(); } else if (MO.isGlobalAddress()) { GlobalValue *GV = MO.getGlobal(); - if (MO.isPCRelative()) { // Global variable reference - if (void *Addr = (void*)(intptr_t)MCE.getGlobalValueAddress(GV)) { - intptr_t CurrPC = MCE.getCurrentPCValue(); - return (int64_t) (((long)Addr - (long)CurrPC) >> 2); - } else { - std::cerr << "Unhandled pc-relative global value: " << GV << "\n"; - abort(); - } - } else { // Function reference - if (!(rv = (intptr_t)MCE.getGlobalValueAddress(GV))) { - if (Function *F = dyn_cast<Function>(GV)) { - std::cerr << "SparcV8CodeEmitter error: no lazy fn resolution yet!\n"; - abort(); -#if 0 - // Function has not yet been code generated! - TheJITResolver->addFunctionReference(MCE.getCurrentPCValue(), - cast<Function>(GV)); - // Delayed resolution... - return (intptr_t)TheJITResolver->getLazyResolver(cast<Function>(GV)); -#endif - } else { - std::cerr << "Unhandled global value: " << GV << "\n"; - abort(); - } - } - } + std::cerr << "Unhandled global value: " << GV << "\n"; + abort(); } else if (MO.isMachineBasicBlock()) { const BasicBlock *BB = MO.getMachineBasicBlock()->getBasicBlock(); unsigned* CurrPC = (unsigned*)(intptr_t)MCE.getCurrentPCValue(); diff --git a/lib/Target/SparcV8/SparcV8CodeEmitter.cpp b/lib/Target/SparcV8/SparcV8CodeEmitter.cpp index 2e43c43..76c854b 100644 --- a/lib/Target/SparcV8/SparcV8CodeEmitter.cpp +++ b/lib/Target/SparcV8/SparcV8CodeEmitter.cpp @@ -140,32 +140,8 @@ int64_t SparcV8CodeEmitter::getMachineOpValue(MachineInstr &MI, rv = MO.getImmedValue(); } else if (MO.isGlobalAddress()) { GlobalValue *GV = MO.getGlobal(); - if (MO.isPCRelative()) { // Global variable reference - if (void *Addr = (void*)(intptr_t)MCE.getGlobalValueAddress(GV)) { - intptr_t CurrPC = MCE.getCurrentPCValue(); - return (int64_t) (((long)Addr - (long)CurrPC) >> 2); - } else { - std::cerr << "Unhandled pc-relative global value: " << GV << "\n"; - abort(); - } - } else { // Function reference - if (!(rv = (intptr_t)MCE.getGlobalValueAddress(GV))) { - if (Function *F = dyn_cast<Function>(GV)) { - std::cerr << "SparcV8CodeEmitter error: no lazy fn resolution yet!\n"; - abort(); -#if 0 - // Function has not yet been code generated! - TheJITResolver->addFunctionReference(MCE.getCurrentPCValue(), - cast<Function>(GV)); - // Delayed resolution... - return (intptr_t)TheJITResolver->getLazyResolver(cast<Function>(GV)); -#endif - } else { - std::cerr << "Unhandled global value: " << GV << "\n"; - abort(); - } - } - } + std::cerr << "Unhandled global value: " << GV << "\n"; + abort(); } else if (MO.isMachineBasicBlock()) { const BasicBlock *BB = MO.getMachineBasicBlock()->getBasicBlock(); unsigned* CurrPC = (unsigned*)(intptr_t)MCE.getCurrentPCValue(); |