Files
velzieandClaude Opus 5.5 41be933195 X87Op arithmetic and compares: IR, the pure import, tier-1
X87Op gains Arith(Add | Sub | Mul | Div) -- args: the two operands'
significands and sign/exponent words and the control word; outs: the
result's significand and sign/exponent, the status bits -- and Compare
{ quiet } (fcom/fucom) -- outs: the condition codes as status-word bits
and the flags. gex_f80 gains the matching pure arith_op and compare_op;
the text form (`x87 add/sub/mul/div/com/ucom`), the interpreter and the
op codes (0x200 | k, 0x300 | quiet) follow.

The gex.x87 import now takes both operands, (ctx, op, a_sig, a_se, b_sig,
b_se, cw) -> i64, and leaves an extended result's sign and exponent at
X87_TMP + 8 beside the status bits at + 12; both shims serve the new
codes.

tier-1 lowers Arith through the import (pure: no flush) and Compare
inline when both operands are zeros or normal numbers -- no flag can be
raised then, and the condition codes are a sign-and-magnitude compare --
falling back to the import for NaNs, infinities, denormals and
unsupported encodings. The validation test covers every operation.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FFqjijkLKTTuaQutt3168C
2026-09-30 23:41:16 -04:00
..