Date: Thu, 04 Mar 2004 15:14:33 +1000 From: Peter Grehan <grehan@freebsd.org> To: Daniel Eischen <eischen@vigrid.com> Cc: freebsd-threads@freebsd.org Subject: Re: User-space context switch and floating-point Message-ID: <4046BB39.9050608@freebsd.org> In-Reply-To: <Pine.GSO.4.10.10403032332380.22172-100000@pcnet5.pcnet.com>
index | next in thread | previous in thread | raw e-mail
> how do you generate code that does: > > double x, y; > > ... > x = y * 1.5 * sqrt(2.25) - 3.15 + pthread_mutex_lock(&m) + 1.25; Substitute integers for float and it's exactly the same problem and handled in the same way: the caller saves registers it is using for intermediate results prior to the mutex_lock and restores them on return according to the calling convention. > I don't know anything about PPC... It's generic RISC, similar to Alpha in terms of register usage. That's what made me wonder about not saving FP state in the Alpha code, but I now think that's a requirement if there are 2 or more threads using FP. That will be a big performance hit as per my routine comments so I'll do some experiments to see how severe it is and whether it can be alleviated. later, Peter.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4046BB39.9050608>
