--- np2/i386c/ia32/ia32.mcr 2004/03/23 15:29:34 1.18 +++ np2/i386c/ia32/ia32.mcr 2008/01/25 18:02:18 1.23 @@ -1,4 +1,4 @@ -/* $Id: ia32.mcr,v 1.18 2004/03/23 15:29:34 monaka Exp $ */ +/* $Id: ia32.mcr,v 1.23 2008/01/25 18:02:18 monaka Exp $ */ /* * Copyright (c) 2002-2003 NONAKA Kimihiro @@ -12,8 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -37,8 +35,12 @@ #define __CBD(src) ((UINT32)((SINT8)(src))) #define __CWDE(src) ((SINT16)(src)) -#define PTR_TO_UINT32(p) ((UINT32)(unsigned long)(p)) -#define UINT32_TO_PTR(v) ((void *)(unsigned long)(v)) +#ifndef PTR_TO_UINT32 +#define PTR_TO_UINT32(p) ((UINT32)((unsigned long)(p))) +#endif +#ifndef UINT32_TO_PTR +#define UINT32_TO_PTR(v) ((void *)((unsigned long)(UINT32)(v))) +#endif #define SWAP_BYTE(p, q) \ do { \ @@ -95,7 +97,6 @@ do { \ EXCEPTION(GP_EXCEPTION, 0); \ } \ CPU_EIP = __new_ip; \ - CPU_PREFETCH_CLEAR(); \ } while (/*CONSTCOND*/ 0) #define ADD_EIP(v) \ @@ -889,7 +890,6 @@ do { \ __ip = __CBD(cpu_codefetch(CPU_EIP)); \ __ip++; \ ADD_EIP(__ip); \ - CPU_PREFETCH_CLEAR(); \ } while (/*CONSTCOND*/ 0) #define JMPNEAR(clock) \ @@ -899,7 +899,6 @@ do { \ __ip = __CWDE(cpu_codefetch_w(CPU_EIP)); \ __ip += 2; \ ADD_EIP(__ip); \ - CPU_PREFETCH_CLEAR(); \ } while (/*CONSTCOND*/ 0) #define JMPNEAR_4(clock) \ @@ -909,7 +908,6 @@ do { \ __ip = cpu_codefetch_d(CPU_EIP); \ __ip += 4; \ ADD_EIP(__ip); \ - CPU_PREFETCH_CLEAR(); \ } while (/*CONSTCOND*/ 0) #if !defined(IA32_SUPPORT_PREFETCH_QUEUE) @@ -922,7 +920,6 @@ do { \ #define JMPNOP(clock, d) \ do { \ CPU_WORKCLOCK(clock); \ - CPU_PREFETCHQ_REMAIN -= (d); \ ADD_EIP((d)); \ } while (/*CONSTCOND*/ 0) #endif