On Tue, Nov 30, 2010 at 11:15:56AM +0000, Peter Maydell wrote: > On 29 November 2010 19:54, Nathan Froyd <froy...@codesourcery.com> wrote: > > Yes, this is ugly. Are you up for running: > > > > perl -p -i -e 's/float(\d+)_is_nan/float\1_is_quiet_nan/g' target-*/*.c > > > > (and also carefully in fpu/*) or similar and moving the bit-twiddling > > float_is_nan into fpu/? > > I'm just compiling this up now. While I was eyeballing the results of > the substitution, I noticed that there are some places which are almost > certainly bugs introduced by other people not noticing that float*_is_nan() > doesn't do what it says on the tin. Three at random: > > In target-ppc/op_helper.c:helper_compute_fprf(): > > In target-alpha/op_helper.c:helper_cmptun(): > > In target-m68k/helper.c:sub_cmp_f64: > > judging from the comments the author expected is_nan() to > be true for all NaNs. > > I'm not sure what we should do about these -- they look wrong > but I don't have any of the setup to actually test whether they're > wrong.
RTH (CC'd) is the expert on the Alpha bits. The PPC one is obviously wrong. I can test the m68k one. In any event, I think the safest course is to do the simple renaming; we can clean up broken bits after the fact. -Nathan