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.
This commit is contained in:
parent
bb67dbeb11
commit
188b23bade
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue