Repository navigation
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Thanks for adding the missing native export. I pushed 4f2435d on top after reproducing a second failure: with FTZ on and DAZ off, the DAZ probe's tiny sums have signs + and −, so native ADDPS produces +0 and −0 in that order. The normal-input FTZ probe still checks the opposite-sign pair. The opt-in now reads the host mask at the first DAZ load per invocation, with a zeroed aligned area and a byte copy, and does not cache across invocations. On Windows x64 (MXCSR_MASK=0xFFFF), both native/lifted CTests passed in dev and release, including the separately compiled /O2 DLL, all four mode pairs, and simulated no-DAZ refusal. Command: ctest --preset <dev|release> --no-tests=error -R '^cpu_aot_mxcsr(_daz)?$' --output-on-failure |
Adapt the separate FTZ and DAZ CTest structure from R0Y00#1052. Keep the simulated mask bypass observable without requesting DAZ from the real host. Co-authored-by: romanv9 <154753195+romanv9@users.noreply.github.com>
|
The shared MXCSR-controlled path landed in #1057, including the co-authored denormal work from this PR. Thanks for the implementation and native comparisons. Closing this overlapping branch now that the consolidated version is on main. |
Change
The host-MXCSR profile previously refused both denormal controls, preventing opt-in translated code from matching native FTZ behavior and from using DAZ where supported. This change adds
Mxcsr(reject, denormals=True): FTZ is accepted on x64 SSE2, while DAZ is gated by a per-loadFXSAVE/MXCSR_MASKprobe. Existing default refusals, exception checks, caller-state restoration, and VEX exclusions remain unchanged. FTZ and DAZ fixtures run separately so unsupported DAZ does not hide FTZ results.The fixture uses runtime-fed synthetic binary32 operands, with negative controls for ignored loads/stores, FTZ/DAZ rejection, and ignoring a synthetic mask without DAZ.
Fixes #1048
Verification
python -B -m py_compile tests\cpu\mxcsr.py tools\ffx_version_query.py- passed.python -B tests\docs_links_check.py- passed; checked 15 Markdown files and 235 links.python -B tests\form_coverage_check.py- passed.python -B tests\bidi_controls_check.py- passed; checked 885 tracked files.git diff --check- passed.iced-x86source-generation smoke checks for the default/opt-in profiles, VEX refusals, control replacements, and signed-subnormal expected bits - passed.ctest --preset dev --no-tests=error -R '^cpu_aot_mxcsr(_daz)?$' -V- not run: this host lackscl.exe,ml64.exe, and a configureddevbuild.Evidence and follow-up
The MASM fixture generates its inputs at runtime and compares native and translated ADDPS results to fixed binary32 expectations. It checks signed FTZ outputs, signed DAZ inputs, all four FTZ/DAZ combinations under two rounding modes, read-back, and caller restoration. On hosts without DAZ, the translated path verifies refusal and the DAZ-specific CTest reports capability skip 77; FTZ remains independently testable.
docs/experiments.mddocuments the behavior and reproduction command; the README has no MXCSR-specific capability row. No hardware run was performed.AI-assisted: implemented with GitHub Copilot.
Checklist
Inline source-generation smoke command