Question about how to re-initialize call_used registers via init_regs()
Wed Dec 3 22:10:00 GMT 2008
On Wed, Dec 03, 2008 at 11:15:13AM +0100, Kai Tietz wrote:
> Hi Honza,
> Related to the problem 38366 me and M. Lankhorst (a wine developer), that
> you were right, that the registers %rsi and %rdi aren't saved for callabi
> switching by ms_abi functions calling sysv_abi. This is reasoned by the
> fact that the fndecl based conditional register usage macro (in i386.h)
> calls init_regs (from regclass.c), which resets it back to the standard
> register usage, so this code is somehow meaning less at the moment.
> I tried it by generate a init_regs_after method (like the init_regs in
> regclass.c), which simply does not reset back to the initial register
> usage set, and use it in the OVERRIDE_REGISTER_USAGE. But this seems to
> lead to bootstrap failures on linux64 targets. What way you would suggest
> to solve this problem?
The function specific support that I added when I was working at AMD can change
which registers are used/defined/etc. I would suggest hooking in with the
function specific support, perhaps making ms_abi/sysv_abi internally set to use
a different function specific option internally for the non-default option.
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
More information about the Gcc-patches