From f206f4fa33916b4acef6e355c9e3cb92f849b9eb Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Wed, 5 Dec 2018 05:56:55 +0000 Subject: [PATCH] x86 push can take a memory reference operand. Conveniently, it evaluates rsp before modifying it too. Shaves about 1% off the runtime. --- src/compiler/machines/x86-64/rules1.scm | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.25.1