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:
@@ -122,18 +122,12 @@ static const struct row rows[] = {
|
|||||||
* type is ty_untyped_float; the pre-fix fld_isfloat predicate
|
* type is ty_untyped_float; the pre-fix fld_isfloat predicate
|
||||||
* accepted only TY_F32/TY_F64 and the variant-widen float arm
|
* accepted only TY_F32/TY_F64 and the variant-widen float arm
|
||||||
* silently fell through to MOVQ AX, dropping the X0 result onto
|
* silently fell through to MOVQ AX, dropping the X0 result onto
|
||||||
* a trashed AX. -2.5 == 0xC004000000000000.
|
* 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. */
|
|
||||||
{ "unary_neg_floatlit_direct",
|
{ "unary_neg_floatlit_direct",
|
||||||
BITCHECK_F64(
|
BITCHECK_F64(
|
||||||
"",
|
"",
|
||||||
"let a: (i64 | f64) = -2.5;\n",
|
"let a: (i64 | f64) = -2.5;\n",
|
||||||
"0xC004000000000000", "1"),
|
"13836183955189006336", "1"),
|
||||||
0 },
|
0 },
|
||||||
/* Same expression shape with explicit parens around the literal.
|
/* Same expression shape with explicit parens around the literal.
|
||||||
* Parser builds N_UN(MINUS, N_FLOATLIT) for both forms; pinning
|
* Parser builds N_UN(MINUS, N_FLOATLIT) for both forms; pinning
|
||||||
@@ -142,7 +136,7 @@ static const struct row rows[] = {
|
|||||||
BITCHECK_F64(
|
BITCHECK_F64(
|
||||||
"",
|
"",
|
||||||
"let a: (i64 | f64) = -(2.5);\n",
|
"let a: (i64 | f64) = -(2.5);\n",
|
||||||
"0xC004000000000000", "1"),
|
"13836183955189006336", "1"),
|
||||||
0 },
|
0 },
|
||||||
/* Binop of two untyped-float literals — N_BIN type is
|
/* Binop of two untyped-float literals — N_BIN type is
|
||||||
* ty_untyped_float (untyped+untyped → untyped, see check.c cbinop).
|
* ty_untyped_float (untyped+untyped → untyped, see check.c cbinop).
|
||||||
@@ -153,7 +147,7 @@ static const struct row rows[] = {
|
|||||||
BITCHECK_F64(
|
BITCHECK_F64(
|
||||||
"",
|
"",
|
||||||
"let a: (i64 | f64) = (2.5 + 1.0);\n",
|
"let a: (i64 | f64) = (2.5 + 1.0);\n",
|
||||||
"0x400C000000000000", "1"),
|
"4615063718147915776", "1"),
|
||||||
0 },
|
0 },
|
||||||
/* Concrete f64 ident — cgexpr emits MOVSD load to X0; AX is
|
/* Concrete f64 ident — cgexpr emits MOVSD load to X0; AX is
|
||||||
* never touched. */
|
* never touched. */
|
||||||
|
|||||||
Reference in New Issue
Block a user