From: Guillermo J. Rozas Date: Thu, 9 Aug 1990 04:24:20 +0000 (+0000) Subject: Fix bug in STORE_ABSOLUTE_ADDRESS by which large addresses in the X-Git-Tag: 20090517-FFI~11268 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b9ca94e9b00d1cf28e71dae596321923d9fe5084;p=mit-scheme.git Fix bug in STORE_ABSOLUTE_ADDRESS by which large addresses in the 26-bit range where being relocated incorrectly on band-load. --- diff --git a/v7/src/microcode/cmpintmd/mips.h b/v7/src/microcode/cmpintmd/mips.h index 4377e5151..adcee9c3e 100644 --- a/v7/src/microcode/cmpintmd/mips.h +++ b/v7/src/microcode/cmpintmd/mips.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/mips.h,v 1.4 1990/07/30 16:20:26 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/mips.h,v 1.5 1990/08/09 04:24:20 jinx Exp $ Copyright (c) 1989, 1990 Massachusetts Institute of Technology @@ -115,16 +115,20 @@ typedef unsigned short format_word; #define JAL_INSTR(dest) (JAL_OP | ((dest) >> 2)) #define STORE_ABSOLUTE_ADDRESS(entry_point, address) \ -{ unsigned long *addr, ep; \ +{ \ + unsigned long *addr, ep; \ \ ep = ((unsigned long) (entry_point)); \ addr = ((unsigned long *) (address)); \ - if (((((long) addr) & 0xF0000000) != \ - (((long) entry_point) & 0xF0000000)) || \ - ((((long) addr) & 0x3) != 0)) \ - printf("\nSTORE_ABSOLUTE_ADDRESS: Bad addr in JAL 0x%x, 0x%x\n", \ - addr, ep); \ - *addr = JAL_INSTR(ep & 0x0FFFFFF); \ + if (((((long) addr) & 0xF0000000) \ + != (((long) entry_point) & 0xF0000000)) \ + || ((((long) addr) & 0x3) != 0)) \ + { \ + fprintf (stderr, \ + "\nSTORE_ABSOLUTE_ADDRESS: Bad addr in JAL 0x%x, 0x%x\n", \ + addr, ep); \ + } \ + *addr = JAL_INSTR (ep & 0x0FFFFFFF); \ } /* Compiled Code Register Conventions */