Fix sense of INVOCATION-PREFIX:DYNAMIC-LINK choice.
authorTaylor R Campbell <campbell@mumble.net>
Tue, 22 Jan 2019 03:47:03 +0000 (03:47 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Wed, 21 Aug 2019 21:34:05 +0000 (21:34 +0000)
src/compiler/machines/aarch64/rules3.scm

index b39aa39826b642428d31a4a32670c345064003be..9701f319603f7da31297b051433f33a2fae740bc 100644 (file)
@@ -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)