CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
176 lines
6.2 KiB
C++
176 lines
6.2 KiB
C++
//===-- M68kInstPrinter.h - Convert M68k MCInst to asm ----------*- 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
///
|
|
/// \file
|
|
/// This file contains declarations for an M68k MCInst printer.
|
|
///
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_LIB_TARGET_M68K_INSTPRINTER_M68KINSTPRINTER_H
|
|
#define LLVM_LIB_TARGET_M68K_INSTPRINTER_M68KINSTPRINTER_H
|
|
|
|
#include "M68kMemOperandPrinter.h"
|
|
#include "llvm/MC/MCInstPrinter.h"
|
|
|
|
namespace llvm {
|
|
|
|
class TargetMachine;
|
|
|
|
class M68kInstPrinter : public MCInstPrinter,
|
|
public M68kMemOperandPrinter<M68kInstPrinter, MCInst> {
|
|
friend class M68kMemOperandPrinter;
|
|
|
|
public:
|
|
M68kInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
|
|
const MCRegisterInfo &MRI)
|
|
: MCInstPrinter(MAI, MII, MRI) {}
|
|
|
|
// Autogenerated by tblgen.
|
|
void printInstruction(const MCInst *MI, uint64_t Address, raw_ostream &O);
|
|
static const char *getRegisterName(MCRegister Reg);
|
|
|
|
void printRegName(raw_ostream &OS, MCRegister Reg) override;
|
|
void printInst(const MCInst *MI, uint64_t Address, StringRef Annot,
|
|
const MCSubtargetInfo &STI, raw_ostream &O) override;
|
|
|
|
bool printAliasInstr(const MCInst *MI, uint64_t Address, raw_ostream &OS);
|
|
void printCustomAliasOperand(const MCInst *MI, unsigned OpIdx,
|
|
unsigned PrintMethodIdx, raw_ostream &O);
|
|
|
|
std::pair<const char *, uint64_t>
|
|
getMnemonic(const MCInst &MI) const override;
|
|
|
|
private:
|
|
void printOperand(const MCInst *MI, unsigned opNum, raw_ostream &O);
|
|
void printImmediate(const MCInst *MI, unsigned opNum, raw_ostream &O);
|
|
/// Print register mask for MOVEM instruction in order D0-D7,A0-A7
|
|
void printMoveMask(const MCInst *MI, unsigned opNum, raw_ostream &O);
|
|
/// Print register mask for MOVEM instruction in order A7-A0,D7-D0
|
|
void printMoveMaskR(const MCInst *MI, unsigned opNum, raw_ostream &O);
|
|
void printDisp(const MCInst *MI, unsigned opNum, raw_ostream &O);
|
|
void printScale(const MCInst *MI, unsigned opNum, raw_ostream &O);
|
|
void printAbsMem(const MCInst *MI, unsigned opNum, raw_ostream &O);
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Specializations
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
void printPCRelImm(const MCInst *MI, uint64_t Address, unsigned opNum,
|
|
raw_ostream &O) {
|
|
printAbsMem(MI, opNum, O);
|
|
}
|
|
|
|
void printARI8Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printARIMem(MI, opNum, O);
|
|
}
|
|
void printARI16Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printARIMem(MI, opNum, O);
|
|
}
|
|
void printARI32Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printARIMem(MI, opNum, O);
|
|
}
|
|
|
|
void printARIPI8Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printARIPIMem(MI, opNum, O);
|
|
}
|
|
void printARIPI16Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printARIPIMem(MI, opNum, O);
|
|
}
|
|
void printARIPI32Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printARIPIMem(MI, opNum, O);
|
|
}
|
|
|
|
void printARIPD8Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printARIPDMem(MI, opNum, O);
|
|
}
|
|
void printARIPD16Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printARIPDMem(MI, opNum, O);
|
|
}
|
|
void printARIPD32Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printARIPDMem(MI, opNum, O);
|
|
}
|
|
|
|
void printARID8Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printARIDMem(MI, opNum, O);
|
|
}
|
|
void printARID16Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printARIDMem(MI, opNum, O);
|
|
}
|
|
void printARID32Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printARIDMem(MI, opNum, O);
|
|
}
|
|
|
|
void printARII8Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printARIIMem(MI, opNum, O);
|
|
}
|
|
void printARII16Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printARIIMem(MI, opNum, O);
|
|
}
|
|
void printARII32Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printARIIMem(MI, opNum, O);
|
|
}
|
|
|
|
void printAS8Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printAbsMem(MI, opNum, O);
|
|
}
|
|
void printAS16Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printAbsMem(MI, opNum, O);
|
|
}
|
|
void printAS32Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printAbsMem(MI, opNum, O);
|
|
}
|
|
|
|
void printAL8Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printAbsMem(MI, opNum, O);
|
|
}
|
|
void printAL16Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printAbsMem(MI, opNum, O);
|
|
}
|
|
void printAL32Mem(const MCInst *MI, unsigned opNum, raw_ostream &O) {
|
|
printAbsMem(MI, opNum, O);
|
|
}
|
|
|
|
void printPCD8Mem(const MCInst *MI, uint64_t Address, unsigned opNum,
|
|
raw_ostream &O) {
|
|
printPCDMem(MI, Address, opNum, O);
|
|
}
|
|
void printPCD16Mem(const MCInst *MI, uint64_t Address, unsigned opNum,
|
|
raw_ostream &O) {
|
|
printPCDMem(MI, Address, opNum, O);
|
|
}
|
|
void printPCD32Mem(const MCInst *MI, uint64_t Address, unsigned opNum,
|
|
raw_ostream &O) {
|
|
printPCDMem(MI, Address, opNum, O);
|
|
}
|
|
|
|
void printPCI8Mem(const MCInst *MI, uint64_t Address, unsigned opNum,
|
|
raw_ostream &O) {
|
|
printPCIMem(MI, Address, opNum, O);
|
|
}
|
|
void printPCI16Mem(const MCInst *MI, uint64_t Address, unsigned opNum,
|
|
raw_ostream &O) {
|
|
printPCIMem(MI, Address, opNum, O);
|
|
}
|
|
void printPCI32Mem(const MCInst *MI, uint64_t Address, unsigned opNum,
|
|
raw_ostream &O) {
|
|
printPCIMem(MI, Address, opNum, O);
|
|
}
|
|
|
|
void printPCIBD16Mem(const MCInst *MI, uint64_t Address, unsigned opNum,
|
|
raw_ostream &O) {
|
|
printPCIBDMem<16>(MI, Address, opNum, O);
|
|
}
|
|
void printPCIBD32Mem(const MCInst *MI, uint64_t Address, unsigned opNum,
|
|
raw_ostream &O) {
|
|
printPCIBDMem<32>(MI, Address, opNum, O);
|
|
}
|
|
};
|
|
} // end namespace llvm
|
|
|
|
#endif // LLVM_LIB_TARGET_M68K_INSTPRINTER_M68KINSTPRINTER_H
|