test: revert 715 hex-RHS to decimal-u64 (close #41)

Surfaced during worker-40; cannot reproduce at HEAD across
{literal-LHS, literal-RHS, ident, u64-max, 2^63, the original
pair}. Probable side-effect of the f64/tagged-widen chain
(#37/#38/#40). Decimal RHS is permanent coverage; regression
caught by 715 if it returns.
This commit is contained in:
2026-05-16 23:32:27 +09:00
parent bbd8d74093
commit 08ac5149e8

View File

@@ -122,18 +122,12 @@ static const struct row rows[] = {
* type is ty_untyped_float; the pre-fix fld_isfloat predicate
* accepted only TY_F32/TY_F64 and the variant-widen float arm
* silently fell through to MOVQ AX, dropping the X0 result onto
* a trashed AX. -2.5 == 0xC004000000000000.
*
* Hex u64 literal pins the bit pattern directly. Decimal literals
* above 2^63 round-trip cleanly through the lexer (cgexpr_int sees
* the right bits) but the surrounding comparison ladder has an
* unrelated latent miscompile on huge-decimal-u64 RHS — orthogonal
* to this fix; do not entangle. */
* a trashed AX. -2.5 == 0xC004000000000000. */
{ "unary_neg_floatlit_direct",
BITCHECK_F64(
"",
"let a: (i64 | f64) = -2.5;\n",
"0xC004000000000000", "1"),
"13836183955189006336", "1"),
0 },
/* Same expression shape with explicit parens around the literal.
* Parser builds N_UN(MINUS, N_FLOATLIT) for both forms; pinning
@@ -142,7 +136,7 @@ static const struct row rows[] = {
BITCHECK_F64(
"",
"let a: (i64 | f64) = -(2.5);\n",
"0xC004000000000000", "1"),
"13836183955189006336", "1"),
0 },
/* Binop of two untyped-float literals — N_BIN type is
* ty_untyped_float (untyped+untyped → untyped, see check.c cbinop).
@@ -153,7 +147,7 @@ static const struct row rows[] = {
BITCHECK_F64(
"",
"let a: (i64 | f64) = (2.5 + 1.0);\n",
"0x400C000000000000", "1"),
"4615063718147915776", "1"),
0 },
/* Concrete f64 ident — cgexpr emits MOVSD load to X0; AX is
* never touched. */