diff --git a/src/decode.c b/src/decode.c index 77c47b7..9ee999d 100644 --- a/src/decode.c +++ b/src/decode.c @@ -24,16 +24,16 @@ a64inst_instruction *decode(word wrd) { word DPImmFlag = getBits(wrd, DATA_PROCESSING_DPIMM_LSB, DATA_PROCESSING_DPIMM_MSB); if (wrd == HALT_WORD) { - inst->type = a64inst_Halt; + inst->type = a64inst_HALT; } else if (DPImmFlag == 0) { - inst->type = a64inst_DPImmediate; + inst->type = a64inst_DPIMMEDIATE; }else if (DPImmFlag == 1) { - inst->type = a64inst_Branch; + inst->type = a64inst_BRANCH; - } else if (getBits(wrd, DATA_PROCESSING_DPReg_LSB, DATA_PROCESSING_DPReg_MSB) == 1) { - inst->type = a64inst_DPRegister; + } else if (getBits(wrd, DATA_PROCESSING_DPREG_LSB, DATA_PROCESSING_DPREG_MSB) == 1) { + inst->type = a64inst_DPREGISTER; } else { // Load and Store, or unknown diff --git a/src/decode.h b/src/decode.h index c24c235..7eaa2fa 100644 --- a/src/decode.h +++ b/src/decode.h @@ -7,7 +7,7 @@ #define DATA_PROCESSING_DPIMM_LSB 26 #define DATA_PROCESSING_DPIMM_MSB 29 -#define DATA_PROCESSING_DPReg_LSB 25 -#define DATA_PROCESSING_DPReg_MSB 26 +#define DATA_PROCESSING_DPREG_LSB 25 +#define DATA_PROCESSING_DPREG_MSB 26 a64inst_instruction *decode(word w); \ No newline at end of file