mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-06 20:32:19 +00:00
Fix an incomplete refactoring of the ppc backend. Thanks to rdivacky for reporting
it. It does need some some tests... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147154 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8d9550bde9
commit
f51e95a9f2
@ -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