Add constraints for pat lab, as done in the m68020 table.
authorGeorge Koehler <xkernigh@netscape.net>
Tue, 24 Jan 2017 16:26:35 +0000 (11:26 -0500)
committerGeorge Koehler <xkernigh@netscape.net>
Tue, 24 Jan 2017 16:26:35 +0000 (11:26 -0500)
Always use 'kills ALL' when reaching a label, because our registers
and tokens have the wrong values if the program jumps to this label
from somewhere else.

When falling through a label, if the top element is in r3, then
require that the rest of the stack is in the real STACK, not in
registers or tokens.

I'm doing this to be certain that the missing constraints are not
causing bugs.  I did not find any such bug, perhaps because the labels
are usually near other instructions (like conditional branches and
function calls) that stack or kill tokens.

mach/powerpc/ncg/table

index 4deceef..d42eb27 100644 (file)
@@ -1852,12 +1852,14 @@ PATTERNS
 /* Other branching and labelling */
 
        pat lab topeltsize($1)==4 && !fallthrough($1)
+               kills ALL
                gen
                        labeldef $1
                        yields R3
 
        pat lab topeltsize($1)==4 && fallthrough($1)
-               with GPR3
+               with GPR3 STACK
+               kills ALL
                gen
                        labeldef $1
                yields %1