This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: powerpc-linux cross-compiler. unknown register name `st(1)' in `asm'


I think that you are looking at i386 source code rather than PowerPC source (ax and st(1)
are i80x86 registers, and u and t are i80387 register constraints).

Brendan Simon wrote:

> Kai Ruottu wrote:
>
> >  The 'ld.so.1' may be a script, where the '/lib/libc.so' or '/lib/libc.a' is
> > named. Just edit it...
> >
> >  The mips-linux and m68k-linux 'dynamic-linker' files are text scripts,
> > probably the powerpc-linux too... If it is, just edit it... Otherwise there is
> > a real problem to be solved ;-(
>
> Yep.  libc.so is a script but libc.a is a binary.  I changed "GROUP ( /lib/libc.so.6
> /usr/lib/libc_nonshared.a )" to "GROUP ( /usr/local/egcs/powerpc-linux/lib/libc.so.6
> /usr/local/egcs/powerpc-linux/lib/libc_nonshared.a )" and this fixed the linking
> problem.
>
> Now I get a unrecognised registers in the __math.h header file.
>
> /usr/local/src/gnu-tools/build-egcs-1.1.2/gcc/xgcc
> -B/usr/local/src/gnu-tools/build-egcs-1.1.2/gcc/ -c -DHAVE_CONFIG_H -g -O2 -I.
> -I../../.././tools/egcs-1.1.2/libiberty/../include
> ../../.././tools/egcs-1.1.2/libiberty/floatformat.c
> /usr/local/egcs/powerpc-linux/sys-include/__math.h: In function `atan2':
> In file included from /usr/local/egcs/powerpc-linux/sys-include/math.h:208,
>                  from ../../.././tools/egcs-1.1.2/libiberty/floatformat.c:21:
> /usr/local/egcs/powerpc-linux/sys-include/__math.h:142: unknown register name `st(1)'
> in `asm'
> /usr/local/egcs/powerpc-linux/sys-include/__math.h: In function `fmod':
> /usr/local/egcs/powerpc-linux/sys-include/__math.h:275: unknown register name `ax' in
> `asm'
> /usr/local/egcs/powerpc-linux/sys-include/__math.h: In function `drem':
> /usr/local/egcs/powerpc-linux/sys-include/__math.h:467: unknown register name `ax' in
> `asm'
> /usr/local/egcs/powerpc-linux/sys-include/__math.h: In function
> `floatformat_to_double':
> /usr/local/egcs/powerpc-linux/sys-include/__math.h:287: inconsistent operand
> constraints in an `asm'
> /usr/local/egcs/powerpc-linux/sys-include/__math.h:287: inconsistent operand
> constraints in an `asm'
> make[1]: *** [floatformat.o] Error 1
>
> The offending line is the one with the "st(1) in it.
>
> __MATH_INLINE double atan2 (double __y, double __x);
> __MATH_INLINE double
> atan2 (double __y, double __x)
> {
>   register double __value;
>   __asm __volatile__
>     ("fpatan\n\t"
>      : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)");   /* THIS
> IS THE OFFENDING LINE IN __math.h */
>
>   return __value;
> }
>
> I've checked my powerpc book and can not find any floating point instruction "fpatan".
> The compiler does not complain about this though, just that the register st(1) is not
> known.
> Is this a valid powerpc assembler statement ?
> Have I got the right header files (I got the yellowdog linux rpm files) ?
>
> Brendan Simon.

--
Charles-Antoine Gauthier
Research Officer
Software Engineering Group
Institute for Information Technology
National Research Council of Canada
Ottawa, ON, Canada
K1A 0R6


_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]