From: Matt Birkholz Date: Wed, 7 Mar 2012 21:28:05 +0000 (-0700) Subject: svm: Save a byte encoding (ea:stack-ref 0). X-Git-Tag: release-9.2.0~276 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=9e637d1f9d27be47d9c9fffe4539f955d86b394f;p=mit-scheme.git svm: Save a byte encoding (ea:stack-ref 0). --- diff --git a/src/compiler/machines/svm/machine.scm b/src/compiler/machines/svm/machine.scm index 146070529..976d1054b 100644 --- a/src/compiler/machines/svm/machine.scm +++ b/src/compiler/machines/svm/machine.scm @@ -222,7 +222,10 @@ USA. (ea:pre-decrement rref:stack-pointer 'WORD)) (define (ea:stack-ref index) - (ea:offset rref:stack-pointer index 'WORD)) + (guarantee-non-negative-fixnum index 'ea:stack-ref) + (if (zero? index) + (ea:indirect rref:stack-pointer) + (ea:offset rref:stack-pointer index 'WORD))) (define (ea:alloc-word) (ea:post-increment rref:free-pointer 'WORD))