mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-17 03:30:28 +00:00
Merge the ARM disassembler header into the implementation file, since it is not externally exposed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138982 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a6804444e8
commit
a1c110045a
@ -9,7 +9,6 @@
|
||||
|
||||
#define DEBUG_TYPE "arm-disassembler"
|
||||
|
||||
#include "ARMDisassembler.h"
|
||||
#include "ARM.h"
|
||||
#include "ARMRegisterInfo.h"
|
||||
#include "MCTargetDesc/ARMAddressingModes.h"
|
||||
@ -18,6 +17,7 @@
|
||||
#include "llvm/MC/MCInst.h"
|
||||
#include "llvm/MC/MCExpr.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/MC/MCDisassembler.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/MemoryObject.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
@ -28,6 +28,59 @@ using namespace llvm;
|
||||
|
||||
typedef MCDisassembler::DecodeStatus DecodeStatus;
|
||||
|
||||
namespace {
|
||||
/// 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:
|
||||
};
|
||||
|
||||
/// ThumbDisassembler - Thumb disassembler for all Thumb 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;
|
||||
};
|
||||
}
|
||||
|
||||
static bool Check(DecodeStatus &Out, DecodeStatus In) {
|
||||
switch (In) {
|
||||
case MCDisassembler::Success:
|
||||
|
@ -1,84 +0,0 @@
|
||||
//===- 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
|
Loading…
Reference in New Issue
Block a user