/* * Define PECULIAR_486 to get a closer approximation to 80486 behaviour, * rather than behaviour which appears to be cleaner. * This is a matter of opinion: for all I know, the 80486 may simply * be complying with the IEEE spec. Maybe one day I'll get to see the * spec...
*/ #define PECULIAR_486
#ifdef __ASSEMBLER__ #include"fpu_asm.h" #defineConst(x) $##x #else #defineConst(x) x #endif
#define EXP_BIAS Const(0) #define EXP_OVER Const(0x4000) /* smallest invalid large exponent */ #define EXP_UNDER Const(-0x3fff) /* largest invalid small exponent */ #define EXP_WAY_UNDER Const(-0x6000) /* Below the smallest denormal, but
still a 16 bit nr. */ #define EXP_Infinity EXP_OVER #define EXP_NaN EXP_OVER
/* Keep the order TAG_Valid, TAG_Zero, TW_Denormal */ /* The following fold to 2 (Special) in the Tag Word */ #define TW_Denormal Const(4) /* De-normal */ #define TW_Infinity Const(5) /* + or - infinity */ #define TW_NaN Const(6) /* Not a Number */ #define TW_Unsupported Const(7) /* Not supported by an 80486 */
#define TAG_Valid Const(0) /* valid */ #define TAG_Zero Const(1) /* zero */ #define TAG_Special Const(2) /* De-normal, + or - infinity,
or Not a Number */ #define TAG_Empty Const(3) /* empty */ #define TAG_Error Const(0x80) /* probably need to abort */
#define LOADED_DATA Const(10101) /* Special st() number to identify
loaded data (not on stack). */
/* A few flags (must be >= 0x10). */ #define REV 0x10 #define DEST_RM 0x20 #define LOADED 0x40
#define FPU_Exception Const(0x80000000) /* Added to tag returns. */
typedefvoid (*FUNC) (void); typedefstruct fpu__reg FPU_REG; typedefvoid (*FUNC_ST0) (FPU_REG *st0_ptr, u_char st0_tag); typedefstruct {
u_char address_size, operand_size, segment;
} overrides; /* This structure is 32 bits: */ typedefstruct {
overrides override;
u_char default_mode;
} fpu_addr_modes; /* PROTECTED has a restricted meaning in the emulator; it is used to signal that the emulator needs to do special things to ensure
that protection is respected in a segmented model. */ #definePROTECTED 4 #define SIXTEEN 1 /* We rely upon this being 1 (true) */ #define VM86 SIXTEEN #define PM16 (SIXTEEN | PROTECTED) #define SEG32 PROTECTED extern u_char const data_sizes_16[32];
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.