[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp
Misha Brukman
brukman at cs.uiuc.edu
Thu Jun 5 22:36:01 PDT 2003
Changes in directory llvm/lib/Target/Sparc:
SparcV9CodeEmitter.cpp updated: 1.14 -> 1.15
---
Log message:
* 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()
---
Diffs of the changes:
Index: llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp
diff -u llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.14 llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.15
--- llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.14 Thu Jun 5 19:26:11 2003
+++ llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp Thu Jun 5 22:35:37 2003
@@ -404,7 +404,7 @@
// 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 @@
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 @@
}
} 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
More information about the llvm-commits
mailing list