diff options
| -rw-r--r-- | chapter31/src/test/java/com/seaofnodes/simple/Chapter21Test.java | 3 | ||||
| -rw-r--r-- | chapter32/src/test/java/com/seaofnodes/simple/Chapter21Test.java | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/chapter31/src/test/java/com/seaofnodes/simple/Chapter21Test.java b/chapter31/src/test/java/com/seaofnodes/simple/Chapter21Test.java index 14a091ac..347f2ce4 100644 --- a/chapter31/src/test/java/com/seaofnodes/simple/Chapter21Test.java +++ b/chapter31/src/test/java/com/seaofnodes/simple/Chapter21Test.java @@ -472,7 +472,8 @@ val test_sqrt = { flt x -> } }; """; - TestC.runC(src, "newtonFloat", result, TestC.CALL_CONVENTION.equals("win64") ? 42 : 34); + // With the zero-input guard, both SystemV and win64 score 42. + TestC.runC(src, "newtonFloat", result, 42); EvalRisc5 R5 = TestRisc5.build( src, "test_sqrt", 0, 10, false); R5.fregs[riscv.FA0 - riscv.F_OFFSET] = 3.0; diff --git a/chapter32/src/test/java/com/seaofnodes/simple/Chapter21Test.java b/chapter32/src/test/java/com/seaofnodes/simple/Chapter21Test.java index 14a091ac..347f2ce4 100644 --- a/chapter32/src/test/java/com/seaofnodes/simple/Chapter21Test.java +++ b/chapter32/src/test/java/com/seaofnodes/simple/Chapter21Test.java @@ -472,7 +472,8 @@ val test_sqrt = { flt x -> } }; """; - TestC.runC(src, "newtonFloat", result, TestC.CALL_CONVENTION.equals("win64") ? 42 : 34); + // With the zero-input guard, both SystemV and win64 score 42. + TestC.runC(src, "newtonFloat", result, 42); EvalRisc5 R5 = TestRisc5.build( src, "test_sqrt", 0, 10, false); R5.fregs[riscv.FA0 - riscv.F_OFFSET] = 3.0; |
