Tell the NCG that XOR foo, foo does *not* read foo
authorwolfgang.thaller@gmx.net <unknown>
Thu, 7 Dec 2006 13:17:21 +0000 (13:17 +0000)
committerwolfgang.thaller@gmx.net <unknown>
Thu, 7 Dec 2006 13:17:21 +0000 (13:17 +0000)
commitbbb0e7f311398fcdca3aee729fb2419a8d95dc1a
treefd22df264e215cb0239155e1a3f04c33cbf6f343
parent28c556a5e0ed5c2687f19ec6ef8853b79ad65518
Tell the NCG that XOR foo, foo does *not* read foo

On x86[-64], MachCodeGen uses the old XOR trick to zero a register.
This patch makes regUsage not list the register as an input in this
case.
Listing the register as an input for the instruction could make it
appear like an unitialised value, which is bad because unitialised
values can cause the register allocator to panic (at least in the
presence of a loop).
compiler/nativeGen/RegAllocInfo.hs