aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Alpha/AlphaJITInfo.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2006-12-07 22:21:48 +0000
committerBill Wendling <isanbard@gmail.com>2006-12-07 22:21:48 +0000
commitf5da13367f88f06e3b585dc2263ab6e9ca6c4bf8 (patch)
tree3cf9a9612ba0a90fee9ec668819ae5a69a7bada1 /lib/Target/Alpha/AlphaJITInfo.cpp
parent6e49d8b4bf7b5911dc953551672161b8f9a7418f (diff)
downloadexternal_llvm-f5da13367f88f06e3b585dc2263ab6e9ca6c4bf8.zip
external_llvm-f5da13367f88f06e3b585dc2263ab6e9ca6c4bf8.tar.gz
external_llvm-f5da13367f88f06e3b585dc2263ab6e9ca6c4bf8.tar.bz2
What should be the last unnecessary <iostream>s in the library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32333 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha/AlphaJITInfo.cpp')
-rw-r--r--lib/Target/Alpha/AlphaJITInfo.cpp37
1 files changed, 18 insertions, 19 deletions
diff --git a/lib/Target/Alpha/AlphaJITInfo.cpp b/lib/Target/Alpha/AlphaJITInfo.cpp
index 81f5e74..669a2d5 100644
--- a/lib/Target/Alpha/AlphaJITInfo.cpp
+++ b/lib/Target/Alpha/AlphaJITInfo.cpp
@@ -18,7 +18,6 @@
#include "llvm/Config/alloca.h"
#include "llvm/Support/Debug.h"
#include <cstdlib>
-#include <iostream>
#include <map>
using namespace llvm;
@@ -58,12 +57,12 @@ static void EmitBranchToAt(void *At, void *To) {
AtI[0] = BUILD_OR(0, 27, 27);
- DEBUG(std::cerr << "Stub targeting " << To << "\n");
+ DOUT << "Stub targeting " << To << "\n";
for (int x = 1; x <= 8; ++x) {
AtI[2*x - 1] = BUILD_SLLi(27,27,8);
unsigned d = (Fn >> (64 - 8 * x)) & 0x00FF;
- // DEBUG(std::cerr << "outputing " << hex << d << dec << "\n");
+ //DOUT << "outputing " << hex << d << dec << "\n";
AtI[2*x] = BUILD_ORi(27, 27, d);
}
AtI[17] = BUILD_JMP(31,27,0); //jump, preserving ra, and setting pv
@@ -87,12 +86,12 @@ extern "C" {
//rewrite the stub to an unconditional branch
if (((unsigned*)CameFromStub)[18] == 0x00FFFFFF) {
- DEBUG(std::cerr << "Came from a stub, rewriting\n");
+ DOUT << "Came from a stub, rewriting\n";
EmitBranchToAt(CameFromStub, Target);
} else {
- DEBUG(std::cerr << "confused, didn't come from stub at " << CameFromStub
- << " old jump vector " << oldpv
- << " new jump vector " << Target << "\n");
+ DOUT << "confused, didn't come from stub at " << CameFromStub
+ << " old jump vector " << oldpv
+ << " new jump vector " << Target << "\n";
}
//Change pv to new Target
@@ -185,7 +184,7 @@ extern "C" {
);
#else
void AlphaCompilationCallback() {
- std::cerr << "Cannot call AlphaCompilationCallback() on a non-Alpha arch!\n";
+ cerr << "Cannot call AlphaCompilationCallback() on a non-Alpha arch!\n";
abort();
}
#endif
@@ -199,7 +198,7 @@ void *AlphaJITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) {
for (int x = 0; x < 19; ++ x)
MCE.emitWordLE(0);
EmitBranchToAt(Addr, Fn);
- DEBUG(std::cerr << "Emitting Stub to " << Fn << " at [" << Addr << "]\n");
+ DOUT << "Emitting Stub to " << Fn << " at [" << Addr << "]\n";
return MCE.finishFunctionStub(0);
}
@@ -250,30 +249,30 @@ void AlphaJITInfo::relocate(void *Function, MachineRelocation *MR,
case Alpha::reloc_literal:
//This is a LDQl
idx = MR->getGOTIndex();
- DEBUG(std::cerr << "Literal relocation to slot " << idx);
+ DOUT << "Literal relocation to slot " << idx;
idx = (idx - GOToffset) * 8;
- DEBUG(std::cerr << " offset " << idx << "\n");
+ DOUT << " offset " << idx << "\n";
break;
case Alpha::reloc_gprellow:
idx = (unsigned char*)MR->getResultPointer() - &GOTBase[GOToffset * 8];
idx = getLower16(idx);
- DEBUG(std::cerr << "gprellow relocation offset " << idx << "\n");
- DEBUG(std::cerr << " Pointer is " << (void*)MR->getResultPointer()
- << " GOT is " << (void*)&GOTBase[GOToffset * 8] << "\n");
+ DOUT << "gprellow relocation offset " << idx << "\n";
+ DOUT << " Pointer is " << (void*)MR->getResultPointer()
+ << " GOT is " << (void*)&GOTBase[GOToffset * 8] << "\n";
break;
case Alpha::reloc_gprelhigh:
idx = (unsigned char*)MR->getResultPointer() - &GOTBase[GOToffset * 8];
idx = getUpper16(idx);
- DEBUG(std::cerr << "gprelhigh relocation offset " << idx << "\n");
- DEBUG(std::cerr << " Pointer is " << (void*)MR->getResultPointer()
- << " GOT is " << (void*)&GOTBase[GOToffset * 8] << "\n");
+ DOUT << "gprelhigh relocation offset " << idx << "\n";
+ DOUT << " Pointer is " << (void*)MR->getResultPointer()
+ << " GOT is " << (void*)&GOTBase[GOToffset * 8] << "\n";
break;
case Alpha::reloc_gpdist:
switch (*RelocPos >> 26) {
case 0x09: //LDAH
idx = &GOTBase[GOToffset * 8] - (unsigned char*)RelocPos;
idx = getUpper16(idx);
- DEBUG(std::cerr << "LDAH: " << idx << "\n");
+ DOUT << "LDAH: " << idx << "\n";
//add the relocation to the map
gpdistmap[std::make_pair(Function, MR->getConstantVal())] = RelocPos;
break;
@@ -283,7 +282,7 @@ void AlphaJITInfo::relocate(void *Function, MachineRelocation *MR,
idx = &GOTBase[GOToffset * 8] -
(unsigned char*)gpdistmap[std::make_pair(Function, MR->getConstantVal())];
idx = getLower16(idx);
- DEBUG(std::cerr << "LDA: " << idx << "\n");
+ DOUT << "LDA: " << idx << "\n";
break;
default:
assert(0 && "Cannot handle gpdist yet");