public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: gcc-2.95.2 problem with target powerpc-eabi
@ 2000-10-26  4:34 David Korn
  2000-10-26  5:40 ` Christoph Hirzel
  0 siblings, 1 reply; 3+ messages in thread
From: David Korn @ 2000-10-26  4:34 UTC (permalink / raw)
  To: 'hirzel@indel.ch', gcc-help

>From: Christoph Hirzel [ mailto:hirzel@indel.ch ]
>Sent: 26 October 2000 07:45

>There seems to be a problem in copying 64 Bit integers
>or structures with gcc-2.95.2 for target powerpc-eabi.

>	lis 11,u1@ha
>	la 9,u1@l(11)
>	lis 10,u2@ha
>	la 11,u2@l(10)
>	lfd 0,0(11)
>	stfd 0,0(9)
>
>The compiler seems to optimize the copy by using load (lfd)
>and store (stfd) double float instructions.

  Can I enquire *why* this is a problem? I have the impression (stop me
if I'm wrong) that lfd/stfd will do a straight load/store between the
fpregs and memory, without any messing around with rounding or format
conversion or anything like that.

    DaveK
-- 
SEAL Team 6 World Trade Center Serbian Cocaine [Hello to all my fans
in domestic surveillance] cracking KGB nuclear arrangements CIA
counter-intelligence smuggle fissionable ammunition SDI

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: gcc-2.95.2 problem with target powerpc-eabi
  2000-10-26  4:34 gcc-2.95.2 problem with target powerpc-eabi David Korn
@ 2000-10-26  5:40 ` Christoph Hirzel
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hirzel @ 2000-10-26  5:40 UTC (permalink / raw)
  To: David Korn; +Cc: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2019 bytes --]

In our kernel I can create tasks with floating point enabled or
disabled. If I don't need floating numbers in a task I disable them
to improve task switches (much faster because the kernel doesn't
have to save/restore the 32 floating point registers of the PPC603).
So my problem is if I work with 64 Bit integers or stuctures in a
task with floating support disabled this task stops with a floating
point exception.

Christoph

-----Ursprüngliche Nachricht-----
Von: David Korn [ mailto:dkorn@pixelpower.com ]
Gesendet: Donnerstag, 26. Oktober 2000 13:29
An: 'hirzel@indel.ch'; gcc-help@gcc.gnu.org
Betreff: RE: gcc-2.95.2 problem with target powerpc-eabi


>From: Christoph Hirzel [ mailto:hirzel@indel.ch ]
>Sent: 26 October 2000 07:45

>There seems to be a problem in copying 64 Bit integers
>or structures with gcc-2.95.2 for target powerpc-eabi.

>	lis 11,u1@ha
>	la 9,u1@l(11)
>	lis 10,u2@ha
>	la 11,u2@l(10)
>	lfd 0,0(11)
>	stfd 0,0(9)
>
>The compiler seems to optimize the copy by using load (lfd)
>and store (stfd) double float instructions.

  Can I enquire *why* this is a problem? I have the impression (stop me
if I'm wrong) that lfd/stfd will do a straight load/store between the
fpregs and memory, without any messing around with rounding or format
conversion or anything like that.

      DaveK
--
SEAL Team 6 World Trade Center Serbian Cocaine [Hello to all my fans
in domestic surveillance] cracking KGB nuclear arrangements CIA
counter-intelligence smuggle fissionable ammunition SDI


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


^ permalink raw reply	[flat|nested] 3+ messages in thread

* gcc-2.95.2 problem with target powerpc-eabi
@ 2000-10-25 23:42 Christoph Hirzel
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hirzel @ 2000-10-25 23:42 UTC (permalink / raw)
  To: gcc-help

Hi

There seems to be a problem in copying 64 Bit integers
or structures with gcc-2.95.2 for target powerpc-eabi.
If I compile the following code for a PowerPC 603
(option -mcpu=603)

unsigned long long u1;
unsigned long long u2;

void Test()
{
	u1 = u2;
}

the compiler generates the following assembler code

	lis 11,u1@ha
	la 9,u1@l(11)
	lis 10,u2@ha
	la 11,u2@l(10)
	lfd 0,0(11)
	stfd 0,0(9)

The compiler seems to optimize the copy by using load (lfd)
and store (stfd) double float instructions.

Now my question. How can I avoid this, without using the
compiler option -msoft-float ? 
I think it should be possible if I make some adjustmenst
in the rs6000.md /.c /.h files and then rebuild the compiler.

Has anybody any experience in doing this ?

Thanks

Christoph Hirzel
Tuefiwies 26
CH-8332 Russikon
Switzerland


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-10-26  5:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-26  4:34 gcc-2.95.2 problem with target powerpc-eabi David Korn
2000-10-26  5:40 ` Christoph Hirzel
  -- strict thread matches above, loose matches on Subject: below --
2000-10-25 23:42 Christoph Hirzel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).