From 3a4bc4b6b16f07a04f75a2d13dcc87e40fb3e7b8 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Tue, 15 Jan 2019 03:48:25 +0000 Subject: [PATCH] Fix push order in move-frame-up / dynamic-link. --- src/compiler/machines/aarch64/lapgen.scm | 2 +- src/compiler/machines/aarch64/rules3.scm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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)))))) -- 2.25.1