1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Fix an incomplete refactoring of the ppc backend. Thanks to rdivacky for reporting

it. It does need some some tests...

llvm-svn: 147154
This commit is contained in:
Rafael Espindola 2011-12-22 18:38:06 +00:00
parent 100e3aaffa
commit 1c75ae90fa
2 changed files with 3 additions and 15 deletions

View File

@ -57,13 +57,6 @@ public:
MCValue Target, uint64_t &FixedValue) {}
};
class PPCELFObjectWriter : public MCELFObjectTargetWriter {
public:
PPCELFObjectWriter(bool Is64Bit, uint8_t OSABI, uint16_t EMachine,
bool HasRelocationAddend, bool isLittleEndian)
: MCELFObjectTargetWriter(Is64Bit, OSABI, EMachine, HasRelocationAddend) {}
};
class PPCAsmBackend : public MCAsmBackend {
const Target &TheTarget;
public:
@ -175,12 +168,7 @@ namespace {
MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
bool is64 = getPointerSize() == 8;
return createELFObjectWriter(new PPCELFObjectWriter(
/*Is64Bit=*/is64,
OSABI,
is64 ? ELF::EM_PPC64 : ELF::EM_PPC,
/*addend*/ true, /*isLittleEndian*/ false),
OS, /*IsLittleEndian=*/false);
return createPPCELFObjectWriter(OS, is64, OSABI);
}
virtual bool doesSectionRequireSymbols(const MCSection &Section) const {

View File

@ -31,7 +31,7 @@ namespace {
PPCELFObjectWriter::PPCELFObjectWriter(bool Is64Bit, uint8_t OSABI)
: MCELFObjectTargetWriter(Is64Bit, OSABI,
Is64Bit ? ELF::EM_PPC64 : ELF::EM_PPC,
/*HasRelocationAddend*/ false) {}
/*HasRelocationAddend*/ true) {}
PPCELFObjectWriter::~PPCELFObjectWriter() {
}
@ -99,5 +99,5 @@ MCObjectWriter *llvm::createPPCELFObjectWriter(raw_ostream &OS,
bool Is64Bit,
uint8_t OSABI) {
MCELFObjectTargetWriter *MOTW = new PPCELFObjectWriter(Is64Bit, OSABI);
return createELFObjectWriter(MOTW, OS, /*IsLittleEndian=*/true);
return createELFObjectWriter(MOTW, OS, /*IsLittleEndian=*/false);
}