From: Stephen Adams Date: Wed, 8 Mar 1995 14:33:28 +0000 (+0000) Subject: Fixed OFFSET-FITS? to know that LDIL is never assembled as two machine X-Git-Tag: 20090517-FFI~6554 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=81c54a305babf9a5a0a300615a928833110c0ab1;p=mit-scheme.git Fixed OFFSET-FITS? to know that LDIL is never assembled as two machine instructionas an is therefore always acceptable in a delay slot. (The common cases, e.g. LDIL unspecific,2 were not finding their way into the delay slot). --- diff --git a/v8/src/compiler/machines/spectrum/lapopt.scm b/v8/src/compiler/machines/spectrum/lapopt.scm index 9f37f2141..9e8a70fc7 100644 --- a/v8/src/compiler/machines/spectrum/lapopt.scm +++ b/v8/src/compiler/machines/spectrum/lapopt.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: lapopt.scm,v 1.3 1994/12/16 20:15:09 adams Exp $ +$Id: lapopt.scm,v 1.4 1995/03/08 14:33:28 adams Exp $ Copyright (c) 1991-1994 Massachusetts Institute of Technology @@ -290,9 +290,12 @@ MIT in each case. |# (define (offset-fits? offset opcode) (and (number? offset) - (memq opcode '(LDW LDB LDO LDI LDH STW STB STH STWM LDWM - STWS LDWS FLDWS FLDDS FSTWS FSTDS)) - (<= -8192 offset 8191))) + (or (and ;; These opcodes require a small offset otherwise they are + ;; assembled as two instructions. + (memq opcode '(LDW LDB LDO LDI LDH STW STB STH STWM LDWM + STWS LDWS FLDWS FLDDS FSTWS FSTDS)) + (<= -8192 offset 8191)) + (eq? opcode 'LDIL)))) ;;;; Utilities @@ -768,9 +771,9 @@ MIT in each case. |# (walk (cdr instr))))))) (define (find-movable-instr/delay instr instrs) - (let* ((next (find-or-label instrs)) + (let* ((next (find-or-label instrs)) (instr* (and next (car next))) - (next* (and next (find-non-label (cdr next))))) + (next* (and next (find-non-label (cdr next))))) (if (and instr* (call-with-values (lambda () (classify-instruction instr*)) @@ -815,9 +818,9 @@ MIT in each case. |# |# (define (find-movable-instr/load instrs reads writes next**) - (let* ((next (find-or-label instrs)) - (instr (and next (car next))) - (next* (and next (find-non-label (cdr next))))) + (let* ((next (find-or-label instrs)) + (instr (and next (car next))) + (next* (and next (find-non-label (cdr next))))) (if (and instr (not (instr-skips? instr)) (call-with-values