diff options
author | Doug Evans <dje@google.com> | 1998-12-04 08:22:27 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 1998-12-04 08:22:27 +0000 |
commit | 99c53aa9f67dac2ed1e8dcf76253e34b59aae7ab (patch) | |
tree | 63600cd4565f3b958d30b5d2d0bfad0965974e53 /sim/m32r/cpu.h | |
parent | edc452d07d89e2e7f5ce7e8ea77a46d3d4a8d529 (diff) | |
download | gdb-99c53aa9f67dac2ed1e8dcf76253e34b59aae7ab.zip gdb-99c53aa9f67dac2ed1e8dcf76253e34b59aae7ab.tar.gz gdb-99c53aa9f67dac2ed1e8dcf76253e34b59aae7ab.tar.bz2 |
* cpu.h,decode.c,sem-switch.c,sem.c: Regenerate.
* cpux.h,decodex.c,modelx.c,semx-switch.c: Regenerate.
Diffstat (limited to 'sim/m32r/cpu.h')
-rw-r--r-- | sim/m32r/cpu.h | 647 |
1 files changed, 327 insertions, 320 deletions
diff --git a/sim/m32r/cpu.h b/sim/m32r/cpu.h index 8636b40..563deca 100644 --- a/sim/m32r/cpu.h +++ b/sim/m32r/cpu.h @@ -126,179 +126,179 @@ struct argbuf { int written; union { struct { /* e.g. add $dr,$sr */ - SI * f_r1; - SI * f_r2; + SI * i_dr; + SI * i_sr; unsigned char in_dr; unsigned char in_sr; unsigned char out_dr; } fmt_add; struct { /* e.g. add3 $dr,$sr,$hash$slo16 */ - SI * f_r1; - SI * f_r2; + SI * i_sr; HI f_simm16; + SI * i_dr; unsigned char in_sr; unsigned char out_dr; } fmt_add3; struct { /* e.g. and3 $dr,$sr,$uimm16 */ - SI * f_r1; - SI * f_r2; + SI * i_sr; USI f_uimm16; + SI * i_dr; unsigned char in_sr; unsigned char out_dr; } fmt_and3; struct { /* e.g. or3 $dr,$sr,$hash$ulo16 */ - SI * f_r1; - SI * f_r2; + SI * i_sr; UHI f_uimm16; + SI * i_dr; unsigned char in_sr; unsigned char out_dr; } fmt_or3; struct { /* e.g. addi $dr,$simm8 */ - SI * f_r1; + SI * i_dr; SI f_simm8; unsigned char in_dr; unsigned char out_dr; } fmt_addi; struct { /* e.g. addv $dr,$sr */ - SI * f_r1; - SI * f_r2; + SI * i_dr; + SI * i_sr; unsigned char in_dr; unsigned char in_sr; unsigned char out_dr; } fmt_addv; struct { /* e.g. addv3 $dr,$sr,$simm16 */ - SI * f_r1; - SI * f_r2; + SI * i_sr; SI f_simm16; + SI * i_dr; unsigned char in_sr; unsigned char out_dr; } fmt_addv3; struct { /* e.g. addx $dr,$sr */ - SI * f_r1; - SI * f_r2; + SI * i_dr; + SI * i_sr; unsigned char in_dr; unsigned char in_sr; unsigned char out_dr; } fmt_addx; struct { /* e.g. cmp $src1,$src2 */ - SI * f_r1; - SI * f_r2; + SI * i_src1; + SI * i_src2; unsigned char in_src1; unsigned char in_src2; } fmt_cmp; struct { /* e.g. cmpi $src2,$simm16 */ - SI * f_r2; + SI * i_src2; SI f_simm16; unsigned char in_src2; } fmt_cmpi; struct { /* e.g. div $dr,$sr */ - SI * f_r1; - SI * f_r2; + SI * i_sr; + SI * i_dr; unsigned char in_sr; unsigned char in_dr; unsigned char out_dr; } fmt_div; struct { /* e.g. ld $dr,@$sr */ - SI * f_r1; - SI * f_r2; + SI * i_sr; + SI * i_dr; unsigned char in_sr; unsigned char out_dr; } fmt_ld; struct { /* e.g. ld $dr,@($slo16,$sr) */ - SI * f_r1; - SI * f_r2; + SI * i_sr; HI f_simm16; + SI * i_dr; unsigned char in_sr; unsigned char out_dr; } fmt_ld_d; struct { /* e.g. ldb $dr,@$sr */ - SI * f_r1; - SI * f_r2; + SI * i_sr; + SI * i_dr; unsigned char in_sr; unsigned char out_dr; } fmt_ldb; struct { /* e.g. ldb $dr,@($slo16,$sr) */ - SI * f_r1; - SI * f_r2; + SI * i_sr; HI f_simm16; + SI * i_dr; unsigned char in_sr; unsigned char out_dr; } fmt_ldb_d; struct { /* e.g. ldh $dr,@$sr */ - SI * f_r1; - SI * f_r2; + SI * i_sr; + SI * i_dr; unsigned char in_sr; unsigned char out_dr; } fmt_ldh; struct { /* e.g. ldh $dr,@($slo16,$sr) */ - SI * f_r1; - SI * f_r2; + SI * i_sr; HI f_simm16; + SI * i_dr; unsigned char in_sr; unsigned char out_dr; } fmt_ldh_d; struct { /* e.g. ld $dr,@$sr+ */ - SI * f_r1; - SI * f_r2; + SI * i_sr; + SI * i_dr; unsigned char in_sr; unsigned char out_dr; unsigned char out_sr; } fmt_ld_plus; struct { /* e.g. ld24 $dr,$uimm24 */ - SI * f_r1; ADDR f_uimm24; + SI * i_dr; unsigned char out_dr; } fmt_ld24; struct { /* e.g. ldi8 $dr,$simm8 */ - SI * f_r1; SI f_simm8; + SI * i_dr; unsigned char out_dr; } fmt_ldi8; struct { /* e.g. ldi16 $dr,$hash$slo16 */ - SI * f_r1; HI f_simm16; + SI * i_dr; unsigned char out_dr; } fmt_ldi16; struct { /* e.g. lock $dr,@$sr */ - SI * f_r1; - SI * f_r2; + SI * i_sr; + SI * i_dr; unsigned char in_sr; unsigned char out_dr; } fmt_lock; struct { /* e.g. machi $src1,$src2 */ - SI * f_r1; - SI * f_r2; + SI * i_src1; + SI * i_src2; unsigned char in_src1; unsigned char in_src2; } fmt_machi; struct { /* e.g. mulhi $src1,$src2 */ - SI * f_r1; - SI * f_r2; + SI * i_src1; + SI * i_src2; unsigned char in_src1; unsigned char in_src2; } fmt_mulhi; struct { /* e.g. mv $dr,$sr */ - SI * f_r1; - SI * f_r2; + SI * i_sr; + SI * i_dr; unsigned char in_sr; unsigned char out_dr; } fmt_mv; struct { /* e.g. mvfachi $dr */ - SI * f_r1; + SI * i_dr; unsigned char out_dr; } fmt_mvfachi; struct { /* e.g. mvfc $dr,$scr */ - SI * f_r1; UINT f_r2; + SI * i_dr; unsigned char out_dr; } fmt_mvfc; struct { /* e.g. mvtachi $src1 */ - SI * f_r1; + SI * i_src1; unsigned char in_src1; } fmt_mvtachi; struct { /* e.g. mvtc $sr,$dcr */ + SI * i_sr; UINT f_r1; - SI * f_r2; unsigned char in_sr; } fmt_mvtc; struct { /* e.g. nop */ @@ -308,72 +308,72 @@ struct argbuf { int empty; } fmt_rac; struct { /* e.g. seth $dr,$hash$hi16 */ - SI * f_r1; UHI f_hi16; + SI * i_dr; unsigned char out_dr; } fmt_seth; struct { /* e.g. sll3 $dr,$sr,$simm16 */ - SI * f_r1; - SI * f_r2; + SI * i_sr; SI f_simm16; + SI * i_dr; unsigned char in_sr; unsigned char out_dr; } fmt_sll3; struct { /* e.g. slli $dr,$uimm5 */ - SI * f_r1; + SI * i_dr; USI f_uimm5; unsigned char in_dr; unsigned char out_dr; } fmt_slli; struct { /* e.g. st $src1,@$src2 */ - SI * f_r1; - SI * f_r2; + SI * i_src2; + SI * i_src1; unsigned char in_src2; unsigned char in_src1; } fmt_st; struct { /* e.g. st $src1,@($slo16,$src2) */ - SI * f_r1; - SI * f_r2; + SI * i_src2; HI f_simm16; + SI * i_src1; unsigned char in_src2; unsigned char in_src1; } fmt_st_d; struct { /* e.g. stb $src1,@$src2 */ - SI * f_r1; - SI * f_r2; + SI * i_src2; + SI * i_src1; unsigned char in_src2; unsigned char in_src1; } fmt_stb; struct { /* e.g. stb $src1,@($slo16,$src2) */ - SI * f_r1; - SI * f_r2; + SI * i_src2; HI f_simm16; + SI * i_src1; unsigned char in_src2; unsigned char in_src1; } fmt_stb_d; struct { /* e.g. sth $src1,@$src2 */ - SI * f_r1; - SI * f_r2; + SI * i_src2; + SI * i_src1; unsigned char in_src2; unsigned char in_src1; } fmt_sth; struct { /* e.g. sth $src1,@($slo16,$src2) */ - SI * f_r1; - SI * f_r2; + SI * i_src2; HI f_simm16; + SI * i_src1; unsigned char in_src2; unsigned char in_src1; } fmt_sth_d; struct { /* e.g. st $src1,@+$src2 */ - SI * f_r1; - SI * f_r2; + SI * i_src2; + SI * i_src1; unsigned char in_src2; unsigned char in_src1; unsigned char out_src2; } fmt_st_plus; struct { /* e.g. unlock $src1,@$src2 */ - SI * f_r1; - SI * f_r2; + SI * i_src2; + SI * i_src1; unsigned char in_src2; unsigned char in_src1; } fmt_unlock; @@ -387,14 +387,14 @@ struct argbuf { IADDR f_disp24; } fmt_bc24; struct { /* e.g. beq $src1,$src2,$disp16 */ - SI * f_r1; - SI * f_r2; + SI * i_src1; + SI * i_src2; IADDR f_disp16; unsigned char in_src1; unsigned char in_src2; } fmt_beq; struct { /* e.g. beqz $src2,$disp16 */ - SI * f_r2; + SI * i_src2; IADDR f_disp16; unsigned char in_src2; } fmt_beqz; @@ -413,12 +413,12 @@ struct argbuf { IADDR f_disp24; } fmt_bra24; struct { /* e.g. jl $sr */ - SI * f_r2; + SI * i_sr; unsigned char in_sr; unsigned char out_h_gr_14; } fmt_jl; struct { /* e.g. jmp $sr */ - SI * f_r2; + SI * i_sr; unsigned char in_sr; } fmt_jmp; struct { /* e.g. rte */ @@ -480,10 +480,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_ADD_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_ADD3_VARS \ /* Instruction fields. */ \ @@ -491,15 +491,15 @@ struct scache { UINT f_r1; \ UINT f_op2; \ UINT f_r2; \ - int f_simm16; \ + INT f_simm16; \ unsigned int length; #define EXTRACT_FMT_ADD3_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_simm16 = EXTRACT_SIGNED (insn, 32, 16, 16); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_simm16 = EXTRACT_INT (insn, 32, 16, 16); \ #define EXTRACT_FMT_AND3_VARS \ /* Instruction fields. */ \ @@ -511,11 +511,11 @@ struct scache { unsigned int length; #define EXTRACT_FMT_AND3_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_uimm16 = EXTRACT_UNSIGNED (insn, 32, 16, 16); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_uimm16 = EXTRACT_UINT (insn, 32, 16, 16); \ #define EXTRACT_FMT_OR3_VARS \ /* Instruction fields. */ \ @@ -527,23 +527,23 @@ struct scache { unsigned int length; #define EXTRACT_FMT_OR3_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_uimm16 = EXTRACT_UNSIGNED (insn, 32, 16, 16); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_uimm16 = EXTRACT_UINT (insn, 32, 16, 16); \ #define EXTRACT_FMT_ADDI_VARS \ /* Instruction fields. */ \ UINT f_op1; \ UINT f_r1; \ - int f_simm8; \ + INT f_simm8; \ unsigned int length; #define EXTRACT_FMT_ADDI_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_simm8 = EXTRACT_SIGNED (insn, 16, 8, 8); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_simm8 = EXTRACT_INT (insn, 16, 8, 8); \ #define EXTRACT_FMT_ADDV_VARS \ /* Instruction fields. */ \ @@ -554,10 +554,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_ADDV_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_ADDV3_VARS \ /* Instruction fields. */ \ @@ -565,15 +565,15 @@ struct scache { UINT f_r1; \ UINT f_op2; \ UINT f_r2; \ - int f_simm16; \ + INT f_simm16; \ unsigned int length; #define EXTRACT_FMT_ADDV3_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_simm16 = EXTRACT_SIGNED (insn, 32, 16, 16); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_simm16 = EXTRACT_INT (insn, 32, 16, 16); \ #define EXTRACT_FMT_ADDX_VARS \ /* Instruction fields. */ \ @@ -584,34 +584,34 @@ struct scache { unsigned int length; #define EXTRACT_FMT_ADDX_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_BC8_VARS \ /* Instruction fields. */ \ UINT f_op1; \ UINT f_r1; \ - int f_disp8; \ + INT f_disp8; \ unsigned int length; #define EXTRACT_FMT_BC8_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_disp8 = ((((EXTRACT_SIGNED (insn, 16, 8, 8)) << (2))) + (((pc) & (-4)))); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_disp8 = ((((EXTRACT_INT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4)))); \ #define EXTRACT_FMT_BC24_VARS \ /* Instruction fields. */ \ UINT f_op1; \ UINT f_r1; \ - int f_disp24; \ + INT f_disp24; \ unsigned int length; #define EXTRACT_FMT_BC24_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_disp24 = ((((EXTRACT_SIGNED (insn, 32, 8, 24)) << (2))) + (pc)); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_disp24 = ((((EXTRACT_INT (insn, 32, 8, 24)) << (2))) + (pc)); \ #define EXTRACT_FMT_BEQ_VARS \ /* Instruction fields. */ \ @@ -619,15 +619,15 @@ struct scache { UINT f_r1; \ UINT f_op2; \ UINT f_r2; \ - int f_disp16; \ + INT f_disp16; \ unsigned int length; #define EXTRACT_FMT_BEQ_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_disp16 = ((((EXTRACT_SIGNED (insn, 32, 16, 16)) << (2))) + (pc)); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_disp16 = ((((EXTRACT_INT (insn, 32, 16, 16)) << (2))) + (pc)); \ #define EXTRACT_FMT_BEQZ_VARS \ /* Instruction fields. */ \ @@ -635,63 +635,63 @@ struct scache { UINT f_r1; \ UINT f_op2; \ UINT f_r2; \ - int f_disp16; \ + INT f_disp16; \ unsigned int length; #define EXTRACT_FMT_BEQZ_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_disp16 = ((((EXTRACT_SIGNED (insn, 32, 16, 16)) << (2))) + (pc)); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_disp16 = ((((EXTRACT_INT (insn, 32, 16, 16)) << (2))) + (pc)); \ #define EXTRACT_FMT_BL8_VARS \ /* Instruction fields. */ \ UINT f_op1; \ UINT f_r1; \ - int f_disp8; \ + INT f_disp8; \ unsigned int length; #define EXTRACT_FMT_BL8_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_disp8 = ((((EXTRACT_SIGNED (insn, 16, 8, 8)) << (2))) + (((pc) & (-4)))); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_disp8 = ((((EXTRACT_INT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4)))); \ #define EXTRACT_FMT_BL24_VARS \ /* Instruction fields. */ \ UINT f_op1; \ UINT f_r1; \ - int f_disp24; \ + INT f_disp24; \ unsigned int length; #define EXTRACT_FMT_BL24_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_disp24 = ((((EXTRACT_SIGNED (insn, 32, 8, 24)) << (2))) + (pc)); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_disp24 = ((((EXTRACT_INT (insn, 32, 8, 24)) << (2))) + (pc)); \ #define EXTRACT_FMT_BRA8_VARS \ /* Instruction fields. */ \ UINT f_op1; \ UINT f_r1; \ - int f_disp8; \ + INT f_disp8; \ unsigned int length; #define EXTRACT_FMT_BRA8_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_disp8 = ((((EXTRACT_SIGNED (insn, 16, 8, 8)) << (2))) + (((pc) & (-4)))); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_disp8 = ((((EXTRACT_INT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4)))); \ #define EXTRACT_FMT_BRA24_VARS \ /* Instruction fields. */ \ UINT f_op1; \ UINT f_r1; \ - int f_disp24; \ + INT f_disp24; \ unsigned int length; #define EXTRACT_FMT_BRA24_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_disp24 = ((((EXTRACT_SIGNED (insn, 32, 8, 24)) << (2))) + (pc)); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_disp24 = ((((EXTRACT_INT (insn, 32, 8, 24)) << (2))) + (pc)); \ #define EXTRACT_FMT_CMP_VARS \ /* Instruction fields. */ \ @@ -702,10 +702,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_CMP_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_CMPI_VARS \ /* Instruction fields. */ \ @@ -713,15 +713,15 @@ struct scache { UINT f_r1; \ UINT f_op2; \ UINT f_r2; \ - int f_simm16; \ + INT f_simm16; \ unsigned int length; #define EXTRACT_FMT_CMPI_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_simm16 = EXTRACT_SIGNED (insn, 32, 16, 16); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_simm16 = EXTRACT_INT (insn, 32, 16, 16); \ #define EXTRACT_FMT_DIV_VARS \ /* Instruction fields. */ \ @@ -729,15 +729,15 @@ struct scache { UINT f_r1; \ UINT f_op2; \ UINT f_r2; \ - int f_simm16; \ + INT f_simm16; \ unsigned int length; #define EXTRACT_FMT_DIV_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_simm16 = EXTRACT_SIGNED (insn, 32, 16, 16); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_simm16 = EXTRACT_INT (insn, 32, 16, 16); \ #define EXTRACT_FMT_JL_VARS \ /* Instruction fields. */ \ @@ -748,10 +748,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_JL_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_JMP_VARS \ /* Instruction fields. */ \ @@ -762,10 +762,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_JMP_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_LD_VARS \ /* Instruction fields. */ \ @@ -776,10 +776,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_LD_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_LD_D_VARS \ /* Instruction fields. */ \ @@ -787,15 +787,15 @@ struct scache { UINT f_r1; \ UINT f_op2; \ UINT f_r2; \ - int f_simm16; \ + INT f_simm16; \ unsigned int length; #define EXTRACT_FMT_LD_D_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_simm16 = EXTRACT_SIGNED (insn, 32, 16, 16); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_simm16 = EXTRACT_INT (insn, 32, 16, 16); \ #define EXTRACT_FMT_LDB_VARS \ /* Instruction fields. */ \ @@ -806,10 +806,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_LDB_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_LDB_D_VARS \ /* Instruction fields. */ \ @@ -817,15 +817,15 @@ struct scache { UINT f_r1; \ UINT f_op2; \ UINT f_r2; \ - int f_simm16; \ + INT f_simm16; \ unsigned int length; #define EXTRACT_FMT_LDB_D_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_simm16 = EXTRACT_SIGNED (insn, 32, 16, 16); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_simm16 = EXTRACT_INT (insn, 32, 16, 16); \ #define EXTRACT_FMT_LDH_VARS \ /* Instruction fields. */ \ @@ -836,10 +836,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_LDH_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_LDH_D_VARS \ /* Instruction fields. */ \ @@ -847,15 +847,15 @@ struct scache { UINT f_r1; \ UINT f_op2; \ UINT f_r2; \ - int f_simm16; \ + INT f_simm16; \ unsigned int length; #define EXTRACT_FMT_LDH_D_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_simm16 = EXTRACT_SIGNED (insn, 32, 16, 16); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_simm16 = EXTRACT_INT (insn, 32, 16, 16); \ #define EXTRACT_FMT_LD_PLUS_VARS \ /* Instruction fields. */ \ @@ -866,10 +866,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_LD_PLUS_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_LD24_VARS \ /* Instruction fields. */ \ @@ -879,21 +879,21 @@ struct scache { unsigned int length; #define EXTRACT_FMT_LD24_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_uimm24 = EXTRACT_UNSIGNED (insn, 32, 8, 24); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_uimm24 = EXTRACT_UINT (insn, 32, 8, 24); \ #define EXTRACT_FMT_LDI8_VARS \ /* Instruction fields. */ \ UINT f_op1; \ UINT f_r1; \ - int f_simm8; \ + INT f_simm8; \ unsigned int length; #define EXTRACT_FMT_LDI8_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_simm8 = EXTRACT_SIGNED (insn, 16, 8, 8); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_simm8 = EXTRACT_INT (insn, 16, 8, 8); \ #define EXTRACT_FMT_LDI16_VARS \ /* Instruction fields. */ \ @@ -901,15 +901,15 @@ struct scache { UINT f_r1; \ UINT f_op2; \ UINT f_r2; \ - int f_simm16; \ + INT f_simm16; \ unsigned int length; #define EXTRACT_FMT_LDI16_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_simm16 = EXTRACT_SIGNED (insn, 32, 16, 16); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_simm16 = EXTRACT_INT (insn, 32, 16, 16); \ #define EXTRACT_FMT_LOCK_VARS \ /* Instruction fields. */ \ @@ -920,10 +920,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_LOCK_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_MACHI_VARS \ /* Instruction fields. */ \ @@ -934,10 +934,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_MACHI_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_MULHI_VARS \ /* Instruction fields. */ \ @@ -948,10 +948,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_MULHI_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_MV_VARS \ /* Instruction fields. */ \ @@ -962,10 +962,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_MV_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_MVFACHI_VARS \ /* Instruction fields. */ \ @@ -976,10 +976,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_MVFACHI_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_MVFC_VARS \ /* Instruction fields. */ \ @@ -990,10 +990,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_MVFC_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_MVTACHI_VARS \ /* Instruction fields. */ \ @@ -1004,10 +1004,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_MVTACHI_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_MVTC_VARS \ /* Instruction fields. */ \ @@ -1018,10 +1018,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_MVTC_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_NOP_VARS \ /* Instruction fields. */ \ @@ -1032,10 +1032,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_NOP_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_RAC_VARS \ /* Instruction fields. */ \ @@ -1046,10 +1046,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_RAC_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_RTE_VARS \ /* Instruction fields. */ \ @@ -1060,10 +1060,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_RTE_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_SETH_VARS \ /* Instruction fields. */ \ @@ -1075,11 +1075,11 @@ struct scache { unsigned int length; #define EXTRACT_FMT_SETH_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_hi16 = EXTRACT_UNSIGNED (insn, 32, 16, 16); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_hi16 = EXTRACT_UINT (insn, 32, 16, 16); \ #define EXTRACT_FMT_SLL3_VARS \ /* Instruction fields. */ \ @@ -1087,15 +1087,15 @@ struct scache { UINT f_r1; \ UINT f_op2; \ UINT f_r2; \ - int f_simm16; \ + INT f_simm16; \ unsigned int length; #define EXTRACT_FMT_SLL3_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_simm16 = EXTRACT_SIGNED (insn, 32, 16, 16); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_simm16 = EXTRACT_INT (insn, 32, 16, 16); \ #define EXTRACT_FMT_SLLI_VARS \ /* Instruction fields. */ \ @@ -1106,10 +1106,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_SLLI_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_shift_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 3); \ - f_uimm5 = EXTRACT_UNSIGNED (insn, 16, 11, 5); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_shift_op2 = EXTRACT_UINT (insn, 16, 8, 3); \ + f_uimm5 = EXTRACT_UINT (insn, 16, 11, 5); \ #define EXTRACT_FMT_ST_VARS \ /* Instruction fields. */ \ @@ -1120,10 +1120,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_ST_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_ST_D_VARS \ /* Instruction fields. */ \ @@ -1131,15 +1131,15 @@ struct scache { UINT f_r1; \ UINT f_op2; \ UINT f_r2; \ - int f_simm16; \ + INT f_simm16; \ unsigned int length; #define EXTRACT_FMT_ST_D_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_simm16 = EXTRACT_SIGNED (insn, 32, 16, 16); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_simm16 = EXTRACT_INT (insn, 32, 16, 16); \ #define EXTRACT_FMT_STB_VARS \ /* Instruction fields. */ \ @@ -1150,10 +1150,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_STB_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_STB_D_VARS \ /* Instruction fields. */ \ @@ -1161,15 +1161,15 @@ struct scache { UINT f_r1; \ UINT f_op2; \ UINT f_r2; \ - int f_simm16; \ + INT f_simm16; \ unsigned int length; #define EXTRACT_FMT_STB_D_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_simm16 = EXTRACT_SIGNED (insn, 32, 16, 16); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_simm16 = EXTRACT_INT (insn, 32, 16, 16); \ #define EXTRACT_FMT_STH_VARS \ /* Instruction fields. */ \ @@ -1180,10 +1180,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_STH_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_STH_D_VARS \ /* Instruction fields. */ \ @@ -1191,15 +1191,15 @@ struct scache { UINT f_r1; \ UINT f_op2; \ UINT f_r2; \ - int f_simm16; \ + INT f_simm16; \ unsigned int length; #define EXTRACT_FMT_STH_D_CODE \ length = 4; \ - f_op1 = EXTRACT_UNSIGNED (insn, 32, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 32, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 32, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 32, 12, 4); \ - f_simm16 = EXTRACT_SIGNED (insn, 32, 16, 16); \ + f_op1 = EXTRACT_UINT (insn, 32, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 32, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 32, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 32, 12, 4); \ + f_simm16 = EXTRACT_INT (insn, 32, 16, 16); \ #define EXTRACT_FMT_ST_PLUS_VARS \ /* Instruction fields. */ \ @@ -1210,10 +1210,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_ST_PLUS_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_TRAP_VARS \ /* Instruction fields. */ \ @@ -1224,10 +1224,10 @@ struct scache { unsigned int length; #define EXTRACT_FMT_TRAP_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_uimm4 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_uimm4 = EXTRACT_UINT (insn, 16, 12, 4); \ #define EXTRACT_FMT_UNLOCK_VARS \ /* Instruction fields. */ \ @@ -1238,9 +1238,16 @@ struct scache { unsigned int length; #define EXTRACT_FMT_UNLOCK_CODE \ length = 2; \ - f_op1 = EXTRACT_UNSIGNED (insn, 16, 0, 4); \ - f_r1 = EXTRACT_UNSIGNED (insn, 16, 4, 4); \ - f_op2 = EXTRACT_UNSIGNED (insn, 16, 8, 4); \ - f_r2 = EXTRACT_UNSIGNED (insn, 16, 12, 4); \ + f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \ + f_r1 = EXTRACT_UINT (insn, 16, 4, 4); \ + f_op2 = EXTRACT_UINT (insn, 16, 8, 4); \ + f_r2 = EXTRACT_UINT (insn, 16, 12, 4); \ + +/* Collection of various things for the trace handler to use. */ + +typedef struct trace_record { + PCADDR pc; + /* FIXME:wip */ +} TRACE_RECORD; #endif /* CPU_M32RBF_H */ |