From c35d5bfd1d34e185bbf357c7bef02ed18abea046 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Tue, 22 Jan 2019 03:47:03 +0000 Subject: [PATCH] Fix sense of INVOCATION-PREFIX:DYNAMIC-LINK choice. --- src/compiler/machines/aarch64/rules3.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/machines/aarch64/rules3.scm b/src/compiler/machines/aarch64/rules3.scm index b39aa3982..9701f3196 100644 --- a/src/compiler/machines/aarch64/rules3.scm +++ b/src/compiler/machines/aarch64/rules3.scm @@ -291,7 +291,9 @@ USA. (assert (not (= address regnum:stack-pointer))) (assert (not (= dynamic-link regnum:stack-pointer))) (LAP (CMP X ,address ,dynamic-link) - (CSEL X GT ,address ,address ,dynamic-link) + ;; Pick the lower of the two addresses, i.e. the one + ;; representing the most elements on the stack. + (CSEL X LE ,address ,address ,dynamic-link) ,@(generate/move-frame-up frame-size address)))) (define (generate/move-frame-up frame-size address) -- 2.25.1