From ab61910b93966b92482967ee5a1034613da3d3ad Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Thu, 13 Aug 1987 01:13:28 +0000 Subject: [PATCH] Add displacement coercions. --- v7/src/compiler/machines/vax/coerce.scm | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/v7/src/compiler/machines/vax/coerce.scm b/v7/src/compiler/machines/vax/coerce.scm index 9d1182c1d..685fe3250 100644 --- a/v7/src/compiler/machines/vax/coerce.scm +++ b/v7/src/compiler/machines/vax/coerce.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/vax/coerce.scm,v 1.1 1987/07/28 18:26:43 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/vax/coerce.scm,v 1.2 1987/08/13 01:13:28 jinx Exp $ Copyright (c) 1987 Massachusetts Institute of Technology @@ -55,12 +55,27 @@ MIT in each case. |# ;; If you add coercions here, remember to also add them to ;; EXPAND-DESCRIPTOR in isnmac.scm . +;; Displacements on the vax are counted from the pc of the following syllable. + +(define (coerce-displacement nbits) + (let ((coercion + (cond ((= nbits 8) coerce-8-bit-signed) + ((= nbits 16) coerce-16-bit-signed) + (else (error "coerce-displacement: Bad size" nbits)))) + (offset (/ nbits 8))) + (lambda (expression) + ;; Expression is either (@PCO ) or (@PCR