Allow C argument regs to be used as global regs (R1, R2, etc.)
authorSimon Marlow <simonmar@microsoft.com>
Tue, 28 Feb 2006 15:29:42 +0000 (15:29 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Tue, 28 Feb 2006 15:29:42 +0000 (15:29 +0000)
The problem here was that we generated C calls with expressions
involving R1 etc. as parameters.  When some of the R registers are
also C argument registers, both GCC and the native code generator
generate incorrect code.  The hacky workaround is to assign
problematic arguments to temporaries first; fortunately this works
with both GCC and the NCG, but we have to be careful not to undo this
with later optimisations (see changes to CmmOpt).


No differences found