--- np2/i386c/ia32/ia32.mcr 2004/03/21 21:30:49 1.17 +++ np2/i386c/ia32/ia32.mcr 2005/03/12 12:32:54 1.22 @@ -1,4 +1,4 @@ -/* $Id: ia32.mcr,v 1.17 2004/03/21 21:30:49 yui Exp $ */ +/* $Id: ia32.mcr,v 1.22 2005/03/12 12:32:54 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,6 +35,13 @@ #define __CBD(src) ((UINT32)((SINT8)(src))) #define __CWDE(src) ((SINT16)(src)) +#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 { \ UINT8 __tmp = (p); \ @@ -682,6 +687,21 @@ do { \ (s) = __b; \ } while (/*CONSTCOND*/ 0) +#define BYTE_NOT(s) \ +do { \ + (s) ^= 0xff; \ +} while (/*CONSTCOND*/ 0) + +#define WORD_NOT(s) \ +do { \ + (s) ^= 0xffff; \ +} while (/*CONSTCOND*/ 0) + +#define DWORD_NOT(s) \ +do { \ + (s) ^= 0xffffffff; \ +} while (/*CONSTCOND*/ 0) + /* * stack @@ -904,7 +924,7 @@ do { \ #define JMPNOP(clock, d) \ do { \ CPU_WORKCLOCK(clock); \ - CPU_PREFETCHQ_REMAIN -= (d); \ + CPU_PREFETCHQ_REMAIN_SUB(d); \ ADD_EIP((d)); \ } while (/*CONSTCOND*/ 0) #endif