PPC64 Compiler bug !!

Randy Swanberg rswanber at us.ibm.com
Tue Jun 17 05:41:39 EST 2003


>> AIX does lazy floating point save/restore, though perhaps not in the
>> same way as Linux.  So the behavior of a program (in AIX) that uses
>> fprs for temp registers depends on the fp usage of other programs
>> running on that CPU.
>
>We do that on UP. On SMP the potential cost and complexity of sending
>an IPI to unlazy the FPU when your process changes cpus is considered
>too great to bother.
>
>Anyway if AIX is using some form of lazy fp save/restore then it casts
>the gcc optimisation into further doubt.

AIX is only "somewhat" lazy on SMP.  FP use by kernel or kernel
extensions is strictly forbidden (will crash).  So, a thread can
enter/exit the kernel multiple times (syscalls, interrupts) without
any FP save/restore.  However, on a thread context switch (in SMP)
the FPRs are saved (provided the thread had used them) but not
explicitly restored.  The next time that thread is dispatched,
its first reference to the FP unit will cause its FP state to be
restored.

Randy

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list