diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2003-06-06 03:35:37 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2003-06-06 03:35:37 +0000 |
commit | 3339459e48def88347aa7cb6545d2c579489bcb3 (patch) | |
tree | 843ccd4b0af8117dcd640bfd870967f99708729c /lib | |
parent | 82c9e55913fae5da1402d75a70e6ee701a7bb926 (diff) | |
download | external_llvm-3339459e48def88347aa7cb6545d2c579489bcb3.zip external_llvm-3339459e48def88347aa7cb6545d2c579489bcb3.tar.gz external_llvm-3339459e48def88347aa7cb6545d2c579489bcb3.tar.bz2 |
* If a global is not a function, just ask the MachineCodeEmitter for the addr
* Do not block a print statement with a DEBUG() guard if we're going to abort()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6645 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/SparcV9/SparcV9CodeEmitter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/SparcV9/SparcV9CodeEmitter.cpp b/lib/Target/SparcV9/SparcV9CodeEmitter.cpp index b1e260d..ee6d2f3 100644 --- a/lib/Target/SparcV9/SparcV9CodeEmitter.cpp +++ b/lib/Target/SparcV9/SparcV9CodeEmitter.cpp @@ -404,7 +404,7 @@ int64_t SparcV9CodeEmitter::getMachineOpValue(MachineInstr &MI, // or things that get fixed up later by the JIT. if (MO.isVirtualRegister()) { - DEBUG(std::cerr << "ERROR: virtual register found in machine code.\n"); + std::cerr << "ERROR: virtual register found in machine code.\n"; abort(); } else if (MO.isPCRelativeDisp()) { DEBUG(std::cerr << "PCRelativeDisp: "); @@ -418,7 +418,7 @@ int64_t SparcV9CodeEmitter::getMachineOpValue(MachineInstr &MI, rv = (int64_t)MCE.getConstantPoolEntryAddress(ConstantMap[C]); DEBUG(std::cerr << "const: 0x" << std::hex << rv << "\n"); } else { - DEBUG(std::cerr << "ERROR: constant not in map:" << MO << "\n"); + std::cerr << "ERROR: constant not in map:" << MO << "\n"; abort(); } } else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) { @@ -444,7 +444,7 @@ int64_t SparcV9CodeEmitter::getMachineOpValue(MachineInstr &MI, } } else { DEBUG(std::cerr << "not a function: " << *GV << "\n"); - abort(); + rv = (int64_t)MCE.getGlobalValueAddress(GV); } // The real target of the call is Addr = PC + (rv * 4) // So undo that: give the instruction (Addr - PC) / 4 |