--- trunk/src/cpus/bintrans_i386.c 2007/10/08 16:19:28 21 +++ trunk/src/cpus/bintrans_i386.c 2007/10/08 16:19:37 22 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2005 Anders Gavare. All rights reserved. + * Copyright (C) 2004-2006 Anders Gavare. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: bintrans_i386.c,v 1.1 2005/08/29 14:36:41 debug Exp $ + * $Id: bintrans_i386.c,v 1.3 2006/02/09 22:40:26 debug Exp $ * * i386 specific code for dynamic binary translation. * See bintrans.c for more information. Included from bintrans.c. @@ -64,8 +64,8 @@ #define ofs_tabl0 (((size_t)&dummy_cpu.cd.mips.vaddr_to_hostaddr_table0) - ((size_t)&dummy_cpu)) #define ofs_chunks ((size_t)&dummy_vth32_table.bintrans_chunks[0] - (size_t)&dummy_vth32_table) #define ofs_chunkbase ((size_t)&dummy_cpu.cd.mips.chunk_base_address - (size_t)&dummy_cpu) -#define ofs_h_l (((size_t)&dummy_cpu.cd.mips.host_load) - ((size_t)&dummy_cpu)) -#define ofs_h_s (((size_t)&dummy_cpu.cd.mips.host_store) - ((size_t)&dummy_cpu)) +#define ofs_h_l (((size_t)&dummy_cpu.cd.mips.host_OLD_load) - ((size_t)&dummy_cpu)) +#define ofs_h_s (((size_t)&dummy_cpu.cd.mips.host_OLD_store) - ((size_t)&dummy_cpu)) static void (*bintrans_runchunk)(struct cpu *, unsigned char *); @@ -1892,18 +1892,18 @@ *a++ = 0xc1; *a++ = 0xeb; *a++ = 0x0c; /* shr $12, %ebx */ if (load) { - /* ecx = cpu->cd.mips.host_load */ + /* ecx = cpu->cd.mips.host_OLD_load */ *a++ = 0x8b; *a++ = 0x8e; *a++ = ofs_h_l & 255; *a++ = (ofs_h_l >> 8) & 255; *a++ = (ofs_h_l >> 16) & 255; *a++ = (ofs_h_l >> 24) & 255; } else { - /* ecx = cpu->cd.mips.host_store */ + /* ecx = cpu->cd.mips.host_OLD_store */ *a++ = 0x8b; *a++ = 0x8e; *a++ = ofs_h_s & 255; *a++ = (ofs_h_s >> 8) & 255; *a++ = (ofs_h_s >> 16) & 255; *a++ = (ofs_h_s >> 24) & 255; } - /* ecx = host_load[a] (or host_store[a]) */ + /* ecx = host_OLD_load[a] (or host_OLD_store[a]) */ *a++ = 0x8b; *a++ = 0x0c; *a++ = 0x99; /* mov (%ecx,%ebx,4),%ecx */ /* @@ -2697,8 +2697,8 @@ /* * bintrans_backend_init(): * - * This is neccessary for broken GCC 2.x. (For GCC 3.x, this wouldn't be - * neccessary, and the old code would have worked.) + * This is necessary for broken GCC 2.x. (For GCC 3.x, this wouldn't be + * needed; the old code would have worked.) */ static void bintrans_backend_init(void) { @@ -2897,12 +2897,12 @@ *p++ = 0x89; *p++ = 0xc3; /* mov %eax, %ebx */ *p++ = 0xc1; *p++ = 0xeb; *p++ = 0x0c; /* shr $12, %ebx */ - /* ecx = cpu->cd.mips.host_load */ + /* ecx = cpu->cd.mips.host_OLD_load */ *p++ = 0x8b; *p++ = 0x8e; *p++ = ofs_h_l & 255; *p++ = (ofs_h_l >> 8) & 255; *p++ = (ofs_h_l >> 16) & 255; *p++ = (ofs_h_l >> 24) & 255; - /* ecx = host_load[a] */ + /* ecx = host_OLD_load[a] */ *p++ = 0x8b; *p++ = 0x0c; *p++ = 0x99; /* mov (%ecx,%ebx,4),%ecx */ /* ret */ @@ -2931,12 +2931,12 @@ *p++ = 0x89; *p++ = 0xc3; /* mov %eax, %ebx */ *p++ = 0xc1; *p++ = 0xeb; *p++ = 0x0c; /* shr $12, %ebx */ - /* ecx = cpu->cd.mips.host_store */ + /* ecx = cpu->cd.mips.host_OLD_store */ *p++ = 0x8b; *p++ = 0x8e; *p++ = ofs_h_s & 255; *p++ = (ofs_h_s >> 8) & 255; *p++ = (ofs_h_s >> 16) & 255; *p++ = (ofs_h_s >> 24) & 255; - /* ecx = host_store[a] */ + /* ecx = host_OLD_store[a] */ *p++ = 0x8b; *p++ = 0x0c; *p++ = 0x99; /* mov (%ecx,%ebx,4),%ecx */ /* ret */