003 File Manager
Current Path:
/usr/src/contrib/llvm-project/llvm/lib/Target/ARC
usr
/
src
/
contrib
/
llvm-project
/
llvm
/
lib
/
Target
/
ARC
/
📁
..
📄
ARC.h
(1.04 KB)
📄
ARC.td
(707 B)
📄
ARCAsmPrinter.cpp
(2.25 KB)
📄
ARCBranchFinalize.cpp
(5.37 KB)
📄
ARCCallingConv.td
(1.7 KB)
📄
ARCExpandPseudos.cpp
(2.94 KB)
📄
ARCFrameLowering.cpp
(18.97 KB)
📄
ARCFrameLowering.h
(2.78 KB)
📄
ARCISelDAGToDAG.cpp
(6.16 KB)
📄
ARCISelLowering.cpp
(28.15 KB)
📄
ARCISelLowering.h
(4.09 KB)
📄
ARCInstrFormats.td
(26.21 KB)
📄
ARCInstrInfo.cpp
(14.94 KB)
📄
ARCInstrInfo.h
(4.15 KB)
📄
ARCInstrInfo.td
(34.68 KB)
📄
ARCMCInstLower.cpp
(3.67 KB)
📄
ARCMCInstLower.h
(1.29 KB)
📄
ARCMachineFunctionInfo.cpp
(464 B)
📄
ARCMachineFunctionInfo.h
(1.87 KB)
📄
ARCOptAddrMode.cpp
(16.16 KB)
📄
ARCRegisterInfo.cpp
(8 KB)
📄
ARCRegisterInfo.h
(1.78 KB)
📄
ARCRegisterInfo.td
(2.89 KB)
📄
ARCSubtarget.cpp
(1.02 KB)
📄
ARCSubtarget.h
(2.03 KB)
📄
ARCTargetMachine.cpp
(2.98 KB)
📄
ARCTargetMachine.h
(1.64 KB)
📄
ARCTargetStreamer.h
(726 B)
📄
ARCTargetTransformInfo.h
(1.92 KB)
📁
Disassembler
📁
MCTargetDesc
📁
TargetInfo
Editing: ARCAsmPrinter.cpp
//===- ARCAsmPrinter.cpp - ARC LLVM assembly writer -------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file contains a printer that converts from our internal representation // of machine-dependent LLVM code to GNU format ARC assembly language. // //===----------------------------------------------------------------------===// #include "ARC.h" #include "ARCMCInstLower.h" #include "ARCSubtarget.h" #include "ARCTargetMachine.h" #include "MCTargetDesc/ARCInstPrinter.h" #include "TargetInfo/ARCTargetInfo.h" #include "llvm/CodeGen/AsmPrinter.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCInst.h" #include "llvm/MC/MCStreamer.h" #include "llvm/Support/TargetRegistry.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; #define DEBUG_TYPE "asm-printer" namespace { class ARCAsmPrinter : public AsmPrinter { ARCMCInstLower MCInstLowering; public: explicit ARCAsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer) : AsmPrinter(TM, std::move(Streamer)), MCInstLowering(&OutContext, *this) {} StringRef getPassName() const override { return "ARC Assembly Printer"; } void emitInstruction(const MachineInstr *MI) override; bool runOnMachineFunction(MachineFunction &MF) override; }; } // end anonymous namespace void ARCAsmPrinter::emitInstruction(const MachineInstr *MI) { SmallString<128> Str; raw_svector_ostream O(Str); switch (MI->getOpcode()) { case ARC::DBG_VALUE: llvm_unreachable("Should be handled target independently"); break; } MCInst TmpInst; MCInstLowering.Lower(MI, TmpInst); EmitToStreamer(*OutStreamer, TmpInst); } bool ARCAsmPrinter::runOnMachineFunction(MachineFunction &MF) { // Functions are 4-byte aligned. MF.ensureAlignment(Align(4)); return AsmPrinter::runOnMachineFunction(MF); } // Force static initialization. extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARCAsmPrinter() { RegisterAsmPrinter<ARCAsmPrinter> X(getTheARCTarget()); }
Upload File
Create Folder