Skip to content

fix(harris0r): stabilize delay conversion with x87 precision - #328

Merged
jaromil merged 5 commits into
masterfrom
fix/harris0r-i386-delay
Nov 11, 2026
Merged

jaromil merged 5 commits into
masterfrom
fix/harris0r-i386-delay

Conversation

@jaromil

@jaromil jaromil commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

On i386, x87 can retain extra precision when scaling the normalized delay, leaving values such as (1.0 / 15.0) * 15 just below an integer. Truncation then selects the previous delay, causing parameter round-trip and frame-history failures.

Store the scaled value in a volatile double before integer conversion so rounding happens even when GCC retains excess precision across casts. Extend contract coverage to all 16 delays in smooth/simple modes with separate and in-place buffers, and verify values on either side of each normalized boundary retain truncation behavior.

Add a native i386 PR CI job on Ubuntu using gcc-multilib, g++-multilib, and -m32 for both C and C++. Install i386 OpenGL/EGL development packages for CMake discovery and select the i386 pkg-config metadata. Build six core contract executables, verify they are ELF32 Intel 80386 binaries, and execute them directly on the runner.

Validation:

  • Native i386 CI, GCC 13.3.0 Release with -m32: 6 passed, 0 failed. Includes harris0r, slitscan0r, aech0r, and three motiondiff0r contracts; all six binaries verified as 32-bit.
  • ctest --test-dir build/issue327-native -R '^harris0r(-contract)?$' --output-on-failure: 2 passed.
  • Contract test built with GCC -mfpmath=387, at -O0, -O2, and -O3, with -fexcess-precision=standard and fast: all six configurations passed.
  • Workflow YAML parsing, Bash syntax checks, ShellCheck, and git diff --check: passed.

Fixes #327.

@jaromil
jaromil merged commit d7642f6 into master Nov 11, 2026
11 checks passed
@jaromil
jaromil deleted the fix/harris0r-i386-delay branch November 11, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

harris0r test fails on i386

1 participant