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:
parent
100e3aaffa
commit
1c75ae90fa
@ -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 {
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user