On Tue, Jul 08, 2014 at 09:59:33PM -0700, Richard Henderson wrote: > On 07/08/2014 01:20 PM, Al Viro wrote: > > Aha... So you've caught that one already... I've looked at your branch; > > AFAICS, the only thing missing there is treating stores to FPCR.DNOD in > > system mode as "not implemented" (which it is in the code as well as in > > 21[0-3]64 hardware). > > Is it loaded and stored on 21264, or it is read-as-zero/write-ignore?
RAZ, and the same on 21364 if Compaq manual for compiler-writers is to be believed. On 21264 bits 48..62 are writable, bit 63 is disjunction of bits 52..57 (stores are ignored), bits 0..47 are RAZ. AARM requires RAZ bits 0..46 and RAZ on everything optional that is unimplemented. IOW, DNOD is unimplemented there, all other optional ones are implemented. And according to https://archive.org/details/dec-comp_guide_v2 21364 doesn't implement DNOD either... > Is UNDZ not required to be paired with DNOD? There are 4 bits having some relation to handling of denorms. DNZ and DNOD are about denorm inputs; UNDZ and UNFD - about denorm output. All of them have effect only for IEEE insns with /S in trap suffix. Rules: * if DNZ, denorm inputs are silently replaced with zero. * if !DNZ && !DNOD, denorm inputs trigger trap (invalid). Same as what would happen without /S. * if !DNZ && DNOD, perform operation on denorm(s). And I would like to play with whatever you are using to bring hardware from alternative universes. * if !UNFD, denorm output triggers trap (underflow). Same as what would happen without /S. * if UNFD && UNDZ, denorm output is replaced with zero. * if UNFD && !UNDZ, denorm output remains as is. So env->fpcr_flush_to_zero = env->fpcr_dnod & env->fpcr_undz; is another bug - needs s/dnod/unfd/ there...