diff options
Diffstat (limited to 'src/devices/cpu/arcompact/arcompact_execute.cpp')
-rw-r--r-- | src/devices/cpu/arcompact/arcompact_execute.cpp | 1472 |
1 files changed, 736 insertions, 736 deletions
diff --git a/src/devices/cpu/arcompact/arcompact_execute.cpp b/src/devices/cpu/arcompact/arcompact_execute.cpp index ebf48240e98..7d5d9383708 100644 --- a/src/devices/cpu/arcompact/arcompact_execute.cpp +++ b/src/devices/cpu/arcompact/arcompact_execute.cpp @@ -1851,15 +1851,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -1871,7 +1871,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -1889,7 +1889,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b + c; m_regs[areg] = result; - + if (F) { if (result & 0x80000000) { STATUS32_SET_N; } @@ -1924,35 +1924,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b + c; m_regs[areg] = result; - + if (F) { if (result & 0x80000000) { STATUS32_SET_N; } @@ -1987,34 +1987,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b + c; m_regs[breg] = result; - + if (F) { if (result & 0x80000000) { STATUS32_SET_N; } @@ -2057,31 +2057,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -2089,7 +2089,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p11_m1(OPS_32) uint32_t result = b + c; m_regs[breg] = result; - + if (F) { if (result & 0x80000000) { STATUS32_SET_N; } @@ -2125,15 +2125,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_02_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -2145,7 +2145,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_02_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -2163,7 +2163,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_02_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b - c; m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_02 (SUB) (F set)\n"); // not yet supported @@ -2176,35 +2176,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_02_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b - c; m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_02 (SUB) (F set)\n"); // not yet supported @@ -2217,34 +2217,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_02_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b - c; m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_02 (SUB) (F set)\n"); // not yet supported @@ -2265,31 +2265,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_02_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -2297,7 +2297,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_02_p11_m1(OPS_32) uint32_t result = b - c; m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_02 (SUB) (F set)\n"); // not yet supported @@ -2311,15 +2311,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -2331,7 +2331,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -2349,7 +2349,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b & c; if (areg != LIMM_REG) { m_regs[areg] = result; } - + if (F) { if (result & 0x80000000) { STATUS32_SET_N; } @@ -2365,35 +2365,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b & c; if (areg != LIMM_REG) { m_regs[areg] = result; } - + if (F) { if (result & 0x80000000) { STATUS32_SET_N; } @@ -2409,34 +2409,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b & c; if (breg != LIMM_REG) { m_regs[breg] = result; } - + if (F) { if (result & 0x80000000) { STATUS32_SET_N; } @@ -2460,31 +2460,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -2492,7 +2492,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p11_m1(OPS_32) uint32_t result = b & c; if (breg != LIMM_REG) { m_regs[breg] = result; } - + if (F) { if (result & 0x80000000) { STATUS32_SET_N; } @@ -2509,15 +2509,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_05_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -2529,7 +2529,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_05_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -2547,7 +2547,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_05_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b | c; m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_05 (OR) (F set)\n"); // not yet supported @@ -2560,35 +2560,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_05_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b | c; m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_05 (OR) (F set)\n"); // not yet supported @@ -2601,34 +2601,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_05_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b | c; m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_05 (OR) (F set)\n"); // not yet supported @@ -2649,31 +2649,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_05_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -2681,7 +2681,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_05_p11_m1(OPS_32) uint32_t result = b | c; m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_05 (OR) (F set)\n"); // not yet supported @@ -2695,15 +2695,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -2715,7 +2715,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -2733,7 +2733,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b & (~c); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_06 (BIC) (F set)\n"); // not yet supported @@ -2746,35 +2746,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b & (~c); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_06 (BIC) (F set)\n"); // not yet supported @@ -2787,34 +2787,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b & (~c); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_06 (BIC) (F set)\n"); // not yet supported @@ -2835,31 +2835,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -2867,7 +2867,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p11_m1(OPS_32) uint32_t result = b & (~c); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_06 (BIC) (F set)\n"); // not yet supported @@ -2881,15 +2881,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_07_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -2901,7 +2901,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_07_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -2919,7 +2919,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_07_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b ^ c; m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_07 (XOR) (F set)\n"); // not yet supported @@ -2932,35 +2932,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_07_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b ^ c; m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_07 (XOR) (F set)\n"); // not yet supported @@ -2973,34 +2973,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_07_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b ^ c; m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_07 (XOR) (F set)\n"); // not yet supported @@ -3021,31 +3021,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_07_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -3053,7 +3053,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_07_p11_m1(OPS_32) uint32_t result = b ^ c; m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_07 (XOR) (F set)\n"); // not yet supported @@ -3067,14 +3067,14 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; - //COMMON32_GET_areg; // areg is reserved / not used - + //COMMON32_GET_areg; // areg is reserved / not used + uint32_t c; - + if (creg == LIMM_REG) { if (!got_limm) @@ -3092,7 +3092,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = c; m_regs[breg] = result; - + if (F) { if (result & 0x80000000) { STATUS32_SET_N; } @@ -3107,21 +3107,21 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p00(OPS_32) ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p01(OPS_32) { int size = 4; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg is reserved / not used - + //COMMON32_GET_areg; // areg is reserved / not used + uint32_t c; - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = c; m_regs[breg] = result; - + if (F) { if (result & 0x80000000) { STATUS32_SET_N; } @@ -3136,20 +3136,20 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p01(OPS_32) ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p10(OPS_32) { int size = 4; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = c; m_regs[breg] = result; - + if (F) { if (result & 0x80000000) { STATUS32_SET_N; } @@ -3172,17 +3172,17 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p11_m0(OPS_32) ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p11_m1(OPS_32) { int size = 4; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -3190,7 +3190,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p11_m1(OPS_32) uint32_t result = c; m_regs[breg] = result; - + if (F) { if (result & 0x80000000) { STATUS32_SET_N; } @@ -3207,15 +3207,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0e_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -3227,7 +3227,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0e_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -3245,7 +3245,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0e_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = c - b; m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_0e (RSUB) (F set)\n"); // not yet supported @@ -3258,35 +3258,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0e_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = c - b; m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_0e (RSUB) (F set)\n"); // not yet supported @@ -3299,34 +3299,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0e_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = c - b; m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_0e (RSUB) (F set)\n"); // not yet supported @@ -3347,31 +3347,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0e_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -3379,7 +3379,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0e_p11_m1(OPS_32) uint32_t result = c - b; m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_0e (RSUB) (F set)\n"); // not yet supported @@ -3393,15 +3393,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0f_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -3413,7 +3413,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0f_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -3431,7 +3431,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0f_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b | (1 << (c & 0x1f)); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_0f (BSET) (F set)\n"); // not yet supported @@ -3444,35 +3444,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0f_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b | (1 << (c & 0x1f)); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_0f (BSET) (F set)\n"); // not yet supported @@ -3485,34 +3485,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0f_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b | (1 << (c & 0x1f)); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_0f (BSET) (F set)\n"); // not yet supported @@ -3533,31 +3533,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0f_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -3565,7 +3565,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0f_p11_m1(OPS_32) uint32_t result = b | (1 << (c & 0x1f)); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_0f (BSET) (F set)\n"); // not yet supported @@ -3579,15 +3579,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_13_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -3599,7 +3599,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_13_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -3617,7 +3617,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_13_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b & ((1<<(c+1))-1); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_13 (BMSK) (F set)\n"); // not yet supported @@ -3630,35 +3630,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_13_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b & ((1<<(c+1))-1); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_13 (BMSK) (F set)\n"); // not yet supported @@ -3671,34 +3671,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_13_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b & ((1<<(c+1))-1); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_13 (BMSK) (F set)\n"); // not yet supported @@ -3719,31 +3719,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_13_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -3751,7 +3751,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_13_p11_m1(OPS_32) uint32_t result = b & ((1<<(c+1))-1); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_13 (BMSK) (F set)\n"); // not yet supported @@ -3765,15 +3765,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_14_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -3785,7 +3785,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_14_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -3803,7 +3803,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_14_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b + (c << 1); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_14 (ADD1) (F set)\n"); // not yet supported @@ -3816,35 +3816,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_14_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b + (c << 1); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_14 (ADD1) (F set)\n"); // not yet supported @@ -3857,34 +3857,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_14_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b + (c << 1); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_14 (ADD1) (F set)\n"); // not yet supported @@ -3905,31 +3905,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_14_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -3937,7 +3937,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_14_p11_m1(OPS_32) uint32_t result = b + (c << 1); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_14 (ADD1) (F set)\n"); // not yet supported @@ -3951,15 +3951,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_15_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -3971,7 +3971,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_15_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -3989,7 +3989,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_15_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b + (c << 2); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_15 (ADD2) (F set)\n"); // not yet supported @@ -4002,35 +4002,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_15_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b + (c << 2); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_15 (ADD2) (F set)\n"); // not yet supported @@ -4043,34 +4043,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_15_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b + (c << 2); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_15 (ADD2) (F set)\n"); // not yet supported @@ -4091,31 +4091,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_15_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -4123,7 +4123,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_15_p11_m1(OPS_32) uint32_t result = b + (c << 2); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_15 (ADD2) (F set)\n"); // not yet supported @@ -4137,15 +4137,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_16_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -4157,7 +4157,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_16_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -4175,7 +4175,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_16_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b + (c << 3); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_16 (ADD3) (F set)\n"); // not yet supported @@ -4188,35 +4188,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_16_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b + (c << 3); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_16 (ADD3) (F set)\n"); // not yet supported @@ -4229,34 +4229,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_16_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b + (c << 3); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_16 (ADD3) (F set)\n"); // not yet supported @@ -4277,31 +4277,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_16_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -4309,7 +4309,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_16_p11_m1(OPS_32) uint32_t result = b + (c << 3); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_16 (ADD3) (F set)\n"); // not yet supported @@ -4323,15 +4323,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_17_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -4343,7 +4343,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_17_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -4361,7 +4361,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_17_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b - (c << 1); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_17 (SUB1) (F set)\n"); // not yet supported @@ -4374,35 +4374,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_17_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b - (c << 1); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_17 (SUB1) (F set)\n"); // not yet supported @@ -4415,34 +4415,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_17_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b - (c << 1); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_17 (SUB1) (F set)\n"); // not yet supported @@ -4463,31 +4463,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_17_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -4495,7 +4495,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_17_p11_m1(OPS_32) uint32_t result = b - (c << 1); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_17 (SUB1) (F set)\n"); // not yet supported @@ -4509,15 +4509,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_18_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -4529,7 +4529,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_18_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -4547,7 +4547,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_18_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b - (c << 2); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_18 (SUB2) (F set)\n"); // not yet supported @@ -4560,35 +4560,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_18_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b - (c << 2); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_18 (SUB2) (F set)\n"); // not yet supported @@ -4601,34 +4601,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_18_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b - (c << 2); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_18 (SUB2) (F set)\n"); // not yet supported @@ -4649,31 +4649,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_18_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -4681,7 +4681,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_18_p11_m1(OPS_32) uint32_t result = b - (c << 2); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_18 (SUB2) (F set)\n"); // not yet supported @@ -4695,15 +4695,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_19_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -4715,7 +4715,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_19_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -4733,7 +4733,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_19_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b - (c << 3); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_19 (SUB3) (F set)\n"); // not yet supported @@ -4746,35 +4746,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_19_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b - (c << 3); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_19 (SUB3) (F set)\n"); // not yet supported @@ -4787,34 +4787,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_19_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b - (c << 3); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_19 (SUB3) (F set)\n"); // not yet supported @@ -4835,31 +4835,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_19_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -4867,7 +4867,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_19_p11_m1(OPS_32) uint32_t result = b - (c << 3); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_19 (SUB3) (F set)\n"); // not yet supported @@ -4881,14 +4881,14 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2a_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; - //COMMON32_GET_areg; // areg is reserved / not used - + //COMMON32_GET_areg; // areg is reserved / not used + uint32_t c; - + if (creg == LIMM_REG) { if (!got_limm) @@ -4905,8 +4905,8 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2a_p00(OPS_32) /* todo: is the limm, limm syntax valid? (it's pointless.) */ /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ m_regs[breg] = READAUX(c); - - + + if (F) { // no flag changes @@ -4918,21 +4918,21 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2a_p00(OPS_32) ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2a_p01(OPS_32) { int size = 4; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg is reserved / not used - + //COMMON32_GET_areg; // areg is reserved / not used + uint32_t c; - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ m_regs[breg] = READAUX(c); - - + + if (F) { // no flag changes @@ -4944,20 +4944,20 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2a_p01(OPS_32) ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2a_p10(OPS_32) { int size = 4; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ m_regs[breg] = READAUX(c); - - + + if (F) { // no flag changes @@ -4977,25 +4977,25 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2a_p11_m0(OPS_32) ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2a_p11_m1(OPS_32) { int size = 4; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) return m_pc + (size>>0); m_regs[breg] = READAUX(c); - - + + if (F) { // no flag changes @@ -5009,15 +5009,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2b_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; - //COMMON32_GET_areg; // areg is reserved / not used - + //COMMON32_GET_areg; // areg is reserved / not used + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -5029,7 +5029,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2b_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -5046,8 +5046,8 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2b_p00(OPS_32) /* todo: is the limm, limm syntax valid? (it's pointless.) */ /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ WRITEAUX(c,b); - - + + if (F) { // no flag changes @@ -5060,35 +5060,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2b_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg is reserved / not used - + //COMMON32_GET_areg; // areg is reserved / not used + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ WRITEAUX(c,b); - - + + if (F) { // no flag changes @@ -5101,34 +5101,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2b_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ WRITEAUX(c,b); - - + + if (F) { // no flag changes @@ -5149,39 +5149,39 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2b_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) return m_pc + (size>>0); WRITEAUX(c,b); - - + + if (F) { // no flag changes @@ -5195,15 +5195,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_00_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -5215,7 +5215,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_00_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -5233,7 +5233,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_00_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b << (c&0x1f); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle05_00 (ASL) (F set)\n"); // not yet supported @@ -5246,35 +5246,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_00_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b << (c&0x1f); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle05_00 (ASL) (F set)\n"); // not yet supported @@ -5287,34 +5287,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_00_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b << (c&0x1f); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle05_00 (ASL) (F set)\n"); // not yet supported @@ -5335,31 +5335,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_00_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -5367,7 +5367,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_00_p11_m1(OPS_32) uint32_t result = b << (c&0x1f); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle05_00 (ASL) (F set)\n"); // not yet supported @@ -5381,15 +5381,15 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_01_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + if (breg == LIMM_REG) { GET_LIMM_32; @@ -5401,7 +5401,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_01_p00(OPS_32) { b = m_regs[breg]; } - + if (creg == LIMM_REG) { if (!got_limm) @@ -5419,7 +5419,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_01_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b >> (c&0x1f); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle05_01 (LSR) (F set)\n"); // not yet supported @@ -5432,35 +5432,35 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_01_p01(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; COMMON32_GET_areg; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b >> (c&0x1f); m_regs[areg] = result; - + if (F) { arcompact_fatal("arcompact_handle05_01 (LSR) (F set)\n"); // not yet supported @@ -5473,34 +5473,34 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_01_p10(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_s12; - + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = (uint32_t)S; - + + c = (uint32_t)S; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = b >> (c&0x1f); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle05_01 (LSR) (F set)\n"); // not yet supported @@ -5521,31 +5521,31 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_01_p11_m1(OPS_32) { int size = 4; uint32_t limm = 0; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as condition code select - + //COMMON32_GET_areg; // areg bits already used as condition code select + uint32_t c; uint32_t b; - + /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ if (breg == LIMM_REG) { GET_LIMM_32; size = 8; -/* got_limm = 1; */ +/* got_limm = 1; */ b = limm; } else { b = m_regs[breg]; } - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ COMMON32_GET_CONDITION; if (!check_condition(condition)) @@ -5553,7 +5553,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_01_p11_m1(OPS_32) uint32_t result = b >> (c&0x1f); m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle05_01 (LSR) (F set)\n"); // not yet supported @@ -5567,14 +5567,14 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_02_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; - //COMMON32_GET_areg; // areg bits already used as opcode select - + //COMMON32_GET_areg; // areg bits already used as opcode select + uint32_t c; - + if (creg == LIMM_REG) { if (!got_limm) @@ -5592,7 +5592,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_02_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = c >> 1; m_regs[breg] = result; - + if (F) { if (result & 0x80000000) { STATUS32_SET_N; } @@ -5609,21 +5609,21 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_02_p00(OPS_32) ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_02_p01(OPS_32) { int size = 4; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as opcode select - + //COMMON32_GET_areg; // areg bits already used as opcode select + uint32_t c; - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = c >> 1; m_regs[breg] = result; - + if (F) { if (result & 0x80000000) { STATUS32_SET_N; } @@ -5664,14 +5664,14 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_03_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; - //COMMON32_GET_areg; // areg bits already used as opcode select - + //COMMON32_GET_areg; // areg bits already used as opcode select + uint32_t c; - + if (creg == LIMM_REG) { if (!got_limm) @@ -5689,7 +5689,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_03_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ int shift = 1; uint32_t mask = (1 << (shift)) - 1; mask <<= (32-shift); uint32_t result = ((c >> shift) & ~mask) | ((c << (32-shift)) & mask); m_regs[breg] = result; - + if (F) { if (result & 0x80000000) { STATUS32_SET_N; } @@ -5706,21 +5706,21 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_03_p00(OPS_32) ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_03_p01(OPS_32) { int size = 4; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as opcode select - + //COMMON32_GET_areg; // areg bits already used as opcode select + uint32_t c; - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ int shift = 1; uint32_t mask = (1 << (shift)) - 1; mask <<= (32-shift); uint32_t result = ((c >> shift) & ~mask) | ((c << (32-shift)) & mask); m_regs[breg] = result; - + if (F) { if (result & 0x80000000) { STATUS32_SET_N; } @@ -5761,14 +5761,14 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_07_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; - //COMMON32_GET_areg; // areg bits already used as opcode select - + //COMMON32_GET_areg; // areg bits already used as opcode select + uint32_t c; - + if (creg == LIMM_REG) { if (!got_limm) @@ -5786,7 +5786,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_07_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = c & 0x000000ff; m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_2f_07 (EXTB) (F set)\n"); // not yet supported @@ -5798,21 +5798,21 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_07_p00(OPS_32) ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_07_p01(OPS_32) { int size = 4; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as opcode select - + //COMMON32_GET_areg; // areg bits already used as opcode select + uint32_t c; - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = c & 0x000000ff; m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_2f_07 (EXTB) (F set)\n"); // not yet supported @@ -5848,14 +5848,14 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_08_p00(OPS_32) int size = 4; uint32_t limm = 0; int got_limm = 0; - + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_creg; - //COMMON32_GET_areg; // areg bits already used as opcode select - + //COMMON32_GET_areg; // areg bits already used as opcode select + uint32_t c; - + if (creg == LIMM_REG) { if (!got_limm) @@ -5873,7 +5873,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_08_p00(OPS_32) /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = c & 0x0000ffff; m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_2f_08 (EXTW) (F set)\n"); // not yet supported @@ -5885,21 +5885,21 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_08_p00(OPS_32) ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_08_p01(OPS_32) { int size = 4; -/* int got_limm = 0; */ - +/* int got_limm = 0; */ + COMMON32_GET_breg; COMMON32_GET_F; COMMON32_GET_u6; - //COMMON32_GET_areg; // areg bits already used as opcode select - + //COMMON32_GET_areg; // areg bits already used as opcode select + uint32_t c; - - c = u; - + + c = u; + /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ uint32_t result = c & 0x0000ffff; m_regs[breg] = result; - + if (F) { arcompact_fatal("arcompact_handle04_2f_08 (EXTW) (F set)\n"); // not yet supported @@ -6191,14 +6191,14 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1b(OPS_16) ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_00(OPS_16) { int breg, u; - + COMMON16_GET_breg; COMMON16_GET_u5; - + REG_16BIT_RANGE(breg); - + m_regs[breg] = m_regs[breg] << (u&0x1f); - + return m_pc + (2 >> 0); } @@ -6206,14 +6206,14 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_00(OPS_16) ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_01(OPS_16) { int breg, u; - + COMMON16_GET_breg; COMMON16_GET_u5; - + REG_16BIT_RANGE(breg); - + m_regs[breg] = m_regs[breg] >> (u&0x1f); - + return m_pc + (2 >> 0); } @@ -6221,14 +6221,14 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_01(OPS_16) ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_02(OPS_16) { int breg, u; - + COMMON16_GET_breg; COMMON16_GET_u5; - + REG_16BIT_RANGE(breg); - + int32_t temp = (int32_t)m_regs[breg]; m_regs[breg] = temp >> (u&0x1f); // treat it as a signed value, so sign extension occurs during shift - + return m_pc + (2 >> 0); } @@ -6236,14 +6236,14 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_02(OPS_16) ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_03(OPS_16) { int breg, u; - + COMMON16_GET_breg; COMMON16_GET_u5; - + REG_16BIT_RANGE(breg); - + m_regs[breg] = m_regs[breg] - u; - + return m_pc + (2 >> 0); } @@ -6251,14 +6251,14 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_03(OPS_16) ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_04(OPS_16) { int breg, u; - + COMMON16_GET_breg; COMMON16_GET_u5; - + REG_16BIT_RANGE(breg); - + m_regs[breg] = m_regs[breg] | (1 << (u & 0x1f)); - + return m_pc + (2 >> 0); } @@ -6266,14 +6266,14 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_04(OPS_16) ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_06(OPS_16) { int breg, u; - + COMMON16_GET_breg; COMMON16_GET_u5; - + REG_16BIT_RANGE(breg); - + m_regs[breg] = m_regs[breg] | ((1 << (u + 1)) - 1); - + return m_pc + (2 >> 0); } |