mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-07 01:54:50 +00:00
Patch by James Molloy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137830 91177308-0d34-0410-b5e6-96231b3b80d8
85 lines
2.2 KiB
C++
85 lines
2.2 KiB
C++
//===- ARMDisassembler.h - Disassembler for ARM/Thumb ISA -------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file is part of the ARM Disassembler.
|
|
// It contains the header for ARMDisassembler and ThumbDisassembler, both are
|
|
// subclasses of MCDisassembler.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef ARMDISASSEMBLER_H
|
|
#define ARMDISASSEMBLER_H
|
|
|
|
#include "llvm/MC/MCDisassembler.h"
|
|
#include <vector>
|
|
|
|
namespace llvm {
|
|
|
|
class MCInst;
|
|
class MemoryObject;
|
|
class raw_ostream;
|
|
|
|
struct EDInstInfo;
|
|
|
|
/// ARMDisassembler - ARM disassembler for all ARM platforms.
|
|
class ARMDisassembler : public MCDisassembler {
|
|
public:
|
|
/// Constructor - Initializes the disassembler.
|
|
///
|
|
ARMDisassembler() :
|
|
MCDisassembler() {
|
|
}
|
|
|
|
~ARMDisassembler() {
|
|
}
|
|
|
|
/// getInstruction - See MCDisassembler.
|
|
DecodeStatus getInstruction(MCInst &instr,
|
|
uint64_t &size,
|
|
const MemoryObject ®ion,
|
|
uint64_t address,
|
|
raw_ostream &vStream) const;
|
|
|
|
/// getEDInfo - See MCDisassembler.
|
|
EDInstInfo *getEDInfo() const;
|
|
private:
|
|
};
|
|
|
|
/// ARMDisassembler - ARM disassembler for all ARM platforms.
|
|
class ThumbDisassembler : public MCDisassembler {
|
|
public:
|
|
/// Constructor - Initializes the disassembler.
|
|
///
|
|
ThumbDisassembler() :
|
|
MCDisassembler() {
|
|
}
|
|
|
|
~ThumbDisassembler() {
|
|
}
|
|
|
|
/// getInstruction - See MCDisassembler.
|
|
DecodeStatus getInstruction(MCInst &instr,
|
|
uint64_t &size,
|
|
const MemoryObject ®ion,
|
|
uint64_t address,
|
|
raw_ostream &vStream) const;
|
|
|
|
/// getEDInfo - See MCDisassembler.
|
|
EDInstInfo *getEDInfo() const;
|
|
private:
|
|
mutable std::vector<unsigned> ITBlock;
|
|
void AddThumbPredicate(MCInst&) const;
|
|
void UpdateThumbVFPPredicate(MCInst&) const;
|
|
};
|
|
|
|
|
|
} // namespace llvm
|
|
|
|
#endif
|