From: Taylor R Campbell Date: Wed, 5 Dec 2018 05:56:55 +0000 (+0000) Subject: x86 push can take a memory reference operand. X-Git-Tag: mit-scheme-pucked-10.1.7~3^2~48 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=f206f4fa33916b4acef6e355c9e3cb92f849b9eb;p=mit-scheme.git x86 push can take a memory reference operand. Conveniently, it evaluates rsp before modifying it too. Shaves about 1% off the runtime. --- diff --git a/src/compiler/machines/x86-64/rules1.scm b/src/compiler/machines/x86-64/rules1.scm index 787d50243..09a02bea7 100644 --- a/src/compiler/machines/x86-64/rules1.scm +++ b/src/compiler/machines/x86-64/rules1.scm @@ -285,6 +285,10 @@ USA. (with-unsigned-immediate-operand (make-non-pointer-literal type datum) (lambda (operand) (LAP (PUSH Q ,operand))))) + +(define-rule statement + (ASSIGN (PRE-INCREMENT (REGISTER 4) -1) (? expression rtl:simple-offset?)) + (LAP (PUSH Q ,(offset->reference! expression)))) ;;;; CHAR->ASCII/BYTE-OFFSET