summaryrefslogtreecommitdiff
path: root/sim/m32r/sem.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/m32r/sem.c')
-rw-r--r--sim/m32r/sem.c96
1 files changed, 48 insertions, 48 deletions
diff --git a/sim/m32r/sem.c b/sim/m32r/sem.c
index 62fe70c4a22..03b0a6fc6c3 100644
--- a/sim/m32r/sem.c
+++ b/sim/m32r/sem.c
@@ -380,8 +380,8 @@ SEM_FN_NAME (m32rbf,addv) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do {
- BI temp1;SI temp0;
+{
+ SI temp0;BI temp1;
temp0 = ADDSI (* FLD (i_dr), * FLD (i_sr));
temp1 = ADDOFSI (* FLD (i_dr), * FLD (i_sr), 0);
{
@@ -394,7 +394,7 @@ do {
CPU (h_cond) = opval;
TRACE_RESULT (current_cpu, abuf, "condbit", 'x', opval);
}
-} while (0);
+}
return vpc;
#undef FLD
@@ -411,8 +411,8 @@ SEM_FN_NAME (m32rbf,addv3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do {
- BI temp1;SI temp0;
+{
+ SI temp0;BI temp1;
temp0 = ADDSI (* FLD (i_sr), FLD (f_simm16));
temp1 = ADDOFSI (* FLD (i_sr), FLD (f_simm16), 0);
{
@@ -425,7 +425,7 @@ do {
CPU (h_cond) = opval;
TRACE_RESULT (current_cpu, abuf, "condbit", 'x', opval);
}
-} while (0);
+}
return vpc;
#undef FLD
@@ -442,8 +442,8 @@ SEM_FN_NAME (m32rbf,addx) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do {
- BI temp1;SI temp0;
+{
+ SI temp0;BI temp1;
temp0 = ADDCSI (* FLD (i_dr), * FLD (i_sr), CPU (h_cond));
temp1 = ADDCFSI (* FLD (i_dr), * FLD (i_sr), CPU (h_cond));
{
@@ -456,7 +456,7 @@ do {
CPU (h_cond) = opval;
TRACE_RESULT (current_cpu, abuf, "condbit", 'x', opval);
}
-} while (0);
+}
return vpc;
#undef FLD
@@ -717,7 +717,7 @@ SEM_FN_NAME (m32rbf,bl8) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_BRANCH_INIT
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do {
+{
{
SI opval = ADDSI (ANDSI (pc, -4), 4);
CPU (h_gr[((UINT) 14)]) = opval;
@@ -728,7 +728,7 @@ do {
SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc, SEM_BRANCH_ADDR_CACHE (sem_arg));
TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
}
-} while (0);
+}
SEM_BRANCH_FINI (vpc);
return vpc;
@@ -747,7 +747,7 @@ SEM_FN_NAME (m32rbf,bl24) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_BRANCH_INIT
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do {
+{
{
SI opval = ADDSI (pc, 4);
CPU (h_gr[((UINT) 14)]) = opval;
@@ -758,7 +758,7 @@ do {
SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc, SEM_BRANCH_ADDR_CACHE (sem_arg));
TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
}
-} while (0);
+}
SEM_BRANCH_FINI (vpc);
return vpc;
@@ -1088,8 +1088,8 @@ SEM_FN_NAME (m32rbf,jl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_BRANCH_INIT
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do {
- USI temp1;SI temp0;
+{
+ SI temp0;USI temp1;
temp0 = ADDSI (ANDSI (pc, -4), 4);
temp1 = ANDSI (* FLD (i_sr), -4);
{
@@ -1102,7 +1102,7 @@ do {
SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
}
-} while (0);
+}
SEM_BRANCH_FINI (vpc);
return vpc;
@@ -1353,8 +1353,8 @@ SEM_FN_NAME (m32rbf,ld_plus) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do {
- SI temp1;SI temp0;
+{
+ SI temp0;SI temp1;
temp0 = GETMEMSI (current_cpu, pc, * FLD (i_sr));
temp1 = ADDSI (* FLD (i_sr), 4);
{
@@ -1367,7 +1367,7 @@ do {
* FLD (i_sr) = opval;
TRACE_RESULT (current_cpu, abuf, "sr", 'x', opval);
}
-} while (0);
+}
return vpc;
#undef FLD
@@ -1447,18 +1447,18 @@ SEM_FN_NAME (m32rbf,lock) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do {
+{
{
BI opval = 1;
CPU (h_lock) = opval;
- TRACE_RESULT (current_cpu, abuf, "lock-0", 'x', opval);
+ TRACE_RESULT (current_cpu, abuf, "lock", 'x', opval);
}
{
SI opval = GETMEMSI (current_cpu, pc, * FLD (i_sr));
* FLD (i_dr) = opval;
TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
}
-} while (0);
+}
return vpc;
#undef FLD
@@ -1891,7 +1891,7 @@ SEM_FN_NAME (m32rbf,rac) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do {
+{
DI tmp_tmp1;
tmp_tmp1 = SLLDI (GET_H_ACCUM (), 1);
tmp_tmp1 = ADDDI (tmp_tmp1, MAKEDI (0, 32768));
@@ -1900,7 +1900,7 @@ do {
SET_H_ACCUM (opval);
TRACE_RESULT (current_cpu, abuf, "accum", 'D', opval);
}
-} while (0);
+}
return vpc;
#undef FLD
@@ -1917,7 +1917,7 @@ SEM_FN_NAME (m32rbf,rach) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do {
+{
DI tmp_tmp1;
tmp_tmp1 = ANDDI (GET_H_ACCUM (), MAKEDI (16777215, 0xffffffff));
if (ANDIF (GEDI (tmp_tmp1, MAKEDI (16383, 0x80000000)), LEDI (tmp_tmp1, MAKEDI (8388607, 0xffffffff)))) {
@@ -1935,7 +1935,7 @@ if (ANDIF (GEDI (tmp_tmp1, MAKEDI (8388608, 0)), LEDI (tmp_tmp1, MAKEDI (1676083
SET_H_ACCUM (opval);
TRACE_RESULT (current_cpu, abuf, "accum", 'D', opval);
}
-} while (0);
+}
return vpc;
#undef FLD
@@ -1953,7 +1953,7 @@ SEM_FN_NAME (m32rbf,rte) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_BRANCH_INIT
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do {
+{
{
USI opval = ANDSI (GET_H_CR (((UINT) 6)), -4);
SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
@@ -1967,14 +1967,14 @@ do {
{
UQI opval = CPU (h_bpsw);
SET_H_PSW (opval);
- TRACE_RESULT (current_cpu, abuf, "psw-0", 'x', opval);
+ TRACE_RESULT (current_cpu, abuf, "psw", 'x', opval);
}
{
UQI opval = CPU (h_bbpsw);
CPU (h_bpsw) = opval;
- TRACE_RESULT (current_cpu, abuf, "bpsw-0", 'x', opval);
+ TRACE_RESULT (current_cpu, abuf, "bpsw", 'x', opval);
}
-} while (0);
+}
SEM_BRANCH_FINI (vpc);
return vpc;
@@ -2328,7 +2328,7 @@ SEM_FN_NAME (m32rbf,st_plus) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do {
+{
SI tmp_new_src2;
tmp_new_src2 = ADDSI (* FLD (i_src2), 4);
{
@@ -2341,7 +2341,7 @@ do {
* FLD (i_src2) = opval;
TRACE_RESULT (current_cpu, abuf, "src2", 'x', opval);
}
-} while (0);
+}
return vpc;
#undef FLD
@@ -2358,7 +2358,7 @@ SEM_FN_NAME (m32rbf,st_minus) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do {
+{
SI tmp_new_src2;
tmp_new_src2 = SUBSI (* FLD (i_src2), 4);
{
@@ -2371,7 +2371,7 @@ do {
* FLD (i_src2) = opval;
TRACE_RESULT (current_cpu, abuf, "src2", 'x', opval);
}
-} while (0);
+}
return vpc;
#undef FLD
@@ -2409,8 +2409,8 @@ SEM_FN_NAME (m32rbf,subv) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do {
- BI temp1;SI temp0;
+{
+ SI temp0;BI temp1;
temp0 = SUBSI (* FLD (i_dr), * FLD (i_sr));
temp1 = SUBOFSI (* FLD (i_dr), * FLD (i_sr), 0);
{
@@ -2423,7 +2423,7 @@ do {
CPU (h_cond) = opval;
TRACE_RESULT (current_cpu, abuf, "condbit", 'x', opval);
}
-} while (0);
+}
return vpc;
#undef FLD
@@ -2440,8 +2440,8 @@ SEM_FN_NAME (m32rbf,subx) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do {
- BI temp1;SI temp0;
+{
+ SI temp0;BI temp1;
temp0 = SUBCSI (* FLD (i_dr), * FLD (i_sr), CPU (h_cond));
temp1 = SUBCFSI (* FLD (i_dr), * FLD (i_sr), CPU (h_cond));
{
@@ -2454,7 +2454,7 @@ do {
CPU (h_cond) = opval;
TRACE_RESULT (current_cpu, abuf, "condbit", 'x', opval);
}
-} while (0);
+}
return vpc;
#undef FLD
@@ -2472,7 +2472,7 @@ SEM_FN_NAME (m32rbf,trap) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_BRANCH_INIT
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do {
+{
{
USI opval = GET_H_CR (((UINT) 6));
SET_H_CR (((UINT) 14), opval);
@@ -2486,24 +2486,24 @@ do {
{
UQI opval = CPU (h_bpsw);
CPU (h_bbpsw) = opval;
- TRACE_RESULT (current_cpu, abuf, "bbpsw-0", 'x', opval);
+ TRACE_RESULT (current_cpu, abuf, "bbpsw", 'x', opval);
}
{
UQI opval = GET_H_PSW ();
CPU (h_bpsw) = opval;
- TRACE_RESULT (current_cpu, abuf, "bpsw-0", 'x', opval);
+ TRACE_RESULT (current_cpu, abuf, "bpsw", 'x', opval);
}
{
UQI opval = ANDQI (GET_H_PSW (), 128);
SET_H_PSW (opval);
- TRACE_RESULT (current_cpu, abuf, "psw-0", 'x', opval);
+ TRACE_RESULT (current_cpu, abuf, "psw", 'x', opval);
}
{
SI opval = m32r_trap (current_cpu, pc, FLD (f_uimm4));
SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
}
-} while (0);
+}
SEM_BRANCH_FINI (vpc);
return vpc;
@@ -2521,7 +2521,7 @@ SEM_FN_NAME (m32rbf,unlock) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do {
+{
if (CPU (h_lock)) {
{
SI opval = * FLD (i_src1);
@@ -2533,9 +2533,9 @@ if (CPU (h_lock)) {
{
BI opval = 0;
CPU (h_lock) = opval;
- TRACE_RESULT (current_cpu, abuf, "lock-0", 'x', opval);
+ TRACE_RESULT (current_cpu, abuf, "lock", 'x', opval);
}
-} while (0);
+}
abuf->written = written;
return vpc;