inn on ncg now passes the CPU tests.
authorDavid Given <dg@cowlark.com>
Sun, 20 Nov 2016 18:35:34 +0000 (19:35 +0100)
committerDavid Given <dg@cowlark.com>
Sun, 20 Nov 2016 18:35:34 +0000 (19:35 +0100)
mach/powerpc/ncg/table

index 6f10c7d..77fdaed 100644 (file)
@@ -328,6 +328,7 @@ INSTRUCTIONS
   lhax            GPR:wo, GPR:ro, GPR:ro cost(4, 3).
   lhz             GPR:wo, GPRINDIRECT:ro cost(4, 3).
   lhzx            GPR:wo, GPR:ro, GPR:ro cost(4, 3).
+  li32            GPR:wo, CONST:ro cost(8, 2).
   li32            GPR:wo, LABEL:ro cost(8, 2).
   lwzu            GPR:wo, GPRINDIRECT:ro cost(4, 3).
   lwzx            GPR:wo, GPR:ro, GPR:ro cost(4, 3).
@@ -1637,14 +1638,13 @@ PATTERNS
                        gen
                                bl {LABEL, ".set"}
                        
-       pat inn defined($1)                /* Test for set bit */
-               leaving
-                       set INT32
-                       and INT32
-                       
-       pat inn !defined($1)               /* Test for set bit (variable) */
-               with GPR3 STACK
+       pat inn                            /* Test for set bit */
+               with STACK
+                       kills ALL
+                       uses REG
                        gen
+                               li32 %a, {CONST, $1}
+                               stwu %a, {GPRINDIRECT, SP, 0-4}
                                bl {LABEL, ".inn"}