From: Taylor R Campbell Date: Wed, 23 Jan 2019 07:49:00 +0000 (+0000) Subject: Fix excessive sign bits in uuo link instruction. X-Git-Tag: mit-scheme-pucked-10.1.20~11^2~66^2~27 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=fa51f66ae33b6682c441676bb5c950260f7ceb2a;p=mit-scheme.git Fix excessive sign bits in uuo link instruction. --- diff --git a/src/microcode/cmpintmd/aarch64.c b/src/microcode/cmpintmd/aarch64.c index be1da7d1c..54aa33e5c 100644 --- a/src/microcode/cmpintmd/aarch64.c +++ b/src/microcode/cmpintmd/aarch64.c @@ -280,8 +280,8 @@ write_uuo_insns (insn_t * target, insn_t * iaddr, int pcrel) { unsigned lo12 = (((uintptr_t) to_pc) - (((uintptr_t) to_pg) << 12)); - unsigned pglo2 = (((unsigned long) pgoff) & 3); - unsigned pghi19 = (((unsigned long) pgoff) >> 2); + unsigned pglo2 = (pgoff & 3); + unsigned pghi19 = ((pgoff & 0x001fffff) >> 2); assert (to_pc == ((char *) (to_pg + lo12))); assert (to_pg == (from_pg + (((unsigned long) pghi19 << 2) | pglo2)));