MechaCat02
82a9bff934
fix(cpu): PPCBUG-009/010+011/041+042+043 mul/div + srawx truncation
Phase 4 batch 4: mulwx, divwx (coupled +CR0), srawx/srawix (coupled +CR0).
- PPCBUG-009 mullwx: 32-bit ABI. Product truncated to u32 before write.
OE handler still uses full i64 product to detect overflow.
- PPCBUG-010+011 divwx (coupled): quotient zero-extended (canary uses
ZeroExtend(v, INT64_TYPE)). CR0 view via i32 — without this, a negative
i32 quotient (e.g. -3 from -10/3) would be classified as positive in
i64 view of the now-zero-extended writeback.
- PPCBUG-041+042+043 srawx/srawix (coupled): writeback uses `as u32 as u64`
(was `as i64 as u64`). All-ones case (sh>=32 with negative input) writes
0x00000000_FFFFFFFF instead of u64::MAX. CR0 view via i32. CA logic
preserved unchanged (audit-verified independently correct).
Tests:
- mullwx_overflow_truncates_to_32 (PPCBUG-009).
- divwx_negative_quotient_zero_extends (PPCBUG-010+011).
- srawx_negative_value_zero_extends_upper (PPCBUG-041+043).
- srawix_high_count_negative_input_yields_low32_all_ones (PPCBUG-042+043).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 11:44:34 +02:00
..
2026-05-01 16:28:06 +02:00
2026-05-01 16:30:26 +02:00
2026-04-16 23:14:56 +02:00
2026-05-02 11:44:34 +02:00
2026-05-01 16:30:03 +02:00
2026-05-01 16:29:38 +02:00
2026-05-01 16:30:03 +02:00
2026-05-01 16:29:00 +02:00
2026-05-01 16:27:13 +02:00
2026-04-16 23:14:56 +02:00
2026-05-01 16:26:48 +02:00
2026-05-01 16:28:32 +02:00
2026-05-01 16:28:32 +02:00