aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCMachOWriter.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2007-01-18 01:23:11 +0000
committerBill Wendling <isanbard@gmail.com>2007-01-18 01:23:11 +0000
commitc904a5b925ce9981ad7501b14ee39cbc8795e23c (patch)
tree01dc4a2700cdae4e7837bb9a57b7c16b115b2abe /lib/Target/PowerPC/PPCMachOWriter.cpp
parentb266ccd0f41b3ac9d9ad733e73204d9177c12e9f (diff)
Have the OutputBuffer take the is64Bit and isLittleEndian booleans.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33316 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCMachOWriter.cpp')
-rw-r--r--lib/Target/PowerPC/PPCMachOWriter.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Target/PowerPC/PPCMachOWriter.cpp b/lib/Target/PowerPC/PPCMachOWriter.cpp
index 5208060749..4d9ec4c94b 100644
--- a/lib/Target/PowerPC/PPCMachOWriter.cpp
+++ b/lib/Target/PowerPC/PPCMachOWriter.cpp
@@ -93,11 +93,11 @@ void PPCMachOWriter::GetTargetRelocation(MachineRelocation &MR,
isExtern, PPC_RELOC_VANILLA);
++From.nreloc;
- OutputBuffer RelocOut(TM, From.RelocBuffer);
+ OutputBuffer RelocOut(From.RelocBuffer, is64Bit, isLittleEndian);
RelocOut.outword(VANILLA.r_address);
RelocOut.outword(VANILLA.getPackedFields());
- OutputBuffer SecOut(TM, From.SectionData);
+ OutputBuffer SecOut(From.SectionData, is64Bit, isLittleEndian);
SecOut.fixword(Addr, MR.getMachineCodeOffset());
break;
}
@@ -109,7 +109,7 @@ void PPCMachOWriter::GetTargetRelocation(MachineRelocation &MR,
Addr <<= 2;
Addr |= (From.SectionData[MR.getMachineCodeOffset()] << 24);
- OutputBuffer SecOut(TM, From.SectionData);
+ OutputBuffer SecOut(From.SectionData, is64Bit, isLittleEndian);
SecOut.fixword(Addr, MR.getMachineCodeOffset());
break;
}
@@ -118,7 +118,7 @@ void PPCMachOWriter::GetTargetRelocation(MachineRelocation &MR,
Addr -= MR.getMachineCodeOffset();
Addr &= 0xFFFC;
- OutputBuffer SecOut(TM, From.SectionData);
+ OutputBuffer SecOut(From.SectionData, is64Bit, isLittleEndian);
SecOut.fixhalf(Addr, MR.getMachineCodeOffset() + 2);
break;
}
@@ -131,7 +131,7 @@ void PPCMachOWriter::GetTargetRelocation(MachineRelocation &MR,
++From.nreloc;
++From.nreloc;
- OutputBuffer RelocOut(TM, From.RelocBuffer);
+ OutputBuffer RelocOut(From.RelocBuffer, is64Bit, isLittleEndian);
RelocOut.outword(HA16.r_address);
RelocOut.outword(HA16.getPackedFields());
RelocOut.outword(PAIR.r_address);
@@ -139,7 +139,7 @@ void PPCMachOWriter::GetTargetRelocation(MachineRelocation &MR,
printf("ha16: %x\n", (unsigned)Addr);
Addr += 0x8000;
- OutputBuffer SecOut(TM, From.SectionData);
+ OutputBuffer SecOut(From.SectionData, is64Bit, isLittleEndian);
SecOut.fixhalf(Addr >> 16, MR.getMachineCodeOffset() + 2);
break;
}
@@ -152,14 +152,14 @@ void PPCMachOWriter::GetTargetRelocation(MachineRelocation &MR,
++From.nreloc;
++From.nreloc;
- OutputBuffer RelocOut(TM, From.RelocBuffer);
+ OutputBuffer RelocOut(From.RelocBuffer, is64Bit, isLittleEndian);
RelocOut.outword(LO16.r_address);
RelocOut.outword(LO16.getPackedFields());
RelocOut.outword(PAIR.r_address);
RelocOut.outword(PAIR.getPackedFields());
printf("lo16: %x\n", (unsigned)Addr);
- OutputBuffer SecOut(TM, From.SectionData);
+ OutputBuffer SecOut(From.SectionData, is64Bit, isLittleEndian);
SecOut.fixhalf(Addr, MR.getMachineCodeOffset() + 2);
break;
}