From 2ad438132edb04c0c8d5d546405336899bf78607 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Tue, 15 Jan 2019 17:27:45 +0000 Subject: [PATCH] Fix add/sub immediate syntax and criterion. --- src/compiler/machines/aarch64/lapgen.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/machines/aarch64/lapgen.scm b/src/compiler/machines/aarch64/lapgen.scm index 8c7354dbd..c7e142761 100644 --- a/src/compiler/machines/aarch64/lapgen.scm +++ b/src/compiler/machines/aarch64/lapgen.scm @@ -382,12 +382,12 @@ USA. (add `(&U ,imm))) ((and (zero? (bitwise-and imm (bit-mask 12 0))) (fits-in-unsigned-12? (shift-right imm 12))) - (add `(&U ,imm LSL 12))) + (add `(LSL (&U ,imm) 12))) ((fits-in-unsigned-12? (- imm)) (sub `(&U ,(- imm)))) - ((and (zero? (bitwise-and imm (bit-mask 12 0))) + ((and (zero? (bitwise-and (- imm) (bit-mask 12 0))) (fits-in-unsigned-12? (shift-right (- imm) 12))) - (sub `(&U ,(- imm) LSL 12))) + (sub `(LSL (&U ,(- imm)) 12))) (else (let ((temp (allocate-temporary-register! 'GENERAL))) (LAP ,@(load-unsigned-immediate temp imm) -- 2.25.1