mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
e53969b475
No true functional changes. Change the "hack" name of emitMipsHackSTOCG to emitSymSTO. Remove demonstration code in AsmParser for emitMipsHackSTOCG and emitMipsHackELFFlags. The STO field is in an ELF symbol and is not an explicit directive. That said, we are missing the compliment call in AsmParser and that will need to be addressed soon. XFAIL dummy tests for emitMipsHackELFFlags and emitMipsHackELFFlags. These will built out with following patches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195067 91177308-0d34-0410-b5e6-96231b3b80d8
57 lines
1.7 KiB
C++
57 lines
1.7 KiB
C++
//===-- MipsTargetStreamer.cpp - Mips Target Streamer Methods -------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file provides Mips specific target streamer methods.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "MipsTargetStreamer.h"
|
|
#include "llvm/MC/MCELF.h"
|
|
#include "llvm/MC/MCSymbol.h"
|
|
#include "llvm/Support/CommandLine.h"
|
|
#include "llvm/Support/ErrorHandling.h"
|
|
#include "llvm/Support/FormattedStream.h"
|
|
|
|
using namespace llvm;
|
|
|
|
// pin vtable to this file
|
|
void MipsTargetStreamer::anchor() {}
|
|
|
|
MipsTargetAsmStreamer::MipsTargetAsmStreamer(formatted_raw_ostream &OS)
|
|
: OS(OS) {}
|
|
|
|
void MipsTargetAsmStreamer::emitMipsHackELFFlags(unsigned Flags) {
|
|
return;
|
|
|
|
}
|
|
void MipsTargetAsmStreamer::emitSymSTO(MCSymbol *Sym, unsigned Val) {
|
|
return;
|
|
|
|
}
|
|
|
|
MipsTargetELFStreamer::MipsTargetELFStreamer() {}
|
|
|
|
MCELFStreamer &MipsTargetELFStreamer::getStreamer() {
|
|
return static_cast<MCELFStreamer &>(*Streamer);
|
|
}
|
|
|
|
void MipsTargetELFStreamer::emitMipsHackELFFlags(unsigned Flags) {
|
|
MCAssembler &MCA = getStreamer().getAssembler();
|
|
MCA.setELFHeaderEFlags(Flags);
|
|
}
|
|
|
|
// Set a symbol's STO flags
|
|
void MipsTargetELFStreamer::emitSymSTO(MCSymbol *Sym, unsigned Val) {
|
|
MCSymbolData &Data = getStreamer().getOrCreateSymbolData(Sym);
|
|
// The "other" values are stored in the last 6 bits of the second byte
|
|
// The traditional defines for STO values assume the full byte and thus
|
|
// the shift to pack it.
|
|
MCELF::setOther(Data, Val >> 2);
|
|
}
|