- cgen/m32r.cpu (h-accum): Add attribute FUN-ACCESS.
* m32r.c (m32r_h_accum_get,m32r_h_accum_set): New functions.
#include cgen-ops.h.
* cpux.c,readx.c,semx.c: Regenerate.
* m32rx.c (m32r_h_accum_get,m32r_h_accum_set): New functions.
#include cgen-ops.h. Delete inclusion of several unnecessary headers.
(m32r_h_accums_get): Sign extend top 8 bits.
+Mon Apr 20 16:12:35 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * cpu.c,sem.c,sem-switch.c: Regenerate. From
+ - cgen/m32r.cpu (h-accum): Add attribute FUN-ACCESS.
+ * m32r.c (m32r_h_accum_get,m32r_h_accum_set): New functions.
+ #include cgen-ops.h.
+start-sanitize-m32rx
+ * cpux.c,readx.c,semx.c: Regenerate.
+ * m32rx.c (m32r_h_accum_get,m32r_h_accum_set): New functions.
+ #include cgen-ops.h. Delete inclusion of several unnecessary headers.
+ (m32r_h_accums_get): Sign extend top 8 bits.
+end-sanitize-m32rx
+
+start-sanitize-m32rx
+Tue Apr 14 14:04:07 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * semx.c: Regenerate.
+
+end-sanitize-m32rx
Fri Apr 10 18:22:41 1998 Doug Evans <devans@canuck.cygnus.com>
* cpu.h,decode.c,decode.h,extract.c,sem.c,sem-switch.c: Regenerate.
EXTRACT_FMT_MACWHI_CODE
/* Fetch the input operands for the semantic handler. */
- OPRND (accum) = CPU (h_accum);
+ OPRND (accum) = m32rx_h_accum_get (current_cpu);
OPRND (src1) = CPU (h_gr[f_r1]);
OPRND (src2) = CPU (h_gr[f_r2]);
#undef OPRND
CASE (sem, INSN_ADD) : /* add $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = ADDSI (* FLD (f_r1), * FLD (f_r2));
}
BREAK (sem);
- CASE (sem, INSN_ADD3) : /* add3 $dr,$sr,#$slo16 */
+ CASE (sem, INSN_ADD3) : /* add3 $dr,$sr,$hash$slo16 */
{
-#define FLD(f) abuf->fields.fmt_1_add3.f
+#define FLD(f) abuf->fields.fmt_add3.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
* FLD (f_r1) = ADDSI (* FLD (f_r2), FLD (f_simm16));
CASE (sem, INSN_AND) : /* and $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = ANDSI (* FLD (f_r1), * FLD (f_r2));
}
BREAK (sem);
- CASE (sem, INSN_AND3) : /* and3 $dr,$sr,#$uimm16 */
+ CASE (sem, INSN_AND3) : /* and3 $dr,$sr,$uimm16 */
{
-#define FLD(f) abuf->fields.fmt_2_and3.f
+#define FLD(f) abuf->fields.fmt_and3.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
* FLD (f_r1) = ANDSI (* FLD (f_r2), FLD (f_uimm16));
CASE (sem, INSN_OR) : /* or $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = ORSI (* FLD (f_r1), * FLD (f_r2));
}
BREAK (sem);
- CASE (sem, INSN_OR3) : /* or3 $dr,$sr,#$ulo16 */
+ CASE (sem, INSN_OR3) : /* or3 $dr,$sr,$hash$ulo16 */
{
-#define FLD(f) abuf->fields.fmt_3_or3.f
+#define FLD(f) abuf->fields.fmt_or3.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
* FLD (f_r1) = ORSI (* FLD (f_r2), FLD (f_uimm16));
CASE (sem, INSN_XOR) : /* xor $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = XORSI (* FLD (f_r1), * FLD (f_r2));
}
BREAK (sem);
- CASE (sem, INSN_XOR3) : /* xor3 $dr,$sr,#$uimm16 */
+ CASE (sem, INSN_XOR3) : /* xor3 $dr,$sr,$uimm16 */
{
-#define FLD(f) abuf->fields.fmt_2_and3.f
+#define FLD(f) abuf->fields.fmt_and3.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
* FLD (f_r1) = XORSI (* FLD (f_r2), FLD (f_uimm16));
}
BREAK (sem);
- CASE (sem, INSN_ADDI) : /* addi $dr,#$simm8 */
+ CASE (sem, INSN_ADDI) : /* addi $dr,$simm8 */
{
-#define FLD(f) abuf->fields.fmt_4_addi.f
+#define FLD(f) abuf->fields.fmt_addi.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = ADDSI (* FLD (f_r1), FLD (f_simm8));
CASE (sem, INSN_ADDV) : /* addv $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_5_addv.f
+#define FLD(f) abuf->fields.fmt_addv.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
}
BREAK (sem);
- CASE (sem, INSN_ADDV3) : /* addv3 $dr,$sr,#$simm16 */
+ CASE (sem, INSN_ADDV3) : /* addv3 $dr,$sr,$simm16 */
{
-#define FLD(f) abuf->fields.fmt_6_addv3.f
+#define FLD(f) abuf->fields.fmt_addv3.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
do {
CASE (sem, INSN_ADDX) : /* addx $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_7_addx.f
+#define FLD(f) abuf->fields.fmt_addx.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
CASE (sem, INSN_BC8) : /* bc $disp8 */
{
-#define FLD(f) abuf->fields.fmt_8_bc8.f
+#define FLD(f) abuf->fields.fmt_bc8.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
if (CPU (h_cond)) {
CASE (sem, INSN_BC24) : /* bc $disp24 */
{
-#define FLD(f) abuf->fields.fmt_9_bc24.f
+#define FLD(f) abuf->fields.fmt_bc24.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
if (CPU (h_cond)) {
CASE (sem, INSN_BEQ) : /* beq $src1,$src2,$disp16 */
{
-#define FLD(f) abuf->fields.fmt_10_beq.f
+#define FLD(f) abuf->fields.fmt_beq.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
if (EQSI (* FLD (f_r1), * FLD (f_r2))) {
CASE (sem, INSN_BEQZ) : /* beqz $src2,$disp16 */
{
-#define FLD(f) abuf->fields.fmt_11_beqz.f
+#define FLD(f) abuf->fields.fmt_beqz.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
if (EQSI (* FLD (f_r2), 0)) {
CASE (sem, INSN_BGEZ) : /* bgez $src2,$disp16 */
{
-#define FLD(f) abuf->fields.fmt_11_beqz.f
+#define FLD(f) abuf->fields.fmt_beqz.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
if (GESI (* FLD (f_r2), 0)) {
CASE (sem, INSN_BGTZ) : /* bgtz $src2,$disp16 */
{
-#define FLD(f) abuf->fields.fmt_11_beqz.f
+#define FLD(f) abuf->fields.fmt_beqz.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
if (GTSI (* FLD (f_r2), 0)) {
CASE (sem, INSN_BLEZ) : /* blez $src2,$disp16 */
{
-#define FLD(f) abuf->fields.fmt_11_beqz.f
+#define FLD(f) abuf->fields.fmt_beqz.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
if (LESI (* FLD (f_r2), 0)) {
CASE (sem, INSN_BLTZ) : /* bltz $src2,$disp16 */
{
-#define FLD(f) abuf->fields.fmt_11_beqz.f
+#define FLD(f) abuf->fields.fmt_beqz.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
if (LTSI (* FLD (f_r2), 0)) {
CASE (sem, INSN_BNEZ) : /* bnez $src2,$disp16 */
{
-#define FLD(f) abuf->fields.fmt_11_beqz.f
+#define FLD(f) abuf->fields.fmt_beqz.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
if (NESI (* FLD (f_r2), 0)) {
CASE (sem, INSN_BL8) : /* bl $disp8 */
{
-#define FLD(f) abuf->fields.fmt_12_bl8.f
+#define FLD(f) abuf->fields.fmt_bl8.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
CASE (sem, INSN_BL24) : /* bl $disp24 */
{
-#define FLD(f) abuf->fields.fmt_13_bl24.f
+#define FLD(f) abuf->fields.fmt_bl24.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
do {
CASE (sem, INSN_BNC8) : /* bnc $disp8 */
{
-#define FLD(f) abuf->fields.fmt_8_bc8.f
+#define FLD(f) abuf->fields.fmt_bc8.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
if (NOTBI (CPU (h_cond))) {
CASE (sem, INSN_BNC24) : /* bnc $disp24 */
{
-#define FLD(f) abuf->fields.fmt_9_bc24.f
+#define FLD(f) abuf->fields.fmt_bc24.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
if (NOTBI (CPU (h_cond))) {
CASE (sem, INSN_BNE) : /* bne $src1,$src2,$disp16 */
{
-#define FLD(f) abuf->fields.fmt_10_beq.f
+#define FLD(f) abuf->fields.fmt_beq.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
if (NESI (* FLD (f_r1), * FLD (f_r2))) {
CASE (sem, INSN_BRA8) : /* bra $disp8 */
{
-#define FLD(f) abuf->fields.fmt_14_bra8.f
+#define FLD(f) abuf->fields.fmt_bra8.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp8)));
CASE (sem, INSN_BRA24) : /* bra $disp24 */
{
-#define FLD(f) abuf->fields.fmt_15_bra24.f
+#define FLD(f) abuf->fields.fmt_bra24.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_CACHE (sem_arg, FLD (f_disp24)));
CASE (sem, INSN_CMP) : /* cmp $src1,$src2 */
{
-#define FLD(f) abuf->fields.fmt_16_cmp.f
+#define FLD(f) abuf->fields.fmt_cmp.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
CPU (h_cond) = LTSI (* FLD (f_r1), * FLD (f_r2));
}
BREAK (sem);
- CASE (sem, INSN_CMPI) : /* cmpi $src2,#$simm16 */
+ CASE (sem, INSN_CMPI) : /* cmpi $src2,$simm16 */
{
-#define FLD(f) abuf->fields.fmt_17_cmpi.f
+#define FLD(f) abuf->fields.fmt_cmpi.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
CPU (h_cond) = LTSI (* FLD (f_r2), FLD (f_simm16));
CASE (sem, INSN_CMPU) : /* cmpu $src1,$src2 */
{
-#define FLD(f) abuf->fields.fmt_16_cmp.f
+#define FLD(f) abuf->fields.fmt_cmp.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
CPU (h_cond) = LTUSI (* FLD (f_r1), * FLD (f_r2));
}
BREAK (sem);
- CASE (sem, INSN_CMPUI) : /* cmpui $src2,#$uimm16 */
+ CASE (sem, INSN_CMPUI) : /* cmpui $src2,$simm16 */
{
-#define FLD(f) abuf->fields.fmt_18_cmpui.f
+#define FLD(f) abuf->fields.fmt_cmpi.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
- CPU (h_cond) = LTUSI (* FLD (f_r2), FLD (f_uimm16));
+ CPU (h_cond) = LTUSI (* FLD (f_r2), FLD (f_simm16));
TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
#undef FLD
CASE (sem, INSN_DIV) : /* div $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_19_div.f
+#define FLD(f) abuf->fields.fmt_div.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
if (NESI (* FLD (f_r2), 0)) {
CASE (sem, INSN_DIVU) : /* divu $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_19_div.f
+#define FLD(f) abuf->fields.fmt_div.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
if (NESI (* FLD (f_r2), 0)) {
CASE (sem, INSN_REM) : /* rem $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_19_div.f
+#define FLD(f) abuf->fields.fmt_div.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
if (NESI (* FLD (f_r2), 0)) {
CASE (sem, INSN_REMU) : /* remu $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_19_div.f
+#define FLD(f) abuf->fields.fmt_div.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
if (NESI (* FLD (f_r2), 0)) {
CASE (sem, INSN_JL) : /* jl $sr */
{
-#define FLD(f) abuf->fields.fmt_20_jl.f
+#define FLD(f) abuf->fields.fmt_jl.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
CASE (sem, INSN_JMP) : /* jmp $sr */
{
-#define FLD(f) abuf->fields.fmt_21_jmp.f
+#define FLD(f) abuf->fields.fmt_jmp.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, * FLD (f_r2)));
CASE (sem, INSN_LD) : /* ld $dr,@$sr */
{
-#define FLD(f) abuf->fields.fmt_22_ld.f
+#define FLD(f) abuf->fields.fmt_ld.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = GETMEMSI (current_cpu, * FLD (f_r2));
CASE (sem, INSN_LD_D) : /* ld $dr,@($slo16,$sr) */
{
-#define FLD(f) abuf->fields.fmt_23_ld_d.f
+#define FLD(f) abuf->fields.fmt_ld_d.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
* FLD (f_r1) = GETMEMSI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)));
CASE (sem, INSN_LDB) : /* ldb $dr,@$sr */
{
-#define FLD(f) abuf->fields.fmt_24_ldb.f
+#define FLD(f) abuf->fields.fmt_ldb.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = EXTQISI (GETMEMQI (current_cpu, * FLD (f_r2)));
CASE (sem, INSN_LDB_D) : /* ldb $dr,@($slo16,$sr) */
{
-#define FLD(f) abuf->fields.fmt_25_ldb_d.f
+#define FLD(f) abuf->fields.fmt_ldb_d.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
* FLD (f_r1) = EXTQISI (GETMEMQI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16))));
CASE (sem, INSN_LDH) : /* ldh $dr,@$sr */
{
-#define FLD(f) abuf->fields.fmt_26_ldh.f
+#define FLD(f) abuf->fields.fmt_ldh.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = EXTHISI (GETMEMHI (current_cpu, * FLD (f_r2)));
CASE (sem, INSN_LDH_D) : /* ldh $dr,@($slo16,$sr) */
{
-#define FLD(f) abuf->fields.fmt_27_ldh_d.f
+#define FLD(f) abuf->fields.fmt_ldh_d.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
* FLD (f_r1) = EXTHISI (GETMEMHI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16))));
CASE (sem, INSN_LDUB) : /* ldub $dr,@$sr */
{
-#define FLD(f) abuf->fields.fmt_24_ldb.f
+#define FLD(f) abuf->fields.fmt_ldb.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = ZEXTQISI (GETMEMQI (current_cpu, * FLD (f_r2)));
CASE (sem, INSN_LDUB_D) : /* ldub $dr,@($slo16,$sr) */
{
-#define FLD(f) abuf->fields.fmt_25_ldb_d.f
+#define FLD(f) abuf->fields.fmt_ldb_d.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
* FLD (f_r1) = ZEXTQISI (GETMEMQI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16))));
CASE (sem, INSN_LDUH) : /* lduh $dr,@$sr */
{
-#define FLD(f) abuf->fields.fmt_26_ldh.f
+#define FLD(f) abuf->fields.fmt_ldh.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = ZEXTHISI (GETMEMHI (current_cpu, * FLD (f_r2)));
CASE (sem, INSN_LDUH_D) : /* lduh $dr,@($slo16,$sr) */
{
-#define FLD(f) abuf->fields.fmt_27_ldh_d.f
+#define FLD(f) abuf->fields.fmt_ldh_d.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
* FLD (f_r1) = ZEXTHISI (GETMEMHI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16))));
CASE (sem, INSN_LD_PLUS) : /* ld $dr,@$sr+ */
{
-#define FLD(f) abuf->fields.fmt_28_ld_plus.f
+#define FLD(f) abuf->fields.fmt_ld_plus.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
}
BREAK (sem);
- CASE (sem, INSN_LD24) : /* ld24 $dr,#$uimm24 */
+ CASE (sem, INSN_LD24) : /* ld24 $dr,$uimm24 */
{
-#define FLD(f) abuf->fields.fmt_29_ld24.f
+#define FLD(f) abuf->fields.fmt_ld24.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
* FLD (f_r1) = FLD (f_uimm24);
}
BREAK (sem);
- CASE (sem, INSN_LDI8) : /* ldi $dr,#$simm8 */
+ CASE (sem, INSN_LDI8) : /* ldi $dr,$simm8 */
{
-#define FLD(f) abuf->fields.fmt_30_ldi8.f
+#define FLD(f) abuf->fields.fmt_ldi8.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = FLD (f_simm8);
}
BREAK (sem);
- CASE (sem, INSN_LDI16) : /* ldi $dr,$slo16 */
+ CASE (sem, INSN_LDI16) : /* ldi $dr,$hash$slo16 */
{
-#define FLD(f) abuf->fields.fmt_31_ldi16.f
+#define FLD(f) abuf->fields.fmt_ldi16.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
* FLD (f_r1) = FLD (f_simm16);
CASE (sem, INSN_LOCK) : /* lock $dr,@$sr */
{
-#define FLD(f) abuf->fields.fmt_32_lock.f
+#define FLD(f) abuf->fields.fmt_lock.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
CASE (sem, INSN_MACHI) : /* machi $src1,$src2 */
{
-#define FLD(f) abuf->fields.fmt_33_machi.f
+#define FLD(f) abuf->fields.fmt_machi.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = SRADI (SLLDI (ADDDI (CPU (h_accum), MULDI (EXTSIDI (ANDSI (* FLD (f_r1), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16))))), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (ADDDI (m32r_h_accum_get (current_cpu), MULDI (EXTSIDI (ANDSI (* FLD (f_r1), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16))))), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#undef FLD
}
CASE (sem, INSN_MACLO) : /* maclo $src1,$src2 */
{
-#define FLD(f) abuf->fields.fmt_33_machi.f
+#define FLD(f) abuf->fields.fmt_machi.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = SRADI (SLLDI (ADDDI (CPU (h_accum), MULDI (EXTSIDI (SLLSI (* FLD (f_r1), 16)), EXTHIDI (TRUNCSIHI (* FLD (f_r2))))), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (ADDDI (m32r_h_accum_get (current_cpu), MULDI (EXTSIDI (SLLSI (* FLD (f_r1), 16)), EXTHIDI (TRUNCSIHI (* FLD (f_r2))))), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#undef FLD
}
CASE (sem, INSN_MACWHI) : /* macwhi $src1,$src2 */
{
-#define FLD(f) abuf->fields.fmt_33_machi.f
+#define FLD(f) abuf->fields.fmt_machi.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = SRADI (SLLDI (ADDDI (CPU (h_accum), MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16))))), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (ADDDI (m32r_h_accum_get (current_cpu), MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16))))), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#undef FLD
}
CASE (sem, INSN_MACWLO) : /* macwlo $src1,$src2 */
{
-#define FLD(f) abuf->fields.fmt_33_machi.f
+#define FLD(f) abuf->fields.fmt_machi.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = SRADI (SLLDI (ADDDI (CPU (h_accum), MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (* FLD (f_r2))))), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (ADDDI (m32r_h_accum_get (current_cpu), MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (* FLD (f_r2))))), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#undef FLD
}
CASE (sem, INSN_MUL) : /* mul $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = MULSI (* FLD (f_r1), * FLD (f_r2));
CASE (sem, INSN_MULHI) : /* mulhi $src1,$src2 */
{
-#define FLD(f) abuf->fields.fmt_34_mulhi.f
+#define FLD(f) abuf->fields.fmt_mulhi.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = SRADI (SLLDI (MULDI (EXTSIDI (ANDSI (* FLD (f_r1), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16)))), 16), 16);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (MULDI (EXTSIDI (ANDSI (* FLD (f_r1), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16)))), 16), 16));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#undef FLD
}
CASE (sem, INSN_MULLO) : /* mullo $src1,$src2 */
{
-#define FLD(f) abuf->fields.fmt_34_mulhi.f
+#define FLD(f) abuf->fields.fmt_mulhi.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = SRADI (SLLDI (MULDI (EXTSIDI (SLLSI (* FLD (f_r1), 16)), EXTHIDI (TRUNCSIHI (* FLD (f_r2)))), 16), 16);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (MULDI (EXTSIDI (SLLSI (* FLD (f_r1), 16)), EXTHIDI (TRUNCSIHI (* FLD (f_r2)))), 16), 16));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#undef FLD
}
CASE (sem, INSN_MULWHI) : /* mulwhi $src1,$src2 */
{
-#define FLD(f) abuf->fields.fmt_34_mulhi.f
+#define FLD(f) abuf->fields.fmt_mulhi.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = SRADI (SLLDI (MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16)))), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16)))), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#undef FLD
}
CASE (sem, INSN_MULWLO) : /* mulwlo $src1,$src2 */
{
-#define FLD(f) abuf->fields.fmt_34_mulhi.f
+#define FLD(f) abuf->fields.fmt_mulhi.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = SRADI (SLLDI (MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (* FLD (f_r2)))), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (* FLD (f_r2)))), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#undef FLD
}
CASE (sem, INSN_MV) : /* mv $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_35_mv.f
+#define FLD(f) abuf->fields.fmt_mv.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = * FLD (f_r2);
CASE (sem, INSN_MVFACHI) : /* mvfachi $dr */
{
-#define FLD(f) abuf->fields.fmt_36_mvfachi.f
+#define FLD(f) abuf->fields.fmt_mvfachi.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
-* FLD (f_r1) = TRUNCDISI (SRADI (CPU (h_accum), 32));
+* FLD (f_r1) = TRUNCDISI (SRADI (m32r_h_accum_get (current_cpu), 32));
TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1));
#undef FLD
CASE (sem, INSN_MVFACLO) : /* mvfaclo $dr */
{
-#define FLD(f) abuf->fields.fmt_36_mvfachi.f
+#define FLD(f) abuf->fields.fmt_mvfachi.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
-* FLD (f_r1) = TRUNCDISI (CPU (h_accum));
+* FLD (f_r1) = TRUNCDISI (m32r_h_accum_get (current_cpu));
TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1));
#undef FLD
CASE (sem, INSN_MVFACMI) : /* mvfacmi $dr */
{
-#define FLD(f) abuf->fields.fmt_36_mvfachi.f
+#define FLD(f) abuf->fields.fmt_mvfachi.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
-* FLD (f_r1) = TRUNCDISI (SRADI (CPU (h_accum), 16));
+* FLD (f_r1) = TRUNCDISI (SRADI (m32r_h_accum_get (current_cpu), 16));
TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1));
#undef FLD
CASE (sem, INSN_MVFC) : /* mvfc $dr,$scr */
{
-#define FLD(f) abuf->fields.fmt_37_mvfc.f
+#define FLD(f) abuf->fields.fmt_mvfc.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = m32r_h_cr_get (current_cpu, FLD (f_r2));
CASE (sem, INSN_MVTACHI) : /* mvtachi $src1 */
{
-#define FLD(f) abuf->fields.fmt_38_mvtachi.f
+#define FLD(f) abuf->fields.fmt_mvtachi.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = ORDI (ANDDI (CPU (h_accum), MAKEDI (0, 0xffffffff)), SLLDI (EXTSIDI (* FLD (f_r1)), 32));
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, ORDI (ANDDI (m32r_h_accum_get (current_cpu), MAKEDI (0, 0xffffffff)), SLLDI (EXTSIDI (* FLD (f_r1)), 32)));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#undef FLD
}
CASE (sem, INSN_MVTACLO) : /* mvtaclo $src1 */
{
-#define FLD(f) abuf->fields.fmt_38_mvtachi.f
+#define FLD(f) abuf->fields.fmt_mvtachi.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = ORDI (ANDDI (CPU (h_accum), MAKEDI (0xffffffff, 0)), ZEXTSIDI (* FLD (f_r1)));
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, ORDI (ANDDI (m32r_h_accum_get (current_cpu), MAKEDI (0xffffffff, 0)), ZEXTSIDI (* FLD (f_r1))));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#undef FLD
}
CASE (sem, INSN_MVTC) : /* mvtc $sr,$dcr */
{
-#define FLD(f) abuf->fields.fmt_39_mvtc.f
+#define FLD(f) abuf->fields.fmt_mvtc.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
m32r_h_cr_set (current_cpu, FLD (f_r1), * FLD (f_r2));
CASE (sem, INSN_NEG) : /* neg $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_35_mv.f
+#define FLD(f) abuf->fields.fmt_mv.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = NEGSI (* FLD (f_r2));
CASE (sem, INSN_NOP) : /* nop */
{
-#define FLD(f) abuf->fields.fmt_40_nop.f
+#define FLD(f) abuf->fields.fmt_nop.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
PROFILE_COUNT_FILLNOPS (current_cpu, abuf->addr);
CASE (sem, INSN_NOT) : /* not $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_35_mv.f
+#define FLD(f) abuf->fields.fmt_mv.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = INVSI (* FLD (f_r2));
CASE (sem, INSN_RAC) : /* rac */
{
-#define FLD(f) abuf->fields.fmt_41_rac.f
+#define FLD(f) abuf->fields.fmt_rac.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
DI tmp_tmp1;
- tmp_tmp1 = SLLDI (CPU (h_accum), 1);
+ tmp_tmp1 = SLLDI (m32r_h_accum_get (current_cpu), 1);
tmp_tmp1 = ADDDI (tmp_tmp1, MAKEDI (0, 32768));
- CPU (h_accum) = (GTDI (tmp_tmp1, MAKEDI (32767, 0xffff0000))) ? (MAKEDI (32767, 0xffff0000)) : (LTDI (tmp_tmp1, MAKEDI (0xffff8000, 0))) ? (MAKEDI (0xffff8000, 0)) : (ANDDI (tmp_tmp1, MAKEDI (0xffffffff, 0xffff0000)));
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, (GTDI (tmp_tmp1, MAKEDI (32767, 0xffff0000))) ? (MAKEDI (32767, 0xffff0000)) : (LTDI (tmp_tmp1, MAKEDI (0xffff8000, 0))) ? (MAKEDI (0xffff8000, 0)) : (ANDDI (tmp_tmp1, MAKEDI (0xffffffff, 0xffff0000))));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
} while (0);
#undef FLD
CASE (sem, INSN_RACH) : /* rach */
{
-#define FLD(f) abuf->fields.fmt_41_rac.f
+#define FLD(f) abuf->fields.fmt_rac.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
DI tmp_tmp1;
- tmp_tmp1 = ANDDI (CPU (h_accum), MAKEDI (16777215, 0xffffffff));
+ tmp_tmp1 = ANDDI (m32r_h_accum_get (current_cpu), MAKEDI (16777215, 0xffffffff));
if (ANDIFSI (GEDI (tmp_tmp1, MAKEDI (16383, 0x80000000)), LEDI (tmp_tmp1, MAKEDI (8388607, 0xffffffff)))) {
tmp_tmp1 = MAKEDI (16383, 0x80000000);
} else {
if (ANDIFSI (GEDI (tmp_tmp1, MAKEDI (8388608, 0)), LEDI (tmp_tmp1, MAKEDI (16760832, 0)))) {
tmp_tmp1 = MAKEDI (16760832, 0);
} else {
- tmp_tmp1 = ANDDI (ADDDI (CPU (h_accum), MAKEDI (0, 1073741824)), MAKEDI (0xffffffff, 0x80000000));
+ tmp_tmp1 = ANDDI (ADDDI (m32r_h_accum_get (current_cpu), MAKEDI (0, 1073741824)), MAKEDI (0xffffffff, 0x80000000));
}
}
tmp_tmp1 = SLLDI (tmp_tmp1, 1);
- CPU (h_accum) = SRADI (SLLDI (tmp_tmp1, 7), 7);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (tmp_tmp1, 7), 7));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
} while (0);
#undef FLD
CASE (sem, INSN_RTE) : /* rte */
{
-#define FLD(f) abuf->fields.fmt_42_rte.f
+#define FLD(f) abuf->fields.fmt_rte.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
TRACE_RESULT (current_cpu, "h-ie-0", 'x', CPU (h_ie));
CPU (h_cond) = CPU (h_bcond);
TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, CPU (h_bpc)));
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, ANDSI (CPU (h_bpc), -4)));
TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc));
} while (0);
}
BREAK (sem);
- CASE (sem, INSN_SETH) : /* seth $dr,#$hi16 */
+ CASE (sem, INSN_SETH) : /* seth $dr,$hash$hi16 */
{
-#define FLD(f) abuf->fields.fmt_43_seth.f
+#define FLD(f) abuf->fields.fmt_seth.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
* FLD (f_r1) = SLLSI (FLD (f_hi16), 16);
CASE (sem, INSN_SLL) : /* sll $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = SLLSI (* FLD (f_r1), ANDSI (* FLD (f_r2), 31));
}
BREAK (sem);
- CASE (sem, INSN_SLL3) : /* sll3 $dr,$sr,#$simm16 */
+ CASE (sem, INSN_SLL3) : /* sll3 $dr,$sr,$simm16 */
{
-#define FLD(f) abuf->fields.fmt_44_sll3.f
+#define FLD(f) abuf->fields.fmt_sll3.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
* FLD (f_r1) = SLLSI (* FLD (f_r2), ANDSI (FLD (f_simm16), 31));
}
BREAK (sem);
- CASE (sem, INSN_SLLI) : /* slli $dr,#$uimm5 */
+ CASE (sem, INSN_SLLI) : /* slli $dr,$uimm5 */
{
-#define FLD(f) abuf->fields.fmt_45_slli.f
+#define FLD(f) abuf->fields.fmt_slli.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = SLLSI (* FLD (f_r1), FLD (f_uimm5));
CASE (sem, INSN_SRA) : /* sra $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = SRASI (* FLD (f_r1), ANDSI (* FLD (f_r2), 31));
}
BREAK (sem);
- CASE (sem, INSN_SRA3) : /* sra3 $dr,$sr,#$simm16 */
+ CASE (sem, INSN_SRA3) : /* sra3 $dr,$sr,$simm16 */
{
-#define FLD(f) abuf->fields.fmt_44_sll3.f
+#define FLD(f) abuf->fields.fmt_sll3.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
* FLD (f_r1) = SRASI (* FLD (f_r2), ANDSI (FLD (f_simm16), 31));
}
BREAK (sem);
- CASE (sem, INSN_SRAI) : /* srai $dr,#$uimm5 */
+ CASE (sem, INSN_SRAI) : /* srai $dr,$uimm5 */
{
-#define FLD(f) abuf->fields.fmt_45_slli.f
+#define FLD(f) abuf->fields.fmt_slli.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = SRASI (* FLD (f_r1), FLD (f_uimm5));
CASE (sem, INSN_SRL) : /* srl $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = SRLSI (* FLD (f_r1), ANDSI (* FLD (f_r2), 31));
}
BREAK (sem);
- CASE (sem, INSN_SRL3) : /* srl3 $dr,$sr,#$simm16 */
+ CASE (sem, INSN_SRL3) : /* srl3 $dr,$sr,$simm16 */
{
-#define FLD(f) abuf->fields.fmt_44_sll3.f
+#define FLD(f) abuf->fields.fmt_sll3.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
* FLD (f_r1) = SRLSI (* FLD (f_r2), ANDSI (FLD (f_simm16), 31));
}
BREAK (sem);
- CASE (sem, INSN_SRLI) : /* srli $dr,#$uimm5 */
+ CASE (sem, INSN_SRLI) : /* srli $dr,$uimm5 */
{
-#define FLD(f) abuf->fields.fmt_45_slli.f
+#define FLD(f) abuf->fields.fmt_slli.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = SRLSI (* FLD (f_r1), FLD (f_uimm5));
CASE (sem, INSN_ST) : /* st $src1,@$src2 */
{
-#define FLD(f) abuf->fields.fmt_46_st.f
+#define FLD(f) abuf->fields.fmt_st.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
SETMEMSI (current_cpu, * FLD (f_r2), * FLD (f_r1));
CASE (sem, INSN_ST_D) : /* st $src1,@($slo16,$src2) */
{
-#define FLD(f) abuf->fields.fmt_47_st_d.f
+#define FLD(f) abuf->fields.fmt_st_d.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
SETMEMSI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)), * FLD (f_r1));
CASE (sem, INSN_STB) : /* stb $src1,@$src2 */
{
-#define FLD(f) abuf->fields.fmt_48_stb.f
+#define FLD(f) abuf->fields.fmt_stb.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
SETMEMQI (current_cpu, * FLD (f_r2), * FLD (f_r1));
CASE (sem, INSN_STB_D) : /* stb $src1,@($slo16,$src2) */
{
-#define FLD(f) abuf->fields.fmt_49_stb_d.f
+#define FLD(f) abuf->fields.fmt_stb_d.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
SETMEMQI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)), * FLD (f_r1));
CASE (sem, INSN_STH) : /* sth $src1,@$src2 */
{
-#define FLD(f) abuf->fields.fmt_50_sth.f
+#define FLD(f) abuf->fields.fmt_sth.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
SETMEMHI (current_cpu, * FLD (f_r2), * FLD (f_r1));
CASE (sem, INSN_STH_D) : /* sth $src1,@($slo16,$src2) */
{
-#define FLD(f) abuf->fields.fmt_51_sth_d.f
+#define FLD(f) abuf->fields.fmt_sth_d.f
new_pc = SEM_NEXT_PC (sem_arg, 4);
SETMEMHI (current_cpu, ADDSI (* FLD (f_r2), FLD (f_simm16)), * FLD (f_r1));
CASE (sem, INSN_ST_PLUS) : /* st $src1,@+$src2 */
{
-#define FLD(f) abuf->fields.fmt_52_st_plus.f
+#define FLD(f) abuf->fields.fmt_st_plus.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
CASE (sem, INSN_ST_MINUS) : /* st $src1,@-$src2 */
{
-#define FLD(f) abuf->fields.fmt_52_st_plus.f
+#define FLD(f) abuf->fields.fmt_st_plus.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
CASE (sem, INSN_SUB) : /* sub $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
* FLD (f_r1) = SUBSI (* FLD (f_r1), * FLD (f_r2));
CASE (sem, INSN_SUBV) : /* subv $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_5_addv.f
+#define FLD(f) abuf->fields.fmt_addv.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
CASE (sem, INSN_SUBX) : /* subx $dr,$sr */
{
-#define FLD(f) abuf->fields.fmt_7_addx.f
+#define FLD(f) abuf->fields.fmt_addx.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
}
BREAK (sem);
- CASE (sem, INSN_TRAP) : /* trap #$uimm4 */
+ CASE (sem, INSN_TRAP) : /* trap $uimm4 */
{
-#define FLD(f) abuf->fields.fmt_53_trap.f
+#define FLD(f) abuf->fields.fmt_trap.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
m32r_h_cr_set (current_cpu, 6, ADDSI (CPU (h_pc), 4));
TRACE_RESULT (current_cpu, "h-cr-6", 'x', m32r_h_cr_get (current_cpu, 6));
-m32r_h_cr_set (current_cpu, 0, ANDSI (SRLSI (m32r_h_cr_get (current_cpu, 0), 8), 33488896));
+m32r_h_cr_set (current_cpu, 0, ANDSI (SLLSI (m32r_h_cr_get (current_cpu, 0), 8), 65408));
TRACE_RESULT (current_cpu, "h-cr-0", 'x', m32r_h_cr_get (current_cpu, 0));
-do_trap (current_cpu, FLD (f_uimm4));
-; /*clobber*/
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, do_trap (current_cpu, FLD (f_uimm4))));
+ TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc));
} while (0);
#undef FLD
CASE (sem, INSN_UNLOCK) : /* unlock $src1,@$src2 */
{
-#define FLD(f) abuf->fields.fmt_54_unlock.f
+#define FLD(f) abuf->fields.fmt_unlock.f
new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
CIA
SEM_FN_NAME (m32r,add) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
#undef FLD
}
-/* Perform add3: add3 $dr,$sr,#$slo16. */
+/* Perform add3: add3 $dr,$sr,$hash$slo16. */
CIA
SEM_FN_NAME (m32r,add3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_1_add3.f
+#define FLD(f) abuf->fields.fmt_add3.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,and) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
#undef FLD
}
-/* Perform and3: and3 $dr,$sr,#$uimm16. */
+/* Perform and3: and3 $dr,$sr,$uimm16. */
CIA
SEM_FN_NAME (m32r,and3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_2_and3.f
+#define FLD(f) abuf->fields.fmt_and3.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,or) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
#undef FLD
}
-/* Perform or3: or3 $dr,$sr,#$ulo16. */
+/* Perform or3: or3 $dr,$sr,$hash$ulo16. */
CIA
SEM_FN_NAME (m32r,or3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_3_or3.f
+#define FLD(f) abuf->fields.fmt_or3.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,xor) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
#undef FLD
}
-/* Perform xor3: xor3 $dr,$sr,#$uimm16. */
+/* Perform xor3: xor3 $dr,$sr,$uimm16. */
CIA
SEM_FN_NAME (m32r,xor3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_2_and3.f
+#define FLD(f) abuf->fields.fmt_and3.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
#undef FLD
}
-/* Perform addi: addi $dr,#$simm8. */
+/* Perform addi: addi $dr,$simm8. */
CIA
SEM_FN_NAME (m32r,addi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_4_addi.f
+#define FLD(f) abuf->fields.fmt_addi.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,addv) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_5_addv.f
+#define FLD(f) abuf->fields.fmt_addv.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
#undef FLD
}
-/* Perform addv3: addv3 $dr,$sr,#$simm16. */
+/* Perform addv3: addv3 $dr,$sr,$simm16. */
CIA
SEM_FN_NAME (m32r,addv3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_6_addv3.f
+#define FLD(f) abuf->fields.fmt_addv3.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,addx) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_7_addx.f
+#define FLD(f) abuf->fields.fmt_addx.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,bc8) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_8_bc8.f
+#define FLD(f) abuf->fields.fmt_bc8.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,bc24) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_9_bc24.f
+#define FLD(f) abuf->fields.fmt_bc24.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,beq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_10_beq.f
+#define FLD(f) abuf->fields.fmt_beq.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,beqz) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_11_beqz.f
+#define FLD(f) abuf->fields.fmt_beqz.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,bgez) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_11_beqz.f
+#define FLD(f) abuf->fields.fmt_beqz.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,bgtz) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_11_beqz.f
+#define FLD(f) abuf->fields.fmt_beqz.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,blez) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_11_beqz.f
+#define FLD(f) abuf->fields.fmt_beqz.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,bltz) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_11_beqz.f
+#define FLD(f) abuf->fields.fmt_beqz.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,bnez) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_11_beqz.f
+#define FLD(f) abuf->fields.fmt_beqz.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,bl8) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_12_bl8.f
+#define FLD(f) abuf->fields.fmt_bl8.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,bl24) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_13_bl24.f
+#define FLD(f) abuf->fields.fmt_bl24.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,bnc8) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_8_bc8.f
+#define FLD(f) abuf->fields.fmt_bc8.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,bnc24) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_9_bc24.f
+#define FLD(f) abuf->fields.fmt_bc24.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,bne) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_10_beq.f
+#define FLD(f) abuf->fields.fmt_beq.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,bra8) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_14_bra8.f
+#define FLD(f) abuf->fields.fmt_bra8.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,bra24) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_15_bra24.f
+#define FLD(f) abuf->fields.fmt_bra24.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,cmp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_16_cmp.f
+#define FLD(f) abuf->fields.fmt_cmp.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
#undef FLD
}
-/* Perform cmpi: cmpi $src2,#$simm16. */
+/* Perform cmpi: cmpi $src2,$simm16. */
CIA
SEM_FN_NAME (m32r,cmpi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_17_cmpi.f
+#define FLD(f) abuf->fields.fmt_cmpi.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,cmpu) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_16_cmp.f
+#define FLD(f) abuf->fields.fmt_cmp.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
#undef FLD
}
-/* Perform cmpui: cmpui $src2,#$uimm16. */
+/* Perform cmpui: cmpui $src2,$simm16. */
CIA
SEM_FN_NAME (m32r,cmpui) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_18_cmpui.f
+#define FLD(f) abuf->fields.fmt_cmpi.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
- CPU (h_cond) = LTUSI (* FLD (f_r2), FLD (f_uimm16));
+ CPU (h_cond) = LTUSI (* FLD (f_r2), FLD (f_simm16));
TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
#if WITH_PROFILE_MODEL_P
CIA
SEM_FN_NAME (m32r,div) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_19_div.f
+#define FLD(f) abuf->fields.fmt_div.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,divu) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_19_div.f
+#define FLD(f) abuf->fields.fmt_div.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,rem) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_19_div.f
+#define FLD(f) abuf->fields.fmt_div.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,remu) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_19_div.f
+#define FLD(f) abuf->fields.fmt_div.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,jl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_20_jl.f
+#define FLD(f) abuf->fields.fmt_jl.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,jmp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_21_jmp.f
+#define FLD(f) abuf->fields.fmt_jmp.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
int taken_p = 0;
CIA
SEM_FN_NAME (m32r,ld) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_22_ld.f
+#define FLD(f) abuf->fields.fmt_ld.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,ld_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_23_ld_d.f
+#define FLD(f) abuf->fields.fmt_ld_d.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,ldb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_24_ldb.f
+#define FLD(f) abuf->fields.fmt_ldb.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,ldb_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_25_ldb_d.f
+#define FLD(f) abuf->fields.fmt_ldb_d.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,ldh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_26_ldh.f
+#define FLD(f) abuf->fields.fmt_ldh.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,ldh_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_27_ldh_d.f
+#define FLD(f) abuf->fields.fmt_ldh_d.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,ldub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_24_ldb.f
+#define FLD(f) abuf->fields.fmt_ldb.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,ldub_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_25_ldb_d.f
+#define FLD(f) abuf->fields.fmt_ldb_d.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,lduh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_26_ldh.f
+#define FLD(f) abuf->fields.fmt_ldh.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,lduh_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_27_ldh_d.f
+#define FLD(f) abuf->fields.fmt_ldh_d.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,ld_plus) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_28_ld_plus.f
+#define FLD(f) abuf->fields.fmt_ld_plus.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
#undef FLD
}
-/* Perform ld24: ld24 $dr,#$uimm24. */
+/* Perform ld24: ld24 $dr,$uimm24. */
CIA
SEM_FN_NAME (m32r,ld24) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_29_ld24.f
+#define FLD(f) abuf->fields.fmt_ld24.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
#undef FLD
}
-/* Perform ldi8: ldi $dr,#$simm8. */
+/* Perform ldi8: ldi $dr,$simm8. */
CIA
SEM_FN_NAME (m32r,ldi8) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_30_ldi8.f
+#define FLD(f) abuf->fields.fmt_ldi8.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
#undef FLD
}
-/* Perform ldi16: ldi $dr,$slo16. */
+/* Perform ldi16: ldi $dr,$hash$slo16. */
CIA
SEM_FN_NAME (m32r,ldi16) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_31_ldi16.f
+#define FLD(f) abuf->fields.fmt_ldi16.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,lock) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_32_lock.f
+#define FLD(f) abuf->fields.fmt_lock.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,machi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_33_machi.f
+#define FLD(f) abuf->fields.fmt_machi.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = SRADI (SLLDI (ADDDI (CPU (h_accum), MULDI (EXTSIDI (ANDSI (* FLD (f_r1), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16))))), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (ADDDI (m32r_h_accum_get (current_cpu), MULDI (EXTSIDI (ANDSI (* FLD (f_r1), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16))))), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#if WITH_PROFILE_MODEL_P
if (PROFILE_MODEL_P (current_cpu))
CIA
SEM_FN_NAME (m32r,maclo) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_33_machi.f
+#define FLD(f) abuf->fields.fmt_machi.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = SRADI (SLLDI (ADDDI (CPU (h_accum), MULDI (EXTSIDI (SLLSI (* FLD (f_r1), 16)), EXTHIDI (TRUNCSIHI (* FLD (f_r2))))), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (ADDDI (m32r_h_accum_get (current_cpu), MULDI (EXTSIDI (SLLSI (* FLD (f_r1), 16)), EXTHIDI (TRUNCSIHI (* FLD (f_r2))))), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#if WITH_PROFILE_MODEL_P
if (PROFILE_MODEL_P (current_cpu))
CIA
SEM_FN_NAME (m32r,macwhi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_33_machi.f
+#define FLD(f) abuf->fields.fmt_machi.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = SRADI (SLLDI (ADDDI (CPU (h_accum), MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16))))), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (ADDDI (m32r_h_accum_get (current_cpu), MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16))))), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#if WITH_PROFILE_MODEL_P
if (PROFILE_MODEL_P (current_cpu))
CIA
SEM_FN_NAME (m32r,macwlo) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_33_machi.f
+#define FLD(f) abuf->fields.fmt_machi.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = SRADI (SLLDI (ADDDI (CPU (h_accum), MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (* FLD (f_r2))))), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (ADDDI (m32r_h_accum_get (current_cpu), MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (* FLD (f_r2))))), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#if WITH_PROFILE_MODEL_P
if (PROFILE_MODEL_P (current_cpu))
CIA
SEM_FN_NAME (m32r,mul) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,mulhi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_34_mulhi.f
+#define FLD(f) abuf->fields.fmt_mulhi.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = SRADI (SLLDI (MULDI (EXTSIDI (ANDSI (* FLD (f_r1), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16)))), 16), 16);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (MULDI (EXTSIDI (ANDSI (* FLD (f_r1), 0xffff0000)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16)))), 16), 16));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#if WITH_PROFILE_MODEL_P
if (PROFILE_MODEL_P (current_cpu))
CIA
SEM_FN_NAME (m32r,mullo) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_34_mulhi.f
+#define FLD(f) abuf->fields.fmt_mulhi.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = SRADI (SLLDI (MULDI (EXTSIDI (SLLSI (* FLD (f_r1), 16)), EXTHIDI (TRUNCSIHI (* FLD (f_r2)))), 16), 16);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (MULDI (EXTSIDI (SLLSI (* FLD (f_r1), 16)), EXTHIDI (TRUNCSIHI (* FLD (f_r2)))), 16), 16));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#if WITH_PROFILE_MODEL_P
if (PROFILE_MODEL_P (current_cpu))
CIA
SEM_FN_NAME (m32r,mulwhi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_34_mulhi.f
+#define FLD(f) abuf->fields.fmt_mulhi.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = SRADI (SLLDI (MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16)))), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (SRASI (* FLD (f_r2), 16)))), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#if WITH_PROFILE_MODEL_P
if (PROFILE_MODEL_P (current_cpu))
CIA
SEM_FN_NAME (m32r,mulwlo) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_34_mulhi.f
+#define FLD(f) abuf->fields.fmt_mulhi.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = SRADI (SLLDI (MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (* FLD (f_r2)))), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (MULDI (EXTSIDI (* FLD (f_r1)), EXTHIDI (TRUNCSIHI (* FLD (f_r2)))), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#if WITH_PROFILE_MODEL_P
if (PROFILE_MODEL_P (current_cpu))
CIA
SEM_FN_NAME (m32r,mv) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_35_mv.f
+#define FLD(f) abuf->fields.fmt_mv.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,mvfachi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_36_mvfachi.f
+#define FLD(f) abuf->fields.fmt_mvfachi.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
-* FLD (f_r1) = TRUNCDISI (SRADI (CPU (h_accum), 32));
+* FLD (f_r1) = TRUNCDISI (SRADI (m32r_h_accum_get (current_cpu), 32));
TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1));
#if WITH_PROFILE_MODEL_P
CIA
SEM_FN_NAME (m32r,mvfaclo) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_36_mvfachi.f
+#define FLD(f) abuf->fields.fmt_mvfachi.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
-* FLD (f_r1) = TRUNCDISI (CPU (h_accum));
+* FLD (f_r1) = TRUNCDISI (m32r_h_accum_get (current_cpu));
TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1));
#if WITH_PROFILE_MODEL_P
CIA
SEM_FN_NAME (m32r,mvfacmi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_36_mvfachi.f
+#define FLD(f) abuf->fields.fmt_mvfachi.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
-* FLD (f_r1) = TRUNCDISI (SRADI (CPU (h_accum), 16));
+* FLD (f_r1) = TRUNCDISI (SRADI (m32r_h_accum_get (current_cpu), 16));
TRACE_RESULT (current_cpu, "dr", 'x', * FLD (f_r1));
#if WITH_PROFILE_MODEL_P
CIA
SEM_FN_NAME (m32r,mvfc) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_37_mvfc.f
+#define FLD(f) abuf->fields.fmt_mvfc.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,mvtachi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_38_mvtachi.f
+#define FLD(f) abuf->fields.fmt_mvtachi.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = ORDI (ANDDI (CPU (h_accum), MAKEDI (0, 0xffffffff)), SLLDI (EXTSIDI (* FLD (f_r1)), 32));
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, ORDI (ANDDI (m32r_h_accum_get (current_cpu), MAKEDI (0, 0xffffffff)), SLLDI (EXTSIDI (* FLD (f_r1)), 32)));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#if WITH_PROFILE_MODEL_P
if (PROFILE_MODEL_P (current_cpu))
CIA
SEM_FN_NAME (m32r,mvtaclo) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_38_mvtachi.f
+#define FLD(f) abuf->fields.fmt_mvtachi.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
- CPU (h_accum) = ORDI (ANDDI (CPU (h_accum), MAKEDI (0xffffffff, 0)), ZEXTSIDI (* FLD (f_r1)));
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, ORDI (ANDDI (m32r_h_accum_get (current_cpu), MAKEDI (0xffffffff, 0)), ZEXTSIDI (* FLD (f_r1))));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
#if WITH_PROFILE_MODEL_P
if (PROFILE_MODEL_P (current_cpu))
CIA
SEM_FN_NAME (m32r,mvtc) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_39_mvtc.f
+#define FLD(f) abuf->fields.fmt_mvtc.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,neg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_35_mv.f
+#define FLD(f) abuf->fields.fmt_mv.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,nop) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_40_nop.f
+#define FLD(f) abuf->fields.fmt_nop.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,not) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_35_mv.f
+#define FLD(f) abuf->fields.fmt_mv.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,rac) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_41_rac.f
+#define FLD(f) abuf->fields.fmt_rac.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
DI tmp_tmp1;
- tmp_tmp1 = SLLDI (CPU (h_accum), 1);
+ tmp_tmp1 = SLLDI (m32r_h_accum_get (current_cpu), 1);
tmp_tmp1 = ADDDI (tmp_tmp1, MAKEDI (0, 32768));
- CPU (h_accum) = (GTDI (tmp_tmp1, MAKEDI (32767, 0xffff0000))) ? (MAKEDI (32767, 0xffff0000)) : (LTDI (tmp_tmp1, MAKEDI (0xffff8000, 0))) ? (MAKEDI (0xffff8000, 0)) : (ANDDI (tmp_tmp1, MAKEDI (0xffffffff, 0xffff0000)));
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, (GTDI (tmp_tmp1, MAKEDI (32767, 0xffff0000))) ? (MAKEDI (32767, 0xffff0000)) : (LTDI (tmp_tmp1, MAKEDI (0xffff8000, 0))) ? (MAKEDI (0xffff8000, 0)) : (ANDDI (tmp_tmp1, MAKEDI (0xffffffff, 0xffff0000))));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
} while (0);
#if WITH_PROFILE_MODEL_P
CIA
SEM_FN_NAME (m32r,rach) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_41_rac.f
+#define FLD(f) abuf->fields.fmt_rac.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
do {
DI tmp_tmp1;
- tmp_tmp1 = ANDDI (CPU (h_accum), MAKEDI (16777215, 0xffffffff));
+ tmp_tmp1 = ANDDI (m32r_h_accum_get (current_cpu), MAKEDI (16777215, 0xffffffff));
if (ANDIFSI (GEDI (tmp_tmp1, MAKEDI (16383, 0x80000000)), LEDI (tmp_tmp1, MAKEDI (8388607, 0xffffffff)))) {
tmp_tmp1 = MAKEDI (16383, 0x80000000);
} else {
if (ANDIFSI (GEDI (tmp_tmp1, MAKEDI (8388608, 0)), LEDI (tmp_tmp1, MAKEDI (16760832, 0)))) {
tmp_tmp1 = MAKEDI (16760832, 0);
} else {
- tmp_tmp1 = ANDDI (ADDDI (CPU (h_accum), MAKEDI (0, 1073741824)), MAKEDI (0xffffffff, 0x80000000));
+ tmp_tmp1 = ANDDI (ADDDI (m32r_h_accum_get (current_cpu), MAKEDI (0, 1073741824)), MAKEDI (0xffffffff, 0x80000000));
}
}
tmp_tmp1 = SLLDI (tmp_tmp1, 1);
- CPU (h_accum) = SRADI (SLLDI (tmp_tmp1, 7), 7);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32r_h_accum_set (current_cpu, SRADI (SLLDI (tmp_tmp1, 7), 7));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32r_h_accum_get (current_cpu));
} while (0);
#if WITH_PROFILE_MODEL_P
CIA
SEM_FN_NAME (m32r,rte) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_42_rte.f
+#define FLD(f) abuf->fields.fmt_rte.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
int taken_p = 0;
TRACE_RESULT (current_cpu, "h-ie-0", 'x', CPU (h_ie));
CPU (h_cond) = CPU (h_bcond);
TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
- BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, CPU (h_bpc)));
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, ANDSI (CPU (h_bpc), -4)));
taken_p = 1;
TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc));
} while (0);
#undef FLD
}
-/* Perform seth: seth $dr,#$hi16. */
+/* Perform seth: seth $dr,$hash$hi16. */
CIA
SEM_FN_NAME (m32r,seth) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_43_seth.f
+#define FLD(f) abuf->fields.fmt_seth.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,sll) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
#undef FLD
}
-/* Perform sll3: sll3 $dr,$sr,#$simm16. */
+/* Perform sll3: sll3 $dr,$sr,$simm16. */
CIA
SEM_FN_NAME (m32r,sll3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_44_sll3.f
+#define FLD(f) abuf->fields.fmt_sll3.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
#undef FLD
}
-/* Perform slli: slli $dr,#$uimm5. */
+/* Perform slli: slli $dr,$uimm5. */
CIA
SEM_FN_NAME (m32r,slli) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_45_slli.f
+#define FLD(f) abuf->fields.fmt_slli.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,sra) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
#undef FLD
}
-/* Perform sra3: sra3 $dr,$sr,#$simm16. */
+/* Perform sra3: sra3 $dr,$sr,$simm16. */
CIA
SEM_FN_NAME (m32r,sra3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_44_sll3.f
+#define FLD(f) abuf->fields.fmt_sll3.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
#undef FLD
}
-/* Perform srai: srai $dr,#$uimm5. */
+/* Perform srai: srai $dr,$uimm5. */
CIA
SEM_FN_NAME (m32r,srai) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_45_slli.f
+#define FLD(f) abuf->fields.fmt_slli.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,srl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
#undef FLD
}
-/* Perform srl3: srl3 $dr,$sr,#$simm16. */
+/* Perform srl3: srl3 $dr,$sr,$simm16. */
CIA
SEM_FN_NAME (m32r,srl3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_44_sll3.f
+#define FLD(f) abuf->fields.fmt_sll3.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
#undef FLD
}
-/* Perform srli: srli $dr,#$uimm5. */
+/* Perform srli: srli $dr,$uimm5. */
CIA
SEM_FN_NAME (m32r,srli) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_45_slli.f
+#define FLD(f) abuf->fields.fmt_slli.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,st) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_46_st.f
+#define FLD(f) abuf->fields.fmt_st.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,st_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_47_st_d.f
+#define FLD(f) abuf->fields.fmt_st_d.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,stb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_48_stb.f
+#define FLD(f) abuf->fields.fmt_stb.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,stb_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_49_stb_d.f
+#define FLD(f) abuf->fields.fmt_stb_d.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,sth) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_50_sth.f
+#define FLD(f) abuf->fields.fmt_sth.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,sth_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_51_sth_d.f
+#define FLD(f) abuf->fields.fmt_sth_d.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 4);
CIA
SEM_FN_NAME (m32r,st_plus) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_52_st_plus.f
+#define FLD(f) abuf->fields.fmt_st_plus.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,st_minus) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_52_st_plus.f
+#define FLD(f) abuf->fields.fmt_st_plus.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,sub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_0_add.f
+#define FLD(f) abuf->fields.fmt_add.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,subv) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_5_addv.f
+#define FLD(f) abuf->fields.fmt_addv.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
CIA
SEM_FN_NAME (m32r,subx) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_7_addx.f
+#define FLD(f) abuf->fields.fmt_addx.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
#undef FLD
}
-/* Perform trap: trap #$uimm4. */
+/* Perform trap: trap $uimm4. */
CIA
SEM_FN_NAME (m32r,trap) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_53_trap.f
+#define FLD(f) abuf->fields.fmt_trap.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
int taken_p = 0;
do {
m32r_h_cr_set (current_cpu, 6, ADDSI (CPU (h_pc), 4));
TRACE_RESULT (current_cpu, "h-cr-6", 'x', m32r_h_cr_get (current_cpu, 6));
-m32r_h_cr_set (current_cpu, 0, ANDSI (SRLSI (m32r_h_cr_get (current_cpu, 0), 8), 33488896));
+m32r_h_cr_set (current_cpu, 0, ANDSI (SLLSI (m32r_h_cr_get (current_cpu, 0), 8), 65408));
TRACE_RESULT (current_cpu, "h-cr-0", 'x', m32r_h_cr_get (current_cpu, 0));
-do_trap (current_cpu, FLD (f_uimm4));
-; /*clobber*/
+ BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, do_trap (current_cpu, FLD (f_uimm4))));
+ taken_p = 1;
+ TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc));
} while (0);
#if WITH_PROFILE_MODEL_P
CIA
SEM_FN_NAME (m32r,unlock) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_54_unlock.f
+#define FLD(f) abuf->fields.fmt_unlock.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
CIA new_pc = SEM_NEXT_PC (sem_arg, 2);
EXTRACT_FMT_MACWHI_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MACWHI_CODE
- CPU (h_accum) = SRADI (SLLDI (ADDDI (OPRND (accum), MULDI (EXTSIDI (OPRND (src1)), EXTHIDI (TRUNCSIHI (SRASI (OPRND (src2), 16))))), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32rx_h_accum_set (current_cpu, SRADI (SLLDI (ADDDI (OPRND (accum), MULDI (EXTSIDI (OPRND (src1)), EXTHIDI (TRUNCSIHI (SRASI (OPRND (src2), 16))))), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32rx_h_accum_get (current_cpu));
#if WITH_PROFILE_MODEL_P
if (PROFILE_MODEL_P (current_cpu))
EXTRACT_FMT_MACWHI_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MACWHI_CODE
- CPU (h_accum) = SRADI (SLLDI (ADDDI (OPRND (accum), MULDI (EXTSIDI (OPRND (src1)), EXTHIDI (TRUNCSIHI (OPRND (src2))))), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32rx_h_accum_set (current_cpu, SRADI (SLLDI (ADDDI (OPRND (accum), MULDI (EXTSIDI (OPRND (src1)), EXTHIDI (TRUNCSIHI (OPRND (src2))))), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32rx_h_accum_get (current_cpu));
#if WITH_PROFILE_MODEL_P
if (PROFILE_MODEL_P (current_cpu))
EXTRACT_FMT_MULWHI_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MULWHI_CODE
- CPU (h_accum) = SRADI (SLLDI (MULDI (EXTSIDI (OPRND (src1)), EXTHIDI (TRUNCSIHI (SRASI (OPRND (src2), 16)))), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32rx_h_accum_set (current_cpu, SRADI (SLLDI (MULDI (EXTSIDI (OPRND (src1)), EXTHIDI (TRUNCSIHI (SRASI (OPRND (src2), 16)))), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32rx_h_accum_get (current_cpu));
#if WITH_PROFILE_MODEL_P
if (PROFILE_MODEL_P (current_cpu))
EXTRACT_FMT_MULWHI_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MULWHI_CODE
- CPU (h_accum) = SRADI (SLLDI (MULDI (EXTSIDI (OPRND (src1)), EXTHIDI (TRUNCSIHI (OPRND (src2)))), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32rx_h_accum_set (current_cpu, SRADI (SLLDI (MULDI (EXTSIDI (OPRND (src1)), EXTHIDI (TRUNCSIHI (OPRND (src2)))), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32rx_h_accum_get (current_cpu));
#if WITH_PROFILE_MODEL_P
if (PROFILE_MODEL_P (current_cpu))
EXTRACT_FMT_MACWHI_VARS /* f-op1 f-r1 f-op2 f-r2 */
EXTRACT_FMT_MACWHI_CODE
- CPU (h_accum) = SRADI (SLLDI (SUBDI (OPRND (accum), SRADI (SLLDI (MULDI (EXTHIDI (TRUNCSIHI (OPRND (src1))), EXTHIDI (TRUNCSIHI (OPRND (src2)))), 32), 16)), 8), 8);
- TRACE_RESULT (current_cpu, "accum", 'D', CPU (h_accum));
+m32rx_h_accum_set (current_cpu, SRADI (SLLDI (SUBDI (OPRND (accum), SRADI (SLLDI (MULDI (EXTHIDI (TRUNCSIHI (OPRND (src1))), EXTHIDI (TRUNCSIHI (OPRND (src2)))), 32), 16)), 8), 8));
+ TRACE_RESULT (current_cpu, "accum", 'D', m32rx_h_accum_get (current_cpu));
#if WITH_PROFILE_MODEL_P
if (PROFILE_MODEL_P (current_cpu))