Changeset 1589 in vbox for trunk/src/recompiler
- Timestamp:
- Mar 20, 2007 11:26:55 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 19698
- Location:
- trunk/src/recompiler/new
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/new/VBoxRecompiler.c
r1588 r1589 3108 3108 * @param cb Number of bytes 3109 3109 */ 3110 void remR3PhysRead (uint8_t *pbSrcPhys, void *pvDst, unsigned cb)3110 void remR3PhysReadHCPtr(uint8_t *pbSrcPhys, void *pvDst, unsigned cb) 3111 3111 { 3112 3112 STAM_PROFILE_ADV_START(&gStatMemRead, a); … … 3139 3139 * @param pbSrcPhys The source address. Relative to guest RAM. 3140 3140 */ 3141 uint8_t remR3PhysRead U8(uint8_t *pbSrcPhys)3141 uint8_t remR3PhysReadHCPtrU8(uint8_t *pbSrcPhys) 3142 3142 { 3143 3143 uint8_t val; … … 3172 3172 * @param pbSrcPhys The source address. Relative to guest RAM. 3173 3173 */ 3174 int8_t remR3PhysRead S8(uint8_t *pbSrcPhys)3174 int8_t remR3PhysReadHCPtrS8(uint8_t *pbSrcPhys) 3175 3175 { 3176 3176 int8_t val; … … 3205 3205 * @param pbSrcPhys The source address. Relative to guest RAM. 3206 3206 */ 3207 uint16_t remR3PhysRead U16(uint8_t *pbSrcPhys)3207 uint16_t remR3PhysReadHCPtrU16(uint8_t *pbSrcPhys) 3208 3208 { 3209 3209 uint16_t val; … … 3238 3238 * @param pbSrcPhys The source address. Relative to guest RAM. 3239 3239 */ 3240 int16_t remR3PhysRead S16(uint8_t *pbSrcPhys)3240 int16_t remR3PhysReadHCPtrS16(uint8_t *pbSrcPhys) 3241 3241 { 3242 3242 int16_t val; … … 3272 3272 * @param pbSrcPhys The source address. Relative to guest RAM. 3273 3273 */ 3274 uint32_t remR3PhysRead U32(uint8_t *pbSrcPhys)3274 uint32_t remR3PhysReadHCPtrU32(uint8_t *pbSrcPhys) 3275 3275 { 3276 3276 uint32_t val; … … 3305 3305 * @param pbSrcPhys The source address. Relative to guest RAM. 3306 3306 */ 3307 int32_t remR3PhysRead S32(uint8_t *pbSrcPhys)3307 int32_t remR3PhysReadHCPtrS32(uint8_t *pbSrcPhys) 3308 3308 { 3309 3309 int32_t val; … … 3338 3338 * @param pbSrcPhys The source address. Relative to guest RAM. 3339 3339 */ 3340 uint64_t remR3PhysRead U64(uint8_t *pbSrcPhys)3340 uint64_t remR3PhysReadHCPtrU64(uint8_t *pbSrcPhys) 3341 3341 { 3342 3342 uint64_t val; … … 3374 3374 * @param cb Number of bytes to write 3375 3375 */ 3376 void remR3PhysWrite (uint8_t *pbDstPhys, const void *pvSrc, unsigned cb)3376 void remR3PhysWriteHCPtr(uint8_t *pbDstPhys, const void *pvSrc, unsigned cb) 3377 3377 { 3378 3378 STAM_PROFILE_ADV_START(&gStatMemWrite, a); … … 3399 3399 * @param val Value 3400 3400 */ 3401 void remR3PhysWrite U8(uint8_t *pbDstPhys, uint8_t val)3401 void remR3PhysWriteHCPtrU8(uint8_t *pbDstPhys, uint8_t val) 3402 3402 { 3403 3403 STAM_PROFILE_ADV_START(&gStatMemWrite, a); … … 3424 3424 * @param val Value 3425 3425 */ 3426 void remR3PhysWrite U16(uint8_t *pbDstPhys, uint16_t val)3426 void remR3PhysWriteHCPtrU16(uint8_t *pbDstPhys, uint16_t val) 3427 3427 { 3428 3428 STAM_PROFILE_ADV_START(&gStatMemWrite, a); … … 3449 3449 * @param val Value 3450 3450 */ 3451 void remR3PhysWrite U32(uint8_t *pbDstPhys, uint32_t val)3451 void remR3PhysWriteHCPtrU32(uint8_t *pbDstPhys, uint32_t val) 3452 3452 { 3453 3453 STAM_PROFILE_ADV_START(&gStatMemWrite, a); … … 3474 3474 * @param val Value 3475 3475 */ 3476 void remR3PhysWrite U64(uint8_t *pbDstPhys, uint64_t val)3476 void remR3PhysWriteHCPtrU64(uint8_t *pbDstPhys, uint64_t val) 3477 3477 { 3478 3478 STAM_PROFILE_ADV_START(&gStatMemWrite, a); -
trunk/src/recompiler/new/cpu-all.h
r1182 r1589 184 184 #define REMR3PHYSREADWRITE_DEFINED 185 185 /* Header sharing between vbox & qemu is rather ugly. */ 186 void remR3PhysRead (uint8_t *pbSrcPhys, void *pvDst, unsigned cb);187 uint8_t remR3PhysRead U8(uint8_t *pbSrcPhys);188 int8_t remR3PhysRead S8(uint8_t *pbSrcPhys);189 uint16_t remR3PhysRead U16(uint8_t *pbSrcPhys);190 int16_t remR3PhysRead S16(uint8_t *pbSrcPhys);191 uint32_t remR3PhysRead U32(uint8_t *pbSrcPhys);192 int32_t remR3PhysRead S32(uint8_t *pbSrcPhys);193 uint64_t remR3PhysRead U64(uint8_t *pbSrcPhys);194 int64_t remR3PhysRead S64(uint8_t *pbSrcPhys);195 void remR3PhysWrite (uint8_t *pbDstPhys, const void *pvSrc, unsigned cb);196 void remR3PhysWrite U8(uint8_t *pbDstPhys, uint8_t val);197 void remR3PhysWrite U16(uint8_t *pbDstPhys, uint16_t val);198 void remR3PhysWrite U32(uint8_t *pbDstPhys, uint32_t val);199 void remR3PhysWrite U64(uint8_t *pbDstPhys, uint64_t val);186 void remR3PhysReadHCPtr(uint8_t *pbSrcPhys, void *pvDst, unsigned cb); 187 uint8_t remR3PhysReadHCPtrU8(uint8_t *pbSrcPhys); 188 int8_t remR3PhysReadHCPtrS8(uint8_t *pbSrcPhys); 189 uint16_t remR3PhysReadHCPtrU16(uint8_t *pbSrcPhys); 190 int16_t remR3PhysReadHCPtrS16(uint8_t *pbSrcPhys); 191 uint32_t remR3PhysReadHCPtrU32(uint8_t *pbSrcPhys); 192 int32_t remR3PhysReadHCPtrS32(uint8_t *pbSrcPhys); 193 uint64_t remR3PhysReadHCPtrU64(uint8_t *pbSrcPhys); 194 int64_t remR3PhysReadHCPtrS64(uint8_t *pbSrcPhys); 195 void remR3PhysWriteHCPtr(uint8_t *pbDstPhys, const void *pvSrc, unsigned cb); 196 void remR3PhysWriteHCPtrU8(uint8_t *pbDstPhys, uint8_t val); 197 void remR3PhysWriteHCPtrU16(uint8_t *pbDstPhys, uint16_t val); 198 void remR3PhysWriteHCPtrU32(uint8_t *pbDstPhys, uint32_t val); 199 void remR3PhysWriteHCPtrU64(uint8_t *pbDstPhys, uint64_t val); 200 200 # ifdef PGM_DYNAMIC_RAM_ALLOC 201 201 void *remR3GCPhys2HCVirt(void *env, target_ulong addr); … … 207 207 static inline int ldub_p(void *ptr) 208 208 { 209 return remR3PhysRead U8(ptr);209 return remR3PhysReadHCPtrU8(ptr); 210 210 } 211 211 212 212 static inline int ldsb_p(void *ptr) 213 213 { 214 return remR3PhysRead S8(ptr);214 return remR3PhysReadHCPtrS8(ptr); 215 215 } 216 216 217 217 static inline void stb_p(void *ptr, int v) 218 218 { 219 remR3PhysWrite U8(ptr, v);219 remR3PhysWriteHCPtrU8(ptr, v); 220 220 } 221 221 222 222 static inline int lduw_le_p(void *ptr) 223 223 { 224 return remR3PhysRead U16(ptr);224 return remR3PhysReadHCPtrU16(ptr); 225 225 } 226 226 227 227 static inline int ldsw_le_p(void *ptr) 228 228 { 229 return remR3PhysRead S16(ptr);229 return remR3PhysReadHCPtrS16(ptr); 230 230 } 231 231 232 232 static inline void stw_le_p(void *ptr, int v) 233 233 { 234 remR3PhysWrite U16(ptr, v);234 remR3PhysWriteHCPtrU16(ptr, v); 235 235 } 236 236 237 237 static inline int ldl_le_p(void *ptr) 238 238 { 239 return remR3PhysRead U32(ptr);239 return remR3PhysReadHCPtrU32(ptr); 240 240 } 241 241 242 242 static inline void stl_le_p(void *ptr, int v) 243 243 { 244 remR3PhysWrite U32(ptr, v);244 remR3PhysWriteHCPtrU32(ptr, v); 245 245 } 246 246 247 247 static inline void stq_le_p(void *ptr, uint64_t v) 248 248 { 249 remR3PhysWrite U64(ptr, v);249 remR3PhysWriteHCPtrU64(ptr, v); 250 250 } 251 251 252 252 static inline uint64_t ldq_le_p(void *ptr) 253 253 { 254 return remR3PhysRead U64(ptr);254 return remR3PhysReadHCPtrU64(ptr); 255 255 } 256 256 -
trunk/src/recompiler/new/exec.c
r1587 r1589 2299 2299 ptr = phys_ram_base + addr1; 2300 2300 # endif 2301 remR3PhysWrite (ptr, buf, l);2301 remR3PhysWriteHCPtr(ptr, buf, l); 2302 2302 #else 2303 2303 ptr = phys_ram_base + addr1; … … 2345 2345 (addr & ~TARGET_PAGE_MASK); 2346 2346 # endif 2347 remR3PhysRead (ptr, buf, l);2347 remR3PhysReadHCPtr(ptr, buf, l); 2348 2348 #else 2349 2349 ptr = phys_ram_base + (pd & TARGET_PAGE_MASK) + -
trunk/src/recompiler/new/translate-op.c
r1 r1589 29 29 #define REMR3PHYSREADWRITE_DEFINED 30 30 /* Header sharing between vbox & qemu is rather ugly. */ 31 void remR3PhysRead (uint8_t *pbSrcPhys, void *pvDst, unsigned cb);32 uint8_t remR3PhysRead U8(uint8_t *pbSrcPhys);33 int8_t remR3PhysRead S8(uint8_t *pbSrcPhys);34 uint16_t remR3PhysRead U16(uint8_t *pbSrcPhys);35 int16_t remR3PhysRead S16(uint8_t *pbSrcPhys);36 uint32_t remR3PhysRead U32(uint8_t *pbSrcPhys);37 int32_t remR3PhysRead S32(uint8_t *pbSrcPhys);38 uint64_t remR3PhysRead U64(uint8_t *pbSrcPhys);39 int64_t remR3PhysRead S64(uint8_t *pbSrcPhys);40 void remR3PhysWrite (uint8_t *pbDstPhys, const void *pvSrc, unsigned cb);41 void remR3PhysWrite U8(uint8_t *pbDstPhys, uint8_t val);42 void remR3PhysWrite U16(uint8_t *pbDstPhys, uint16_t val);43 void remR3PhysWrite U32(uint8_t *pbDstPhys, uint32_t val);44 void remR3PhysWrite U64(uint8_t *pbDstPhys, uint64_t val);31 void remR3PhysReadHCPtr(uint8_t *pbSrcPhys, void *pvDst, unsigned cb); 32 uint8_t remR3PhysReadHCPtrU8(uint8_t *pbSrcPhys); 33 int8_t remR3PhysReadHCPtrS8(uint8_t *pbSrcPhys); 34 uint16_t remR3PhysReadHCPtrU16(uint8_t *pbSrcPhys); 35 int16_t remR3PhysReadHCPtrS16(uint8_t *pbSrcPhys); 36 uint32_t remR3PhysReadHCPtrU32(uint8_t *pbSrcPhys); 37 int32_t remR3PhysReadHCPtrS32(uint8_t *pbSrcPhys); 38 uint64_t remR3PhysReadHCPtrU64(uint8_t *pbSrcPhys); 39 int64_t remR3PhysReadHCPtrS64(uint8_t *pbSrcPhys); 40 void remR3PhysWriteHCPtr(uint8_t *pbDstPhys, const void *pvSrc, unsigned cb); 41 void remR3PhysWriteHCPtrU8(uint8_t *pbDstPhys, uint8_t val); 42 void remR3PhysWriteHCPtrU16(uint8_t *pbDstPhys, uint16_t val); 43 void remR3PhysWriteHCPtrU32(uint8_t *pbDstPhys, uint32_t val); 44 void remR3PhysWriteHCPtrU64(uint8_t *pbDstPhys, uint64_t val); 45 45 #endif /* VBOX */ 46 46
Note:
See TracChangeset
for help on using the changeset viewer.