X-Git-Url: http://git.joshuawise.com/firearm.git/blobdiff_plain/f8194bf768cc66cc66febf58f7b64a0bacc660d5..ae281afdd15d606536d5b445b49cbc3bafcb9b7c:/ARM_Constants.v diff --git a/ARM_Constants.v b/ARM_Constants.v index bbde7be..a635c5e 100644 --- a/ARM_Constants.v +++ b/ARM_Constants.v @@ -8,9 +8,40 @@ `define COND_VC 4'b0111 /* V clear */ `define COND_HI 4'b1000 /* C set and Z clear */ `define COND_LS 4'b1001 /* C clear or Z set */ -`define COND_GT 4'b1010 /* N equal to V */ +`define COND_GE 4'b1010 /* N equal to V */ `define COND_LT 4'b1011 /* N not equal to V */ `define COND_GT 4'b1100 /* Z clear AND (N equals V) */ `define COND_LE 4'b1101 /* Z set OR (N not equals V) */ `define COND_AL 4'b1110 /* TRUE */ `define COND_NV 4'b1111 /* FALSE */ + +`define COND_MATTERS(x) ((x != `COND_AL) && (x != `COND_NV)) + +`define ALU_AND 4'b0000 +`define ALU_EOR 4'b0001 +`define ALU_SUB 4'b0010 +`define ALU_RSB 4'b0011 +`define ALU_ADD 4'b0100 +`define ALU_ADC 4'b0101 +`define ALU_SBC 4'b0110 +`define ALU_RBC 4'b0111 +`define ALU_TST 4'b1000 +`define ALU_TEQ 4'b1001 +`define ALU_CMP 4'b1010 +`define ALU_CMN 4'b1011 +`define ALU_ORR 4'b1100 +`define ALU_MOV 4'b1101 +`define ALU_BIC 4'b1110 +`define ALU_MVN 4'b1111 + +`define SHIFT_LSL 2'b00 +`define SHIFT_LSR 2'b01 +`define SHIFT_ASR 2'b10 +`define SHIFT_ROR 2'b11 + +`define CPSR_N 31 +`define CPSR_Z 30 +`define CPSR_C 29 +`define CPSR_V 28 +`define CPSR_I 7 +`define CPSR_F 6