[Bug target/57717] error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe

2017-12-27 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717

Alan Modra  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Alan Modra  ---
Seems to be fixed on all active branches, so closing.

[Bug target/57717] error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe

2013-08-12 Thread jules at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717

jules at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jules at gcc dot gnu.org

--- Comment #7 from jules at gcc dot gnu.org ---
Here's another candidate patch:

http://gcc.gnu.org/ml/gcc-patches/2013-08/msg00668.html


[Bug target/57717] error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe

2013-07-15 Thread raj.khem at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717

--- Comment #6 from Khem Raj  ---
here is another case which fails before suggested patch and also after the
patch

void foo()
{

 double a[2];
 double b = 3.1L / 2;
}

Here is result below after applying the patch in comment #3

$ ./gcc/cc1 ~/a.c
 foo
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data>   <*free_inline_summary>
 Assembling functions:
 foo
/homes/kraj/a.c: In function 'foo':
/homes/kraj/a.c:6:1: internal compiler error: in change_address_1, at
emit-rtl.c:1955
 }
 ^
0x5d7dd0 change_address_1
../../gcc/gcc/emit-rtl.c:1955
0x5dad82 adjust_address_1(rtx_def*, machine_mode, long, int, int, int, long)
../../gcc/gcc/emit-rtl.c:2087
0x61ac98 alter_subreg(rtx_def**, bool)
../../gcc/gcc/final.c:3062
0x61aed9 cleanup_subreg_operands(rtx_def*)
../../gcc/gcc/final.c:3008
0x7e80b6 reload(rtx_def*, int)
../../gcc/gcc/reload1.c:1240
0x70227b do_reload
../../gcc/gcc/ira.c:4701
0x70227b rest_of_handle_reload
../../gcc/gcc/ira.c:4801
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


[Bug target/57717] error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe

2013-07-12 Thread alexandru.sardan at freescale dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717

Alexandru-Cezar Sărdan  changed:

   What|Removed |Added

 CC||alexandru.sardan@freescale.
   ||com

--- Comment #5 from Alexandru-Cezar Sărdan  ---
Created attachment 30500
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30500&action=edit
testcase

The attached test case causes another ICE if gcc is compiled for gnuspe targets
after the patch proposed in comment #4 is applied and -mfloat-gprs=double is
used.
Also -mfloat-gprs=single works fine.

$ ./gcc/cc1 -m32 -mcpu=8548 -mabi=spe -mspe -mfloat-gprs=double ~/test.c 
 __bswap_32 __bswap_64 create_Result_file main
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data>   <*free_inline_summary>
Assembling functions:
 create_Result_file
/home/alex/test.c: In function 'create_Result_file':
/home/alex/test.c:43:1: internal compiler error: in change_address_1, at
emit-rtl.c:2019
 }
 ^

[Bug target/57717] error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe

2013-06-27 Thread raj.khem at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717

--- Comment #4 from Khem Raj  ---
I have backported this fix to 4.8 branch and tested it and it fixed the issue.
Below is the patch for 4.8


Index: gcc-4.8.1/gcc/config/rs6000/rs6000.c
===
--- gcc-4.8.1.orig/gcc/config/rs6000/rs6000.c   2013-05-09 18:54:06.0
-0700
+++ gcc-4.8.1/gcc/config/rs6000/rs6000.c2013-06-27 08:22:40.459021366
-0700
@@ -5431,11 +5431,12 @@

 case TFmode:
 case TDmode:
-case TImode:
   if (TARGET_E500_DOUBLE)
return (SPE_CONST_OFFSET_OK (offset)
&& SPE_CONST_OFFSET_OK (offset + 8));
+/* Fall through.  */

+case TImode:
   extra = 8;
   if (!worst_case)
break;


[Bug target/57717] error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe

2013-06-27 Thread amodra at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717

Alan Modra  changed:

   What|Removed |Added

 CC||amodra at gmail dot com

--- Comment #3 from Alan Modra  ---
Created attachment 30383
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30383&action=edit
potential fix

This reverts part of the patch identified in comment #1, and cures the testcase
failure.


[Bug target/57717] error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe

2013-06-25 Thread raj.khem at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717

Khem Raj  changed:

   What|Removed |Added

 Target||powerpc-angstrom-linux-gnus
   ||pe
  Known to work||4.7.0, 4.7.1, 4.7.2
   Host||x86_64-linux
  Known to fail||4.8.0, 4.8.1, 4.9.0
  Build||x86_64-linux

--- Comment #2 from Khem Raj  ---
This is how gcc is configured

Target: powerpc-angstrom-linux-gnuspe
Configured with: ../gcc/configure --build=x86_64-linux --host=x86_64-linux
--target=powerpc-angstrom-linux-gnuspe
--prefix=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr
--exec_prefix=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr
--bindir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/bin/ppce500v2-angstrom-linux-gnuspe.gcc-cross-initial
--sbindir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/bin/ppce500v2-angstrom-linux-gnuspe.gcc-cross-initial
--libexecdir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/libexec/ppce500v2-angstrom-linux-gnuspe.gcc-cross-initial
--datadir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/share
--sysconfdir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/etc
--sharedstatedir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/com
--localstatedir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/var
--libdir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/lib/ppce500v2-angstrom-linux-gnuspe.gcc-cross-initial
--includedir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/include
--oldincludedir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/include
--infodir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/share/info
--mandir=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux/usr/share/man
--disable-silent-rules --disable-dependency-tracking
--with-libtool-sysroot=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/x86_64-linux
--with-newlib --without-headers --disable-shared --disable-threads
--disable-multilib --disable-__cxa_atexit --enable-languages=c
--program-prefix=powerpc-angstrom-linux-gnuspe-
--with-sysroot=/builds1/angstrom/build/tmp-angstrom_next-eglibc/sysroots/p2020ds
--with-build-sysroot=/builds1/angstrom/build/tmp-angstrom_next-eglibc/work/ppce500v2-angstrom-linux-gnuspe/gcc-cross-initial/4.8.1-r0/gcc-4.8.1/build.x86_64-linux.powerpc-angstrom-linux-gnuspe/tmpsysroot
--disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath
--with-system-zlib --disable-lto --disable-plugin --enable-decimal-float=no
--enable-e500_double --disable-nls --with-long-double-128


Thread model: single
gcc version 4.9.0 20130625 (experimental) (GCC)


[Bug target/57717] error: unrecognizable insn compiling ./strtod_l.c from glibc on powerpc-gnuspe

2013-06-25 Thread raj.khem at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717

Khem Raj  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 CC||amodra at gcc dot gnu.org,
   ||raj.khem at gmail dot com

--- Comment #1 from Khem Raj  ---
I have tracked it down to this commit

Author: amodra 
Date:   Tue Jul 24 05:55:50 2012 +

        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__store): Adjust reload_di_store to provide
        reload_si_store as well.
        (reload__load): Likewise.