qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [patch] target-alpha: squashed fpu qualifiers patch


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [patch] target-alpha: squashed fpu qualifiers patch
Date: Mon, 28 Dec 2009 20:52:28 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Mon, Dec 28, 2009 at 08:48:22PM +0100, Aurelien Jarno wrote:
> On Mon, Dec 28, 2009 at 11:06:20AM -0800, Richard Henderson wrote:
> > On 12/24/2009 07:18 AM, Aurelien Jarno wrote:
> >> My main concern about this patch is that I don't really understand why
> >> the current fp exceptions, the current rounding mode or flush_to_zero
> >> mode are stored in FP_STATUS. I think it would be better to have
> >> dedicated variable(s) in the cpu state structure, as it is done in other
> >> emulated architectures.
> >
> > The internal format for these features is quite different (in terms of  
> > bit ordering) than the native Alpha format.  If I were to be forcing the  
> > bits back into the Alpha format after each operation, that would be far  
> > more shifting and masking than only doing the conversion to Alpha format  
> > when the FPCR register is read or written.  At present I'm only saving a  
> > value and ORing it back in
> >
> > However, if you're convinced I should keep things in Alpha format all  
> > the time, I can rearrange the patch along those lines.
> >
> 
> If the format is too different, you should still use a dedicated
> variable in the cpu state. Thinking more, there is no guarantee that
> FP_STATUS is not overriden by another thread (or another CPU in system
> mode), if it's value is set in one TB, and read back in another TB.

Forget that part, there is actually one FP_STATUS per CPU, so it should
work. My grep didn't work due to the #define...

> Also there is no need to save FP_STATUS and restore it. It should be set
> to 0, and the result should be ORed with the dedicated variable.
> 
> -- 
> Aurelien Jarno                                GPG: 1024D/F1BCDB73
> address@hidden                 http://www.aurel32.net

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
address@hidden                 http://www.aurel32.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]