From b7d2651050ef755a50d02fba0eac15d40fa0b253 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Wed, 28 Nov 2018 03:45:16 +0000 Subject: [PATCH] Teach rtlgen to open-code flo:safe-negative? too. Disabled on all machines for now. --- src/compiler/machines/C/machin.scm | 3 ++- src/compiler/machines/i386/machin.scm | 3 ++- src/compiler/machines/svm/machine.scm | 3 ++- src/compiler/machines/x86-64/machin.scm | 3 ++- src/compiler/rtlgen/opncod.scm | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/compiler/machines/C/machin.scm b/src/compiler/machines/C/machin.scm index ba76d135c..bbb68bf81 100644 --- a/src/compiler/machines/C/machin.scm +++ b/src/compiler/machines/C/machin.scm @@ -305,4 +305,5 @@ USA. VECTOR-CONS STRING-ALLOCATE FLOATING-VECTOR-CONS FLONUM-IS-LESS? FLONUM-IS-LESS-OR-EQUAL? FLONUM-IS-GREATER? FLONUM-IS-GREATER-OR-EQUAL? - FLONUM-IS-LESS-OR-GREATER? FLONUM-IS-UNORDERED?)) \ No newline at end of file + FLONUM-IS-LESS-OR-GREATER? FLONUM-IS-UNORDERED? + FLONUM-IS-NEGATIVE?)) \ No newline at end of file diff --git a/src/compiler/machines/i386/machin.scm b/src/compiler/machines/i386/machin.scm index 10d5faeea..703fdcd67 100644 --- a/src/compiler/machines/i386/machin.scm +++ b/src/compiler/machines/i386/machin.scm @@ -358,4 +358,5 @@ USA. VECTOR-CONS STRING-ALLOCATE FLOATING-VECTOR-CONS FLONUM-IS-LESS? FLONUM-IS-LESS-OR-EQUAL? FLONUM-IS-GREATER? FLONUM-IS-GREATER-OR-EQUAL? - FLONUM-IS-LESS-OR-GREATER? FLONUM-IS-UNORDERED?)) \ No newline at end of file + FLONUM-IS-LESS-OR-GREATER? FLONUM-IS-UNORDERED? + FLONUM-IS-NEGATIVE?)) \ No newline at end of file diff --git a/src/compiler/machines/svm/machine.scm b/src/compiler/machines/svm/machine.scm index f996e28f7..0a429640d 100644 --- a/src/compiler/machines/svm/machine.scm +++ b/src/compiler/machines/svm/machine.scm @@ -488,7 +488,8 @@ USA. VECTOR-CONS STRING-ALLOCATE FLOATING-VECTOR-CONS FLONUM-IS-LESS? FLONUM-IS-LESS-OR-EQUAL? FLONUM-IS-GREATER? FLONUM-IS-GREATER-OR-EQUAL? - FLONUM-IS-LESS-OR-GREATER? FLONUM-IS-UNORDERED?)) + FLONUM-IS-LESS-OR-GREATER? FLONUM-IS-UNORDERED? + FLONUM-IS-NEGATIVE?)) ;;;; Closure format diff --git a/src/compiler/machines/x86-64/machin.scm b/src/compiler/machines/x86-64/machin.scm index 3c2a7874c..a6c44a36b 100644 --- a/src/compiler/machines/x86-64/machin.scm +++ b/src/compiler/machines/x86-64/machin.scm @@ -420,4 +420,5 @@ USA. FLONUM-TAN FLONUM-TRUNCATE GCD-FIXNUM STRING-ALLOCATE VECTOR-CONS FLONUM-IS-LESS? FLONUM-IS-LESS-OR-EQUAL? FLONUM-IS-GREATER? FLONUM-IS-GREATER-OR-EQUAL? - FLONUM-IS-LESS-OR-GREATER? FLONUM-IS-UNORDERED?)) \ No newline at end of file + FLONUM-IS-LESS-OR-GREATER? FLONUM-IS-UNORDERED? + FLONUM-IS-NEGATIVE?)) \ No newline at end of file diff --git a/src/compiler/rtlgen/opncod.scm b/src/compiler/rtlgen/opncod.scm index 90e475e49..745c069e8 100644 --- a/src/compiler/rtlgen/opncod.scm +++ b/src/compiler/rtlgen/opncod.scm @@ -1554,7 +1554,7 @@ USA. expressions))) '(0) internal-close-coding-for-type-checks))) - '(FLONUM-ZERO? FLONUM-POSITIVE? FLONUM-NEGATIVE?)) + '(FLONUM-ZERO? FLONUM-POSITIVE? FLONUM-NEGATIVE? FLONUM-IS-NEGATIVE?)) (for-each (lambda (flonum-pred) -- 2.25.1