Fix push order in move-frame-up / dynamic-link.
authorTaylor R Campbell <campbell@mumble.net>
Tue, 15 Jan 2019 03:48:25 +0000 (03:48 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Wed, 21 Aug 2019 21:34:02 +0000 (21:34 +0000)
src/compiler/machines/aarch64/lapgen.scm
src/compiler/machines/aarch64/rules3.scm

index ab045fee86d4d3fd13423ce4e5e3a862e69c4c4c..9dc14bf1255895a8c4775e430a74ddaad940ab30 100644 (file)
@@ -276,7 +276,7 @@ USA.
                   (& (* ,address-units-per-object 2))))))
 
 (define (push2 reg1 reg2)
-  ;; (LAP ,@(push reg2) ,@(push reg1))
+  ;; (LAP ,@(push reg1) ,@(push reg2))
   (LAP (STP X ,reg2 ,reg1
            (PRE+ ,regnum:stack-pointer
                  (& (* ,address-units-per-object -2))))))
index a6b8d23b2167af180b2fdba4d0b0b9554c2431d4..b040e2a58a84d8da7cee73b91fd8383ca69bd5ec 100644 (file)
@@ -338,11 +338,11 @@ USA.
                  (LAP)))
          ,@(register->register-transfer address regnum:stack-pointer)
          ,@(let loop ((temps temps))
-             ;; (push r5) (push r3 r4) (push r1 r2)
+             ;; (push r5) (push2 r4 r3) (push2 r2 r1)
              (if (pair? temps)
                  (if (pair? (cdr temps))
                      (LAP ,@(loop (cddr temps))
-                          ,@(push2 (car temps) (cadr temps)))
+                          ,@(push2 (cadr temps) (car temps)))
                      (push (car temps)))
                  (LAP))))))
 \f