test: 953 add #98 XMM-pressure row (myf.g() as 1-of-3 f64 args, MOVSD->X2)
Basic x98_nested_arg only spills the imported f64 call-result into the
first float slot (X0); a multi-f64-arg call forces the spill into X2
while two more f64 args are live, exercising pushargsrev's float spill
under XMM register pressure — a distinct path. Verified .s diverges on
master 6f8b658 (integer PUSHQ AX/POPQ DI for the myf.g() arg) and is
byte-identical post-fix; cstage run exits 8 (sum3(-7,10.5,4.5)=8.0:i32).
(#98)
This commit is contained in:
@@ -80,6 +80,17 @@ static const struct row rows[] = {
|
||||
"import myf;\n"
|
||||
"fn dbl(x: f64) f64 = { return x * 2.0; };\n"
|
||||
"export fn main() i32 = { return dbl(myf.g()): i32; };\n", 242 },
|
||||
/* #98 XMM-pressure: myf.g() forwarded as the first of three f64
|
||||
* args; pushargsrev must MOVSD-spill the imported call-result into
|
||||
* X2 while two more f64 args are live — a distinct path from the
|
||||
* basic single-arg X0 spill above. sum3(-7,10.5,4.5)=8.0 -> i32 8. */
|
||||
{ "x98_xmm_pressure",
|
||||
"package myf;\n"
|
||||
"export fn g() f64 = { return -7.0; };\n"
|
||||
"package main;\n"
|
||||
"import myf;\n"
|
||||
"fn sum3(a: f64, b: f64, c: f64) f64 = { return a + b + c; };\n"
|
||||
"export fn main() i32 = { return sum3(myf.g(), 10.5, 4.5): i32; };\n", 8 },
|
||||
{ NULL, NULL, 0 }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user