# x87, MMX and SSE Evidence tags as in the methodology; DOC citations to the pinned SDM volumes (2003) and 245127-001, TEST ROM citations to abaire/nxdk_low_level_cpu_tests at `d7a6e7e` (its README says its expectations are behaviour "on one specific piece of hardware", a 1.0 Xbox). ## x87 - Eight 80-bit registers as a stack with TOP in the status word, a two-bit tag per register, control word (precision 24/53/64 bits, rounding mode, exception masks), status word (condition codes C0-C3, exception flags, stack fault), last instruction and operand pointers with the opcode. DOC SDM 1 ch. 8. - Power-up control word 0040h; FNINIT gives 037Fh and tag FFFFh (SDM 3 Table 9-1). - **Precision control rounds the significand only**; the exponent range stays extended, so a "single-precision" x87 result is not an IEEE single. abaire's `fpu_test` checks that `fadd/fsub/fmul/fdiv` with qword operands under PC = 00b round the exact result once to 24 bits, catching emulators that round to binary64 first (TEST ROM), and that `fld qword`/`fstp qword` copies are unaffected by PC (TEST ROM). - **Transcendentals.** FSIN, FCOS, FSINCOS, FPTAN, FPATAN, F2XM1, FYL2X, FYL2XP1 and FSCALE/FPREM/FPREM1. Their exact results are an implementation property: Intel documents ranges, flags and the C2 "out of range" rule (SDM 1 ยง8.3.10, SDM 2 per-instruction pages), not the last bit. The Pentium III's last bits are **not documented anywhere we found** (U3). Options: a correctly rounded reference (wrong in places by design), the host's x87 (a later microcode: unknown agreement), or tables captured on an Xbox (none exist). Decision 3. - Unmasked exceptions: the P6 signals them at the next waiting x87 instruction (#MF, CR0.NE = 1 on the Xbox per MAME's trace value 80010031h: OBSERVED) or through FERR#/IGNNE# when NE = 0 (the I/O port F0h "FPU error control" appears in the xboxdevwiki `Memory` I/O map, r7416, marked unconfirmed). ## MMX - MM0-MM7 alias the low 64 bits of the x87 registers; any MMX instruction sets TOP = 0 and all tags valid; EMMS sets all tags empty. abaire's `mmx_test` checks the tag word after MMX (non-empty), after EMMS (FFFFh in FSTENV form, FFh in FXSAVE's abridged form), data retained across EMMS, and the x87 stack fault after MMX without EMMS (TEST ROM). DOC SDM 1 ch. 9. - Wrap-around, signed and unsigned saturation, PMADDWD's -32768 x -32768 case, shift counts beyond the element width zeroing (or sign-filling for PSRA): all in the same test (TEST ROM) and in SDM 2. - The SSE integer additions on MMX registers (PAVGB/W, PMINUB/PMAXUB, PMINSW/PMAXSW, PMULHUW, PMOVMSKB, PEXTRW/PINSRW, PSADBW, PSHUFW, MASKMOVQ): in the Pentium III, in abaire's test (TEST ROM), XED's `SSE` set. ## SSE (Pentium III: single precision only) - XMM0-XMM7 (128-bit, four singles), MXCSR, FXSAVE/FXRSTOR's 512-byte area (CR4.OSFXSR, CR4.OSXMMEXCPT gate SSE use and #XM). DOC SDM 1 ch. 10. - **No DAZ.** SDM 1 Figure 10-3: "The denormals-are-zeros flag was introduced in the Pentium 4 and Intel Xeon processor." abaire's MXCSR test reads MXCSR_MASK through FXSAVE and expects bit 6 clear on Coppermine (TEST ROM). Setting a reserved MXCSR bit raises #GP (SDM 2, LDMXCSR). - **FTZ** and the sticky flags: covered by the same test (TEST ROM). - **MINSS/MAXSS/MINPS/MAXPS are not IEEE min/max**: they return the second operand when either is a NaN or both are zeros of either sign (SDM 2 MINSS: "If only one value is a NaN ... the second operand is returned"); abaire checks this (TEST ROM). - **RCPSS/RCPPS/RSQRTSS/RSQRTPS** are approximations with relative error at most 1.5 x 2^-12 (SDM 2). The bits are implementation-defined, and abaire's test asserts **"exact hardware baseline bit patterns on Coppermine"** for both (`sse_tests/test_sse_approximations.cpp`, comments at lines 91 and 169: TEST ROM). A specification needs the table the hardware uses: not documented (U4). The approximations differ between Intel and AMD and may between Intel generations, so the host CPU is **not** a judge for them. - COMISS/UCOMISS set ZF, PF, CF and clear OF, SF, AF; the difference is QNaN signalling (SDM 2; TEST ROM). - PREFETCHh are hints with no architectural effect; the specification may model them as cache fills or not at all (timing only). ## What the host can and cannot judge here | Behaviour | Judge | | --- | --- | | IEEE basic ops (+ - x / sqrt) in single, double, extended, all rounding modes and precisions | host x87/SSE (tier 1 for IEEE behaviour, identical by the standard) and TestFloat; abaire's TestFloat-on-Xbox run confirms the Xbox matches (TEST ROM) | | x87 transcendentals' last bits | none (U3) | | RCP/RSQRT bits | abaire's baselines only (U4) | | MMX integer ops | host (defined results) and abaire | | Exceptions, flags, tags | SDM (tier 2), host for defined cases, abaire | | DAZ absent, MXCSR_MASK value | abaire (TEST ROM); the host has DAZ, so it is the wrong judge |