Files
zig/src
Motiejus Jakštys d8b3451f12 x86_64: fix RoundMode immediate encoding for vroundss/vcvtps2ph
The RoundMode packed struct had Direction as enum(u4) occupying bits 3:0,
which pushed the precision exception suppress field to bit 4. Per Intel
SDM, the ROUNDSS/VROUNDSS/VCVTPS2PH immediate layout is:

  bits 1:0 = rounding mode
  bit 2    = rounding source (MXCSR.RC vs immediate)
  bit 3    = precision exception suppress
  bits 7:4 = reserved (must be 0)

The old encoding emitted e.g. vroundss $0x12 for ceil-suppress (bit 4
set, reserved), which CPUs silently ignore but valgrind 3.26.0 correctly
rejects with SIGILL. Fix by changing Direction to enum(u3) so precision
lands at bit 3, producing the correct $0x0a encoding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 20:41:19 +00:00
..
2025-08-12 16:33:57 +02:00
2025-09-21 21:08:52 +02:00
2025-10-02 10:55:16 +02:00
2025-07-16 10:23:02 -07:00
2025-08-02 04:16:01 +03:30
2025-07-07 22:43:51 -07:00