public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/14406] New: rs6000 abstf2 is broken
@ 2004-03-03 13:53 amodra at bigpond dot net dot au
  2004-03-03 13:56 ` [Bug target/14406] " amodra at bigpond dot net dot au
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-03-03 13:53 UTC (permalink / raw)
  To: gcc-bugs

The following demonstrates an error in the rs6000 abstf2 pattern.
The IBM extended double format uses a sum of two doubles to represent a long
double.  The first double is required to be the closest double to the long
double value, which implies that the second double may be of opposite sign to
the first.  

#include <stdio.h>

long double x = 0x1.FFFFFFFFFFFFF8P0L;

int main (void)
{
  long double y = __builtin_fabsl (x);
  union { long double ld; double d[2]; unsigned int x[4]; } u;

  u.ld = x;
  printf ("%e %e\n", u.d[0], u.d[1]);
  printf ("%08x %08x %08x %08x\n", u.x[0], u.x[1], u.x[2], u.x[3]);

  u.ld = y;
  printf ("%e %e\n", u.d[0], u.d[1]);
  printf ("%08x %08x %08x %08x\n", u.x[0], u.x[1], u.x[2], u.x[3]);
  return 0;
}

$ gcc/xgcc -Bgcc/ -O1 -mlong-double-128 /src/tmp/fabs.c
$ ./a.out
2.000000e+00 -1.110223e-16
40000000 00000000 bca00000 00000000
2.000000e+00 1.110223e-16
40000000 00000000 3ca00000 00000000

-- 
           Summary: rs6000 abstf2 is broken
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: amodra at bigpond dot net dot au
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc64-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14406


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

* [Bug target/14406] rs6000 abstf2 is broken
  2004-03-03 13:53 [Bug target/14406] New: rs6000 abstf2 is broken amodra at bigpond dot net dot au
@ 2004-03-03 13:56 ` amodra at bigpond dot net dot au
  2004-03-03 16:23 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-03-03 13:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-03-03 13:56 -------
Working on a patch

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
      Known to fail|                            |3.3.3 3.4.0 3.5.0
   Last reconfirmed|0000-00-00 00:00:00         |2004-03-03 13:56:01
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14406


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

* [Bug target/14406] rs6000 abstf2 is broken
  2004-03-03 13:53 [Bug target/14406] New: rs6000 abstf2 is broken amodra at bigpond dot net dot au
  2004-03-03 13:56 ` [Bug target/14406] " amodra at bigpond dot net dot au
@ 2004-03-03 16:23 ` pinskia at gcc dot gnu dot org
  2004-03-04  9:26 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-03 16:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-03 16:23 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-03/msg00275.html>.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14406


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

* [Bug target/14406] rs6000 abstf2 is broken
  2004-03-03 13:53 [Bug target/14406] New: rs6000 abstf2 is broken amodra at bigpond dot net dot au
  2004-03-03 13:56 ` [Bug target/14406] " amodra at bigpond dot net dot au
  2004-03-03 16:23 ` pinskia at gcc dot gnu dot org
@ 2004-03-04  9:26 ` cvs-commit at gcc dot gnu dot org
  2004-03-04  9:54 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-04  9:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-04 09:26 -------
Subject: Bug 14406

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	amodra@gcc.gnu.org	2004-03-04 09:26:46

Modified files:
	gcc            : ChangeLog 
	gcc/config/rs6000: rs6000.md 

Log message:
	PR target/14406
	* config/rs6000/rs6000.md (abstf2, abstf2+1): Delete define_insn.
	(abstf2, abstf2_internal): New define_expand.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3032&r2=2.3033
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&r1=1.296&r2=1.297



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14406


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

* [Bug target/14406] rs6000 abstf2 is broken
  2004-03-03 13:53 [Bug target/14406] New: rs6000 abstf2 is broken amodra at bigpond dot net dot au
                   ` (2 preceding siblings ...)
  2004-03-04  9:26 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-04  9:54 ` cvs-commit at gcc dot gnu dot org
  2004-03-04 11:01 ` amodra at bigpond dot net dot au
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-04  9:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-04 09:54 -------
Subject: Bug 14406

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	amodra@gcc.gnu.org	2004-03-04 09:54:26

Modified files:
	gcc            : ChangeLog 
	gcc/config/rs6000: rs6000.md 

Log message:
	PR target/14406
	* config/rs6000/rs6000.md (abstf2, abstf2+1): Delete define_insn.
	(abstf2, abstf2_internal): New define_expand.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.287&r2=2.2326.2.288
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.284.4.5&r2=1.284.4.6



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14406


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

* [Bug target/14406] rs6000 abstf2 is broken
  2004-03-03 13:53 [Bug target/14406] New: rs6000 abstf2 is broken amodra at bigpond dot net dot au
                   ` (3 preceding siblings ...)
  2004-03-04  9:54 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-04 11:01 ` amodra at bigpond dot net dot au
  2004-03-04 15:54 ` pinskia at gcc dot gnu dot org
  2004-03-08  7:30 ` cvs-commit at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-03-04 11:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-03-04 11:01 -------
Fixed for 3.4.0 and 3.5.0

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|3.3.3 3.4.0 3.5.0           |3.3.3
      Known to work|                            |3.4.0 3.5.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14406


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

* [Bug target/14406] rs6000 abstf2 is broken
  2004-03-03 13:53 [Bug target/14406] New: rs6000 abstf2 is broken amodra at bigpond dot net dot au
                   ` (4 preceding siblings ...)
  2004-03-04 11:01 ` amodra at bigpond dot net dot au
@ 2004-03-04 15:54 ` pinskia at gcc dot gnu dot org
  2004-03-08  7:30 ` cvs-commit at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-04 15:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-04 15:54 -------
Fixed so closing.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |3.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14406


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

* [Bug target/14406] rs6000 abstf2 is broken
  2004-03-03 13:53 [Bug target/14406] New: rs6000 abstf2 is broken amodra at bigpond dot net dot au
                   ` (5 preceding siblings ...)
  2004-03-04 15:54 ` pinskia at gcc dot gnu dot org
@ 2004-03-08  7:30 ` cvs-commit at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-08  7:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-08 07:30 -------
Subject: Bug 14406

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	hammer-3_3-branch
Changes by:	amodra@gcc.gnu.org	2004-03-08 07:30:07

Modified files:
	gcc            : ChangeLog.hammer 
	gcc/config/rs6000: rs6000.md 

Log message:
	PR target/14406
	* config/rs6000/rs6000.md (abstf2, abstf2+1): Delete define_insn.
	(abstf2, abstf2_internal): New define_expand.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.hammer.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.1.2.363&r2=1.1.2.364
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.221.4.13&r2=1.221.4.14



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14406


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

end of thread, other threads:[~2004-03-08  7:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-03 13:53 [Bug target/14406] New: rs6000 abstf2 is broken amodra at bigpond dot net dot au
2004-03-03 13:56 ` [Bug target/14406] " amodra at bigpond dot net dot au
2004-03-03 16:23 ` pinskia at gcc dot gnu dot org
2004-03-04  9:26 ` cvs-commit at gcc dot gnu dot org
2004-03-04  9:54 ` cvs-commit at gcc dot gnu dot org
2004-03-04 11:01 ` amodra at bigpond dot net dot au
2004-03-04 15:54 ` pinskia at gcc dot gnu dot org
2004-03-08  7:30 ` cvs-commit at gcc dot gnu dot org

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).