diff options
Diffstat (limited to 'opcodes/fr30-opc.h')
-rw-r--r-- | opcodes/fr30-opc.h | 68 |
1 files changed, 48 insertions, 20 deletions
diff --git a/opcodes/fr30-opc.h b/opcodes/fr30-opc.h index 2a8259a..d272b2c 100644 --- a/opcodes/fr30-opc.h +++ b/opcodes/fr30-opc.h @@ -113,19 +113,36 @@ typedef enum h_dr { , H_DR_MDH, H_DR_MDL } H_DR; -/* Enum declaration for control registers. */ -typedef enum h_cr { - H_CR_PC, H_CR_PS -} H_CR; +/* Enum declaration for program status. */ +typedef enum h_ps { + H_PS_PS = 1 +} H_PS; + +/* Enum declaration for General Register 13 explicitely required. */ +typedef enum h_r13 { + H_R13_R13 = 13 +} H_R13; + +/* Enum declaration for General Register 14 explicitely required. */ +typedef enum h_r14 { + H_R14_R14 = 14 +} H_R14; + +/* Enum declaration for General Register 15 explicitely required. */ +typedef enum h_r15 { + H_R15_R15 = 15 +} H_R15; /* Enum declaration for fr30 operand types. */ typedef enum cgen_operand_type { FR30_OPERAND_PC, FR30_OPERAND_RI, FR30_OPERAND_RJ, FR30_OPERAND_RS1 - , FR30_OPERAND_RS2, FR30_OPERAND_PS, FR30_OPERAND_U4, FR30_OPERAND_M4 - , FR30_OPERAND_I8, FR30_OPERAND_U8, FR30_OPERAND_O8, FR30_OPERAND_S10 - , FR30_OPERAND_U10, FR30_OPERAND_DIR8, FR30_OPERAND_DIR9, FR30_OPERAND_DIR10 - , FR30_OPERAND_LABEL9, FR30_OPERAND_LABEL12, FR30_OPERAND_CC, FR30_OPERAND_NBIT - , FR30_OPERAND_VBIT, FR30_OPERAND_ZBIT, FR30_OPERAND_CBIT, FR30_OPERAND_MAX + , FR30_OPERAND_RS2, FR30_OPERAND_R13, FR30_OPERAND_R14, FR30_OPERAND_R15 + , FR30_OPERAND_PS, FR30_OPERAND_U4, FR30_OPERAND_M4, FR30_OPERAND_U8 + , FR30_OPERAND_I8, FR30_OPERAND_UDISP6, FR30_OPERAND_DISP8, FR30_OPERAND_DISP9 + , FR30_OPERAND_DISP10, FR30_OPERAND_S10, FR30_OPERAND_U10, FR30_OPERAND_DIR8 + , FR30_OPERAND_DIR9, FR30_OPERAND_DIR10, FR30_OPERAND_LABEL9, FR30_OPERAND_LABEL12 + , FR30_OPERAND_CC, FR30_OPERAND_NBIT, FR30_OPERAND_VBIT, FR30_OPERAND_ZBIT + , FR30_OPERAND_CBIT, FR30_OPERAND_MAX } CGEN_OPERAND_TYPE; /* Non-boolean attributes. */ @@ -196,16 +213,21 @@ typedef enum cgen_insn_type { , FR30_INSN_STR13B, FR30_INSN_STR14, FR30_INSN_STR14H, FR30_INSN_STR14B , FR30_INSN_STR15, FR30_INSN_STR15GR, FR30_INSN_STR15DR, FR30_INSN_STR15PS , FR30_INSN_MOV, FR30_INSN_MOVDR, FR30_INSN_MOVPS, FR30_INSN_MOV2DR - , FR30_INSN_MOV2PS, FR30_INSN_JMP, FR30_INSN_CALL, FR30_INSN_CALLR - , FR30_INSN_RET, FR30_INSN_INT, FR30_INSN_INTE, FR30_INSN_RETI + , FR30_INSN_MOV2PS, FR30_INSN_JMP, FR30_INSN_JMPD, FR30_INSN_CALL + , FR30_INSN_CALLD, FR30_INSN_CALLR, FR30_INSN_CALLRD, FR30_INSN_RET + , FR30_INSN_RETD, FR30_INSN_INT, FR30_INSN_INTE, FR30_INSN_RETI , FR30_INSN_BRA, FR30_INSN_BNO, FR30_INSN_BEQ, FR30_INSN_BNE , FR30_INSN_BC, FR30_INSN_BNC, FR30_INSN_BN, FR30_INSN_BP , FR30_INSN_BV, FR30_INSN_BNV, FR30_INSN_BLT, FR30_INSN_BGE , FR30_INSN_BLE, FR30_INSN_BGT, FR30_INSN_BLS, FR30_INSN_BHI + , FR30_INSN_BRAD, FR30_INSN_BNOD, FR30_INSN_BEQD, FR30_INSN_BNED + , FR30_INSN_BCD, FR30_INSN_BNCD, FR30_INSN_BND, FR30_INSN_BPD + , FR30_INSN_BVD, FR30_INSN_BNVD, FR30_INSN_BLTD, FR30_INSN_BGED + , FR30_INSN_BLED, FR30_INSN_BGTD, FR30_INSN_BLSD, FR30_INSN_BHID , FR30_INSN_DMOV2R13, FR30_INSN_DMOV2R13H, FR30_INSN_DMOV2R13B, FR30_INSN_DMOVR13 , FR30_INSN_DMOVR13H, FR30_INSN_DMOVR13B, FR30_INSN_DMOV2R13PI, FR30_INSN_DMOV2R13PIH - , FR30_INSN_DMOV2R13PIB, FR30_INSN_DMOV13PI, FR30_INSN_DMOV13PIH, FR30_INSN_DMOV13PIB - , FR30_INSN_DMOV2R15PD, FR30_INSN_DMOV15PI, FR30_INSN_LDRES, FR30_INSN_STRES + , FR30_INSN_DMOV2R13PIB, FR30_INSN_DMOVR13PI, FR30_INSN_DMOVR13PIH, FR30_INSN_DMOVR13PIB + , FR30_INSN_DMOV2R15PD, FR30_INSN_DMOVR15PI, FR30_INSN_LDRES, FR30_INSN_STRES , FR30_INSN_NOP, FR30_INSN_ANDCCR, FR30_INSN_ORCCR, FR30_INSN_STILM , FR30_INSN_ADDSP, FR30_INSN_EXTSB, FR30_INSN_EXTUB, FR30_INSN_EXTSH , FR30_INSN_EXTUH, FR30_INSN_ENTER, FR30_INSN_LEAVE, FR30_INSN_XCHB @@ -239,15 +261,17 @@ struct cgen_fields long f_m4; long f_u8; long f_i8; - long f_o8; + long f_udisp6; + long f_disp8; + long f_disp9; + long f_disp10; long f_s10; long f_u10; - long f_rel8; + long f_rel9; long f_dir8; long f_dir9; long f_dir10; - long f_rlist; - long f_rel11; + long f_rel12; int length; }; @@ -260,8 +284,9 @@ extern const CGEN_ATTR_TABLE fr30_cgen_insn_attr_table[]; typedef enum hw_type { HW_H_PC, HW_H_MEMORY, HW_H_SINT, HW_H_UINT , HW_H_ADDR, HW_H_IADDR, HW_H_GR, HW_H_DR - , HW_H_CR, HW_H_NBIT, HW_H_ZBIT, HW_H_VBIT - , HW_H_CBIT, HW_MAX + , HW_H_PS, HW_H_R13, HW_H_R14, HW_H_R15 + , HW_H_NBIT, HW_H_ZBIT, HW_H_VBIT, HW_H_CBIT + , HW_MAX } HW_TYPE; #define MAX_HW ((int) HW_MAX) @@ -270,7 +295,10 @@ typedef enum hw_type { extern CGEN_KEYWORD fr30_cgen_opval_h_gr; extern CGEN_KEYWORD fr30_cgen_opval_h_dr; -extern CGEN_KEYWORD fr30_cgen_opval_h_cr; +extern CGEN_KEYWORD fr30_cgen_opval_h_ps; +extern CGEN_KEYWORD fr30_cgen_opval_h_r13; +extern CGEN_KEYWORD fr30_cgen_opval_h_r14; +extern CGEN_KEYWORD fr30_cgen_opval_h_r15; #define CGEN_INIT_PARSE(od) \ {\ |