mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
This reverts commit r200064 and r200051.
r200064 depends on r200051. r200051 is broken: I tries to replace .mips_hack_elf_flags, which is a good thing, but what it replaces it with is even worse. The new emitMipsELFFlags it adds corresponds to no assembly directive, is not marked as a hack and is not even printed to the .s file. The patch also introduces more uses of hasRawTextSupport. The correct way to remove .mips_hack_elf_flags is to have the mips target streamer handle the default flags (and command line options). That way the same code path is used for asm and obj. The streamer interface should *really* correspond to what is printed in the .s file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200078 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -21,13 +21,23 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
static cl::opt<bool> PrintHackDirectives("print-hack-directives",
|
||||
cl::init(false), cl::Hidden);
|
||||
|
||||
// Pin vtable to this file.
|
||||
void MipsTargetStreamer::anchor() {}
|
||||
|
||||
MipsTargetAsmStreamer::MipsTargetAsmStreamer(formatted_raw_ostream &OS)
|
||||
: OS(OS) {}
|
||||
|
||||
void MipsTargetAsmStreamer::emitMipsELFFlags(unsigned Flags) { return; }
|
||||
void MipsTargetAsmStreamer::emitMipsHackELFFlags(unsigned Flags) {
|
||||
if (!PrintHackDirectives)
|
||||
return;
|
||||
|
||||
OS << "\t.mips_hack_elf_flags 0x";
|
||||
OS.write_hex(Flags);
|
||||
OS << '\n';
|
||||
}
|
||||
|
||||
void MipsTargetAsmStreamer::emitDirectiveSetMicroMips() {
|
||||
OS << "\t.set\tmicromips\n";
|
||||
@@ -75,7 +85,7 @@ MCELFStreamer &MipsTargetELFStreamer::getStreamer() {
|
||||
return static_cast<MCELFStreamer &>(*Streamer);
|
||||
}
|
||||
|
||||
void MipsTargetELFStreamer::emitMipsELFFlags(unsigned Flags) {
|
||||
void MipsTargetELFStreamer::emitMipsHackELFFlags(unsigned Flags) {
|
||||
MCAssembler &MCA = getStreamer().getAssembler();
|
||||
MCA.setELFHeaderEFlags(Flags);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user