diff options
Diffstat (limited to 'src/core/arm/interpreter/armvirt.cpp')
| -rw-r--r-- | src/core/arm/interpreter/armvirt.cpp | 165 |
1 files changed, 0 insertions, 165 deletions
diff --git a/src/core/arm/interpreter/armvirt.cpp b/src/core/arm/interpreter/armvirt.cpp deleted file mode 100644 index 7845d1042..000000000 --- a/src/core/arm/interpreter/armvirt.cpp +++ /dev/null | |||
| @@ -1,165 +0,0 @@ | |||
| 1 | /* armvirt.c -- ARMulator virtual memory interace: ARM6 Instruction Emulator. | ||
| 2 | Copyright (C) 1994 Advanced RISC Machines Ltd. | ||
| 3 | |||
| 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 | ||
| 6 | the Free Software Foundation; either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 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 | ||
| 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | ||
| 17 | |||
| 18 | /* This file contains a complete ARMulator memory model, modelling a | ||
| 19 | "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 | ||
| 21 | 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 | ||
| 23 | freed as they might be needed again. A single area of memory may be | ||
| 24 | defined to generate aborts. */ | ||
| 25 | |||
| 26 | #include "core/arm/skyeye_common/armdefs.h" | ||
| 27 | #include "core/arm/skyeye_common/armemu.h" | ||
| 28 | |||
| 29 | #include "core/mem_map.h" | ||
| 30 | |||
| 31 | #define dumpstack 1 | ||
| 32 | #define dumpstacksize 0x10 | ||
| 33 | #define maxdmupaddr 0x0033a850 | ||
| 34 | |||
| 35 | /*ARMword ARMul_GetCPSR (ARMul_State * state) { | ||
| 36 | return 0; | ||
| 37 | } | ||
| 38 | ARMword ARMul_GetSPSR (ARMul_State * state, ARMword mode) { | ||
| 39 | return 0; | ||
| 40 | } | ||
| 41 | void ARMul_SetCPSR (ARMul_State * state, ARMword value) { | ||
| 42 | |||
| 43 | } | ||
| 44 | void ARMul_SetSPSR (ARMul_State * state, ARMword mode, ARMword value) { | ||
| 45 | |||
| 46 | }*/ | ||
| 47 | |||
| 48 | void ARMul_Icycles(ARMul_State * state, unsigned number, ARMword address) { | ||
| 49 | } | ||
| 50 | |||
| 51 | void ARMul_Ccycles(ARMul_State * state, unsigned number, ARMword address) { | ||
| 52 | } | ||
| 53 | |||
| 54 | ARMword ARMul_LoadInstrS(ARMul_State * state, ARMword address, ARMword isize) { | ||
| 55 | state->NumScycles++; | ||
| 56 | |||
| 57 | #ifdef HOURGLASS | ||
| 58 | if ((state->NumScycles & HOURGLASS_RATE) == 0) { | ||
| 59 | HOURGLASS; | ||
| 60 | } | ||
| 61 | #endif | ||
| 62 | if (isize == 2) | ||
| 63 | return (u16)Memory::Read16(address); | ||
| 64 | else | ||
| 65 | return (u32)Memory::Read32(address); | ||
| 66 | } | ||
| 67 | |||
| 68 | ARMword ARMul_LoadInstrN(ARMul_State * state, ARMword address, ARMword isize) { | ||
| 69 | state->NumNcycles++; | ||
| 70 | |||
| 71 | if (isize == 2) | ||
| 72 | return (u16)Memory::Read16(address); | ||
| 73 | else | ||
| 74 | return (u32)Memory::Read32(address); | ||
| 75 | } | ||
| 76 | |||
| 77 | ARMword ARMul_ReLoadInstr(ARMul_State * state, ARMword address, ARMword isize) { | ||
| 78 | ARMword data; | ||
| 79 | |||
| 80 | if ((isize == 2) && (address & 0x2)) { | ||
| 81 | ARMword lo; | ||
| 82 | lo = (u16)Memory::Read16(address); | ||
| 83 | return lo; | ||
| 84 | } | ||
| 85 | |||
| 86 | data = (u32)Memory::Read32(address); | ||
| 87 | return data; | ||
| 88 | } | ||
| 89 | |||
| 90 | ARMword ARMul_ReadWord(ARMul_State * state, ARMword address) { | ||
| 91 | ARMword data; | ||
| 92 | data = Memory::Read32(address); | ||
| 93 | return data; | ||
| 94 | } | ||
| 95 | |||
| 96 | ARMword ARMul_LoadWordS(ARMul_State * state, ARMword address) { | ||
| 97 | state->NumScycles++; | ||
| 98 | return ARMul_ReadWord(state, address); | ||
| 99 | } | ||
| 100 | |||
| 101 | ARMword ARMul_LoadWordN(ARMul_State * state, ARMword address) { | ||
| 102 | state->NumNcycles++; | ||
| 103 | return ARMul_ReadWord(state, address); | ||
| 104 | } | ||
| 105 | |||
| 106 | ARMword ARMul_LoadHalfWord(ARMul_State * state, ARMword address) { | ||
| 107 | state->NumNcycles++; | ||
| 108 | return (u16)Memory::Read16(address);; | ||
| 109 | } | ||
| 110 | |||
| 111 | ARMword ARMul_ReadByte(ARMul_State * state, ARMword address) { | ||
| 112 | return (u8)Memory::Read8(address); | ||
| 113 | } | ||
| 114 | |||
| 115 | ARMword ARMul_LoadByte(ARMul_State * state, ARMword address) { | ||
| 116 | state->NumNcycles++; | ||
| 117 | return ARMul_ReadByte(state, address); | ||
| 118 | } | ||
| 119 | |||
| 120 | void ARMul_StoreHalfWord(ARMul_State * state, ARMword address, ARMword data) { | ||
| 121 | state->NumNcycles++; | ||
| 122 | Memory::Write16(address, data); | ||
| 123 | } | ||
| 124 | |||
| 125 | void ARMul_StoreByte(ARMul_State * state, ARMword address, ARMword data) { | ||
| 126 | state->NumNcycles++; | ||
| 127 | ARMul_WriteByte(state, address, data); | ||
| 128 | } | ||
| 129 | |||
| 130 | ARMword ARMul_SwapWord(ARMul_State * state, ARMword address, ARMword data) { | ||
| 131 | ARMword temp; | ||
| 132 | state->NumNcycles++; | ||
| 133 | temp = ARMul_ReadWord(state, address); | ||
| 134 | state->NumNcycles++; | ||
| 135 | Memory::Write32(address, data); | ||
| 136 | return temp; | ||
| 137 | } | ||
| 138 | |||
| 139 | ARMword ARMul_SwapByte(ARMul_State * state, ARMword address, ARMword data) { | ||
| 140 | ARMword temp; | ||
| 141 | temp = ARMul_LoadByte(state, address); | ||
| 142 | Memory::Write8(address, data); | ||
| 143 | return temp; | ||
| 144 | } | ||
| 145 | |||
| 146 | void ARMul_WriteWord(ARMul_State * state, ARMword address, ARMword data) { | ||
| 147 | Memory::Write32(address, data); | ||
| 148 | } | ||
| 149 | |||
| 150 | void ARMul_WriteByte(ARMul_State * state, ARMword address, ARMword data) | ||
| 151 | { | ||
| 152 | Memory::Write8(address, data); | ||
| 153 | } | ||
| 154 | |||
| 155 | void ARMul_StoreWordS(ARMul_State * state, ARMword address, ARMword data) | ||
| 156 | { | ||
| 157 | state->NumScycles++; | ||
| 158 | ARMul_WriteWord(state, address, data); | ||
| 159 | } | ||
| 160 | |||
| 161 | void ARMul_StoreWordN(ARMul_State * state, ARMword address, ARMword data) | ||
| 162 | { | ||
| 163 | state->NumNcycles++; | ||
| 164 | ARMul_WriteWord(state, address, data); | ||
| 165 | } | ||