Integer moves for fp regs
Jeffrey A Law
law@cygnus.com
Wed Jul 29 16:09:00 GMT 1998
In message < 199807292139.VAA06864@ongaonga.chch.cri.nz >you write:
> Jeffrey A Law writes:
> > I believe it is still necessary if HARD_REGNO_MODE_OK allows floating
> > point registers to hold integer mode values.
>
> Do you know which bits of GCC require this behaviour?
The register allocators & reload. Sorry, hard to be more specific
than that.
The last time I had to work on a problem related to this code was
4 or 5 years ago. Basically gcc decided it was better to hold some
integer value in a floating point register than flushing it to memory
(all the integer regs were already used).
For the target in question (PA) that was normally OK. However for
various reasons we turned off the FPU as we entered the kernel on our
BSD & Mach ports. So when the code stuffed the value into the FP reg
we got a wonderful kernel panic.
We dealt with this by making the FP regs fixed when building the kernel.
> Yes, it does this. However, if HARD_REGNO_MODE_OK allows both
> floating point and integer modes of the same size for a register,
> then caller save will use integer save/restore instructions.
> For most architectures this is of no concern since the representation
> of the bit pattern is not important.
Of course -- if HARD_REGNO_MODE_OK allows it, then caller-save.c knows
no reason why it can't use an integer mode load/store to save/restore
floating point registers.
jeff
More information about the Gcc
mailing list