mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Flatten some of the arrays in the X86 disassembler tables to reduce space needed to store pointers on 64-bit hosts and reduce relocations needed at startup. Part of PR11953.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150161 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -78,7 +78,7 @@
|
||||
const char* name;
|
||||
|
||||
#define INSTRUCTION_IDS \
|
||||
const InstrUID *instructionIDs;
|
||||
unsigned instructionIDs;
|
||||
|
||||
#include "X86DisassemblerDecoderCommon.h"
|
||||
|
||||
|
||||
@@ -131,14 +131,13 @@ static InstrUID decode(OpcodeType type,
|
||||
debug("Corrupt table! Unknown modrm_type");
|
||||
return 0;
|
||||
case MODRM_ONEENTRY:
|
||||
return dec->instructionIDs[0];
|
||||
return modRMTable[dec->instructionIDs];
|
||||
case MODRM_SPLITRM:
|
||||
if (modFromModRM(modRM) == 0x3)
|
||||
return dec->instructionIDs[1];
|
||||
else
|
||||
return dec->instructionIDs[0];
|
||||
return modRMTable[dec->instructionIDs+1];
|
||||
return modRMTable[dec->instructionIDs];
|
||||
case MODRM_FULL:
|
||||
return dec->instructionIDs[modRM];
|
||||
return modRMTable[dec->instructionIDs+modRM];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ extern "C" {
|
||||
const char* name;
|
||||
|
||||
#define INSTRUCTION_IDS \
|
||||
const InstrUID *instructionIDs;
|
||||
unsigned instructionIDs;
|
||||
|
||||
#include "X86DisassemblerDecoderCommon.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user