mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-06 17:51:44 +00:00

(RISCDisassemblerEmitter) which emits the decoder functions for ARM and Thumb, and the disassembler core which invokes the decoder function and builds up the MCInst based on the decoded Opcode. Added sub-formats to the NeonI/NeonXI instructions to further refine the NEONFrm instructions to help disassembly. We also changed the output of the addressing modes to omit the '+' from the assembler syntax #+/-<imm> or +/-<Rm>. See, for example, A8.6.57/58/60. And modified test cases to not expect '+' in +reg or #+num. For example, ; CHECK: ldr.w r9, [r7, #28] llvm-svn: 98637
72 lines
1.7 KiB
C++
72 lines
1.7 KiB
C++
//===- X86Disassembler.h - Disassembler for x86 and x86_64 ------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef ARMDISASSEMBLER_H
|
|
#define ARMDISASSEMBLER_H
|
|
|
|
#include "llvm/MC/MCDisassembler.h"
|
|
|
|
namespace llvm {
|
|
|
|
class MCInst;
|
|
class MemoryObject;
|
|
class raw_ostream;
|
|
|
|
namespace ARMDisassembler {
|
|
|
|
/// ARMDisassembler - ARM disassembler for all ARM platforms.
|
|
class ARMDisassembler : public MCDisassembler {
|
|
public:
|
|
/// Constructor - Initializes the disassembler.
|
|
///
|
|
ARMDisassembler() :
|
|
MCDisassembler() {
|
|
}
|
|
|
|
~ARMDisassembler() {
|
|
}
|
|
|
|
/// getInstruction - See MCDisassembler.
|
|
bool getInstruction(MCInst &instr,
|
|
uint64_t &size,
|
|
const MemoryObject ®ion,
|
|
uint64_t address,
|
|
raw_ostream &vStream) const;
|
|
private:
|
|
};
|
|
|
|
/// ThumbDisassembler - Thumb disassembler for all ARM platforms.
|
|
class ThumbDisassembler : public MCDisassembler {
|
|
public:
|
|
/// Constructor - Initializes the disassembler.
|
|
///
|
|
ThumbDisassembler() :
|
|
MCDisassembler() {
|
|
}
|
|
|
|
~ThumbDisassembler() {
|
|
}
|
|
|
|
/// getInstruction - See MCDisassembler.
|
|
bool getInstruction(MCInst &instr,
|
|
uint64_t &size,
|
|
const MemoryObject ®ion,
|
|
uint64_t address,
|
|
raw_ostream &vStream) const;
|
|
private:
|
|
};
|
|
|
|
} // namespace ARMDisassembler
|
|
|
|
} // namespace llvm
|
|
|
|
#endif
|