| OLD | NEW |
| 1 /* armvirt.c -- ARMulator virtual memory interace: ARM6 Instruction Emulator. | 1 /* armvirt.c -- ARMulator virtual memory interace: ARM6 Instruction Emulator. |
| 2 Copyright (C) 1994 Advanced RISC Machines Ltd. | 2 Copyright (C) 1994 Advanced RISC Machines Ltd. |
| 3 | 3 |
| 4 This program is free software; you can redistribute it and/or modify | 4 This program is free software; you can redistribute it and/or modify |
| 5 it under the terms of the GNU General Public License as published by | 5 it under the terms of the GNU General Public License as published by |
| 6 the Free Software Foundation; either version 2 of the License, or | 6 the Free Software Foundation; either version 3 of the License, or |
| 7 (at your option) any later version. | 7 (at your option) any later version. |
| 8 | 8 |
| 9 This program is distributed in the hope that it will be useful, | 9 This program is distributed in the hope that it will be useful, |
| 10 but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 GNU General Public License for more details. | 12 GNU General Public License for more details. |
| 13 | 13 |
| 14 You should have received a copy of the GNU General Public License | 14 You should have received a copy of the GNU General Public License |
| 15 along with this program; if not, write to the Free Software | 15 along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
| 16 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, U
SA. */ | |
| 17 | 16 |
| 18 /* This file contains a complete ARMulator memory model, modelling a | 17 /* This file contains a complete ARMulator memory model, modelling a |
| 19 "virtual memory" system. A much simpler model can be found in armfast.c, | 18 "virtual memory" system. A much simpler model can be found in armfast.c, |
| 20 and that model goes faster too, but has a fixed amount of memory. This | 19 and that model goes faster too, but has a fixed amount of memory. This |
| 21 model's memory has 64K pages, allocated on demand from a 64K entry page | 20 model's memory has 64K pages, allocated on demand from a 64K entry page |
| 22 table. The routines PutWord and GetWord implement this. Pages are never | 21 table. The routines PutWord and GetWord implement this. Pages are never |
| 23 freed as they might be needed again. A single area of memory may be | 22 freed as they might be needed again. A single area of memory may be |
| 24 defined to generate aborts. */ | 23 defined to generate aborts. */ |
| 25 | 24 |
| 26 #include "armopts.h" | 25 #include "armopts.h" |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 { | 512 { |
| 514 ARMword temp, offset; | 513 ARMword temp, offset; |
| 515 | 514 |
| 516 temp = GetWord (state, address, FALSE); | 515 temp = GetWord (state, address, FALSE); |
| 517 offset = (((ARMword) state->bigendSig * 3) ^ (address & 3)) << 3; | 516 offset = (((ARMword) state->bigendSig * 3) ^ (address & 3)) << 3; |
| 518 | 517 |
| 519 PutWord (state, address, | 518 PutWord (state, address, |
| 520 (temp & ~(0xffL << offset)) | ((data & 0xffL) << offset), | 519 (temp & ~(0xffL << offset)) | ((data & 0xffL) << offset), |
| 521 FALSE); | 520 FALSE); |
| 522 } | 521 } |
| OLD | NEW |