From: Taylor R Campbell Date: Tue, 15 Jan 2019 03:48:25 +0000 (+0000) Subject: Fix push order in move-frame-up / dynamic-link. X-Git-Tag: mit-scheme-pucked-10.1.20~11^2~66^2~81 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=3a4bc4b6b16f07a04f75a2d13dcc87e40fb3e7b8;p=mit-scheme.git Fix push order in move-frame-up / dynamic-link. --- diff --git a/src/compiler/machines/aarch64/lapgen.scm b/src/compiler/machines/aarch64/lapgen.scm index ab045fee8..9dc14bf12 100644 --- a/src/compiler/machines/aarch64/lapgen.scm +++ b/src/compiler/machines/aarch64/lapgen.scm @@ -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)))))) diff --git a/src/compiler/machines/aarch64/rules3.scm b/src/compiler/machines/aarch64/rules3.scm index a6b8d23b2..b040e2a58 100644 --- a/src/compiler/machines/aarch64/rules3.scm +++ b/src/compiler/machines/aarch64/rules3.scm @@ -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))))))