From: Guillermo J. Rozas Date: Thu, 19 May 1988 01:47:37 +0000 (+0000) Subject: Fix bug in INTERPRETER-REGISTER. It now checks whether the offset is X-Git-Tag: 20090517-FFI~12755 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=0273dc0c34228315a7b4431c458cc58004aef930;p=mit-scheme.git Fix bug in INTERPRETER-REGISTER. It now checks whether the offset is a known offset directly, and if not, it tries the aligned version instead. The bug was noticed because interpreter entries are 6 bytes long, so only half of them are aligned, and the others were not found. --- diff --git a/v7/src/compiler/machines/bobcat/dassm2.scm b/v7/src/compiler/machines/bobcat/dassm2.scm index fcc0f56e3..aa5340b6e 100644 --- a/v7/src/compiler/machines/bobcat/dassm2.scm +++ b/v7/src/compiler/machines/bobcat/dassm2.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/dassm2.scm,v 4.5 1988/05/14 16:19:24 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/dassm2.scm,v 4.6 1988/05/19 01:47:37 jinx Exp $ Copyright (c) 1987 Massachusetts Institute of Technology @@ -229,14 +229,15 @@ MIT in each case. |# (else false)))) (define (interpreter-register register offset) - (with-aligned-offset offset - (lambda (word-offset residue) - (and (= register interpreter-register-pointer) - (let ((entry (assq word-offset interpreter-register-assignments))) - (and entry - (if (= residue 0) - (cdr entry) - `(,@(cdr entry) (,residue))))))))) + (and (= register interpreter-register-pointer) + (let ((entry (assq offset interpreter-register-assignments))) + (if entry + (cdr entry) + (let ((entry (assq word-offset interpreter-register-assignments))) + (and entry + (if (= residue 0) + (cdr entry) + `(,@(cdr entry) (,residue))))))))) (define (with-aligned-offset offset receiver) (let ((q/r (integer-divide offset 4)))