|
|
1.1 ! root 1: /* ! 2: * UAE - The Un*x Amiga Emulator ! 3: * ! 4: * MC68000 emulation - machine dependent bits ! 5: * ! 6: * Copyright 1996 Bernd Schmidt ! 7: */ ! 8: ! 9: #if defined(ACORN_FLAG_OPT) ! 10: struct flag_struct { ! 11: unsigned int x:1; ! 12: int :27; ! 13: unsigned int v:1; ! 14: unsigned int c:1; ! 15: unsigned int z:1; ! 16: unsigned int n:1; ! 17: }; ! 18: #else ! 19: struct flag_struct { ! 20: unsigned int c; ! 21: unsigned int z; ! 22: unsigned int n; ! 23: unsigned int v; ! 24: unsigned int x; ! 25: }; ! 26: #endif ! 27: ! 28: extern struct flag_struct regflags; ! 29: ! 30: #define ZFLG (regflags.z) ! 31: #define NFLG (regflags.n) ! 32: #define CFLG (regflags.c) ! 33: #define VFLG (regflags.v) ! 34: #define XFLG (regflags.x) ! 35: ! 36: static __inline__ int cctrue(const int cc) ! 37: { ! 38: switch(cc){ ! 39: case 0: return 1; /* T */ ! 40: case 1: return 0; /* F */ ! 41: case 2: return !CFLG && !ZFLG; /* HI */ ! 42: case 3: return CFLG || ZFLG; /* LS */ ! 43: case 4: return !CFLG; /* CC */ ! 44: case 5: return CFLG; /* CS */ ! 45: case 6: return !ZFLG; /* NE */ ! 46: case 7: return ZFLG; /* EQ */ ! 47: case 8: return !VFLG; /* VC */ ! 48: case 9: return VFLG; /* VS */ ! 49: case 10:return !NFLG; /* PL */ ! 50: case 11:return NFLG; /* MI */ ! 51: case 12:return NFLG == VFLG; /* GE */ ! 52: case 13:return NFLG != VFLG; /* LT */ ! 53: case 14:return !ZFLG && (NFLG == VFLG); /* GT */ ! 54: case 15:return ZFLG || (NFLG != VFLG); /* LE */ ! 55: } ! 56: abort(); ! 57: return 0; ! 58: } ! 59:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.