mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 04:19:52 +00:00
test(loader): x86-64 architectural known answers from the Intel SDM (#155)
Add 727 cases and definition-based sweeps for the guest CPU, derived from the Intel SDM (revision 093) before the CPU code was read. The interpreter and the DBT run the same cases. 588 cases are verified, 133 use forms both engines refuse, and four ignored tests state open defects: stale DBT blocks after the guest rewrites code, the address of a page-crossing fault, and the fault class of a non-canonical address and of an instruction over 15 bytes. Signed-off-by: jelly013 <22855910+jelly013@users.noreply.github.com>
This commit is contained in:
1 parent
6d073a99b5
commit
1c5c320437
2 files changed
+5362
No files matched your search
@@ -16,6 +16,7 @@ remains unsupported.
|
||||
- Added authoritative read-only x86-64 CPU inventory CLI (`python3 -m qa cpu-inventory`) over `crates/loader/x86/instructions.toml` via `generate_x86.load`, with opcode-map/prefix/operand summaries, native vs shared-semantic operation partitions from `dbt.rs`, fixture mnemonic evidence and a separate unsupported catalog. Does not count candidates as implemented. Covered by `tests/qa/test_cpu_inventory.py`.
|
||||
- Added typed runtime inventory CLI (`python3 -m qa runtime-inventory`) over `crates/loader/runtime/services.txt`, reporting implemented/partial/stub services separately from API-set aliases and leaving independently-verified empty unless recorded. Covered by `tests/qa/test_runtime_inventory.py`.
|
||||
|
||||
- Added `crates/loader/tests/cpu_known_answers.rs` (#155): 727 x86-64 cases whose results, flags, MXCSR state and faults were derived from the Intel SDM before the CPU code was read, plus arithmetic, shift, packed-integer, multiply, divide and floating-point sweeps computed from the manual's definitions. The interpreter and the DBT both run them, and the DBT route (ARM64 code or Rust helper) of each verified instruction is recorded. 588 cases are verified, 133 use forms both engines refuse, and six, plus a self-modifying-code test, record open defects in four ignored tests: the reported address of a page-crossing fault, the fault class of a non-canonical address and of an instruction over 15 bytes, and DBT blocks that stay cached after the guest rewrites them. Not compared with x86 hardware; awaiting independent review.
|
||||
- Added a typed runtime service registry (`crates/loader/runtime/services.txt`) and `xenora-runtime-gen`, which generates Win64 argument and result adapters, static metadata and a coverage report. It covers 20 services: 16 existing kernel32 services moved to typed handlers, and `sqrt`, `sqrtf`, `fabs` and `fabsf` with arguments and results in XMM registers. Conflicting keys, unlisted API sets, unsupported types and behaviour without an existing test are rejected. See `docs/runtime/registry.md`.
|
||||
- Added SSE and SSE2 floating point in scalar and packed, binary32 and binary64 forms: add, subtract, multiply, divide, minimum, maximum, square root, compares, COMI/UCOMI and the conversions between formats and integers (parts of #127 and #128; awaiting independent review). `crates/loader/src/softfloat.rs` computes every result exactly and rounds once, with MXCSR rounding modes, sticky flags, denormals-are-zero, flush-to-zero, tininess after rounding and x86 NaN rules; host floating point is not used because ARM64 differs. An unmasked exception exits with `SimdException` and leaves everything but MXCSR unchanged. RCP, RSQRT and MMX conversions are rejected, and no floating-point form is translated to NEON yet.
|
||||
- Added 6,824 floating-point vectors computed with exact fractions by `tests/x86/float_reference.py`, run through both engines from registers and memory and through the packed forms, and more than two million round-to-nearest results compared with the host's IEEE 754 hardware.
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user