|
|
| version 1.9, 2003/12/11 21:57:38 | version 1.11, 2005/02/07 14:46:11 |
|---|---|
| Line 46 | Line 46 |
| I286_FLAGL = (UINT8)(BYTESZPF(d) | A_FLAG | ((s) & 1)); | I286_FLAGL = (UINT8)(BYTESZPF(d) | A_FLAG | ((s) & 1)); |
| #else // eVC3/4 compiler bug | #else // eVC3/4 compiler bug |
| #define BYTE_SAR1(d, s) \ | #define BYTE_SAR1(d, s) \ |
| (d) = (BYTE)(((SINT8)(s)) >> 1); \ | (d) = (UINT8)(((SINT8)(s)) >> 1); \ |
| I286_OV = 0; \ | I286_OV = 0; \ |
| I286_FLAGL = (UINT8)(BYTESZPF(d) | A_FLAG | ((s) & 1)); | I286_FLAGL = (UINT8)(BYTESZPF(d) | A_FLAG | ((s) & 1)); |
| #endif | #endif |
| Line 166 | Line 166 |
| #define BYTE_SHLCL(d, s, c) \ | #define BYTE_SHLCL(d, s, c) \ |
| (c) &= 0x1f; \ | (c) &= 0x1f; \ |
| if (c) { \ | if (c) { \ |
| if ((c) >= 0x10) { \ | if ((c) > 10) { \ |
| (c) &= 7; \ | (c) = 10; \ |
| (c) |= 8; \ | |
| } \ | } \ |
| (s) <<= (c); \ | (s) <<= (c); \ |
| (s) &= 0x1ff; \ | (s) &= 0x1ff; \ |
| Line 180 | Line 179 |
| #define BYTE_SHRCL(d, s, c) \ | #define BYTE_SHRCL(d, s, c) \ |
| (c) &= 0x1f; \ | (c) &= 0x1f; \ |
| if (c) { \ | if (c) { \ |
| if ((c) >= 0x10) { \ | if ((c) >= 10) { \ |
| (c) &= 7; \ | (c) = 10; \ |
| (c) |= 8; \ | |
| } \ | } \ |
| (s) >>= ((c) - 1); \ | (s) >>= ((c) - 1); \ |
| I286_FLAGL = (BYTE)((s) & 1); \ | I286_FLAGL = (UINT8)((s) & 1); \ |
| (s) >>= 1; \ | (s) >>= 1; \ |
| I286_OV = ((s) ^ ((s) >> 1)) & 0x40; \ | I286_OV = ((s) ^ ((s) >> 1)) & 0x40; \ |
| I286_FLAGL |= BYTESZPF(s) + A_FLAG; \ | I286_FLAGL |= BYTESZPF(s) + A_FLAG; \ |
| } \ | } \ |
| (d) = (s); | (d) = (s); |
| #if !defined(_WIN32_WCE) || (_WIN32_WCE < 300) | |
| #define BYTE_SARCL(d, s, c) \ | #define BYTE_SARCL(d, s, c) \ |
| (c) &= 0x1f; \ | (c) &= 0x1f; \ |
| if (c) { \ | if (c) { \ |
| (s) = ((SINT8)(s)) >> ((c) - 1); \ | (s) = ((SINT8)(s)) >> ((c) - 1); \ |
| I286_FLAGL = (BYTE)((s) & 1); \ | I286_FLAGL = (UINT8)((s) & 1); \ |
| (s) = (BYTE)(((SINT8)s) >> 1); \ | (s) = (UINT8)(((SINT8)s) >> 1); \ |
| I286_OV = 0; \ | I286_OV = 0; \ |
| I286_FLAGL |= BYTESZPF(s) | A_FLAG; \ | I286_FLAGL |= BYTESZPF(s) | A_FLAG; \ |
| } \ | } \ |
| (d) = (s); | (d) = (s); |
| #else | |
| #define BYTE_SARCL(d, s, c) \ | |
| (c) &= 0x1f; \ | |
| if (c) { \ | |
| SINT32 t; \ | |
| t = (s) << 24; \ | |
| t = t >> ((c) - 1); \ | |
| I286_FLAGL = (UINT8)((t >> 24) & 1); \ | |
| (s) = (t >> 25) & 0xff; \ | |
| I286_OV = 0; \ | |
| I286_FLAGL |= BYTESZPF(s) | A_FLAG; \ | |
| } \ | |
| (d) = (s); | |
| #endif | |
| #define WORD_ROLCL(d, s, c) \ | #define WORD_ROLCL(d, s, c) \ |
| (c) &= 0x1f; \ | (c) &= 0x1f; \ |