From 3bdab315ad39bdd86470a23c12d8a3588c68cc04 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Fri, 1 Feb 2019 05:29:29 +0000 Subject: [PATCH] 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. --- src/compiler/machines/aarch64/instr1.scm | 5 +++++ 1 file changed, 5 insertions(+) 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)))) ;(*) -- 2.25.1