From: Taylor R Campbell Date: Fri, 1 Feb 2019 05:29:29 +0000 (+0000) Subject: Comment out bogus ADRP-ADD pseudo-instruction definition. X-Git-Tag: mit-scheme-pucked-10.1.20~11^2~66^2~15 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=3bdab315ad39bdd86470a23c12d8a3588c68cc04;p=mit-scheme.git Comment out bogus ADRP-ADD pseudo-instruction definition. This will cause the compiler to fail noisily if it tries to assemble code with sufficiently distant PC-relative addresses, which is better than silently assembling garbage. Need to find a proper fix. --- diff --git a/src/compiler/machines/aarch64/instr1.scm b/src/compiler/machines/aarch64/instr1.scm index f55a1ad5e..995d86cde 100644 --- a/src/compiler/machines/aarch64/instr1.scm +++ b/src/compiler/machines/aarch64/instr1.scm @@ -1305,7 +1305,12 @@ USA. ;; page-aligned), or we need to generate extra code to find and add PC ;; mod 2^12, which looks like it'll require another temporary register. ;; Ugh! +;; +;; The way that assemblers usually get around this is either by always +;; relying on relocations or by always aligning code on page boundaries +;; so that we know PC mod 2^12 anyway. +#; (define-instruction ADRP-ADD ((X (? Rd) (@PCO (? offset signed-33))) (MACRO 32 (ADRP X ,Rd (@PCO (LSL ,(shift-right offset 12) 12)))) ;(*)