[Bug target/54009] incorrect code generated for DFmode lo_sum mem

2013-02-06 Thread amodra at gmail dot com


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



--- Comment #4 from Alan Modra amodra at gmail dot com 2013-02-06 13:04:43 
UTC ---

Regressed due to pr54131 fix.


[Bug target/54009] incorrect code generated for DFmode lo_sum mem

2013-02-06 Thread amodra at gcc dot gnu.org


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



--- Comment #5 from Alan Modra amodra at gcc dot gnu.org 2013-02-07 02:37:49 
UTC ---

Author: amodra

Date: Thu Feb  7 02:37:37 2013

New Revision: 195836



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=195836

Log:

gcc/

PR target/54009

* config/rs6000/rs6000.c (mem_operand_gpr): Check that LO_SUM

addresses won't wrap when offsetting.

(rs6000_secondary_reload): Provide secondary reloads needed for

wrapping LO_SUM addresses.



gcc/testsuite/

PR target/54009

* gcc.target/powerpc/pr54009.c: New test.





Added:

trunk/gcc/testsuite/gcc.target/powerpc/pr54009.c

Modified:

trunk/gcc/ChangeLog

trunk/gcc/config/rs6000/rs6000.c

trunk/gcc/testsuite/ChangeLog


[Bug target/54009] incorrect code generated for DFmode lo_sum mem

2013-02-06 Thread amodra at gmail dot com


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



Alan Modra amodra at gmail dot com changed:



   What|Removed |Added



 Status|ASSIGNED|RESOLVED

 Resolution||FIXED



--- Comment #6 from Alan Modra amodra at gmail dot com 2013-02-07 02:46:30 
UTC ---

Fixed.


[Bug target/54009] incorrect code generated for DFmode lo_sum mem

2012-07-24 Thread amodra at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54009

Alan Modra amodra at gmail dot com changed:

   What|Removed |Added

   Target Milestone|--- |4.8.0

--- Comment #2 from Alan Modra amodra at gmail dot com 2012-07-24 12:43:23 
UTC ---
The x+32768 assembly is fixed, but errors remain.  If you change the testcase
slightly, substituting 32764 with a smaller value, 2764 say, then r() accesses
x.d with an indirect address while w() does so using a lo_sum with an offset. 
This is wrong if the extern x is such that d straddles a 32k boundary.  In the
case of r(), the indirect address is generated in rs6000_split_multireg_move. 
It seems the fix for pr42427 specifically excluded lo_sum addresses, but if I
read the diff correctly, before that patch they were split.


[Bug target/54009] incorrect code generated for DFmode lo_sum mem

2012-07-24 Thread amodra at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54009

--- Comment #3 from Alan Modra amodra at gmail dot com 2012-07-24 12:53:35 
UTC ---
No, I was mistaken.  The pr42427 patch isn't at fault here.


[Bug target/54009] incorrect code generated for DFmode lo_sum mem

2012-07-23 Thread amodra at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54009

--- Comment #1 from Alan Modra amodra at gcc dot gnu.org 2012-07-24 05:55:56 
UTC ---
Author: amodra
Date: Tue Jul 24 05:55:50 2012
New Revision: 189801

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=189801
Log:
PR target/53914
PR target/54009
* config/rs6000/constraints.md (Y): Use mem_operand_gpr.
* config/rs6000/predicates.md (word_offset_memref_operand): Delete.
Adjust all rs6000_legitimate_offset_address_p calls.
* config/rs6000/rs6000-protos.h (mem_operand_gpr): Declare.
(rs6000_secondary_reload_gpr): Declare.
(rs6000_legitimate_offset_address_p): Update prototype.
(rs6000_offsettable_memref_p): Delete.
(rs6000_secondary_reload_ppc64): Delete.
* config/rs6000/rs6000.c (address_offset): New function.
(mem_operand_gpr): Likewise.
(rs6000_legitimate_offset_address_p): Add worst_case param.  When
not worst_case assume class of regs with least restrictive offsets.
Adjust all calls.
(legitimate_lo_sum_address_p): Simplify register mode tests.
(rs6000_legitimize_address): Likewise.  Assume best case offset
addressing.  Combine ELF and MACHO lo_sum code.
(rs6000_mode_dependent_address): Correct offset addressing limits.
(rs6000_offsettable_memref_p): Make static, add reg_mode param.
Use reg_mode to help rs6000_legitimate_offset_address_p.
(rs6000_secondary_reload): Use address_offset.  Handle 32-bit multi
gpr load/store when offset too large.
(rs6000_secondary_reload_gpr): Renamed rs6000_secondary_reload_ppc64.
(rs6000_split_multireg_move): Adjust rs6000_offsettable_memref_p calls.
* config/rs6000/rs6000.md (movdf_hardfloat32): Use 'Y' constraint
for gpr load/store.  Order alternatives as r-Y,Y-r,r-r and
d-m,m-d,d-d.  Correct size of gpr load/store.
(movdf_softfloat32): Use 'Y' constraint for gpr load/store.  Order
alternatives.
(movti_ppc64): Likewise.
(movdi_internal32): Likewise.  Also disparage fprs.
(movdi_mfpgpr, movdi_internal64): Likewise.
(movtf_internal): Use 'm' for fpr load/store.  Order alternatives.
(movtf_softfloat): Order alternatives.
(extenddftf2_internal): Use 'm' and 'Y' for store.
(movti_power, movti_string): Use 'Y' for gpr load/store.  Order.
(stack_protect_setdi, stack_protect_testdi): Likewise.
(movdf_hardfloat64_mfpgpr, movdf_hardfloat64): Order alternatives.
(movdf_softfloat64): Likewise.
(reload_mode_store): Adjust reload_di_store to provide
reload_si_store as well.
(reload_mode_load): Likewise.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/constraints.md
trunk/gcc/config/rs6000/predicates.md
trunk/gcc/config/rs6000/rs6000-protos.h
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/config/rs6000/rs6000.md


[Bug target/54009] incorrect code generated for DFmode lo_sum mem

2012-07-18 Thread amodra at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54009

Alan Modra amodra at gmail dot com changed:

   What|Removed |Added

 Target||powerpc-linux
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-07-18
 AssignedTo|unassigned at gcc dot   |amodra at gmail dot com
   |gnu.org |
 Ever Confirmed|0   |1