ARM7: Clean up instruction decoding for future expandability
Jeffrey Pfau jeffrey@endrift.com
Mon, 06 Jun 2016 21:26:02 -0700
3 files changed,
3 insertions(+),
14 deletions(-)
M
CHANGES
→
CHANGES
@@ -46,6 +46,7 @@ - ARM7: Flush prefetch cache when loading CPSR via MSR
- Qt: Canonicalize file paths when loading games - OpenGL: Add texSize uniform - Qt: Add refresh button to controller editing + - ARM7: Clean up instruction decoding for future expandability 0.4.0: (2016-02-02) Features:
M
src/arm/decoder-arm.c
→
src/arm/decoder-arm.c
@@ -437,18 +437,12 @@ DECLARE_ARM_EMITTER_BLOCK(_ARMDecode)
}; void ARMDecodeARM(uint32_t opcode, struct ARMInstructionInfo* info) { + memset(info, 0, sizeof(*info)); info->execMode = MODE_ARM; info->opcode = opcode; info->branchType = ARM_BRANCH_NONE; - info->traps = 0; - info->affectsCPSR = 0; info->condition = opcode >> 28; - info->sDataCycles = 0; - info->nDataCycles = 0; info->sInstructionCycles = 1; - info->nInstructionCycles = 0; - info->iCycles = 0; - info->cCycles = 0; ARMDecoder decoder = _armDecoderTable[((opcode >> 16) & 0xFF0) | ((opcode >> 4) & 0x00F)]; decoder(opcode, info); }
M
src/arm/decoder-thumb.c
→
src/arm/decoder-thumb.c
@@ -299,18 +299,12 @@ DECLARE_THUMB_EMITTER_BLOCK(_ThumbDecode)
}; void ARMDecodeThumb(uint16_t opcode, struct ARMInstructionInfo* info) { + memset(info, 0, sizeof(*info)); info->execMode = MODE_THUMB; info->opcode = opcode; info->branchType = ARM_BRANCH_NONE; - info->traps = 0; - info->affectsCPSR = 0; info->condition = ARM_CONDITION_AL; - info->sDataCycles = 0; - info->nDataCycles = 0; info->sInstructionCycles = 1; - info->nInstructionCycles = 0; - info->iCycles = 0; - info->cCycles = 0; ThumbDecoder decoder = _thumbDecoderTable[opcode >> 6]; decoder(opcode, info); }