From 8461452386037343cb4fec4b48ddd2df84be4372 Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Sun, 5 Aug 1990 05:41:27 +0000 Subject: [PATCH] Add PCR-HOOK pseudo-op for the closure creation code. --- v7/src/compiler/machines/spectrum/instr2.scm | 55 +++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/v7/src/compiler/machines/spectrum/instr2.scm b/v7/src/compiler/machines/spectrum/instr2.scm index 041cfde12..db0b52a06 100644 --- a/v7/src/compiler/machines/spectrum/instr2.scm +++ b/v7/src/compiler/machines/spectrum/instr2.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/instr2.scm,v 1.2 1990/04/09 21:21:01 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/instr2.scm,v 1.3 1990/08/05 05:41:27 jinx Rel $ Copyright (c) 1987, 1989, 1990 Massachusetts Institute of Technology @@ -628,4 +628,55 @@ branch-extend-nullify in instr1. ((() (? format-word) (@PCO (? offset))) (LONG (16 format-word UNSIGNED) - (16 offset UNSIGNED)))) \ No newline at end of file + (16 offset UNSIGNED)))) + +(define-instruction PCR-HOOK + ((() (? target) + (OFFSET (? offset) (? space sr3) (? base)) + (@PCR (? label))) + (VARIABLE-WIDTH + (disp `(- ,label (+ *PC* 8))) + ((#x-2000 #x1FFF) + (LONG + ;; (BLE () (OFFSET ,offset ,space ,base)) + (6 #x39) + (5 base) + (5 offset ASSEMBLE17:X) + (3 space) + (11 offset ASSEMBLE17:Y) + (1 0) + (1 offset ASSEMBLE17:Z) + ;; (LDO () (OFFSET ,disp 0 31) ,target) + (6 #x0D) + (5 31) + (5 target) + (2 #b00) + (14 disp RIGHT-SIGNED))) + ((() ()) + (LONG + ;; (LDIL () L$disp-8 target) + (6 #x08) + (5 1) + (21 (quotient (- disp 8) #x800) ASSEMBLE21:X) + ;; (LDO () (OFFSET R$disp-4 0 1) target) + (6 #x0D) + (5 1) + (5 1) + (2 #b00) + (14 (remainder (- disp 8) #x800) RIGHT-SIGNED) + ;; (BLE () (OFFSET ,offset ,space ,base)) + (6 #x39) + (5 base) + (5 offset ASSEMBLE17:X) + (3 space) + (11 offset ASSEMBLE17:Y) + (1 0) + (1 offset ASSEMBLE17:Z) + ;; (ADD () 31 1 target) + (6 #x02) + (5 31) + (5 1) + (3 0) + (1 0) + (7 #x30) + (5 target)))))) \ No newline at end of file -- 2.25.1