svm: Stub out bogus rtl:constant-cost copied from i386.
authorMatt Birkholz <matt@birchwood-abbey.net>
Tue, 31 Jan 2017 00:26:39 +0000 (17:26 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Tue, 31 Jan 2017 00:26:39 +0000 (17:26 -0700)
src/compiler/machines/svm/machine.scm

index 8555c509a020a1a9f1a49cb624a2f8d9815820e0..2bfea551dc5565a241c792b0ba9284e412e51d70 100644 (file)
@@ -473,45 +473,8 @@ USA.
      (error "No such interpreter register" locative))))
 \f
 (define (rtl:constant-cost expression)
-  (let ((if-integer
-        (lambda (value)
-          value
-          ;; Can this be done in fewer bytes for suitably small values?
-          1))                          ; MOV immediate
-       (get-pc-cost
-        (+ 3                           ; CALL
-           4))                         ; POP
-       (based-reference-cost
-        1)                             ; MOV r/m
-       (address-offset-cost
-        1))                            ; LEA instruction
-
-    (define (if-synthesized-constant type datum)
-      (if-integer (make-non-pointer-literal type datum)))
-
-    (case (rtl:expression-type expression)
-      ((CONSTANT)
-       (let ((value (rtl:constant-value expression)))
-        (if (object-non-pointer? value)
-            (if-synthesized-constant (object-type value) (object-datum value))
-            (+ get-pc-cost based-reference-cost))))
-      ((MACHINE-CONSTANT)
-       (if-integer (rtl:machine-constant-value expression)))
-      ((ENTRY:PROCEDURE ENTRY:CONTINUATION)
-       (+ get-pc-cost address-offset-cost))
-      ((ASSIGNMENT-CACHE VARIABLE-CACHE)
-       (+ get-pc-cost based-reference-cost))
-      ((OFFSET-ADDRESS BYTE-OFFSET-ADDRESS FLOAT-OFFSET-ADDRESS)
-       address-offset-cost)
-      ((CONS-POINTER)
-       (and (rtl:machine-constant? (rtl:cons-pointer-type expression))
-           (rtl:machine-constant? (rtl:cons-pointer-datum expression))
-           (if-synthesized-constant
-            (rtl:machine-constant-value (rtl:cons-pointer-type expression))
-            (rtl:machine-constant-value
-             (rtl:cons-pointer-datum expression)))))
-      (else
-       #f))))
+  expression                           ; ignored
+  1)
 
 (define compiler:open-code-floating-point-arithmetic?
   #t)