diff options
| -rw-r--r-- | src/core/arm/interpreter/armemu.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/arm/interpreter/armemu.cpp b/src/core/arm/interpreter/armemu.cpp index 23469f4df..b2f671f94 100644 --- a/src/core/arm/interpreter/armemu.cpp +++ b/src/core/arm/interpreter/armemu.cpp | |||
| @@ -1670,7 +1670,7 @@ mainswitch: | |||
| 1670 | op1 *= op2; | 1670 | op1 *= op2; |
| 1671 | //printf("SMLA_INST:BB,op1=0x%x, op2=0x%x. Rn=0x%x\n", op1, op2, Rn); | 1671 | //printf("SMLA_INST:BB,op1=0x%x, op2=0x%x. Rn=0x%x\n", op1, op2, Rn); |
| 1672 | if (AddOverflow(op1, Rn, op1 + Rn)) | 1672 | if (AddOverflow(op1, Rn, op1 + Rn)) |
| 1673 | SETS; | 1673 | SETQ; |
| 1674 | state->Reg[BITS (16, 19)] = op1 + Rn; | 1674 | state->Reg[BITS (16, 19)] = op1 + Rn; |
| 1675 | break; | 1675 | break; |
| 1676 | } | 1676 | } |
| @@ -1682,7 +1682,7 @@ mainswitch: | |||
| 1682 | ARMword result = op1 + op2; | 1682 | ARMword result = op1 + op2; |
| 1683 | if (AddOverflow(op1, op2, result)) { | 1683 | if (AddOverflow(op1, op2, result)) { |
| 1684 | result = POS (result) ? 0x80000000 : 0x7fffffff; | 1684 | result = POS (result) ? 0x80000000 : 0x7fffffff; |
| 1685 | SETS; | 1685 | SETQ; |
| 1686 | } | 1686 | } |
| 1687 | state->Reg[BITS (12, 15)] = result; | 1687 | state->Reg[BITS (12, 15)] = result; |
| 1688 | break; | 1688 | break; |
| @@ -1795,7 +1795,7 @@ mainswitch: | |||
| 1795 | ARMword Rn = state->Reg[BITS(12, 15)]; | 1795 | ARMword Rn = state->Reg[BITS(12, 15)]; |
| 1796 | 1796 | ||
| 1797 | if (AddOverflow((ARMword)result, Rn, (ARMword)(result + Rn))) | 1797 | if (AddOverflow((ARMword)result, Rn, (ARMword)(result + Rn))) |
| 1798 | SETS; | 1798 | SETQ; |
| 1799 | result += Rn; | 1799 | result += Rn; |
| 1800 | } | 1800 | } |
| 1801 | state->Reg[BITS (16, 19)] = (ARMword)result; | 1801 | state->Reg[BITS (16, 19)] = (ARMword)result; |
| @@ -1811,7 +1811,7 @@ mainswitch: | |||
| 1811 | if (SubOverflow | 1811 | if (SubOverflow |
| 1812 | (op1, op2, result)) { | 1812 | (op1, op2, result)) { |
| 1813 | result = POS (result) ? 0x80000000 : 0x7fffffff; | 1813 | result = POS (result) ? 0x80000000 : 0x7fffffff; |
| 1814 | SETS; | 1814 | SETQ; |
| 1815 | } | 1815 | } |
| 1816 | 1816 | ||
| 1817 | state->Reg[BITS (12, 15)] = result; | 1817 | state->Reg[BITS (12, 15)] = result; |
| @@ -1934,13 +1934,13 @@ mainswitch: | |||
| 1934 | 1934 | ||
| 1935 | if (AddOverflow | 1935 | if (AddOverflow |
| 1936 | (op2, op2, op2d)) { | 1936 | (op2, op2, op2d)) { |
| 1937 | SETS; | 1937 | SETQ; |
| 1938 | op2d = POS (op2d) ? 0x80000000 : 0x7fffffff; | 1938 | op2d = POS (op2d) ? 0x80000000 : 0x7fffffff; |
| 1939 | } | 1939 | } |
| 1940 | 1940 | ||
| 1941 | result = op1 + op2d; | 1941 | result = op1 + op2d; |
| 1942 | if (AddOverflow(op1, op2d, result)) { | 1942 | if (AddOverflow(op1, op2d, result)) { |
| 1943 | SETS; | 1943 | SETQ; |
| 1944 | result = POS (result) ? 0x80000000 : 0x7fffffff; | 1944 | result = POS (result) ? 0x80000000 : 0x7fffffff; |
| 1945 | } | 1945 | } |
| 1946 | 1946 | ||
| @@ -2053,13 +2053,13 @@ mainswitch: | |||
| 2053 | ARMword result; | 2053 | ARMword result; |
| 2054 | 2054 | ||
| 2055 | if (AddOverflow(op2, op2, op2d)) { | 2055 | if (AddOverflow(op2, op2, op2d)) { |
| 2056 | SETS; | 2056 | SETQ; |
| 2057 | op2d = POS (op2d) ? 0x80000000 : 0x7fffffff; | 2057 | op2d = POS (op2d) ? 0x80000000 : 0x7fffffff; |
| 2058 | } | 2058 | } |
| 2059 | 2059 | ||
| 2060 | result = op1 - op2d; | 2060 | result = op1 - op2d; |
| 2061 | if (SubOverflow(op1, op2d, result)) { | 2061 | if (SubOverflow(op1, op2d, result)) { |
| 2062 | SETS; | 2062 | SETQ; |
| 2063 | result = POS (result) ? 0x80000000 : 0x7fffffff; | 2063 | result = POS (result) ? 0x80000000 : 0x7fffffff; |
| 2064 | } | 2064 | } |
| 2065 | 2065 | ||