On 9/11/25 11:14 PM, Max Filippov wrote:
Hi Suwa-san,

On Thu, Sep 11, 2025 at 1:48 PM Takayuki 'January June' Suwa
<jjsuwa_sys3...@yahoo.co.jp> wrote:

If the Floating-Point Coprocessor option is configured and there are no
floating-point coprocessor instructions in the function, the unused
floating-point registers (f0 thru f15) can be good targets for spilling
address (integer) registers.

For reference, the ISA manual says that [RW]FR machine instructions have
non-arithmetic behavior and do not raise floating-point exceptions.

They don't raise floating-point exceptions, but they would still raise
the "coprocessor disabled" exception if the FP coprocessor is disabled.
Also all the conditions that you mentioned may be satisfied in the linux
kernel code, yet it shouldn't clobber the FP registers.
Also note that it's common for moves that cross functional units to have extra penalties which often negate any benefit from avoiding the memory load/store if you'd spilled the GPR into memory.

I'd strongly suggest benchmarking this before installing.

jeff

Reply via email to