diff options
Diffstat (limited to 'sim/m32c/srcdest.c')
-rw-r--r-- | sim/m32c/srcdest.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sim/m32c/srcdest.c b/sim/m32c/srcdest.c index a2415a8..ada2a9b 100644 --- a/sim/m32c/srcdest.c +++ b/sim/m32c/srcdest.c @@ -31,7 +31,7 @@ static int src_addend = 0; static int dest_addend = 0; static int -disp8 () +disp8 (void) { int rv; int tsave = trace; @@ -45,7 +45,7 @@ disp8 () } static int -disp16 () +disp16 (void) { int rv; int tsave = trace; @@ -59,7 +59,7 @@ disp16 () } static int -disp24 () +disp24 (void) { int rv; int tsave = trace; @@ -73,7 +73,7 @@ disp24 () } static int -disp20 () +disp20 (void) { return disp24 () & 0x000fffff; } @@ -117,8 +117,6 @@ srcdest decode_srcdest4 (int destcode, int bw) { srcdest sd; - sd.bytes = bw ? 2 : 1; - sd.mem = (destcode >= 6) ? 1 : 0; static const char *dc_wnames[16] = { "r0", "r1", "r2", "r3", "a0", "a1", "[a0]", "[a1]", "disp8[a0]", "disp8[a1]", "disp8[sb]", "disp8[fb]", @@ -126,6 +124,9 @@ decode_srcdest4 (int destcode, int bw) }; static const char *dc_bnames[4] = { "r0l", "r0h", "r1l", "r1h" };; + sd.bytes = bw ? 2 : 1; + sd.mem = (destcode >= 6) ? 1 : 0; + if (trace) { const char *n = dc_wnames[destcode]; @@ -199,8 +200,6 @@ srcdest decode_jumpdest (int destcode, int w) { srcdest sd; - sd.bytes = w ? 2 : 3; - sd.mem = (destcode >= 6) ? 1 : 0; static const char *dc_wnames[16] = { "r0", "r1", "r2", "r3", "a0", "a1", "[a0]", "[a1]", "disp8[a0]", "disp8[a1]", "disp8[sb]", "disp8[fb]", @@ -208,6 +207,9 @@ decode_jumpdest (int destcode, int w) }; static const char *dc_anames[4] = { "r0l", "r0h", "r1l", "r1h" }; + sd.bytes = w ? 2 : 3; + sd.mem = (destcode >= 6) ? 1 : 0; + if (trace) { const char *n = dc_wnames[destcode]; |