Add missing rule.
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Thu, 26 Aug 1993 18:00:26 +0000 (18:00 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Thu, 26 Aug 1993 18:00:26 +0000 (18:00 +0000)
v7/src/compiler/machines/i386/rules2.scm

index f74fd11e9db8eea799b10055dbb2b85c6eaaf933..f52a3705a7c450869d7340d16c59302e09565a49 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: rules2.scm,v 1.6 1993/07/16 19:27:54 gjr Exp $
+$Id: rules2.scm,v 1.7 1993/08/26 18:00:26 gjr Exp $
 
 Copyright (c) 1992-1993 Massachusetts Institute of Technology
 
@@ -93,6 +93,20 @@ MIT in each case. |#
   (LAP (CMP W ,(offset->reference! expression)
            (&U ,(non-pointer->literal constant)))))
 
+(define-rule predicate
+  (EQ-TEST (CONSTANT (? constant-1)) (CONSTANT (? constant-2)))
+  (let ((always-jump
+        (lambda (label)
+          (LAP (JMP (@PCR ,label)))))
+       (always-fall-through
+        (lambda (label)
+          label                        ; ignored
+          (LAP))))
+    (if (eq? constant-1 constant-2)
+       (set-current-branches! always-jump always-fall-through)
+       (set-current-branches! always-fall-through always-jump)))
+  (LAP))
+
 (define-rule predicate
   (EQ-TEST (CONS-POINTER (MACHINE-CONSTANT (? type))
                         (MACHINE-CONSTANT (? datum)))