From: Taylor R Campbell Date: Tue, 15 Jan 2019 17:27:45 +0000 (+0000) Subject: Fix add/sub immediate syntax and criterion. X-Git-Tag: mit-scheme-pucked-10.1.20~11^2~66^2~78 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=2ad438132edb04c0c8d5d546405336899bf78607;p=mit-scheme.git Fix add/sub immediate syntax and criterion. --- 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)