From 8a6a3b7e3699b64f8b3e867d4ca3ea2fbc7c971a Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Sat, 24 Aug 2013 15:03:06 -0700 Subject: [PATCH] svm: Add lost flonum-pred-2-args rule. The "new" rule escaped the copying from i386/rulflo.scm(?). Also added symlink src/lib/compiler, useful when debugging a broken build. --- src/Setup.sh | 1 + src/compiler/machines/svm/rules.scm | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/Setup.sh b/src/Setup.sh index 20d9a4958..a184ee99f 100755 --- a/src/Setup.sh +++ b/src/Setup.sh @@ -84,6 +84,7 @@ maybe_link lib/edwin ../edwin maybe_link lib/include ../microcode maybe_link lib/optiondb.scm ../etc/optiondb.scm maybe_link lib/runtime ../runtime +maybe_link lib/compiler ../compiler maybe_link lib/mit-scheme.h ../microcode/pruxffi.h maybe_link lib/ffi ../ffi maybe_link lib/ffi-test-shim.so ../ffi/ffi-test-shim.so diff --git a/src/compiler/machines/svm/rules.scm b/src/compiler/machines/svm/rules.scm index 827c93900..a2543485b 100644 --- a/src/compiler/machines/svm/rules.scm +++ b/src/compiler/machines/svm/rules.scm @@ -460,6 +460,20 @@ USA. (else (error "Unknown flonum predicate:" predicate))) (float-source source1) temp) (inst:load-immediate temp constant))) + +(define-rule predicate + (FLONUM-PRED-2-ARGS (? predicate) + (OBJECT->FLOAT (CONSTANT (? constant))) + (REGISTER (? source))) + (QUALIFIER (flo:flonum? constant)) + (let ((temp (float-temporary))) + (simple-branches! (case predicate + ((FLONUM-EQUAL?) 'EQ) + ((FLONUM-LESS?) 'LT) + ((FLONUM-GREATER?) 'GT) + (else (error "Unknown flonum predicate:" predicate))) + temp (float-source source)) + (inst:load-immediate temp constant))) (define-rule statement (ASSIGN (REGISTER (? target)) -- 2.25.1