summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-01-29 18:02:02 +0000
committerChris Lattner <sabre@nondot.org>2003-01-29 18:02:02 +0000
commit75f7f8d90688bc692e32d9d33ca75dcb8e35ea4d (patch)
treef78fc31d97c7c10aaeac44fe6841f76fe9de42d3
parent51978fe6929ac65533a28ea8b4aaee2e2e0e4572 (diff)
downloadbcm5719-llvm-75f7f8d90688bc692e32d9d33ca75dcb8e35ea4d.tar.gz
bcm5719-llvm-75f7f8d90688bc692e32d9d33ca75dcb8e35ea4d.zip
Fix warnings on sparc
llvm-svn: 5427
-rw-r--r--llvm/lib/ExecutionEngine/JIT/Emitter.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/Emitter.cpp b/llvm/lib/ExecutionEngine/JIT/Emitter.cpp
index d1075f76a55..1c89bdba26b 100644
--- a/llvm/lib/ExecutionEngine/JIT/Emitter.cpp
+++ b/llvm/lib/ExecutionEngine/JIT/Emitter.cpp
@@ -69,14 +69,15 @@ void Emitter::finishFunction(MachineFunction &F) {
for (unsigned i = 0, e = BBRefs.size(); i != e; ++i) {
unsigned Location = BBLocations[BBRefs[i].first];
unsigned *Ref = BBRefs[i].second;
- *Ref = Location-(unsigned)Ref-4;
+ *Ref = Location-(unsigned)(intptr_t)Ref-4;
}
BBRefs.clear();
BBLocations.clear();
NumBytes += CurByte-CurBlock;
- DEBUG(std::cerr << "Finished CodeGen of [0x" << std::hex << (unsigned)CurBlock
+ DEBUG(std::cerr << "Finished CodeGen of [0x" << std::hex
+ << (unsigned)(intptr_t)CurBlock
<< std::dec << "] Function: " << F.getFunction()->getName()
<< ": " << CurByte-CurBlock << " bytes of text\n");
}
@@ -95,7 +96,7 @@ void Emitter::emitConstantPool(MachineConstantPool *MCP) {
void Emitter::startBasicBlock(MachineBasicBlock &BB) {
- BBLocations[BB.getBasicBlock()] = (unsigned)CurByte;
+ BBLocations[BB.getBasicBlock()] = (unsigned)(intptr_t)CurByte;
}
@@ -121,7 +122,7 @@ void Emitter::emitPCRelativeDisp(Value *V) {
//
void Emitter::emitAddress(void *Addr, bool isPCRelative) {
if (isPCRelative) {
- *(unsigned*)CurByte = (unsigned)Addr - (unsigned)CurByte-4;
+ *(intptr_t*)CurByte = (intptr_t)Addr - (intptr_t)CurByte-4;
} else {
*(void**)CurByte = Addr;
}
OpenPOWER on IntegriCloud