mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Use raw_ostream throughout the AsmPrinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55092 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -37,6 +37,7 @@
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <cctype>
|
||||
|
||||
using namespace llvm;
|
||||
@ -48,7 +49,7 @@ namespace {
|
||||
|
||||
const MipsSubtarget *Subtarget;
|
||||
|
||||
MipsAsmPrinter(std::ostream &O, MipsTargetMachine &TM,
|
||||
MipsAsmPrinter(raw_ostream &O, MipsTargetMachine &TM,
|
||||
const TargetAsmInfo *T):
|
||||
AsmPrinter(O, TM, T) {
|
||||
Subtarget = &TM.getSubtarget<MipsSubtarget>();
|
||||
@ -89,7 +90,7 @@ namespace {
|
||||
/// assembly code for a MachineFunction to the given output stream,
|
||||
/// using the given target machine description. This should work
|
||||
/// regardless of whether the function is in SSA form.
|
||||
FunctionPass *llvm::createMipsCodePrinterPass(std::ostream &o,
|
||||
FunctionPass *llvm::createMipsCodePrinterPass(raw_ostream &o,
|
||||
MipsTargetMachine &tm)
|
||||
{
|
||||
return new MipsAsmPrinter(o, tm, tm.getTargetAsmInfo());
|
||||
@ -175,10 +176,9 @@ printSavedRegsBitmask(MachineFunction &MF)
|
||||
void MipsAsmPrinter::
|
||||
printHex32(unsigned int Value)
|
||||
{
|
||||
O << "0x" << std::hex;
|
||||
O << "0x";
|
||||
for (int i = 7; i >= 0; i--)
|
||||
O << std::hex << ( (Value & (0xF << (i*4))) >> (i*4) );
|
||||
O << std::dec;
|
||||
O << utohexstr( (Value & (0xF << (i*4))) >> (i*4) );
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
Reference in New Issue
Block a user