GNU Binutils with patches for OS216
修訂 | 454de2ee151958e0c45d4ed0f3e496156e29d3a2 (tree) |
---|---|
時間 | 2015-07-14 20:06:33 |
作者 | Nick Clifton <nickc@redh...> |
Commiter | Nick Clifton |
Remove extraneous whitespace from ARM sim sources.
* armcopro.c: Remove extraneous whitespace.
* armdefs.h: Likewise.
* armfpe.h: Likewise.
* arminit.c: Likewise.
* armopts.h: Likewise.
* armos.c: Likewise.
* armos.h: Likewise.
* armrdi.c: Likewise.
* armsupp.c: Likewise.
* armvirt.c: Likewise.
* bag.c: Likewise.
* bag.h: Likewise.
* communicate.c: Likewise.
* communicate.h: Likewise.
* dbg_conf.h: Likewise.
* dbg_cp.h: Likewise.
* dbg_hif.h: Likewise.
* dbg_rdi.h: Likewise.
* gdbhost.c: Likewise.
* gdbhost.h: Likewise.
* iwmmxt.c: Likewise.
* iwmmxt.h: Likewise.
* kid.c: Likewise.
* main.c: Likewise.
* maverick.c: Likewise.
* parent.c: Likewise.
* thumbemu.c: Likewise.
* wrapper.c: Likewise.
@@ -1,3 +1,34 @@ | ||
1 | +2015-07-14 Nick Clifton <nickc@redhat.com> | |
2 | + | |
3 | + * armcopro.c: Remove extraneous whitespace. | |
4 | + * armdefs.h: Likewise. | |
5 | + * armfpe.h: Likewise. | |
6 | + * arminit.c: Likewise. | |
7 | + * armopts.h: Likewise. | |
8 | + * armos.c: Likewise. | |
9 | + * armos.h: Likewise. | |
10 | + * armrdi.c: Likewise. | |
11 | + * armsupp.c: Likewise. | |
12 | + * armvirt.c: Likewise. | |
13 | + * bag.c: Likewise. | |
14 | + * bag.h: Likewise. | |
15 | + * communicate.c: Likewise. | |
16 | + * communicate.h: Likewise. | |
17 | + * dbg_conf.h: Likewise. | |
18 | + * dbg_cp.h: Likewise. | |
19 | + * dbg_hif.h: Likewise. | |
20 | + * dbg_rdi.h: Likewise. | |
21 | + * gdbhost.c: Likewise. | |
22 | + * gdbhost.h: Likewise. | |
23 | + * iwmmxt.c: Likewise. | |
24 | + * iwmmxt.h: Likewise. | |
25 | + * kid.c: Likewise. | |
26 | + * main.c: Likewise. | |
27 | + * maverick.c: Likewise. | |
28 | + * parent.c: Likewise. | |
29 | + * thumbemu.c: Likewise. | |
30 | + * wrapper.c: Likewise. | |
31 | + | |
1 | 32 | 2015-07-02 Nick Clifton <nickc@redhat.com> |
2 | 33 | |
3 | 34 | * Makefile.in (SIM_EXTRA_CFLAGS): Revert previous delta. |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* armcopro.c -- co-processor interface: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994, 2000 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -114,7 +114,7 @@ check_cp15_access (ARMul_State * state, | ||
114 | 114 | /* CRm must be 0. Opcode_2 can be anything. */ |
115 | 115 | if (CRm != 0) |
116 | 116 | return ARMul_CANT; |
117 | - break; | |
117 | + break; | |
118 | 118 | case 2: |
119 | 119 | case 3: |
120 | 120 | /* CRm must be 0. Opcode_2 must be zero. */ |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* armdefs.h -- ARMulator common definitions: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -1,23 +1,22 @@ | ||
1 | 1 | /* armfpe.h -- ARMulator pre-compiled FPE: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 | |
17 | 17 | /* Array containing the Floating Point Emualtor (FPE). */ |
18 | - | |
19 | - | |
20 | -unsigned long fpecode[] = { | |
18 | +unsigned long fpecode[] = | |
19 | +{ | |
21 | 20 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
22 | 21 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
23 | 22 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* arminit.c -- ARMulator initialization: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -1,20 +1,20 @@ | ||
1 | 1 | /* armopts.h -- ARMulator configuration options: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 | |
17 | -/* Define one of ARM60 or ARM61 */ | |
17 | +/* Define one of ARM60 or ARM61. */ | |
18 | 18 | #ifndef ARM60 |
19 | 19 | #ifndef ARM61 |
20 | 20 | #define ARM60 |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* armos.c -- ARMulator OS interface: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -157,7 +157,7 @@ ARMul_OSInit (ARMul_State * state) | ||
157 | 157 | exit (15); |
158 | 158 | } |
159 | 159 | } |
160 | - | |
160 | + | |
161 | 161 | OSptr = (struct OSblock *) state->OSptr; |
162 | 162 | OSptr->ErrorP = 0; |
163 | 163 | state->Reg[13] = ADDRSUPERSTACK; /* Set up a stack for the current mode... */ |
@@ -166,11 +166,11 @@ ARMul_OSInit (ARMul_State * state) | ||
166 | 166 | ARMul_SetReg (state, UNDEF32MODE, 13, ADDRSUPERSTACK);/* ...and for undef 32 mode... */ |
167 | 167 | ARMul_SetReg (state, SYSTEMMODE, 13, ADDRSUPERSTACK);/* ...and for system mode. */ |
168 | 168 | instr = 0xe59ff000 | (ADDRSOFTVECTORS - 8); /* Load pc from soft vector */ |
169 | - | |
169 | + | |
170 | 170 | for (i = ARMul_ResetV; i <= ARMFIQV; i += 4) |
171 | 171 | /* Write hardware vectors. */ |
172 | 172 | ARMul_WriteWord (state, i, instr); |
173 | - | |
173 | + | |
174 | 174 | SWI_vector_installed = 0; |
175 | 175 | |
176 | 176 | for (i = ARMul_ResetV; i <= ARMFIQV + 4; i += 4) |
@@ -626,7 +626,7 @@ ARMul_OSHandleSWI (ARMul_State * state, ARMword number) | ||
626 | 626 | returning -1 in r0 to the caller. If GDB is then used to |
627 | 627 | resume the system call the reason code will now be -1. */ |
628 | 628 | return TRUE; |
629 | - | |
629 | + | |
630 | 630 | /* Unimplemented reason codes. */ |
631 | 631 | case AngelSWI_Reason_ReadC: |
632 | 632 | case AngelSWI_Reason_TmpNam: |
@@ -777,7 +777,7 @@ ARMul_OSHandleSWI (ARMul_State * state, ARMword number) | ||
777 | 777 | state->EndCondition = RDIError_SoftwareInterrupt; |
778 | 778 | state->Emulate = FALSE; |
779 | 779 | return FALSE; |
780 | - } | |
780 | + } | |
781 | 781 | |
782 | 782 | case 0x90: /* Reset. */ |
783 | 783 | case 0x92: /* SWI. */ |
@@ -799,7 +799,7 @@ ARMul_OSHandleSWI (ARMul_State * state, ARMword number) | ||
799 | 799 | returning -1 in r0 to the caller. If GDB is then used to |
800 | 800 | resume the system call the reason code will now be -1. */ |
801 | 801 | return TRUE; |
802 | - | |
802 | + | |
803 | 803 | case 0x180001: /* RedBoot's Syscall SWI in ARM mode. */ |
804 | 804 | if (swi_mask & SWI_MASK_REDBOOT) |
805 | 805 | { |
@@ -887,11 +887,11 @@ ARMul_OSHandleSWI (ARMul_State * state, ARMword number) | ||
887 | 887 | } |
888 | 888 | break; |
889 | 889 | } |
890 | - | |
890 | + | |
891 | 891 | default: |
892 | 892 | unhandled = TRUE; |
893 | 893 | } |
894 | - | |
894 | + | |
895 | 895 | if (unhandled) |
896 | 896 | { |
897 | 897 | if (SWI_vector_installed) |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* armos.h -- ARMulator OS definitions: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* armrdi.c -- ARMulator RDI interface: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -1134,7 +1134,7 @@ handle_VFP_op (ARMul_State * state, ARMword instr) | ||
1134 | 1134 | { |
1135 | 1135 | if (trace) |
1136 | 1136 | fprintf (stderr, " VFP: VMLS: %g = %g - %g * %g\n", |
1137 | - VFP_dval (dest) - val, | |
1137 | + VFP_dval (dest) - val, | |
1138 | 1138 | VFP_dval (dest), VFP_dval (srcN), VFP_dval (srcM)); |
1139 | 1139 | VFP_dval (dest) -= val; |
1140 | 1140 | } |
@@ -1142,7 +1142,7 @@ handle_VFP_op (ARMul_State * state, ARMword instr) | ||
1142 | 1142 | { |
1143 | 1143 | if (trace) |
1144 | 1144 | fprintf (stderr, " VFP: VMLA: %g = %g + %g * %g\n", |
1145 | - VFP_dval (dest) + val, | |
1145 | + VFP_dval (dest) + val, | |
1146 | 1146 | VFP_dval (dest), VFP_dval (srcN), VFP_dval (srcM)); |
1147 | 1147 | VFP_dval (dest) += val; |
1148 | 1148 | } |
@@ -1155,7 +1155,7 @@ handle_VFP_op (ARMul_State * state, ARMword instr) | ||
1155 | 1155 | { |
1156 | 1156 | if (trace) |
1157 | 1157 | fprintf (stderr, " VFP: VMLS: %g = %g - %g * %g\n", |
1158 | - VFP_fval (dest) - val, | |
1158 | + VFP_fval (dest) - val, | |
1159 | 1159 | VFP_fval (dest), VFP_fval (srcN), VFP_fval (srcM)); |
1160 | 1160 | VFP_fval (dest) -= val; |
1161 | 1161 | } |
@@ -1163,7 +1163,7 @@ handle_VFP_op (ARMul_State * state, ARMword instr) | ||
1163 | 1163 | { |
1164 | 1164 | if (trace) |
1165 | 1165 | fprintf (stderr, " VFP: VMLA: %g = %g + %g * %g\n", |
1166 | - VFP_fval (dest) + val, | |
1166 | + VFP_fval (dest) + val, | |
1167 | 1167 | VFP_fval (dest), VFP_fval (srcN), VFP_fval (srcM)); |
1168 | 1168 | VFP_fval (dest) += val; |
1169 | 1169 | } |
@@ -1345,7 +1345,7 @@ handle_VFP_op (ARMul_State * state, ARMword instr) | ||
1345 | 1345 | if (BIT (8)) |
1346 | 1346 | { |
1347 | 1347 | ARMdval src = VFP_dval (srcM); |
1348 | - | |
1348 | + | |
1349 | 1349 | VFP_dval (dest) = fabs (src); |
1350 | 1350 | if (trace) |
1351 | 1351 | fprintf (stderr, " VFP: VABS (%g) = %g\n", src, VFP_dval (dest)); |
@@ -1402,7 +1402,7 @@ handle_VFP_op (ARMul_State * state, ARMword instr) | ||
1402 | 1402 | if (BIT (16) == 0) |
1403 | 1403 | { |
1404 | 1404 | ARMdval src = VFP_dval (srcM); |
1405 | - | |
1405 | + | |
1406 | 1406 | if (isinf (res) && isinf (src)) |
1407 | 1407 | { |
1408 | 1408 | if (res > 0.0 && src > 0.0) |
@@ -1442,7 +1442,7 @@ handle_VFP_op (ARMul_State * state, ARMword instr) | ||
1442 | 1442 | if (BIT (16) == 0) |
1443 | 1443 | { |
1444 | 1444 | ARMfval src = VFP_fval (srcM); |
1445 | - | |
1445 | + | |
1446 | 1446 | if (isinf (res) && isinf (src)) |
1447 | 1447 | { |
1448 | 1448 | if (res > 0.0 && src > 0.0) |
@@ -1,26 +1,26 @@ | ||
1 | 1 | /* armvirt.c -- ARMulator virtual memory interace: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 | |
17 | 17 | /* This file contains a complete ARMulator memory model, modelling a |
18 | -"virtual memory" system. A much simpler model can be found in armfast.c, | |
19 | -and that model goes faster too, but has a fixed amount of memory. This | |
20 | -model's memory has 64K pages, allocated on demand from a 64K entry page | |
21 | -table. The routines PutWord and GetWord implement this. Pages are never | |
22 | -freed as they might be needed again. A single area of memory may be | |
23 | -defined to generate aborts. */ | |
18 | + "virtual memory" system. A much simpler model can be found in armfast.c, | |
19 | + and that model goes faster too, but has a fixed amount of memory. This | |
20 | + model's memory has 64K pages, allocated on demand from a 64K entry page | |
21 | + table. The routines PutWord and GetWord implement this. Pages are never | |
22 | + freed as they might be needed again. A single area of memory may be | |
23 | + defined to generate aborts. */ | |
24 | 24 | |
25 | 25 | #include "armopts.h" |
26 | 26 | #include "armos.h" |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* bag.c -- ARMulator support code: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* bag.h -- ARMulator support code: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* communicate.c -- ARMulator RDP comms code: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* communicate.h -- ARMulator comms support defns: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -1,21 +1,20 @@ | ||
1 | 1 | /* dbg_conf.h -- ARMulator debug interface: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 | |
17 | 17 | #ifndef Dbg_Conf__h |
18 | - | |
19 | 18 | #define Dbg_Conf__h |
20 | 19 | |
21 | 20 | typedef struct Dbg_ConfigBlock |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* dbg_cp.h -- ARMulator debug interface: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* dbg_hif.h -- ARMulator debug interface: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* dbg_rdi.h -- ARMulator RDI interface: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* gdbhost.c -- ARMulator RDP to gdb comms code: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* gdbhost.h -- ARMulator to gdb interface: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -1,7 +1,7 @@ | ||
1 | 1 | /* iwmmxt.c -- Intel(r) Wireless MMX(tm) technology co-processor interface. |
2 | 2 | Copyright (C) 2002-2015 Free Software Foundation, Inc. |
3 | 3 | Contributed by matthew green (mrg@redhat.com). |
4 | - | |
4 | + | |
5 | 5 | This program is free software; you can redistribute it and/or modify |
6 | 6 | it under the terms of the GNU General Public License as published by |
7 | 7 | the Free Software Foundation; either version 3 of the License, or |
@@ -25,7 +25,7 @@ | ||
25 | 25 | |
26 | 26 | /* #define DEBUG 1 */ |
27 | 27 | |
28 | -/* Intel(r) Wireless MMX(tm) technology co-processor. | |
28 | +/* Intel(r) Wireless MMX(tm) technology co-processor. | |
29 | 29 | It uses co-processor numbers (0 and 1). There are 16 vector registers wRx |
30 | 30 | and 16 control registers wCx. Co-processors 0 and 1 are used in MCR/MRC |
31 | 31 | to access wRx and wCx respectively. */ |
@@ -231,7 +231,7 @@ Add32 (ARMword a1, | ||
231 | 231 | same sign, but the result is a different sign. */ |
232 | 232 | * overflow_ptr = ( ( (result & sign_mask) && !(a1 & sign_mask) && !(a2 & sign_mask)) |
233 | 233 | || (!(result & sign_mask) && (a1 & sign_mask) && (a2 & sign_mask))); |
234 | - | |
234 | + | |
235 | 235 | return result; |
236 | 236 | } |
237 | 237 |
@@ -495,7 +495,7 @@ static signed short | ||
495 | 495 | IwmmxtSaturateS16 (signed int val, int * sat) |
496 | 496 | { |
497 | 497 | signed short rv; |
498 | - | |
498 | + | |
499 | 499 | if (val < -0x8000) |
500 | 500 | { |
501 | 501 | rv = - 0x8000; |
@@ -541,7 +541,7 @@ static signed long | ||
541 | 541 | IwmmxtSaturateS32 (signed long long val, int * sat) |
542 | 542 | { |
543 | 543 | signed long rv; |
544 | - | |
544 | + | |
545 | 545 | if (val < -0x80000000LL) |
546 | 546 | { |
547 | 547 | rv = -0x80000000; |
@@ -616,7 +616,7 @@ TANDC (ARMul_State * state, ARMword instr) | ||
616 | 616 | |
617 | 617 | #ifdef DEBUG |
618 | 618 | fprintf (stderr, "tandc\n"); |
619 | -#endif | |
619 | +#endif | |
620 | 620 | |
621 | 621 | /* The Rd field must be r15. */ |
622 | 622 | if (BITS (12, 15) != 15) |
@@ -654,7 +654,7 @@ TANDC (ARMul_State * state, ARMword instr) | ||
654 | 654 | ARMul_UndefInstr (state, instr); |
655 | 655 | return ARMul_DONE; |
656 | 656 | } |
657 | - | |
657 | + | |
658 | 658 | ARMul_SetCPSR (state, cpsr); |
659 | 659 | |
660 | 660 | return ARMul_DONE; |
@@ -671,7 +671,7 @@ TBCST (ARMul_State * state, ARMword instr) | ||
671 | 671 | |
672 | 672 | #ifdef DEBUG |
673 | 673 | fprintf (stderr, "tbcst\n"); |
674 | -#endif | |
674 | +#endif | |
675 | 675 | |
676 | 676 | Rn = state->Reg [BITS (12, 15)]; |
677 | 677 | if (BITS (12, 15) == 15) |
@@ -717,7 +717,7 @@ TEXTRC (ARMul_State * state, ARMword instr) | ||
717 | 717 | |
718 | 718 | #ifdef DEBUG |
719 | 719 | fprintf (stderr, "textrc\n"); |
720 | -#endif | |
720 | +#endif | |
721 | 721 | |
722 | 722 | /* The Rd field must be r15. */ |
723 | 723 | if (BITS (12, 15) != 15) |
@@ -744,7 +744,7 @@ TEXTRC (ARMul_State * state, ARMword instr) | ||
744 | 744 | ARMul_UndefInstr (state, instr); |
745 | 745 | return ARMul_DONE; |
746 | 746 | } |
747 | - | |
747 | + | |
748 | 748 | cpsr |= wCBITS (wCASF, selector, selector + 3) << 28; |
749 | 749 | ARMul_SetCPSR (state, cpsr); |
750 | 750 |
@@ -764,12 +764,12 @@ TEXTRM (ARMul_State * state, ARMword instr) | ||
764 | 764 | |
765 | 765 | #ifdef DEBUG |
766 | 766 | fprintf (stderr, "textrm\n"); |
767 | -#endif | |
767 | +#endif | |
768 | 768 | |
769 | 769 | wRn = BITS (16, 19); |
770 | 770 | sign = BIT (3); |
771 | 771 | offset = BITS (0, 2); |
772 | - | |
772 | + | |
773 | 773 | switch (BITS (22, 23)) |
774 | 774 | { |
775 | 775 | case Bqual: |
@@ -844,7 +844,7 @@ TINSR (ARMul_State * state, ARMword instr) | ||
844 | 844 | |
845 | 845 | switch (offset & 3) |
846 | 846 | { |
847 | - case 0: wR [wRd] = data | (wRBITS (wRd, 16, 63) << 16); break; | |
847 | + case 0: wR [wRd] = data | (wRBITS (wRd, 16, 63) << 16); break; | |
848 | 848 | case 1: wR [wRd] = wRBITS (wRd, 0, 15) | (data << 16) | (wRBITS (wRd, 32, 63) << 32); break; |
849 | 849 | case 2: wR [wRd] = wRBITS (wRd, 0, 31) | (data << 32) | (wRBITS (wRd, 48, 63) << 48); break; |
850 | 850 | case 3: wR [wRd] = wRBITS (wRd, 0, 47) | (data << 48); break; |
@@ -878,7 +878,7 @@ TMCR (ARMul_State * state, ARMword instr) | ||
878 | 878 | |
879 | 879 | #ifdef DEBUG |
880 | 880 | fprintf (stderr, "tmcr\n"); |
881 | -#endif | |
881 | +#endif | |
882 | 882 | |
883 | 883 | if (BITS (0, 3) != 0) |
884 | 884 | return ARMul_CANT; |
@@ -899,14 +899,14 @@ TMCR (ARMul_State * state, ARMword instr) | ||
899 | 899 | /* Writing to the MUP or CUP bits clears them. */ |
900 | 900 | wC [wCon] &= ~ (val & 0x3); |
901 | 901 | break; |
902 | - | |
902 | + | |
903 | 903 | case wCSSF: |
904 | 904 | /* Only the bottom 8 bits can be written to. |
905 | 905 | The higher bits write as zero. */ |
906 | 906 | wC [wCSSF] = (val & 0xff); |
907 | 907 | wC [wCon] |= WCON_CUP; |
908 | 908 | break; |
909 | - | |
909 | + | |
910 | 910 | default: |
911 | 911 | wC [wCreg] = val; |
912 | 912 | wC [wCon] |= WCON_CUP; |
@@ -927,7 +927,7 @@ TMCRR (ARMul_State * state, ARMword instr) | ||
927 | 927 | |
928 | 928 | #ifdef DEBUG |
929 | 929 | fprintf (stderr, "tmcrr\n"); |
930 | -#endif | |
930 | +#endif | |
931 | 931 | |
932 | 932 | if ((BITS (16, 19) == 15) || (BITS (12, 15) == 15)) |
933 | 933 | return ARMul_CANT; |
@@ -949,7 +949,7 @@ TMIA (ARMul_State * state, ARMword instr) | ||
949 | 949 | |
950 | 950 | #ifdef DEBUG |
951 | 951 | fprintf (stderr, "tmia\n"); |
952 | -#endif | |
952 | +#endif | |
953 | 953 | |
954 | 954 | if ((BITS (0, 3) == 15) || (BITS (12, 15) == 15)) |
955 | 955 | { |
@@ -976,13 +976,13 @@ TMIAPH (ARMul_State * state, ARMword instr) | ||
976 | 976 | signed long long r; |
977 | 977 | ARMword Rm = state->Reg [BITS (0, 3)]; |
978 | 978 | ARMword Rs = state->Reg [BITS (12, 15)]; |
979 | - | |
979 | + | |
980 | 980 | if ((read_cp15_reg (15, 0, 1) & 3) != 3) |
981 | 981 | return ARMul_CANT; |
982 | 982 | |
983 | 983 | #ifdef DEBUG |
984 | 984 | fprintf (stderr, "tmiaph\n"); |
985 | -#endif | |
985 | +#endif | |
986 | 986 | |
987 | 987 | if (BITS (0, 3) == 15 || BITS (12, 15) == 15) |
988 | 988 | { |
@@ -1000,7 +1000,7 @@ TMIAPH (ARMul_State * state, ARMword instr) | ||
1000 | 1000 | |
1001 | 1001 | r = result; |
1002 | 1002 | r = EXTEND32 (r); |
1003 | - | |
1003 | + | |
1004 | 1004 | wR [BITS (5, 8)] += r; |
1005 | 1005 | |
1006 | 1006 | a = SUBSTR (Rs, ARMword, 0, 15); |
@@ -1013,7 +1013,7 @@ TMIAPH (ARMul_State * state, ARMword instr) | ||
1013 | 1013 | |
1014 | 1014 | r = result; |
1015 | 1015 | r = EXTEND32 (r); |
1016 | - | |
1016 | + | |
1017 | 1017 | wR [BITS (5, 8)] += r; |
1018 | 1018 | wC [wCon] |= WCON_MUP; |
1019 | 1019 |
@@ -1026,13 +1026,13 @@ TMIAxy (ARMul_State * state, ARMword instr) | ||
1026 | 1026 | ARMword Rm; |
1027 | 1027 | ARMword Rs; |
1028 | 1028 | long long temp; |
1029 | - | |
1029 | + | |
1030 | 1030 | if ((read_cp15_reg (15, 0, 1) & 3) != 3) |
1031 | 1031 | return ARMul_CANT; |
1032 | 1032 | |
1033 | 1033 | #ifdef DEBUG |
1034 | 1034 | fprintf (stderr, "tmiaxy\n"); |
1035 | -#endif | |
1035 | +#endif | |
1036 | 1036 | |
1037 | 1037 | if (BITS (0, 3) == 15 || BITS (12, 15) == 15) |
1038 | 1038 | { |
@@ -1081,7 +1081,7 @@ TMOVMSK (ARMul_State * state, ARMword instr) | ||
1081 | 1081 | |
1082 | 1082 | #ifdef DEBUG |
1083 | 1083 | fprintf (stderr, "tmovmsk\n"); |
1084 | -#endif | |
1084 | +#endif | |
1085 | 1085 | |
1086 | 1086 | /* The CRm field must be r0. */ |
1087 | 1087 | if (BITS (0, 3) != 0) |
@@ -1133,7 +1133,7 @@ TMRC (ARMul_State * state, ARMword instr) | ||
1133 | 1133 | |
1134 | 1134 | #ifdef DEBUG |
1135 | 1135 | fprintf (stderr, "tmrc\n"); |
1136 | -#endif | |
1136 | +#endif | |
1137 | 1137 | |
1138 | 1138 | if (BITS (0, 3) != 0) |
1139 | 1139 | return ARMul_CANT; |
@@ -1154,7 +1154,7 @@ TMRRC (ARMul_State * state, ARMword instr) | ||
1154 | 1154 | |
1155 | 1155 | #ifdef DEBUG |
1156 | 1156 | fprintf (stderr, "tmrrc\n"); |
1157 | -#endif | |
1157 | +#endif | |
1158 | 1158 | |
1159 | 1159 | if ((BITS (16, 19) == 15) || (BITS (12, 15) == 15) || (BITS (4, 11) != 0)) |
1160 | 1160 | ARMul_UndefInstr (state, instr); |
@@ -1177,16 +1177,16 @@ TORC (ARMul_State * state, ARMword instr) | ||
1177 | 1177 | |
1178 | 1178 | #ifdef DEBUG |
1179 | 1179 | fprintf (stderr, "torc\n"); |
1180 | -#endif | |
1180 | +#endif | |
1181 | 1181 | |
1182 | 1182 | /* The Rd field must be r15. */ |
1183 | 1183 | if (BITS (12, 15) != 15) |
1184 | 1184 | return ARMul_CANT; |
1185 | - | |
1185 | + | |
1186 | 1186 | /* The CRn field must be r3. */ |
1187 | 1187 | if (BITS (16, 19) != 3) |
1188 | 1188 | return ARMul_CANT; |
1189 | - | |
1189 | + | |
1190 | 1190 | /* The CRm field must be r0. */ |
1191 | 1191 | if (BITS (0, 3) != 0) |
1192 | 1192 | return ARMul_CANT; |
@@ -1215,7 +1215,7 @@ TORC (ARMul_State * state, ARMword instr) | ||
1215 | 1215 | ARMul_UndefInstr (state, instr); |
1216 | 1216 | return ARMul_DONE; |
1217 | 1217 | } |
1218 | - | |
1218 | + | |
1219 | 1219 | ARMul_SetCPSR (state, cpsr); |
1220 | 1220 | |
1221 | 1221 | return ARMul_DONE; |
@@ -1231,7 +1231,7 @@ WACC (ARMul_State * state, ARMword instr) | ||
1231 | 1231 | |
1232 | 1232 | #ifdef DEBUG |
1233 | 1233 | fprintf (stderr, "wacc\n"); |
1234 | -#endif | |
1234 | +#endif | |
1235 | 1235 | |
1236 | 1236 | wRn = BITS (16, 19); |
1237 | 1237 |
@@ -1281,7 +1281,7 @@ WADD (ARMul_State * state, ARMword instr) | ||
1281 | 1281 | |
1282 | 1282 | #ifdef DEBUG |
1283 | 1283 | fprintf (stderr, "wadd\n"); |
1284 | -#endif | |
1284 | +#endif | |
1285 | 1285 | |
1286 | 1286 | /* Add two numbers using the specified function, |
1287 | 1287 | leaving setting the carry bit as required. */ |
@@ -1450,7 +1450,7 @@ WADD (ARMul_State * state, ARMword instr) | ||
1450 | 1450 | wC [wCon] |= (WCON_MUP | WCON_CUP); |
1451 | 1451 | |
1452 | 1452 | SET_wCSSFvec (satrv); |
1453 | - | |
1453 | + | |
1454 | 1454 | #undef ADDx |
1455 | 1455 | |
1456 | 1456 | return ARMul_DONE; |
@@ -1466,7 +1466,7 @@ WALIGNI (ARMword instr) | ||
1466 | 1466 | |
1467 | 1467 | #ifdef DEBUG |
1468 | 1468 | fprintf (stderr, "waligni\n"); |
1469 | -#endif | |
1469 | +#endif | |
1470 | 1470 | |
1471 | 1471 | if (shift) |
1472 | 1472 | wR [BITS (12, 15)] = |
@@ -1474,7 +1474,7 @@ WALIGNI (ARMword instr) | ||
1474 | 1474 | | (wRBITS (BITS (0, 3), 0, shift) << ((64 - shift))); |
1475 | 1475 | else |
1476 | 1476 | wR [BITS (12, 15)] = wR [BITS (16, 19)]; |
1477 | - | |
1477 | + | |
1478 | 1478 | wC [wCon] |= WCON_MUP; |
1479 | 1479 | return ARMul_DONE; |
1480 | 1480 | } |
@@ -1489,7 +1489,7 @@ WALIGNR (ARMul_State * state, ARMword instr) | ||
1489 | 1489 | |
1490 | 1490 | #ifdef DEBUG |
1491 | 1491 | fprintf (stderr, "walignr\n"); |
1492 | -#endif | |
1492 | +#endif | |
1493 | 1493 | |
1494 | 1494 | if (shift) |
1495 | 1495 | wR [BITS (12, 15)] = |
@@ -1513,14 +1513,14 @@ WAND (ARMword instr) | ||
1513 | 1513 | |
1514 | 1514 | #ifdef DEBUG |
1515 | 1515 | fprintf (stderr, "wand\n"); |
1516 | -#endif | |
1516 | +#endif | |
1517 | 1517 | |
1518 | 1518 | result = wR [BITS (16, 19)] & wR [BITS (0, 3)]; |
1519 | 1519 | wR [BITS (12, 15)] = result; |
1520 | 1520 | |
1521 | 1521 | SIMD64_SET (psr, (result == 0), SIMD_ZBIT); |
1522 | 1522 | SIMD64_SET (psr, (result & (1ULL << 63)), SIMD_NBIT); |
1523 | - | |
1523 | + | |
1524 | 1524 | wC [wCASF] = psr; |
1525 | 1525 | wC [wCon] |= (WCON_CUP | WCON_MUP); |
1526 | 1526 |
@@ -1538,14 +1538,14 @@ WANDN (ARMword instr) | ||
1538 | 1538 | |
1539 | 1539 | #ifdef DEBUG |
1540 | 1540 | fprintf (stderr, "wandn\n"); |
1541 | -#endif | |
1541 | +#endif | |
1542 | 1542 | |
1543 | 1543 | result = wR [BITS (16, 19)] & ~ wR [BITS (0, 3)]; |
1544 | 1544 | wR [BITS (12, 15)] = result; |
1545 | 1545 | |
1546 | 1546 | SIMD64_SET (psr, (result == 0), SIMD_ZBIT); |
1547 | 1547 | SIMD64_SET (psr, (result & (1ULL << 63)), SIMD_NBIT); |
1548 | - | |
1548 | + | |
1549 | 1549 | wC [wCASF] = psr; |
1550 | 1550 | wC [wCon] |= (WCON_CUP | WCON_MUP); |
1551 | 1551 |
@@ -1566,7 +1566,7 @@ WAVG2 (ARMword instr) | ||
1566 | 1566 | |
1567 | 1567 | #ifdef DEBUG |
1568 | 1568 | fprintf (stderr, "wavg2\n"); |
1569 | -#endif | |
1569 | +#endif | |
1570 | 1570 | |
1571 | 1571 | #define AVG2x(x, y, m) (((wRBITS (BITS (16, 19), (x), (y)) & (m)) \ |
1572 | 1572 | + (wRBITS (BITS ( 0, 3), (x), (y)) & (m)) \ |
@@ -1611,7 +1611,7 @@ WCMPEQ (ARMul_State * state, ARMword instr) | ||
1611 | 1611 | |
1612 | 1612 | #ifdef DEBUG |
1613 | 1613 | fprintf (stderr, "wcmpeq\n"); |
1614 | -#endif | |
1614 | +#endif | |
1615 | 1615 | |
1616 | 1616 | switch (BITS (22, 23)) |
1617 | 1617 | { |
@@ -1670,7 +1670,7 @@ WCMPGT (ARMul_State * state, ARMword instr) | ||
1670 | 1670 | |
1671 | 1671 | #ifdef DEBUG |
1672 | 1672 | fprintf (stderr, "wcmpgt\n"); |
1673 | -#endif | |
1673 | +#endif | |
1674 | 1674 | |
1675 | 1675 | switch (BITS (22, 23)) |
1676 | 1676 | { |
@@ -1681,7 +1681,7 @@ WCMPGT (ARMul_State * state, ARMword instr) | ||
1681 | 1681 | for (i = 0; i < 8; i++) |
1682 | 1682 | { |
1683 | 1683 | signed char a, b; |
1684 | - | |
1684 | + | |
1685 | 1685 | a = wRBYTE (BITS (16, 19), i); |
1686 | 1686 | b = wRBYTE (BITS (0, 3), i); |
1687 | 1687 |
@@ -1826,7 +1826,7 @@ Compute_Iwmmxt_Address (ARMul_State * state, ARMword instr, int * pFailed) | ||
1826 | 1826 | /* Writeback into R15 is UNPREDICTABLE. */ |
1827 | 1827 | #ifdef DEBUG |
1828 | 1828 | fprintf (stderr, "iWMMXt: writeback into r15\n"); |
1829 | -#endif | |
1829 | +#endif | |
1830 | 1830 | * pFailed = 1; |
1831 | 1831 | } |
1832 | 1832 | else |
@@ -1848,7 +1848,7 @@ Compute_Iwmmxt_Address (ARMul_State * state, ARMword instr, int * pFailed) | ||
1848 | 1848 | { |
1849 | 1849 | #ifdef DEBUG |
1850 | 1850 | fprintf (stderr, "iWMMXt: undefined addressing mode\n"); |
1851 | -#endif | |
1851 | +#endif | |
1852 | 1852 | * pFailed = 1; |
1853 | 1853 | } |
1854 | 1854 | } |
@@ -1861,7 +1861,7 @@ static ARMdword | ||
1861 | 1861 | Iwmmxt_Load_Double_Word (ARMul_State * state, ARMword address) |
1862 | 1862 | { |
1863 | 1863 | ARMdword value; |
1864 | - | |
1864 | + | |
1865 | 1865 | /* The address must be aligned on a 8 byte boundary. */ |
1866 | 1866 | if (address & 0x7) |
1867 | 1867 | { |
@@ -1911,7 +1911,7 @@ Iwmmxt_Load_Word (ARMul_State * state, ARMword address) | ||
1911 | 1911 | else |
1912 | 1912 | address &= ~ 3; |
1913 | 1913 | } |
1914 | - | |
1914 | + | |
1915 | 1915 | value = ARMul_LoadWordN (state, address); |
1916 | 1916 | |
1917 | 1917 | if (state->Aborted) |
@@ -2052,7 +2052,7 @@ WLDR (ARMul_State * state, ARMword instr) | ||
2052 | 2052 | |
2053 | 2053 | #ifdef DEBUG |
2054 | 2054 | fprintf (stderr, "wldr\n"); |
2055 | -#endif | |
2055 | +#endif | |
2056 | 2056 | |
2057 | 2057 | address = Compute_Iwmmxt_Address (state, instr, & failed); |
2058 | 2058 | if (failed) |
@@ -2099,7 +2099,7 @@ WMAC (ARMword instr) | ||
2099 | 2099 | |
2100 | 2100 | #ifdef DEBUG |
2101 | 2101 | fprintf (stderr, "wmac\n"); |
2102 | -#endif | |
2102 | +#endif | |
2103 | 2103 | |
2104 | 2104 | for (i = 0; i < 4; i++) |
2105 | 2105 | { |
@@ -2154,7 +2154,7 @@ WMADD (ARMword instr) | ||
2154 | 2154 | |
2155 | 2155 | #ifdef DEBUG |
2156 | 2156 | fprintf (stderr, "wmadd\n"); |
2157 | -#endif | |
2157 | +#endif | |
2158 | 2158 | |
2159 | 2159 | for (i = 0; i < 2; i++) |
2160 | 2160 | { |
@@ -2216,7 +2216,7 @@ WMAX (ARMul_State * state, ARMword instr) | ||
2216 | 2216 | |
2217 | 2217 | #ifdef DEBUG |
2218 | 2218 | fprintf (stderr, "wmax\n"); |
2219 | -#endif | |
2219 | +#endif | |
2220 | 2220 | |
2221 | 2221 | switch (BITS (22, 23)) |
2222 | 2222 | { |
@@ -2345,7 +2345,7 @@ WMIN (ARMul_State * state, ARMword instr) | ||
2345 | 2345 | |
2346 | 2346 | #ifdef DEBUG |
2347 | 2347 | fprintf (stderr, "wmin\n"); |
2348 | -#endif | |
2348 | +#endif | |
2349 | 2349 | |
2350 | 2350 | switch (BITS (22, 23)) |
2351 | 2351 | { |
@@ -2459,7 +2459,7 @@ WMIN (ARMul_State * state, ARMword instr) | ||
2459 | 2459 | |
2460 | 2460 | wR [BITS (12, 15)] = r; |
2461 | 2461 | wC [wCon] |= WCON_MUP; |
2462 | - | |
2462 | + | |
2463 | 2463 | return ARMul_DONE; |
2464 | 2464 | } |
2465 | 2465 |
@@ -2475,7 +2475,7 @@ WMUL (ARMword instr) | ||
2475 | 2475 | |
2476 | 2476 | #ifdef DEBUG |
2477 | 2477 | fprintf (stderr, "wmul\n"); |
2478 | -#endif | |
2478 | +#endif | |
2479 | 2479 | |
2480 | 2480 | for (i = 0; i < 4; i++) |
2481 | 2481 | if (BIT (21)) /* Signed. */ |
@@ -2527,14 +2527,14 @@ WOR (ARMword instr) | ||
2527 | 2527 | |
2528 | 2528 | #ifdef DEBUG |
2529 | 2529 | fprintf (stderr, "wor\n"); |
2530 | -#endif | |
2530 | +#endif | |
2531 | 2531 | |
2532 | 2532 | result = wR [BITS (16, 19)] | wR [BITS (0, 3)]; |
2533 | 2533 | wR [BITS (12, 15)] = result; |
2534 | 2534 | |
2535 | 2535 | SIMD64_SET (psr, (result == 0), SIMD_ZBIT); |
2536 | 2536 | SIMD64_SET (psr, (result & (1ULL << 63)), SIMD_NBIT); |
2537 | - | |
2537 | + | |
2538 | 2538 | wC [wCASF] = psr; |
2539 | 2539 | wC [wCon] |= (WCON_CUP | WCON_MUP); |
2540 | 2540 |
@@ -2556,8 +2556,8 @@ WPACK (ARMul_State * state, ARMword instr) | ||
2556 | 2556 | |
2557 | 2557 | #ifdef DEBUG |
2558 | 2558 | fprintf (stderr, "wpack\n"); |
2559 | -#endif | |
2560 | - | |
2559 | +#endif | |
2560 | + | |
2561 | 2561 | switch (BITS (22, 23)) |
2562 | 2562 | { |
2563 | 2563 | case Hqual: |
@@ -2669,7 +2669,7 @@ WROR (ARMul_State * state, ARMword instr) | ||
2669 | 2669 | |
2670 | 2670 | #ifdef DEBUG |
2671 | 2671 | fprintf (stderr, "wror\n"); |
2672 | -#endif | |
2672 | +#endif | |
2673 | 2673 | |
2674 | 2674 | DECODE_G_BIT (state, instr, shift); |
2675 | 2675 |
@@ -2732,7 +2732,7 @@ WSAD (ARMword instr) | ||
2732 | 2732 | |
2733 | 2733 | #ifdef DEBUG |
2734 | 2734 | fprintf (stderr, "wsad\n"); |
2735 | -#endif | |
2735 | +#endif | |
2736 | 2736 | |
2737 | 2737 | /* Z bit. */ |
2738 | 2738 | r = BIT (20) ? 0 : (wR [BITS (12, 15)] & 0xffffffff); |
@@ -2772,7 +2772,7 @@ WSHUFH (ARMword instr) | ||
2772 | 2772 | |
2773 | 2773 | #ifdef DEBUG |
2774 | 2774 | fprintf (stderr, "wshufh\n"); |
2775 | -#endif | |
2775 | +#endif | |
2776 | 2776 | |
2777 | 2777 | imm8 = (BITS (20, 23) << 4) | BITS (0, 3); |
2778 | 2778 |
@@ -2805,7 +2805,7 @@ WSLL (ARMul_State * state, ARMword instr) | ||
2805 | 2805 | |
2806 | 2806 | #ifdef DEBUG |
2807 | 2807 | fprintf (stderr, "wsll\n"); |
2808 | -#endif | |
2808 | +#endif | |
2809 | 2809 | |
2810 | 2810 | DECODE_G_BIT (state, instr, shift); |
2811 | 2811 |
@@ -2874,7 +2874,7 @@ WSRA (ARMul_State * state, ARMword instr) | ||
2874 | 2874 | |
2875 | 2875 | #ifdef DEBUG |
2876 | 2876 | fprintf (stderr, "wsra\n"); |
2877 | -#endif | |
2877 | +#endif | |
2878 | 2878 | |
2879 | 2879 | DECODE_G_BIT (state, instr, shift); |
2880 | 2880 |
@@ -2915,7 +2915,7 @@ WSRA (ARMul_State * state, ARMword instr) | ||
2915 | 2915 | SIMD32_SET (psr, ZBIT32 (s), SIMD_ZBIT, i); |
2916 | 2916 | } |
2917 | 2917 | break; |
2918 | - | |
2918 | + | |
2919 | 2919 | case Dqual: |
2920 | 2920 | if (shift > 63) |
2921 | 2921 | r = (wR [BITS (16, 19)] & 0x8000000000000000ULL) ? 0xffffffffffffffffULL : 0; |
@@ -3020,7 +3020,7 @@ WSTR (ARMul_State * state, ARMword instr) | ||
3020 | 3020 | #ifdef DEBUG |
3021 | 3021 | fprintf (stderr, "wstr\n"); |
3022 | 3022 | #endif |
3023 | - | |
3023 | + | |
3024 | 3024 | address = Compute_Iwmmxt_Address (state, instr, & failed); |
3025 | 3025 | if (failed) |
3026 | 3026 | return ARMul_CANT; |
@@ -3069,7 +3069,7 @@ WSUB (ARMul_State * state, ARMword instr) | ||
3069 | 3069 | |
3070 | 3070 | #ifdef DEBUG |
3071 | 3071 | fprintf (stderr, "wsub\n"); |
3072 | -#endif | |
3072 | +#endif | |
3073 | 3073 | |
3074 | 3074 | /* Subtract two numbers using the specified function, |
3075 | 3075 | leaving setting the carry bit as required. */ |
@@ -3255,7 +3255,7 @@ WUNPCKEH (ARMul_State * state, ARMword instr) | ||
3255 | 3255 | |
3256 | 3256 | #ifdef DEBUG |
3257 | 3257 | fprintf (stderr, "wunpckeh\n"); |
3258 | -#endif | |
3258 | +#endif | |
3259 | 3259 | |
3260 | 3260 | switch (BITS (22, 23)) |
3261 | 3261 | { |
@@ -3322,7 +3322,7 @@ WUNPCKEL (ARMul_State * state, ARMword instr) | ||
3322 | 3322 | |
3323 | 3323 | #ifdef DEBUG |
3324 | 3324 | fprintf (stderr, "wunpckel\n"); |
3325 | -#endif | |
3325 | +#endif | |
3326 | 3326 | |
3327 | 3327 | switch (BITS (22, 23)) |
3328 | 3328 | { |
@@ -3390,7 +3390,7 @@ WUNPCKIH (ARMul_State * state, ARMword instr) | ||
3390 | 3390 | |
3391 | 3391 | #ifdef DEBUG |
3392 | 3392 | fprintf (stderr, "wunpckih\n"); |
3393 | -#endif | |
3393 | +#endif | |
3394 | 3394 | |
3395 | 3395 | switch (BITS (22, 23)) |
3396 | 3396 | { |
@@ -3407,7 +3407,7 @@ WUNPCKIH (ARMul_State * state, ARMword instr) | ||
3407 | 3407 | SIMD8_SET (psr, ZBIT8 (b), SIMD_ZBIT, (i * 2) + 1); |
3408 | 3408 | } |
3409 | 3409 | break; |
3410 | - | |
3410 | + | |
3411 | 3411 | case Hqual: |
3412 | 3412 | for (i = 0; i < 2; i++) |
3413 | 3413 | { |
@@ -3459,7 +3459,7 @@ WUNPCKIL (ARMul_State * state, ARMword instr) | ||
3459 | 3459 | |
3460 | 3460 | #ifdef DEBUG |
3461 | 3461 | fprintf (stderr, "wunpckil\n"); |
3462 | -#endif | |
3462 | +#endif | |
3463 | 3463 | |
3464 | 3464 | switch (BITS (22, 23)) |
3465 | 3465 | { |
@@ -3525,14 +3525,14 @@ WXOR (ARMword instr) | ||
3525 | 3525 | |
3526 | 3526 | #ifdef DEBUG |
3527 | 3527 | fprintf (stderr, "wxor\n"); |
3528 | -#endif | |
3528 | +#endif | |
3529 | 3529 | |
3530 | 3530 | result = wR [BITS (16, 19)] ^ wR [BITS (0, 3)]; |
3531 | 3531 | wR [BITS (12, 15)] = result; |
3532 | 3532 | |
3533 | 3533 | SIMD64_SET (psr, (result == 0), SIMD_ZBIT); |
3534 | 3534 | SIMD64_SET (psr, (result & (1ULL << 63)), SIMD_NBIT); |
3535 | - | |
3535 | + | |
3536 | 3536 | wC [wCASF] = psr; |
3537 | 3537 | wC [wCon] |= (WCON_CUP | WCON_MUP); |
3538 | 3538 |
@@ -3560,7 +3560,7 @@ Process_Instruction (ARMul_State * state, ARMword instr) | ||
3560 | 3560 | status = WMADD (instr); break; |
3561 | 3561 | |
3562 | 3562 | case 0x10e: case 0x50e: case 0x90e: case 0xd0e: |
3563 | - status = WUNPCKIL (state, instr); break; | |
3563 | + status = WUNPCKIL (state, instr); break; | |
3564 | 3564 | case 0x10c: case 0x50c: case 0x90c: case 0xd0c: |
3565 | 3565 | status = WUNPCKIH (state, instr); break; |
3566 | 3566 | case 0x012: case 0x112: case 0x412: case 0x512: |
@@ -3626,7 +3626,7 @@ Process_Instruction (ARMul_State * state, ARMword instr) | ||
3626 | 3626 | case 0x81a: case 0x91a: case 0xa1a: case 0xb1a: |
3627 | 3627 | case 0xc1a: case 0xd1a: case 0xe1a: case 0xf1a: |
3628 | 3628 | status = WSUB (state, instr); break; |
3629 | - case 0x01e: case 0x11e: case 0x21e: case 0x31e: | |
3629 | + case 0x01e: case 0x11e: case 0x21e: case 0x31e: | |
3630 | 3630 | case 0x41e: case 0x51e: case 0x61e: case 0x71e: |
3631 | 3631 | case 0x81e: case 0x91e: case 0xa1e: case 0xb1e: |
3632 | 3632 | case 0xc1e: case 0xd1e: case 0xe1e: case 0xf1e: |
@@ -3643,8 +3643,8 @@ Process_Instruction (ARMul_State * state, ARMword instr) | ||
3643 | 3643 | status = WPACK (state, instr); break; |
3644 | 3644 | case 0x201: case 0x203: case 0x205: case 0x207: |
3645 | 3645 | case 0x209: case 0x20b: case 0x20d: case 0x20f: |
3646 | - case 0x211: case 0x213: case 0x215: case 0x217: | |
3647 | - case 0x219: case 0x21b: case 0x21d: case 0x21f: | |
3646 | + case 0x211: case 0x213: case 0x215: case 0x217: | |
3647 | + case 0x219: case 0x21b: case 0x21d: case 0x21f: | |
3648 | 3648 | switch (BITS (16, 19)) |
3649 | 3649 | { |
3650 | 3650 | case 0x0: status = TMIA (state, instr); break; |
@@ -3667,7 +3667,7 @@ Process_Instruction (ARMul_State * state, ARMword instr) | ||
3667 | 3667 | |
3668 | 3668 | int |
3669 | 3669 | ARMul_HandleIwmmxt (ARMul_State * state, ARMword instr) |
3670 | -{ | |
3670 | +{ | |
3671 | 3671 | int status = ARMul_BUSY; |
3672 | 3672 | |
3673 | 3673 | if (BITS (24, 27) == 0xe) |
@@ -1,7 +1,7 @@ | ||
1 | 1 | /* iwmmxt.h -- Intel(r) Wireless MMX(tm) technology co-processor interface. |
2 | 2 | Copyright (C) 2002-2015 Free Software Foundation, Inc. |
3 | 3 | Contributed by matthew green (mrg@redhat.com). |
4 | - | |
4 | + | |
5 | 5 | This program is free software; you can redistribute it and/or modify |
6 | 6 | it under the terms of the GNU General Public License as published by |
7 | 7 | the Free Software Foundation; either version 3 of the License, or |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* kid.c -- ARMulator RDP/RDI interface: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* main.c -- top level of ARMulator: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -1,7 +1,7 @@ | ||
1 | 1 | /* maverick.c -- Cirrus/DSP co-processor interface. |
2 | 2 | Copyright (C) 2003-2015 Free Software Foundation, Inc. |
3 | 3 | Contributed by Aldy Hernandez (aldyh@redhat.com). |
4 | - | |
4 | + | |
5 | 5 | This program is free software; you can redistribute it and/or modify |
6 | 6 | it under the terms of the GNU General Public License as published by |
7 | 7 | the Free Software Foundation; either version 3 of the License, or |
@@ -47,7 +47,7 @@ struct maverick_regs | ||
47 | 47 | int i; |
48 | 48 | float f; |
49 | 49 | } upper; |
50 | - | |
50 | + | |
51 | 51 | union |
52 | 52 | { |
53 | 53 | int i; |
@@ -93,7 +93,7 @@ cirrus_not_implemented (char * insn) | ||
93 | 93 | { |
94 | 94 | fprintf (stderr, "Cirrus instruction '%s' not implemented.\n", insn); |
95 | 95 | fprintf (stderr, "aborting!\n"); |
96 | - | |
96 | + | |
97 | 97 | exit (1); |
98 | 98 | } |
99 | 99 |
@@ -110,19 +110,19 @@ DSPMRC4 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
110 | 110 | printfdbg ("cfmvrdl\n"); |
111 | 111 | printfdbg ("\tlower half=0x%x\n", DSPregs[SRC1_REG].lower.i); |
112 | 112 | printfdbg ("\tentire thing=%g\n", mv_getRegDouble (SRC1_REG)); |
113 | - | |
113 | + | |
114 | 114 | *value = (ARMword) DSPregs[SRC1_REG].lower.i; |
115 | 115 | break; |
116 | - | |
116 | + | |
117 | 117 | case 1: /* cfmvrdh */ |
118 | 118 | /* Move upper half of a DF stored in a DSP reg into an Arm reg. */ |
119 | 119 | printfdbg ("cfmvrdh\n"); |
120 | 120 | printfdbg ("\tupper half=0x%x\n", DSPregs[SRC1_REG].upper.i); |
121 | 121 | printfdbg ("\tentire thing=%g\n", mv_getRegDouble (SRC1_REG)); |
122 | - | |
122 | + | |
123 | 123 | *value = (ARMword) DSPregs[SRC1_REG].upper.i; |
124 | 124 | break; |
125 | - | |
125 | + | |
126 | 126 | case 2: /* cfmvrs */ |
127 | 127 | /* Move SF from upper half of a DSP register to an Arm register. */ |
128 | 128 | *value = (ARMword) DSPregs[SRC1_REG].upper.i; |
@@ -130,7 +130,7 @@ DSPMRC4 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
130 | 130 | SRC1_REG, |
131 | 131 | DSPregs[SRC1_REG].upper.f); |
132 | 132 | break; |
133 | - | |
133 | + | |
134 | 134 | #ifdef doesnt_work |
135 | 135 | case 4: /* cfcmps */ |
136 | 136 | { |
@@ -150,7 +150,7 @@ DSPMRC4 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
150 | 150 | *value = (n << 31) | (z << 30) | (c << 29) | (v << 28); |
151 | 151 | break; |
152 | 152 | } |
153 | - | |
153 | + | |
154 | 154 | case 5: /* cfcmpd */ |
155 | 155 | { |
156 | 156 | double a, b; |
@@ -177,7 +177,7 @@ DSPMRC4 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
177 | 177 | |
178 | 178 | a = DSPregs[SRC1_REG].upper.f; |
179 | 179 | b = DSPregs[SRC2_REG].upper.f; |
180 | - | |
180 | + | |
181 | 181 | printfdbg ("cfcmps\n"); |
182 | 182 | printfdbg ("\tcomparing %f and %f\n", a, b); |
183 | 183 |
@@ -197,10 +197,10 @@ DSPMRC4 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
197 | 197 | |
198 | 198 | a = mv_getRegDouble (SRC1_REG); |
199 | 199 | b = mv_getRegDouble (SRC2_REG); |
200 | - | |
200 | + | |
201 | 201 | printfdbg ("cfcmpd\n"); |
202 | 202 | printfdbg ("\tcomparing %g and %g\n", a, b); |
203 | - | |
203 | + | |
204 | 204 | z = a == b; /* zero */ |
205 | 205 | n = a < b; /* negative */ |
206 | 206 | c = a > b; /* carry */ |
@@ -233,13 +233,13 @@ DSPMRC5 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
233 | 233 | DEST_REG, |
234 | 234 | (int) *value); |
235 | 235 | break; |
236 | - | |
236 | + | |
237 | 237 | case 1: /* cfmvr64h */ |
238 | 238 | /* Move upper half of 64bit int from Cirrus to Arm. */ |
239 | 239 | *value = (ARMword) DSPregs[SRC1_REG].upper.i; |
240 | 240 | printfdbg ("cfmvr64h <-- %d\n", (int) *value); |
241 | 241 | break; |
242 | - | |
242 | + | |
243 | 243 | case 4: /* cfcmp32 */ |
244 | 244 | { |
245 | 245 | int res; |
@@ -270,7 +270,7 @@ DSPMRC5 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
270 | 270 | *value = (n << 31) | (z << 30) | (c << 29) | (v << 28); |
271 | 271 | break; |
272 | 272 | } |
273 | - | |
273 | + | |
274 | 274 | case 5: /* cfcmp64 */ |
275 | 275 | { |
276 | 276 | long long res; |
@@ -302,7 +302,7 @@ DSPMRC5 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
302 | 302 | *value = (n << 31) | (z << 30) | (c << 29) | (v << 28); |
303 | 303 | break; |
304 | 304 | } |
305 | - | |
305 | + | |
306 | 306 | default: |
307 | 307 | fprintf (stderr, "unknown opcode in DSPMRC5 0x%x\n", instr); |
308 | 308 | cirrus_not_implemented ("unknown"); |
@@ -323,27 +323,27 @@ DSPMRC6 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
323 | 323 | case 0: /* cfmval32 */ |
324 | 324 | cirrus_not_implemented ("cfmval32"); |
325 | 325 | break; |
326 | - | |
326 | + | |
327 | 327 | case 1: /* cfmvam32 */ |
328 | 328 | cirrus_not_implemented ("cfmvam32"); |
329 | 329 | break; |
330 | - | |
330 | + | |
331 | 331 | case 2: /* cfmvah32 */ |
332 | 332 | cirrus_not_implemented ("cfmvah32"); |
333 | 333 | break; |
334 | - | |
334 | + | |
335 | 335 | case 3: /* cfmva32 */ |
336 | 336 | cirrus_not_implemented ("cfmva32"); |
337 | 337 | break; |
338 | - | |
338 | + | |
339 | 339 | case 4: /* cfmva64 */ |
340 | 340 | cirrus_not_implemented ("cfmva64"); |
341 | 341 | break; |
342 | - | |
342 | + | |
343 | 343 | case 5: /* cfmvsc32 */ |
344 | 344 | cirrus_not_implemented ("cfmvsc32"); |
345 | 345 | break; |
346 | - | |
346 | + | |
347 | 347 | default: |
348 | 348 | fprintf (stderr, "unknown opcode in DSPMRC6 0x%x\n", instr); |
349 | 349 | cirrus_not_implemented ("unknown"); |
@@ -367,20 +367,20 @@ DSPMCR4 (ARMul_State * state, | ||
367 | 367 | printfdbg ("cfmvdlr <-- 0x%x\n", (int) value); |
368 | 368 | DSPregs[SRC1_REG].lower.i = (int) value; |
369 | 369 | break; |
370 | - | |
370 | + | |
371 | 371 | case 1: /* cfmvdhr */ |
372 | 372 | /* Move the upper half of a DF value from an Arm register into |
373 | 373 | the upper half of a Cirrus register. */ |
374 | 374 | printfdbg ("cfmvdhr <-- 0x%x\n", (int) value); |
375 | 375 | DSPregs[SRC1_REG].upper.i = (int) value; |
376 | 376 | break; |
377 | - | |
377 | + | |
378 | 378 | case 2: /* cfmvsr */ |
379 | 379 | /* Move SF from Arm register into upper half of Cirrus register. */ |
380 | 380 | printfdbg ("cfmvsr <-- 0x%x\n", (int) value); |
381 | 381 | DSPregs[SRC1_REG].upper.i = (int) value; |
382 | 382 | break; |
383 | - | |
383 | + | |
384 | 384 | default: |
385 | 385 | fprintf (stderr, "unknown opcode in DSPMCR4 0x%x\n", instr); |
386 | 386 | cirrus_not_implemented ("unknown"); |
@@ -410,7 +410,7 @@ DSPMCR5 (ARMul_State * state, | ||
410 | 410 | printfdbg ("cfmv64lr mvdx%d <-- 0x%x\n", SRC1_REG, (int) value); |
411 | 411 | DSPregs[SRC1_REG].lower.i = (int) value; |
412 | 412 | break; |
413 | - | |
413 | + | |
414 | 414 | case 1: /* cfmv64hr */ |
415 | 415 | /* Move upper half of a 64bit int from an ARM register into the |
416 | 416 | upper half of a DSP register. */ |
@@ -419,7 +419,7 @@ DSPMCR5 (ARMul_State * state, | ||
419 | 419 | (int) value); |
420 | 420 | DSPregs[SRC1_REG].upper.i = (int) value; |
421 | 421 | break; |
422 | - | |
422 | + | |
423 | 423 | case 2: /* cfrshl32 */ |
424 | 424 | printfdbg ("cfrshl32\n"); |
425 | 425 | val.us = value; |
@@ -428,7 +428,7 @@ DSPMCR5 (ARMul_State * state, | ||
428 | 428 | else |
429 | 429 | DSPregs[SRC2_REG].lower.i = DSPregs[SRC1_REG].lower.i >> -value; |
430 | 430 | break; |
431 | - | |
431 | + | |
432 | 432 | case 3: /* cfrshl64 */ |
433 | 433 | printfdbg ("cfrshl64\n"); |
434 | 434 | val.us = value; |
@@ -437,7 +437,7 @@ DSPMCR5 (ARMul_State * state, | ||
437 | 437 | else |
438 | 438 | mv_setReg64int (SRC2_REG, mv_getReg64int (SRC1_REG) >> -value); |
439 | 439 | break; |
440 | - | |
440 | + | |
441 | 441 | default: |
442 | 442 | fprintf (stderr, "unknown opcode in DSPMCR5 0x%x\n", instr); |
443 | 443 | cirrus_not_implemented ("unknown"); |
@@ -458,27 +458,27 @@ DSPMCR6 (ARMul_State * state, | ||
458 | 458 | case 0: /* cfmv32al */ |
459 | 459 | cirrus_not_implemented ("cfmv32al"); |
460 | 460 | break; |
461 | - | |
461 | + | |
462 | 462 | case 1: /* cfmv32am */ |
463 | 463 | cirrus_not_implemented ("cfmv32am"); |
464 | 464 | break; |
465 | - | |
465 | + | |
466 | 466 | case 2: /* cfmv32ah */ |
467 | 467 | cirrus_not_implemented ("cfmv32ah"); |
468 | 468 | break; |
469 | - | |
469 | + | |
470 | 470 | case 3: /* cfmv32a */ |
471 | 471 | cirrus_not_implemented ("cfmv32a"); |
472 | 472 | break; |
473 | - | |
473 | + | |
474 | 474 | case 4: /* cfmv64a */ |
475 | 475 | cirrus_not_implemented ("cfmv64a"); |
476 | 476 | break; |
477 | - | |
477 | + | |
478 | 478 | case 5: /* cfmv32sc */ |
479 | 479 | cirrus_not_implemented ("cfmv32sc"); |
480 | 480 | break; |
481 | - | |
481 | + | |
482 | 482 | default: |
483 | 483 | fprintf (stderr, "unknown opcode in DSPMCR6 0x%x\n", instr); |
484 | 484 | cirrus_not_implemented ("unknown"); |
@@ -501,14 +501,14 @@ DSPLDC4 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
501 | 501 | words = 0; |
502 | 502 | return ARMul_DONE; |
503 | 503 | } |
504 | - | |
504 | + | |
505 | 505 | if (BIT (22)) |
506 | 506 | { /* it's a long access, get two words */ |
507 | 507 | /* cfldrd */ |
508 | 508 | |
509 | 509 | printfdbg ("cfldrd: %x (words = %d) (bigend = %d) DESTREG = %d\n", |
510 | 510 | data, words, state->bigendSig, DEST_REG); |
511 | - | |
511 | + | |
512 | 512 | if (words == 0) |
513 | 513 | { |
514 | 514 | if (state->bigendSig) |
@@ -523,14 +523,14 @@ DSPLDC4 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
523 | 523 | else |
524 | 524 | DSPregs[DEST_REG].upper.i = (int) data; |
525 | 525 | } |
526 | - | |
526 | + | |
527 | 527 | ++ words; |
528 | - | |
528 | + | |
529 | 529 | if (words == 2) |
530 | 530 | { |
531 | 531 | printfdbg ("\tmvd%d <-- mem = %g\n", DEST_REG, |
532 | 532 | mv_getRegDouble (DEST_REG)); |
533 | - | |
533 | + | |
534 | 534 | return ARMul_DONE; |
535 | 535 | } |
536 | 536 | else |
@@ -539,7 +539,7 @@ DSPLDC4 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
539 | 539 | else |
540 | 540 | { |
541 | 541 | /* Get just one word. */ |
542 | - | |
542 | + | |
543 | 543 | /* cfldrs */ |
544 | 544 | printfdbg ("cfldrs\n"); |
545 | 545 |
@@ -565,11 +565,11 @@ DSPLDC5 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
565 | 565 | words = 0; |
566 | 566 | return ARMul_DONE; |
567 | 567 | } |
568 | - | |
568 | + | |
569 | 569 | if (BIT (22)) |
570 | 570 | { |
571 | 571 | /* It's a long access, get two words. */ |
572 | - | |
572 | + | |
573 | 573 | /* cfldr64 */ |
574 | 574 | printfdbg ("cfldr64: %d\n", data); |
575 | 575 |
@@ -587,14 +587,14 @@ DSPLDC5 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
587 | 587 | else |
588 | 588 | DSPregs[DEST_REG].upper.i = (int) data; |
589 | 589 | } |
590 | - | |
590 | + | |
591 | 591 | ++ words; |
592 | - | |
592 | + | |
593 | 593 | if (words == 2) |
594 | 594 | { |
595 | 595 | printfdbg ("\tmvdx%d <-- mem = %lld\n", DEST_REG, |
596 | 596 | mv_getReg64int (DEST_REG)); |
597 | - | |
597 | + | |
598 | 598 | return ARMul_DONE; |
599 | 599 | } |
600 | 600 | else |
@@ -603,10 +603,10 @@ DSPLDC5 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
603 | 603 | else |
604 | 604 | { |
605 | 605 | /* Get just one word. */ |
606 | - | |
606 | + | |
607 | 607 | /* cfldr32 */ |
608 | 608 | printfdbg ("cfldr32 mvfx%d <-- %d\n", DEST_REG, (int) data); |
609 | - | |
609 | + | |
610 | 610 | /* 32bit ints should be sign extended to 64bits when loaded. */ |
611 | 611 | mv_setReg64int (DEST_REG, (long long) data); |
612 | 612 |
@@ -627,7 +627,7 @@ DSPSTC4 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
627 | 627 | words = 0; |
628 | 628 | return ARMul_DONE; |
629 | 629 | } |
630 | - | |
630 | + | |
631 | 631 | if (BIT (22)) |
632 | 632 | { |
633 | 633 | /* It's a long access, get two words. */ |
@@ -648,14 +648,14 @@ DSPSTC4 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
648 | 648 | else |
649 | 649 | *data = (ARMword) DSPregs[DEST_REG].upper.i; |
650 | 650 | } |
651 | - | |
651 | + | |
652 | 652 | ++ words; |
653 | - | |
653 | + | |
654 | 654 | if (words == 2) |
655 | 655 | { |
656 | 656 | printfdbg ("\tmem = mvd%d = %g\n", DEST_REG, |
657 | 657 | mv_getRegDouble (DEST_REG)); |
658 | - | |
658 | + | |
659 | 659 | return ARMul_DONE; |
660 | 660 | } |
661 | 661 | else |
@@ -687,7 +687,7 @@ DSPSTC5 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
687 | 687 | words = 0; |
688 | 688 | return ARMul_DONE; |
689 | 689 | } |
690 | - | |
690 | + | |
691 | 691 | if (BIT (22)) |
692 | 692 | { |
693 | 693 | /* It's a long access, store two words. */ |
@@ -708,14 +708,14 @@ DSPSTC5 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
708 | 708 | else |
709 | 709 | *data = (ARMword) DSPregs[DEST_REG].upper.i; |
710 | 710 | } |
711 | - | |
711 | + | |
712 | 712 | ++ words; |
713 | - | |
713 | + | |
714 | 714 | if (words == 2) |
715 | 715 | { |
716 | 716 | printfdbg ("\tmem = mvd%d = %lld\n", DEST_REG, |
717 | 717 | mv_getReg64int (DEST_REG)); |
718 | - | |
718 | + | |
719 | 719 | return ARMul_DONE; |
720 | 720 | } |
721 | 721 | else |
@@ -726,7 +726,7 @@ DSPSTC5 (ARMul_State * state ATTRIBUTE_UNUSED, | ||
726 | 726 | /* Store just one word. */ |
727 | 727 | /* cfstr32 */ |
728 | 728 | *data = (ARMword) DSPregs[DEST_REG].lower.i; |
729 | - | |
729 | + | |
730 | 730 | printfdbg ("cfstr32 MEM = %d\n", (int) *data); |
731 | 731 | |
732 | 732 | return ARMul_DONE; |
@@ -754,7 +754,7 @@ DSPCDP4 (ARMul_State * state, | ||
754 | 754 | DSPregs[SRC1_REG].upper.f); |
755 | 755 | DSPregs[DEST_REG].upper.f = DSPregs[SRC1_REG].upper.f; |
756 | 756 | break; |
757 | - | |
757 | + | |
758 | 758 | case 1: /* cfcpyd */ |
759 | 759 | printfdbg ("cfcpyd mvd%d = mvd%d = %g\n", |
760 | 760 | DEST_REG, |
@@ -762,7 +762,7 @@ DSPCDP4 (ARMul_State * state, | ||
762 | 762 | mv_getRegDouble (SRC1_REG)); |
763 | 763 | mv_setRegDouble (DEST_REG, mv_getRegDouble (SRC1_REG)); |
764 | 764 | break; |
765 | - | |
765 | + | |
766 | 766 | case 2: /* cfcvtds */ |
767 | 767 | printfdbg ("cfcvtds mvf%d = (float) mvd%d = %f\n", |
768 | 768 | DEST_REG, |
@@ -770,7 +770,7 @@ DSPCDP4 (ARMul_State * state, | ||
770 | 770 | (float) mv_getRegDouble (SRC1_REG)); |
771 | 771 | DSPregs[DEST_REG].upper.f = (float) mv_getRegDouble (SRC1_REG); |
772 | 772 | break; |
773 | - | |
773 | + | |
774 | 774 | case 3: /* cfcvtsd */ |
775 | 775 | printfdbg ("cfcvtsd mvd%d = mvf%d = %g\n", |
776 | 776 | DEST_REG, |
@@ -778,7 +778,7 @@ DSPCDP4 (ARMul_State * state, | ||
778 | 778 | (double) DSPregs[SRC1_REG].upper.f); |
779 | 779 | mv_setRegDouble (DEST_REG, (double) DSPregs[SRC1_REG].upper.f); |
780 | 780 | break; |
781 | - | |
781 | + | |
782 | 782 | case 4: /* cfcvt32s */ |
783 | 783 | printfdbg ("cfcvt32s mvf%d = mvfx%d = %f\n", |
784 | 784 | DEST_REG, |
@@ -786,7 +786,7 @@ DSPCDP4 (ARMul_State * state, | ||
786 | 786 | (float) DSPregs[SRC1_REG].lower.i); |
787 | 787 | DSPregs[DEST_REG].upper.f = (float) DSPregs[SRC1_REG].lower.i; |
788 | 788 | break; |
789 | - | |
789 | + | |
790 | 790 | case 5: /* cfcvt32d */ |
791 | 791 | printfdbg ("cfcvt32d mvd%d = mvfx%d = %g\n", |
792 | 792 | DEST_REG, |
@@ -794,7 +794,7 @@ DSPCDP4 (ARMul_State * state, | ||
794 | 794 | (double) DSPregs[SRC1_REG].lower.i); |
795 | 795 | mv_setRegDouble (DEST_REG, (double) DSPregs[SRC1_REG].lower.i); |
796 | 796 | break; |
797 | - | |
797 | + | |
798 | 798 | case 6: /* cfcvt64s */ |
799 | 799 | printfdbg ("cfcvt64s mvf%d = mvdx%d = %f\n", |
800 | 800 | DEST_REG, |
@@ -802,7 +802,7 @@ DSPCDP4 (ARMul_State * state, | ||
802 | 802 | (float) mv_getReg64int (SRC1_REG)); |
803 | 803 | DSPregs[DEST_REG].upper.f = (float) mv_getReg64int (SRC1_REG); |
804 | 804 | break; |
805 | - | |
805 | + | |
806 | 806 | case 7: /* cfcvt64d */ |
807 | 807 | printfdbg ("cfcvt64d mvd%d = mvdx%d = %g\n", |
808 | 808 | DEST_REG, |
@@ -821,11 +821,11 @@ DSPCDP4 (ARMul_State * state, | ||
821 | 821 | DEST_REG, |
822 | 822 | SRC1_REG, |
823 | 823 | DSPregs[SRC1_REG].upper.f * DSPregs[SRC2_REG].upper.f); |
824 | - | |
824 | + | |
825 | 825 | DSPregs[DEST_REG].upper.f = DSPregs[SRC1_REG].upper.f |
826 | 826 | * DSPregs[SRC2_REG].upper.f; |
827 | 827 | break; |
828 | - | |
828 | + | |
829 | 829 | case 1: /* cfmuld */ |
830 | 830 | printfdbg ("cfmuld mvd%d = mvd%d = %g\n", |
831 | 831 | DEST_REG, |
@@ -836,7 +836,7 @@ DSPCDP4 (ARMul_State * state, | ||
836 | 836 | mv_getRegDouble (SRC1_REG) |
837 | 837 | * mv_getRegDouble (SRC2_REG)); |
838 | 838 | break; |
839 | - | |
839 | + | |
840 | 840 | default: |
841 | 841 | fprintf (stderr, "unknown opcode in DSPCDP4 0x%x\n", instr); |
842 | 842 | cirrus_not_implemented ("unknown"); |
@@ -856,7 +856,7 @@ DSPCDP4 (ARMul_State * state, | ||
856 | 856 | SRC1_REG, |
857 | 857 | DSPregs[DEST_REG].upper.f); |
858 | 858 | break; |
859 | - | |
859 | + | |
860 | 860 | case 1: /* cfabsd */ |
861 | 861 | mv_setRegDouble (DEST_REG, |
862 | 862 | (mv_getRegDouble (SRC1_REG) < 0.0 ? |
@@ -867,7 +867,7 @@ DSPCDP4 (ARMul_State * state, | ||
867 | 867 | SRC1_REG, |
868 | 868 | mv_getRegDouble (DEST_REG)); |
869 | 869 | break; |
870 | - | |
870 | + | |
871 | 871 | case 2: /* cfnegs */ |
872 | 872 | DSPregs[DEST_REG].upper.f = -DSPregs[SRC1_REG].upper.f; |
873 | 873 | printfdbg ("cfnegs mvf%d = -mvf%d = %f\n", |
@@ -875,7 +875,7 @@ DSPCDP4 (ARMul_State * state, | ||
875 | 875 | SRC1_REG, |
876 | 876 | DSPregs[DEST_REG].upper.f); |
877 | 877 | break; |
878 | - | |
878 | + | |
879 | 879 | case 3: /* cfnegd */ |
880 | 880 | mv_setRegDouble (DEST_REG, |
881 | 881 | -mv_getRegDouble (SRC1_REG)); |
@@ -883,7 +883,7 @@ DSPCDP4 (ARMul_State * state, | ||
883 | 883 | DEST_REG, |
884 | 884 | mv_getRegDouble (DEST_REG)); |
885 | 885 | break; |
886 | - | |
886 | + | |
887 | 887 | case 4: /* cfadds */ |
888 | 888 | DSPregs[DEST_REG].upper.f = DSPregs[SRC1_REG].upper.f |
889 | 889 | + DSPregs[SRC2_REG].upper.f; |
@@ -893,7 +893,7 @@ DSPCDP4 (ARMul_State * state, | ||
893 | 893 | SRC2_REG, |
894 | 894 | DSPregs[DEST_REG].upper.f); |
895 | 895 | break; |
896 | - | |
896 | + | |
897 | 897 | case 5: /* cfaddd */ |
898 | 898 | mv_setRegDouble (DEST_REG, |
899 | 899 | mv_getRegDouble (SRC1_REG) |
@@ -904,7 +904,7 @@ DSPCDP4 (ARMul_State * state, | ||
904 | 904 | SRC2_REG, |
905 | 905 | mv_getRegDouble (DEST_REG)); |
906 | 906 | break; |
907 | - | |
907 | + | |
908 | 908 | case 6: /* cfsubs */ |
909 | 909 | DSPregs[DEST_REG].upper.f = DSPregs[SRC1_REG].upper.f |
910 | 910 | - DSPregs[SRC2_REG].upper.f; |
@@ -914,7 +914,7 @@ DSPCDP4 (ARMul_State * state, | ||
914 | 914 | SRC2_REG, |
915 | 915 | DSPregs[DEST_REG].upper.f); |
916 | 916 | break; |
917 | - | |
917 | + | |
918 | 918 | case 7: /* cfsubd */ |
919 | 919 | mv_setRegDouble (DEST_REG, |
920 | 920 | mv_getRegDouble (SRC1_REG) |
@@ -978,7 +978,7 @@ DSPCDP5 (ARMul_State * state, | ||
978 | 978 | SRC2_REG, |
979 | 979 | DSPregs[DEST_REG].lower.i); |
980 | 980 | break; |
981 | - | |
981 | + | |
982 | 982 | case 1: /* cfmul64 */ |
983 | 983 | mv_setReg64int (DEST_REG, |
984 | 984 | mv_getReg64int (SRC1_REG) |
@@ -989,7 +989,7 @@ DSPCDP5 (ARMul_State * state, | ||
989 | 989 | SRC2_REG, |
990 | 990 | mv_getReg64int (DEST_REG)); |
991 | 991 | break; |
992 | - | |
992 | + | |
993 | 993 | case 2: /* cfmac32 */ |
994 | 994 | DSPregs[DEST_REG].lower.i |
995 | 995 | += DSPregs[SRC1_REG].lower.i * DSPregs[SRC2_REG].lower.i; |
@@ -999,7 +999,7 @@ DSPCDP5 (ARMul_State * state, | ||
999 | 999 | SRC2_REG, |
1000 | 1000 | DSPregs[DEST_REG].lower.i); |
1001 | 1001 | break; |
1002 | - | |
1002 | + | |
1003 | 1003 | case 3: /* cfmsc32 */ |
1004 | 1004 | DSPregs[DEST_REG].lower.i |
1005 | 1005 | -= DSPregs[SRC1_REG].lower.i * DSPregs[SRC2_REG].lower.i; |
@@ -1009,7 +1009,7 @@ DSPCDP5 (ARMul_State * state, | ||
1009 | 1009 | SRC2_REG, |
1010 | 1010 | DSPregs[DEST_REG].lower.i); |
1011 | 1011 | break; |
1012 | - | |
1012 | + | |
1013 | 1013 | case 4: /* cfcvts32 */ |
1014 | 1014 | /* fixme: this should round */ |
1015 | 1015 | DSPregs[DEST_REG].lower.i = (int) DSPregs[SRC1_REG].upper.f; |
@@ -1018,7 +1018,7 @@ DSPCDP5 (ARMul_State * state, | ||
1018 | 1018 | SRC1_REG, |
1019 | 1019 | DSPregs[DEST_REG].lower.i); |
1020 | 1020 | break; |
1021 | - | |
1021 | + | |
1022 | 1022 | case 5: /* cfcvtd32 */ |
1023 | 1023 | /* fixme: this should round */ |
1024 | 1024 | DSPregs[DEST_REG].lower.i = (int) mv_getRegDouble (SRC1_REG); |
@@ -1027,7 +1027,7 @@ DSPCDP5 (ARMul_State * state, | ||
1027 | 1027 | SRC1_REG, |
1028 | 1028 | DSPregs[DEST_REG].lower.i); |
1029 | 1029 | break; |
1030 | - | |
1030 | + | |
1031 | 1031 | case 6: /* cftruncs32 */ |
1032 | 1032 | DSPregs[DEST_REG].lower.i = (int) DSPregs[SRC1_REG].upper.f; |
1033 | 1033 | printfdbg ("cftruncs32 mvfx%d = mvf%d = %d\n", |
@@ -1035,7 +1035,7 @@ DSPCDP5 (ARMul_State * state, | ||
1035 | 1035 | SRC1_REG, |
1036 | 1036 | DSPregs[DEST_REG].lower.i); |
1037 | 1037 | break; |
1038 | - | |
1038 | + | |
1039 | 1039 | case 7: /* cftruncd32 */ |
1040 | 1040 | DSPregs[DEST_REG].lower.i = (int) mv_getRegDouble (SRC1_REG); |
1041 | 1041 | printfdbg ("cftruncd32 mvfx%d = mvd%d = %d\n", |
@@ -1049,7 +1049,7 @@ DSPCDP5 (ARMul_State * state, | ||
1049 | 1049 | case 2: |
1050 | 1050 | /* cfsh64 */ |
1051 | 1051 | printfdbg ("cfsh64\n"); |
1052 | - | |
1052 | + | |
1053 | 1053 | if (shift < 0) |
1054 | 1054 | /* Negative shift is a right shift. */ |
1055 | 1055 | mv_setReg64int (DEST_REG, |
@@ -1073,7 +1073,7 @@ DSPCDP5 (ARMul_State * state, | ||
1073 | 1073 | SRC2_REG, |
1074 | 1074 | DSPregs[DEST_REG].lower.i); |
1075 | 1075 | break; |
1076 | - | |
1076 | + | |
1077 | 1077 | case 1: /* cfabs64 */ |
1078 | 1078 | mv_setReg64int (DEST_REG, |
1079 | 1079 | (mv_getReg64int (SRC1_REG) < 0 |
@@ -1085,7 +1085,7 @@ DSPCDP5 (ARMul_State * state, | ||
1085 | 1085 | SRC2_REG, |
1086 | 1086 | mv_getReg64int (DEST_REG)); |
1087 | 1087 | break; |
1088 | - | |
1088 | + | |
1089 | 1089 | case 2: /* cfneg32 */ |
1090 | 1090 | DSPregs[DEST_REG].lower.i = -DSPregs[SRC1_REG].lower.i; |
1091 | 1091 | printfdbg ("cfneg32 mvfx%d = -mvfx%d = %d\n", |
@@ -1094,7 +1094,7 @@ DSPCDP5 (ARMul_State * state, | ||
1094 | 1094 | SRC2_REG, |
1095 | 1095 | DSPregs[DEST_REG].lower.i); |
1096 | 1096 | break; |
1097 | - | |
1097 | + | |
1098 | 1098 | case 3: /* cfneg64 */ |
1099 | 1099 | mv_setReg64int (DEST_REG, -mv_getReg64int (SRC1_REG)); |
1100 | 1100 | printfdbg ("cfneg64 mvdx%d = -mvdx%d = %lld\n", |
@@ -1103,7 +1103,7 @@ DSPCDP5 (ARMul_State * state, | ||
1103 | 1103 | SRC2_REG, |
1104 | 1104 | mv_getReg64int (DEST_REG)); |
1105 | 1105 | break; |
1106 | - | |
1106 | + | |
1107 | 1107 | case 4: /* cfadd32 */ |
1108 | 1108 | DSPregs[DEST_REG].lower.i = DSPregs[SRC1_REG].lower.i |
1109 | 1109 | + DSPregs[SRC2_REG].lower.i; |
@@ -1113,7 +1113,7 @@ DSPCDP5 (ARMul_State * state, | ||
1113 | 1113 | SRC2_REG, |
1114 | 1114 | DSPregs[DEST_REG].lower.i); |
1115 | 1115 | break; |
1116 | - | |
1116 | + | |
1117 | 1117 | case 5: /* cfadd64 */ |
1118 | 1118 | mv_setReg64int (DEST_REG, |
1119 | 1119 | mv_getReg64int (SRC1_REG) |
@@ -1124,7 +1124,7 @@ DSPCDP5 (ARMul_State * state, | ||
1124 | 1124 | SRC2_REG, |
1125 | 1125 | mv_getReg64int (DEST_REG)); |
1126 | 1126 | break; |
1127 | - | |
1127 | + | |
1128 | 1128 | case 6: /* cfsub32 */ |
1129 | 1129 | DSPregs[DEST_REG].lower.i = DSPregs[SRC1_REG].lower.i |
1130 | 1130 | - DSPregs[SRC2_REG].lower.i; |
@@ -1134,7 +1134,7 @@ DSPCDP5 (ARMul_State * state, | ||
1134 | 1134 | SRC2_REG, |
1135 | 1135 | DSPregs[DEST_REG].lower.i); |
1136 | 1136 | break; |
1137 | - | |
1137 | + | |
1138 | 1138 | case 7: /* cfsub64 */ |
1139 | 1139 | mv_setReg64int (DEST_REG, |
1140 | 1140 | mv_getReg64int (SRC1_REG) |
@@ -1168,17 +1168,17 @@ DSPCDP6 (ARMul_State * state, | ||
1168 | 1168 | /* cfmadd32 */ |
1169 | 1169 | cirrus_not_implemented ("cfmadd32"); |
1170 | 1170 | break; |
1171 | - | |
1171 | + | |
1172 | 1172 | case 1: |
1173 | 1173 | /* cfmsub32 */ |
1174 | 1174 | cirrus_not_implemented ("cfmsub32"); |
1175 | 1175 | break; |
1176 | - | |
1176 | + | |
1177 | 1177 | case 2: |
1178 | 1178 | /* cfmadda32 */ |
1179 | 1179 | cirrus_not_implemented ("cfmadda32"); |
1180 | 1180 | break; |
1181 | - | |
1181 | + | |
1182 | 1182 | case 3: |
1183 | 1183 | /* cfmsuba32 */ |
1184 | 1184 | cirrus_not_implemented ("cfmsuba32"); |
@@ -1,16 +1,16 @@ | ||
1 | 1 | /* parent.c -- ARMulator RDP comms code: ARM6 Instruction Emulator. |
2 | 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. |
3 | - | |
3 | + | |
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
6 | 6 | the Free Software Foundation; either version 3 of the License, or |
7 | 7 | (at your option) any later version. |
8 | - | |
8 | + | |
9 | 9 | This program is distributed in the hope that it will be useful, |
10 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | 12 | GNU General Public License for more details. |
13 | - | |
13 | + | |
14 | 14 | You should have received a copy of the GNU General Public License |
15 | 15 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 |
@@ -102,7 +102,7 @@ panic_error: | ||
102 | 102 | fprintf (stderr, "->debugger\n"); |
103 | 103 | #endif |
104 | 104 | |
105 | - /* Inside this rather large if statement with simply pass on a complete | |
105 | + /* Inside this rather large if statement with simply pass on a complete | |
106 | 106 | message to the ARMulator. The reason we need to pass messages on one |
107 | 107 | at a time is that we have to know whether the message is an OSOpReply |
108 | 108 | or an info(stop), so that we can take different action in those |
@@ -137,7 +137,7 @@ ThumbExpandImm (ARMword tinstr) | ||
137 | 137 | else |
138 | 138 | { |
139 | 139 | int ror = tBITS (7, 11); |
140 | - | |
140 | + | |
141 | 141 | val = (1 << 7) | tBITS (0, 6); |
142 | 142 | val = (val >> ror) | (val << (32 - ror)); |
143 | 143 | } |
@@ -207,7 +207,7 @@ handle_T2_insn (ARMul_State * state, | ||
207 | 207 | simm32 |= (-1 << 20); |
208 | 208 | break; |
209 | 209 | } |
210 | - | |
210 | + | |
211 | 211 | case 1: /* B.W */ |
212 | 212 | { |
213 | 213 | ARMword imm10 = tBITS (0, 9); |
@@ -220,7 +220,7 @@ handle_T2_insn (ARMul_State * state, | ||
220 | 220 | simm32 |= (-1 << 24); |
221 | 221 | break; |
222 | 222 | } |
223 | - | |
223 | + | |
224 | 224 | case 2: /* BLX <label> */ |
225 | 225 | { |
226 | 226 | ARMword imm10h = tBITS (0, 9); |
@@ -258,7 +258,7 @@ handle_T2_insn (ARMul_State * state, | ||
258 | 258 | fprintf (stderr, " pc changed to %x\n", state->Reg[15]); |
259 | 259 | return; |
260 | 260 | } |
261 | - | |
261 | + | |
262 | 262 | switch (tBITS (5,12)) |
263 | 263 | { |
264 | 264 | case 0x29: // TST<c>.W <Rn>,<Rm>{,<shift>} |
@@ -400,7 +400,7 @@ handle_T2_insn (ARMul_State * state, | ||
400 | 400 | break; |
401 | 401 | } |
402 | 402 | |
403 | - case 0x50: | |
403 | + case 0x50: | |
404 | 404 | { |
405 | 405 | ARMword Rd = ntBITS (8, 11); |
406 | 406 | ARMword Rn = tBITS (0, 3); |
@@ -436,7 +436,7 @@ handle_T2_insn (ARMul_State * state, | ||
436 | 436 | * pvalid = t_decoded; |
437 | 437 | break; |
438 | 438 | } |
439 | - | |
439 | + | |
440 | 440 | case 0x51: // BIC{S}<c>.W <Rd>,<Rn>,<Rm>{,<shift>} |
441 | 441 | { |
442 | 442 | ARMword Rn = tBITS (0, 3); |
@@ -458,8 +458,8 @@ handle_T2_insn (ARMul_State * state, | ||
458 | 458 | * pvalid = t_decoded; |
459 | 459 | break; |
460 | 460 | } |
461 | - | |
462 | - case 0x52: | |
461 | + | |
462 | + case 0x52: | |
463 | 463 | { |
464 | 464 | ARMword Rn = tBITS (0, 3); |
465 | 465 | ARMword Rd = ntBITS (8, 11); |
@@ -539,7 +539,7 @@ handle_T2_insn (ARMul_State * state, | ||
539 | 539 | break; |
540 | 540 | } |
541 | 541 | |
542 | - case 0x54: | |
542 | + case 0x54: | |
543 | 543 | { |
544 | 544 | ARMword Rn = tBITS (0, 3); |
545 | 545 | ARMword Rd = ntBITS (8, 11); |
@@ -611,7 +611,7 @@ handle_T2_insn (ARMul_State * state, | ||
611 | 611 | * ainstr |= ntBITS (0, 3); // Rm |
612 | 612 | * pvalid = t_decoded; |
613 | 613 | break; |
614 | - | |
614 | + | |
615 | 615 | case 0x5B: // SBC{S}<c>.W <Rd>,<Rn>,<Rm>{,<shift>} |
616 | 616 | { |
617 | 617 | ARMword Rn = tBITS (0, 3); |
@@ -636,7 +636,7 @@ handle_T2_insn (ARMul_State * state, | ||
636 | 636 | * pvalid = t_decoded; |
637 | 637 | break; |
638 | 638 | } |
639 | - | |
639 | + | |
640 | 640 | case 0x5E: // RSB{S}<c> <Rd>,<Rn>,<Rm>{,<shift>} |
641 | 641 | case 0x5D: // SUB{S}<c>.W <Rd>,<Rn>,<Rm>{,<shift>} |
642 | 642 | { |
@@ -669,13 +669,13 @@ handle_T2_insn (ARMul_State * state, | ||
669 | 669 | * pvalid = t_decoded; |
670 | 670 | break; |
671 | 671 | } |
672 | - | |
672 | + | |
673 | 673 | case 0x9D: // NOP.W |
674 | 674 | tASSERT (tBITS (0, 15) == 0xF3AF); |
675 | 675 | tASSERT (ntBITS (0, 15) == 0x8000); |
676 | 676 | * pvalid = t_branch; |
677 | 677 | break; |
678 | - | |
678 | + | |
679 | 679 | case 0x80: // AND |
680 | 680 | case 0xA0: // TST |
681 | 681 | { |
@@ -697,7 +697,7 @@ handle_T2_insn (ARMul_State * state, | ||
697 | 697 | { |
698 | 698 | // AND{S}<c> <Rd>,<Rn>,#<const> |
699 | 699 | if (in_IT_block ()) |
700 | - S = 0; | |
700 | + S = 0; | |
701 | 701 | |
702 | 702 | state->Reg[Rd] = val; |
703 | 703 | } |
@@ -726,7 +726,7 @@ handle_T2_insn (ARMul_State * state, | ||
726 | 726 | * pvalid = t_resolved; |
727 | 727 | break; |
728 | 728 | } |
729 | - | |
729 | + | |
730 | 730 | case 0xA2: |
731 | 731 | case 0x82: // MOV{S}<c>.W <Rd>,#<const> |
732 | 732 | { |
@@ -783,13 +783,13 @@ handle_T2_insn (ARMul_State * state, | ||
783 | 783 | if (in_IT_block ()) |
784 | 784 | S = 0; |
785 | 785 | } |
786 | - | |
786 | + | |
787 | 787 | if (S) |
788 | 788 | ARMul_NegZero (state, result); |
789 | 789 | * pvalid = t_resolved; |
790 | 790 | break; |
791 | 791 | } |
792 | - | |
792 | + | |
793 | 793 | case 0xA8: // CMN |
794 | 794 | case 0x88: // ADD |
795 | 795 | { |
@@ -838,7 +838,7 @@ handle_T2_insn (ARMul_State * state, | ||
838 | 838 | break; |
839 | 839 | } |
840 | 840 | |
841 | - case 0xAA: | |
841 | + case 0xAA: | |
842 | 842 | case 0x8A: // ADC{S}<c> <Rd>,<Rn>,#<const> |
843 | 843 | { |
844 | 844 | ARMword Rn = tBITS (0, 3); |
@@ -879,7 +879,7 @@ handle_T2_insn (ARMul_State * state, | ||
879 | 879 | * pvalid = t_branch; |
880 | 880 | break; |
881 | 881 | } |
882 | - | |
882 | + | |
883 | 883 | case 0xAB: |
884 | 884 | case 0x8B: // SBC{S}<c> <Rd>,<Rn>,#<const> |
885 | 885 | { |
@@ -940,7 +940,7 @@ handle_T2_insn (ARMul_State * state, | ||
940 | 940 | } |
941 | 941 | else |
942 | 942 | { |
943 | - // SUB{S}<c>.W <Rd>,<Rn>,#<const> | |
943 | + // SUB{S}<c>.W <Rd>,<Rn>,#<const> | |
944 | 944 | if (in_IT_block ()) |
945 | 945 | S = 0; |
946 | 946 |
@@ -997,7 +997,7 @@ handle_T2_insn (ARMul_State * state, | ||
997 | 997 | CLEARV; |
998 | 998 | } |
999 | 999 | } |
1000 | - | |
1000 | + | |
1001 | 1001 | * pvalid = t_branch; |
1002 | 1002 | break; |
1003 | 1003 | } |
@@ -1038,7 +1038,7 @@ handle_T2_insn (ARMul_State * state, | ||
1038 | 1038 | |
1039 | 1039 | tASSERT (tBIT (4) == 0); |
1040 | 1040 | tASSERT (ntBIT (15) == 0); |
1041 | - | |
1041 | + | |
1042 | 1042 | /* Note the ARM ARM indicates special cases for Rn == 15 (ADR) |
1043 | 1043 | and Rn == 13 (SUB SP minus immediate), but these are implemented |
1044 | 1044 | in exactly the same way as the normal SUBW insn. */ |
@@ -1047,7 +1047,7 @@ handle_T2_insn (ARMul_State * state, | ||
1047 | 1047 | * pvalid = t_resolved; |
1048 | 1048 | break; |
1049 | 1049 | } |
1050 | - | |
1050 | + | |
1051 | 1051 | case 0xB6: |
1052 | 1052 | case 0x96: // MOVT<c> <Rd>,#<imm16> |
1053 | 1053 | { |
@@ -1098,7 +1098,7 @@ handle_T2_insn (ARMul_State * state, | ||
1098 | 1098 | // BFI<c> <Rd>,<Rn>,#<lsb>,#<width> |
1099 | 1099 | ARMword val = state->Reg[Rn] & (mask >> lsbit); |
1100 | 1100 | |
1101 | - val <<= lsbit; | |
1101 | + val <<= lsbit; | |
1102 | 1102 | state->Reg[Rd] &= ~ mask; |
1103 | 1103 | state->Reg[Rd] |= val; |
1104 | 1104 | } |
@@ -1118,7 +1118,7 @@ handle_T2_insn (ARMul_State * state, | ||
1118 | 1118 | * ainstr |= tBITS (0, 3); // Rn |
1119 | 1119 | * pvalid = t_decoded; |
1120 | 1120 | break; |
1121 | - | |
1121 | + | |
1122 | 1122 | case 0xC0: // STRB |
1123 | 1123 | case 0xC4: // LDRB |
1124 | 1124 | { |
@@ -1157,7 +1157,7 @@ handle_T2_insn (ARMul_State * state, | ||
1157 | 1157 | |
1158 | 1158 | tASSERT (! (Rt == 15 && P && !U && !W)); |
1159 | 1159 | tASSERT (! (P && U && !W)); |
1160 | - | |
1160 | + | |
1161 | 1161 | /* LDRB<c> <Rt>,[<Rn>,#-<imm8>] => 1111 1000 0001 rrrr |
1162 | 1162 | LDRB<c> <Rt>,[<Rn>],#+/-<imm8> => 1111 1000 0001 rrrr |
1163 | 1163 | LDRB<c> <Rt>,[<Rn>,#+/-<imm8>]! => 1111 1000 0001 rrrr */ |
@@ -1239,7 +1239,7 @@ handle_T2_insn (ARMul_State * state, | ||
1239 | 1239 | tASSERT (! (P && U && ! W)); |
1240 | 1240 | tASSERT (! (!P && U && W && Rn == 13 && imm8 == 4 && ntBIT (11) == 0)); |
1241 | 1241 | tASSERT (! (P && !U && W && Rn == 13 && imm8 == 4 && ntBIT (11))); |
1242 | - | |
1242 | + | |
1243 | 1243 | // LDR<c> <Rt>,[<Rn>,#-<imm8>] |
1244 | 1244 | // LDR<c> <Rt>,[<Rn>],#+/-<imm8> |
1245 | 1245 | // LDR<c> <Rt>,[<Rn>,#+/-<imm8>]! |
@@ -1275,7 +1275,7 @@ handle_T2_insn (ARMul_State * state, | ||
1275 | 1275 | |
1276 | 1276 | * ainstr = 0xE92D0000; |
1277 | 1277 | * ainstr |= (1 << Rt); |
1278 | - | |
1278 | + | |
1279 | 1279 | Rt = Rn = 0; |
1280 | 1280 | } |
1281 | 1281 | else |
@@ -1412,7 +1412,7 @@ handle_T2_insn (ARMul_State * state, | ||
1412 | 1412 | * pvalid = t_branch; |
1413 | 1413 | break; |
1414 | 1414 | } |
1415 | - | |
1415 | + | |
1416 | 1416 | case 0xC6: // LDR.W/STR.W |
1417 | 1417 | { |
1418 | 1418 | ARMword Rn = tBITS (0, 3); |
@@ -1453,7 +1453,7 @@ handle_T2_insn (ARMul_State * state, | ||
1453 | 1453 | // LDRSB<c> <Rt>,<label> |
1454 | 1454 | ARMword imm12 = ntBITS (0, 11); |
1455 | 1455 | address += (U ? imm12 : - imm12); |
1456 | - } | |
1456 | + } | |
1457 | 1457 | else if (U) |
1458 | 1458 | { |
1459 | 1459 | // LDRSB<c> <Rt>,[<Rn>,#<imm12>] |
@@ -1494,7 +1494,7 @@ handle_T2_insn (ARMul_State * state, | ||
1494 | 1494 | * pvalid = t_resolved; |
1495 | 1495 | break; |
1496 | 1496 | } |
1497 | - | |
1497 | + | |
1498 | 1498 | case 0xC9: |
1499 | 1499 | case 0xCD:// LDRSH |
1500 | 1500 | { |
@@ -1548,7 +1548,7 @@ handle_T2_insn (ARMul_State * state, | ||
1548 | 1548 | break; |
1549 | 1549 | } |
1550 | 1550 | |
1551 | - case 0x0D0: | |
1551 | + case 0x0D0: | |
1552 | 1552 | { |
1553 | 1553 | ARMword Rm = ntBITS (0, 3); |
1554 | 1554 | ARMword Rd = ntBITS (8, 11); |
@@ -1598,7 +1598,7 @@ handle_T2_insn (ARMul_State * state, | ||
1598 | 1598 | break; |
1599 | 1599 | } |
1600 | 1600 | |
1601 | - case 0xD2: | |
1601 | + case 0xD2: | |
1602 | 1602 | tASSERT (ntBITS (12, 15) == 15); |
1603 | 1603 | if (ntBIT (7)) |
1604 | 1604 | { |
@@ -1622,7 +1622,7 @@ handle_T2_insn (ARMul_State * state, | ||
1622 | 1622 | * ainstr |= (ntBITS (8, 11) << 12); // Rd |
1623 | 1623 | * pvalid = t_decoded; |
1624 | 1624 | break; |
1625 | - | |
1625 | + | |
1626 | 1626 | case 0xD3: // ROR{S}<c>.W <Rd>,<Rn>,<Rm> |
1627 | 1627 | tASSERT (ntBITS (12, 15) == 15); |
1628 | 1628 | tASSERT (ntBITS (4, 7) == 0); |
@@ -1634,7 +1634,7 @@ handle_T2_insn (ARMul_State * state, | ||
1634 | 1634 | * ainstr |= (tBITS (0, 3) << 0); // Rn |
1635 | 1635 | * pvalid = t_decoded; |
1636 | 1636 | break; |
1637 | - | |
1637 | + | |
1638 | 1638 | case 0xD4: |
1639 | 1639 | { |
1640 | 1640 | ARMword Rn = tBITS (0, 3); |
@@ -1647,9 +1647,9 @@ handle_T2_insn (ARMul_State * state, | ||
1647 | 1647 | { |
1648 | 1648 | // REV<c>.W <Rd>,<Rm> |
1649 | 1649 | ARMword val = state->Reg[Rm]; |
1650 | - | |
1650 | + | |
1651 | 1651 | tASSERT (Rm == Rn); |
1652 | - | |
1652 | + | |
1653 | 1653 | state->Reg [Rd] = |
1654 | 1654 | (val >> 24) |
1655 | 1655 | | ((val >> 8) & 0xFF00) |
@@ -1741,7 +1741,7 @@ handle_T2_insn (ARMul_State * state, | ||
1741 | 1741 | if (ntBITS (4, 7) == 1) |
1742 | 1742 | { |
1743 | 1743 | // MLS<c> <Rd>,<Rn>,<Rm>,<Ra> |
1744 | - state->Reg[Rd] = state->Reg[Ra] - (state->Reg[Rn] * state->Reg[Rm]); | |
1744 | + state->Reg[Rd] = state->Reg[Ra] - (state->Reg[Rn] * state->Reg[Rm]); | |
1745 | 1745 | } |
1746 | 1746 | else |
1747 | 1747 | { |
@@ -1769,7 +1769,7 @@ handle_T2_insn (ARMul_State * state, | ||
1769 | 1769 | * ainstr |= tBITS (0, 3); // Rn |
1770 | 1770 | * pvalid = t_decoded; |
1771 | 1771 | break; |
1772 | - | |
1772 | + | |
1773 | 1773 | case 0xDD: // UMULL |
1774 | 1774 | tASSERT (tBIT (4) == 0); |
1775 | 1775 | tASSERT (ntBITS (4, 7) == 0); |
@@ -1780,7 +1780,7 @@ handle_T2_insn (ARMul_State * state, | ||
1780 | 1780 | * ainstr |= tBITS (0, 3); // Rn |
1781 | 1781 | * pvalid = t_decoded; |
1782 | 1782 | break; |
1783 | - | |
1783 | + | |
1784 | 1784 | case 0xDF: // UMLAL |
1785 | 1785 | tASSERT (tBIT (4) == 0); |
1786 | 1786 | tASSERT (ntBITS (4, 7) == 0); |
@@ -1792,7 +1792,7 @@ handle_T2_insn (ARMul_State * state, | ||
1792 | 1792 | * pvalid = t_decoded; |
1793 | 1793 | break; |
1794 | 1794 | |
1795 | - default: | |
1795 | + default: | |
1796 | 1796 | fprintf (stderr, "(op = %x) ", tBITS (5,12)); |
1797 | 1797 | tASSERT (0); |
1798 | 1798 | return; |
@@ -1860,7 +1860,7 @@ handle_v6_thumb_insn (ARMul_State * state, | ||
1860 | 1860 | state->Reg[Rd] += state->Reg[Rm]; |
1861 | 1861 | break; |
1862 | 1862 | } |
1863 | - | |
1863 | + | |
1864 | 1864 | case 0x4600: // MOV<c> <Rd>,<Rm> |
1865 | 1865 | { |
1866 | 1866 | // instr [15, 8] = 0100 0110 |
@@ -1916,7 +1916,7 @@ handle_v6_thumb_insn (ARMul_State * state, | ||
1916 | 1916 | state->Reg [tBITS (0, 2)] = (val >> 16) | (val << 16); |
1917 | 1917 | break; |
1918 | 1918 | } |
1919 | - | |
1919 | + | |
1920 | 1920 | case 0xb660: /* cpsie */ |
1921 | 1921 | case 0xb670: /* cpsid */ |
1922 | 1922 | case 0xbac0: /* revsh */ |
@@ -2017,7 +2017,7 @@ ARMul_ThumbDecode (ARMul_State * state, | ||
2017 | 2017 | |
2018 | 2018 | return t_branch; |
2019 | 2019 | } |
2020 | - | |
2020 | + | |
2021 | 2021 | old_tinstr = tinstr; |
2022 | 2022 | if (trace) |
2023 | 2023 | fprintf (stderr, "pc: %x, Thumb instr: %x", pc & ~1, tinstr); |
@@ -2072,7 +2072,7 @@ ARMul_ThumbDecode (ARMul_State * state, | ||
2072 | 2072 | * ainstr |= tBITS (8, 10) << 16; |
2073 | 2073 | * ainstr |= tBITS (0, 7); |
2074 | 2074 | break; |
2075 | - | |
2075 | + | |
2076 | 2076 | case 6: |
2077 | 2077 | case 7: |
2078 | 2078 | * ainstr = tBIT (11) |
@@ -114,7 +114,7 @@ struct maverick_regs | ||
114 | 114 | int i; |
115 | 115 | float f; |
116 | 116 | } upper; |
117 | - | |
117 | + | |
118 | 118 | union |
119 | 119 | { |
120 | 120 | int i; |
@@ -664,7 +664,7 @@ sim_fetch_register (SIM_DESC sd ATTRIBUTE_UNUSED, | ||
664 | 664 | len -= 4; |
665 | 665 | memory += 4; |
666 | 666 | regval = 0; |
667 | - } | |
667 | + } | |
668 | 668 | |
669 | 669 | return length; |
670 | 670 | } |
@@ -710,7 +710,7 @@ sim_target_parse_command_line (int argc, char ** argv) | ||
710 | 710 | trace = 1; |
711 | 711 | continue; |
712 | 712 | } |
713 | - | |
713 | + | |
714 | 714 | if (strcmp (ptr, "-z") == 0) |
715 | 715 | { |
716 | 716 | /* Remove this option from the argv array. */ |
@@ -721,7 +721,7 @@ sim_target_parse_command_line (int argc, char ** argv) | ||
721 | 721 | trace_funcs = 1; |
722 | 722 | continue; |
723 | 723 | } |
724 | - | |
724 | + | |
725 | 725 | if (strcmp (ptr, "-d") == 0) |
726 | 726 | { |
727 | 727 | /* Remove this option from the argv array. */ |
@@ -742,14 +742,14 @@ sim_target_parse_command_line (int argc, char ** argv) | ||
742 | 742 | for (arg = i; arg < argc; arg ++) |
743 | 743 | argv[arg] = argv[arg + 1]; |
744 | 744 | argc --; |
745 | - | |
745 | + | |
746 | 746 | ptr = argv[i]; |
747 | 747 | } |
748 | 748 | else |
749 | 749 | ptr += sizeof SWI_SWITCH; |
750 | 750 | |
751 | 751 | swi_mask = 0; |
752 | - | |
752 | + | |
753 | 753 | while (* ptr) |
754 | 754 | { |
755 | 755 | int i; |
@@ -773,7 +773,7 @@ sim_target_parse_command_line (int argc, char ** argv) | ||
773 | 773 | |
774 | 774 | if (* ptr != 0) |
775 | 775 | fprintf (stderr, "Ignoring swi options: %s\n", ptr); |
776 | - | |
776 | + | |
777 | 777 | /* Remove this option from the argv array. */ |
778 | 778 | for (arg = i; arg < argc; arg ++) |
779 | 779 | argv[arg] = argv[arg + 1]; |
@@ -907,7 +907,6 @@ sim_open (SIM_OPEN_KIND kind, | ||
907 | 907 | "Missing argument to -m option\n"); |
908 | 908 | return NULL; |
909 | 909 | } |
910 | - | |
911 | 910 | } |
912 | 911 | } |
913 | 912 |