[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gcc-2.95.2 problem with target powerpc-eabi
From: |
David Edelsohn |
Subject: |
Re: gcc-2.95.2 problem with target powerpc-eabi |
Date: |
27 Oct 2000 18:09:12 -0400 |
>>>>> "Christoph Hirzel" writes:
Christoph> There seems to be a problem in copying 64 Bit integers
Christoph> or structures with gcc-2.95.2 for target powerpc-eabi.
Christoph> If I compile the following code for a PowerPC 603
Christoph> (option -mcpu=3D603)
Christoph> unsigned long long u1;
Christoph> unsigned long long u2;
Christoph> void Test()
Christoph> {
Christoph> u1 =3D u2;
Christoph> }
Christoph> the compiler generates the following assembler code
Christoph> lis 11,address@hidden
Christoph> la 9,address@hidden(11)
Christoph> lis 10,address@hidden
Christoph> la 11,address@hidden(10)
Christoph> lfd 0,0(11)
Christoph> stfd 0,0(9)
Christoph> The compiler seems to optimize the copy by using load (lfd)
Christoph> and store (stfd) double float instructions.
Christoph> Now my question. How can I avoid this, without using the
Christoph> compiler option -msoft-float ?
Christoph> I think it should be possible if I make some adjustmenst
Christoph> in the rs6000.md /.c /.h files and then rebuild the compiler.
Christoph> Has anybody any experience in doing this ?
The current development version of GCC has the behavior you want
due to some other heuristic changes. It is not a trivial change because
GCC needs to be able to store integers in FPRs due to fp conversion. Once
it is allowed, GCC will use it where convenient, like moving a structure
or long long value.
David
--
===============================================================================
David Edelsohn T.J. Watson Research Center
address@hidden P.O. Box 218
+1 914 945 4364 (TL 862) Yorktown Heights, NY 10598