mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-04 05:17:07 +00:00 
			
		
		
		
	[MC] Require an MCContext when constructing an MCDisassembler.
This patch re-introduces the MCContext member that was removed from MCDisassembler in r206063, and requires that an MCContext be passed in at MCDisassembler construction time. (Previously the MCContext member had been initialized in an ad-hoc fashion after construction). The MCCContext member can be used by MCDisassembler sub-classes to construct constant or target-specific MCExprs. This patch updates disassemblers for in-tree targets, and provides the MCRegisterInfo instance that some disassemblers were using through the MCContext (previously those backends were constructing their own MCRegisterInfo instances). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206241 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		@@ -184,8 +184,9 @@ using namespace llvm;
 | 
			
		||||
#define Fail llvm::MCDisassembler::Fail
 | 
			
		||||
 | 
			
		||||
static MCDisassembler *createARM64Disassembler(const Target &T,
 | 
			
		||||
                                               const MCSubtargetInfo &STI) {
 | 
			
		||||
  return new ARM64Disassembler(STI);
 | 
			
		||||
                                               const MCSubtargetInfo &STI,
 | 
			
		||||
                                               MCContext &Ctx) {
 | 
			
		||||
  return new ARM64Disassembler(STI, Ctx);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
DecodeStatus ARM64Disassembler::getInstruction(MCInst &MI, uint64_t &Size,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user