From 188b23bade620afc6be386973e45ce77a5999d0f Mon Sep 17 00:00:00 2001 From: George Koehler Date: Tue, 24 Jan 2017 11:26:35 -0500 Subject: [PATCH] Add constraints for pat lab, as done in the m68020 table. 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mach/powerpc/ncg/table b/mach/powerpc/ncg/table index 4deceefe8..d42eb27eb 100644 --- a/mach/powerpc/ncg/table +++ b/mach/powerpc/ncg/table @@ -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