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]

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


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.


begin:vcard 
n:Simon;Brendan
tel;cell:+61 3 417 380 984
tel;fax:+61 3 9886 0269
tel;home:+61 3 9561 0817
tel;work:+61 3 9886 0128
x-mozilla-html:TRUE
url:http://www.dgs.monash.edu.au/~brendan
org:Monash University;Digital Systems
version:2.1
email;internet:brendan@dgs.monash.edu.au
title:Embedded Systems Design Engineer
adr;quoted-printable:;;469 Springvale Rd=0D=0A;Glen Waverly;Victoria;3150;Australia
x-mozilla-cpt:;0
fn:Brendan Simon
end:vcard

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