[Bug target/28170] [4.1/4.2 Regression] Wrong result after swap byte in one word when compiled in 64-bit mode

2006-07-08 Thread steven at gcc dot gnu dot org


--- Comment #14 from steven at gcc dot gnu dot org  2006-07-09 00:34 ---
Fixed on the trunk?  If so, please remove the 4.2 marker from this bug.


-- 


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



[Bug target/28170] [4.1/4.2 Regression] Wrong result after swap byte in one word when compiled in 64-bit mode

2006-07-06 Thread bergner at vnet dot ibm dot com


--- Comment #10 from bergner at vnet dot ibm dot com  2006-07-06 14:32 
---
I used Alan's code changes from comments #8 and #9 on the 4.1 branch and it
bootstrapped and regression tested (32-bit and 64-bit) fine.

Mainline bootstraps and regression tests are still running.


-- 


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



[Bug target/28170] [4.1/4.2 Regression] Wrong result after swap byte in one word when compiled in 64-bit mode

2006-07-06 Thread dje at gcc dot gnu dot org


--- Comment #11 from dje at gcc dot gnu dot org  2006-07-06 14:37 ---
The original code could not be totally broken unless Alan's code also is
totally broken because he computes many of the same tests.  Also, Alan does not
include an important test from the original code, so his code is wrong.

I am testing a variant of the original code that includes some of Alan's
simplifications.


-- 


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



[Bug target/28170] [4.1/4.2 Regression] Wrong result after swap byte in one word when compiled in 64-bit mode

2006-07-06 Thread bergner at vnet dot ibm dot com


--- Comment #12 from bergner at vnet dot ibm dot com  2006-07-06 18:00 
---
Mainline with Alan's changed bootstrapped, but showed a few regressions.

David's suggested fix from comment #7 (using mainline) bootstrapped and is
currently in the middle of running the test suite.


-- 


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



[Bug target/28170] [4.1/4.2 Regression] Wrong result after swap byte in one word when compiled in 64-bit mode

2006-07-06 Thread dje at gcc dot gnu dot org


--- Comment #13 from dje at gcc dot gnu dot org  2006-07-06 19:00 ---
Subject: Bug 28170

Author: dje
Date: Thu Jul  6 18:59:58 2006
New Revision: 115229

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=115229
Log:
2006-07-06  David Edelsohn  [EMAIL PROTECTED]

PR target/28150
* config/rs6000/rs6000.c (rs6000_legitimate_address): Do not allow
PRE_{INC,DEC} of TFmode.

2006-07-06  David Edelsohn  [EMAIL PROTECTED]
Alan Modra  [EMAIL PROTECTED]

PR target/28170
* config/rs6000/rs6000.c (insvdi_rshift_rlwimi_p): Correct shiftop
bounds. Simplify.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.c


-- 


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



[Bug target/28170] [4.1/4.2 Regression] Wrong result after swap byte in one word when compiled in 64-bit mode

2006-06-26 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
  Component|rtl-optimization|target
Summary|Wrong result after swap byte|[4.1/4.2 Regression] Wrong
   |in one word when compiled in|result after swap byte in
   |64-bit mode |one word when compiled in
   ||64-bit mode
   Target Milestone|--- |4.1.2


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



[Bug target/28170] [4.1/4.2 Regression] Wrong result after swap byte in one word when compiled in 64-bit mode

2006-06-26 Thread pinskia at gcc dot gnu dot org


--- Comment #5 from pinskia at gcc dot gnu dot org  2006-06-26 20:10 ---
As an aside, I think we should produce two lwbrx instead and then combine them
for the double word (or ldbrx which only exists on Cell as far as I know) But
that is not here or there for this problem right now.


-- 


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



[Bug target/28170] [4.1/4.2 Regression] Wrong result after swap byte in one word when compiled in 64-bit mode

2006-06-26 Thread dje at gcc dot gnu dot org


--- Comment #6 from dje at gcc dot gnu dot org  2006-06-27 01:34 ---
rs6000.c:insvdi_rshift_rlwimi_p() is wrong, specifically the lines checking the
shift count.


-- 


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



[Bug target/28170] [4.1/4.2 Regression] Wrong result after swap byte in one word when compiled in 64-bit mode

2006-06-26 Thread dje at gcc dot gnu dot org


--- Comment #7 from dje at gcc dot gnu dot org  2006-06-27 01:40 ---
I think the correct test is something like

Index: rs6000.c
===
--- rs6000.c(revision 115003)
+++ rs6000.c(working copy)
@@ -9794,8 +9794,8 @@
INTVAL (startop)  32
(INTVAL (sizeop) + INTVAL (startop)  64)
(INTVAL (sizeop) + INTVAL (startop)  33)
-   (INTVAL (sizeop) + INTVAL (startop) + INTVAL (shiftop)  96)
-   (INTVAL (sizeop) + INTVAL (startop) + INTVAL (shiftop) = 64)
+   (INTVAL (sizeop) + INTVAL (startop) + INTVAL (shiftop)  64)
+   (INTVAL (sizeop) + INTVAL (startop) + INTVAL (shiftop) =32)
(64 - (INTVAL (shiftop)  63)) = INTVAL (sizeop))
 return 1;


-- 


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



[Bug target/28170] [4.1/4.2 Regression] Wrong result after swap byte in one word when compiled in 64-bit mode

2006-06-26 Thread amodra at bigpond dot net dot au


--- Comment #8 from amodra at bigpond dot net dot au  2006-06-27 01:41 
---
I think insvdi_rshift_rlwimi_p is totally broken.  It should look something
like the following to match the capabilities of rlwimi according to my reading
of the powerpc architecture specification.

/* Return 1 if operands will generate valid arguments to the rlwimi
   instruction for insert with right shift in 64-bit mode.  */

int
insvdi_rshift_rlwimi_p (rtx sizeop, rtx startop, rtx shiftop)
{
  /* The field that we insert into must start in the low word.  */
  if (INTVAL (startop)  32 || INTVAL (startop) = 64)
return 0;

  /* And it must end there too.  */
  if (INTVAL (sizeop)  0 || INTVAL (sizeop) + INTVAL (startop) = 64)
return 0;

  /* The value we are inserting must also come from the low word.
 Since the sign bit isn't in the low word, we don't need to worry
 about ashiftrt vs. lshiftrt.  */
  if (INTVAL (shiftop) + INTVAL (sizeop) = 32)
return 0;

  return 1;
}


-- 


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



[Bug target/28170] [4.1/4.2 Regression] Wrong result after swap byte in one word when compiled in 64-bit mode

2006-06-26 Thread amodra at bigpond dot net dot au


--- Comment #9 from amodra at bigpond dot net dot au  2006-06-27 01:47 
---
Uh, that should be INTVAL (sizeop) = 0.


-- 


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