unsigned long long working ?
Sergei Organov
osv at topconrd.ru
Fri Feb 13 09:40:37 UTC 2004
"Feng, Shuchen" <feng at bnl.gov> writes:
> Aaron J. Grier wrote :
>
> > works fine on m68k. (the emitted assembly isn't bad either.) I even do
> > (gasp) bit operations with them, and haven't had troubles with newlib
> > misbehaving either.
>
> Actually it worked fine on my 7455 and 604 PPCs as well. However,
> I experienced the same problem as what Phil Torre described
> about the formatted i/o functions (printf and friends) . The
> workaround is to break down one 'long long' into two
> 'longs' for the printf and friends. I am using
> the newlib-1.11.0. Perhaps you have a newer veriosn ?
Looking at newlib sources, you just need to pass -DWANT_PRINTF_LONG_LONG to
the gcc when building newlib. There are some hosts in newlib/configure.host
that do define this flag.
> Sergei Organov wrote :
> > One thing that could bite you: gcc tends to use floating-point 64 bit
> > registers (when compiles with -fhard-float) to move long longs (as well
> > as any other 64-bit entities) around. This could be a problem in
> > FP-disabled tasks. I use -fstrict-align switch to gcc that prevents gcc
> > from using FP registers from moving anything but floats/doubles. This
> > behavior of the switch is neither documented nor guaranteed, but I don't
> > know any other way to achieve the desired effect.
>
> I think Sergei meant -mstrict-align, not -fstrict-align. Correct ?
> I did not find -fstrict-align in my GCC doc.
Yes, my fault, I meant -mstrict-align.
--
Sergei.
More information about the users
mailing list