public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* How to configure a bi-arch PowerPC GCC?
@ 2017-01-19 12:41 Sebastian Huber
  2017-01-20  1:04 ` Segher Boessenkool
  0 siblings, 1 reply; 16+ messages in thread
From: Sebastian Huber @ 2017-01-19 12:41 UTC (permalink / raw)
  To: GCC Development

Hello,

I would like to configure a bi-arch PowerPC GCC. My naive approach was 
simply:

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 90308cd..228f941 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2381,7 +2381,7 @@ powerpc-*-eabi*)
         use_gcc_stdint=wrap
         ;;
  powerpc-*-rtems*)
-       tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h 
newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h 
rs6000/rtems.h rtems.h"
+       tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h 
freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h 
rs6000/e500.h rs6000/rtems.h rtems.h"
         extra_options="${extra_options} rs6000/sysv4.opt"
         tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems 
rs6000/t-ppccomm"
         ;;
diff --git a/gcc/config/rs6000/t-rtems b/gcc/config/rs6000/t-rtems
index 7c7637d..8ff0656 100644
--- a/gcc/config/rs6000/t-rtems
+++ b/gcc/config/rs6000/t-rtems
@@ -30,6 +30,9 @@ MULTILIB_DIRNAMES += m403 m505 m603e m604 m860 m7400 
m8540 me6500
  MULTILIB_OPTIONS += m32
  MULTILIB_DIRNAMES += m32

+MULTILIB_OPTIONS += m64
+MULTILIB_DIRNAMES += m64
+
  MULTILIB_OPTIONS += msoft-float/mfloat-gprs=double
  MULTILIB_DIRNAMES += nof gprsdouble

@@ -77,3 +80,5 @@ MULTILIB_REQUIRED += mcpu=8540/mfloat-gprs=double
  MULTILIB_REQUIRED += mcpu=860
  MULTILIB_REQUIRED += mcpu=e6500/m32
  MULTILIB_REQUIRED += mcpu=e6500/m32/msoft-float/mno-altivec
+MULTILIB_REQUIRED += mcpu=e6500/m64
+MULTILIB_REQUIRED += mcpu=e6500/m64/msoft-float/mno-altivec

This leads to an ICE during libgcc configure:

configure:3660: checking for suffix of object files
configure:3682: /build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc 
-B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/ -nostdinc 
-B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ 
-isystem 
/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include 
-isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include 
-B/opt/rtems-4.12/powerpc-rtems4.12/bin/ 
-B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem 
/opt/rtems-4.12/powerpc-rtems4.12/include -isystem 
/opt/rtems-4.12/powerpc-rtems4.12/sys-include  -mcpu=e6500 -m64 -c -g 
-O2  conftest.c >&5
conftest.c: In function 'main':
conftest.c:16:1: error: unrecognizable insn:
  }
  ^
(insn/f 22 21 23 2 (parallel [
             (set (reg/f:DI 1 1)
                 (plus:SI (reg/f:DI 1 1)
                     (const_int 16 [0x10])))
             (set (mem:BLK (reg/f:DI 1 1) [0  A8])
                 (const_int 0 [0]))
             (set (mem:BLK (reg/f:DI 1 1) [0  A8])
                 (const_int 0 [0]))
         ]) "conftest.c":16 -1
      (expr_list:REG_CFA_DEF_CFA (reg/f:DI 1 1)
         (nil)))
conftest.c:16:1: internal compiler error: in extract_insn, at recog.c:2311
0x98ada5 _fatal_insn(char const*, rtx_def const*, char const*, int, char 
const*)
     /home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:108
0x98add9 _fatal_insn_not_found(rtx_def const*, char const*, int, char 
const*)
     /home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:116
0x95c397 extract_insn(rtx_insn*)
     /home/EB/sebastian_h/archive/gcc-git/gcc/recog.c:2311
0x95d3b8 extract_constrain_insn(rtx_insn*)
     /home/EB/sebastian_h/archive/gcc-git/gcc/recog.c:2211
0x9609a6 copyprop_hardreg_forward_1
     /home/EB/sebastian_h/archive/gcc-git/gcc/regcprop.c:794
0x961982 execute
     /home/EB/sebastian_h/archive/gcc-git/gcc/regcprop.c:1301
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
configure:3686: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3700: error: in 
`/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libgcc':
configure:3703: error: cannot compute suffix of object files: cannot compile

I would be happy for some hints how to fix this.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

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

* Re: How to configure a bi-arch PowerPC GCC?
  2017-01-19 12:41 How to configure a bi-arch PowerPC GCC? Sebastian Huber
@ 2017-01-20  1:04 ` Segher Boessenkool
  2017-01-20  7:35   ` Sebastian Huber
  0 siblings, 1 reply; 16+ messages in thread
From: Segher Boessenkool @ 2017-01-20  1:04 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: GCC Development

Hi,

On Thu, Jan 19, 2017 at 01:41:33PM +0100, Sebastian Huber wrote:
> conftest.c:16:1: error: unrecognizable insn:
>  }
>  ^
> (insn/f 22 21 23 2 (parallel [
>             (set (reg/f:DI 1 1)
>                 (plus:SI (reg/f:DI 1 1)
>                     (const_int 16 [0x10])))
>             (set (mem:BLK (reg/f:DI 1 1) [0  A8])
>                 (const_int 0 [0]))
>             (set (mem:BLK (reg/f:DI 1 1) [0  A8])
>                 (const_int 0 [0]))
>         ]) "conftest.c":16 -1
>      (expr_list:REG_CFA_DEF_CFA (reg/f:DI 1 1)
>         (nil)))

This is stack_restore_tie, which requires TARGET_32BIT.

It currently is only generated from rs6000_emit_stack_reset:

  /* This blockage is needed so that sched doesn't decide to move
     the sp change before the register restores.  */
  if (DEFAULT_ABI == ABI_V4
      || (TARGET_SPE_ABI
          && info->spe_64bit_regs_used != 0
          && info->first_gp_reg_save != 32))
    return emit_insn (gen_stack_restore_tie (updt_reg_rtx, frame_reg_rtx,
                                             GEN_INT (frame_off)));

so you seem to have 64-bit ABI_V4?  I wonder how well tested that is,
you are likely to run into more problems.  Either stack_restore_tie or
the above code will need a tweak.


Segher

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

* Re: How to configure a bi-arch PowerPC GCC?
  2017-01-20  1:04 ` Segher Boessenkool
@ 2017-01-20  7:35   ` Sebastian Huber
  2017-01-21  0:46     ` Segher Boessenkool
  0 siblings, 1 reply; 16+ messages in thread
From: Sebastian Huber @ 2017-01-20  7:35 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: GCC Development

Hello Segher,

On 20/01/17 02:04, Segher Boessenkool wrote:
> Hi,
>
> On Thu, Jan 19, 2017 at 01:41:33PM +0100, Sebastian Huber wrote:
>> conftest.c:16:1: error: unrecognizable insn:
>>   }
>>   ^
>> (insn/f 22 21 23 2 (parallel [
>>              (set (reg/f:DI 1 1)
>>                  (plus:SI (reg/f:DI 1 1)
>>                      (const_int 16 [0x10])))
>>              (set (mem:BLK (reg/f:DI 1 1) [0  A8])
>>                  (const_int 0 [0]))
>>              (set (mem:BLK (reg/f:DI 1 1) [0  A8])
>>                  (const_int 0 [0]))
>>          ]) "conftest.c":16 -1
>>       (expr_list:REG_CFA_DEF_CFA (reg/f:DI 1 1)
>>          (nil)))
> This is stack_restore_tie, which requires TARGET_32BIT.
>
> It currently is only generated from rs6000_emit_stack_reset:
>
>    /* This blockage is needed so that sched doesn't decide to move
>       the sp change before the register restores.  */
>    if (DEFAULT_ABI == ABI_V4
>        || (TARGET_SPE_ABI
>            && info->spe_64bit_regs_used != 0
>            && info->first_gp_reg_save != 32))
>      return emit_insn (gen_stack_restore_tie (updt_reg_rtx, frame_reg_rtx,
>                                               GEN_INT (frame_off)));
>
> so you seem to have 64-bit ABI_V4?  I wonder how well tested that is,
> you are likely to run into more problems.  Either stack_restore_tie or
> the above code will need a tweak.

thanks for your help. I would had a hard time to figure this out myself.

I am flexible in terms of the ABI choice for the 64-bit PowerPC. I guess 
the ABI_ELFv2 is the way to go?

I had to provide SUBSUBTARGET_OVERRIDE_OPTIONS in rtems.h (in 
config/rs6000/) to set the ABI. The sysv4.h doesn't care about 
-mabi=elfv2. There seems to be some copy and paste in linux64.h and 
freebsd64.h for their SUBSUBTARGET_OVERRIDE_OPTIONS. Maybe the common 
stuff should move to sysv4.h?

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

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

* Re: How to configure a bi-arch PowerPC GCC?
  2017-01-20  7:35   ` Sebastian Huber
@ 2017-01-21  0:46     ` Segher Boessenkool
  2017-01-23  8:19       ` Sebastian Huber
  0 siblings, 1 reply; 16+ messages in thread
From: Segher Boessenkool @ 2017-01-21  0:46 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: GCC Development

On Fri, Jan 20, 2017 at 08:35:14AM +0100, Sebastian Huber wrote:
> >so you seem to have 64-bit ABI_V4?  I wonder how well tested that is,
> >you are likely to run into more problems.  Either stack_restore_tie or
> >the above code will need a tweak.
> 
> thanks for your help. I would had a hard time to figure this out myself.
> 
> I am flexible in terms of the ABI choice for the 64-bit PowerPC. I guess 
> the ABI_ELFv2 is the way to go?

It certainly is the most modern ABI.  It makes some requirements to what
Power ISA features are required, which may or may not be a problem for
your platform.  If you want to use BE, that should work with ELFv2 fine
(and it did in the past at least), but it doesn't get serious testing.

> I had to provide SUBSUBTARGET_OVERRIDE_OPTIONS in rtems.h (in 
> config/rs6000/) to set the ABI. The sysv4.h doesn't care about 
> -mabi=elfv2. There seems to be some copy and paste in linux64.h and 
> freebsd64.h for their SUBSUBTARGET_OVERRIDE_OPTIONS. Maybe the common 
> stuff should move to sysv4.h?

sysv4 is not ELFv2, it is a separate ABI.  Perhaps there should be an
elfv2.h header, sure.


Segher

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

* Re: How to configure a bi-arch PowerPC GCC?
  2017-01-21  0:46     ` Segher Boessenkool
@ 2017-01-23  8:19       ` Sebastian Huber
  2017-01-23 17:18         ` Segher Boessenkool
  0 siblings, 1 reply; 16+ messages in thread
From: Sebastian Huber @ 2017-01-23  8:19 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: GCC Development

[-- Attachment #1: Type: text/plain, Size: 15366 bytes --]

On 21/01/17 01:46, Segher Boessenkool wrote:
> On Fri, Jan 20, 2017 at 08:35:14AM +0100, Sebastian Huber wrote:
>>> so you seem to have 64-bit ABI_V4?  I wonder how well tested that is,
>>> you are likely to run into more problems.  Either stack_restore_tie or
>>> the above code will need a tweak.
>> thanks for your help. I would had a hard time to figure this out myself.
>>
>> I am flexible in terms of the ABI choice for the 64-bit PowerPC. I guess
>> the ABI_ELFv2 is the way to go?
> It certainly is the most modern ABI.  It makes some requirements to what
> Power ISA features are required, which may or may not be a problem for
> your platform.  If you want to use BE, that should work with ELFv2 fine
> (and it did in the past at least), but it doesn't get serious testing.

I use now the attached patch and get the following error types (for 
several multilibs):

/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc 
-B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/ -nostdinc 
-B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/ 
-isystem 
/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/targ-include 
-isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include 
-B/opt/rtems-4.12/powerpc-rtems4.12/bin/ 
-B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem 
/opt/rtems-4.12/powerpc-rtems4.12/include -isystem 
/opt/rtems-4.12/powerpc-rtems4.12/sys-include    -g -O2 -mcpu=8540 -O2 
-I/home/EB/sebastian_h/archive/gcc-git/libgcc/../newlib/libc/sys/rtems/include 
-g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing 
-Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes 
-Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 
-fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -I. -I. 
-I../../.././gcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc 
-I/home/EB/sebastian_h/archive/gcc-git/libgcc/. 
-I/home/EB/sebastian_h/archive/gcc-git/libgcc/../gcc 
-I/home/EB/sebastian_h/archive/gcc-git/libgcc/../include -DHAVE_CC_TLS  
-o ibm-ldouble.o -MT ibm-ldouble.o -MD -MP -MF ibm-ldouble.dep  -c 
/home/EB/sebastian_h/archive/gcc-git/libgcc/config/rs6000/ibm-ldouble.c 
-fvisibility=hidden -DHIDE_EXPORTS
# the right startup files when linking shared libgcc.
/bin/sh /home/EB/sebastian_h/archive/gcc-git/libgcc/../mkinstalldirs 
../../.././gcc/m8540
parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o 
ecrtn.o ncrti.o ncrtn.o";                                  \
for file in $parts; do                                  \
   rm -f ../../.././gcc/m8540/$file;             \
   /usr/bin/install -c -m 644 $file ../../.././gcc/m8540/;       \
   case $file in                                         \
     *.a)                                                \
       /opt/rtems-4.12/powerpc-rtems4.12/bin/ranlib 
../../.././gcc/m8540/$file ;;        \
   esac;                                                 \
done
In file included from 
/home/EB/sebastian_h/archive/gcc-git/libgcc/config/rs6000/ibm-ldouble.c:374:0:
/home/EB/sebastian_h/archive/gcc-git/libgcc/soft-fp/quad.h:72:1: error: 
unable to emulate 'TF'
  typedef float TFtype __attribute__ ((mode (TF)));
  ^~~~~~~
config.status: creating auto-target.h
config.status: auto-target.h is unchanged
config.status: executing default commands
In file included from 
/home/EB/sebastian_h/archive/gcc-git/libgcc/soft-fp/soft-fp.h:321:0,
                  from 
/home/EB/sebastian_h/archive/gcc-git/libgcc/config/rs6000/ibm-ldouble.c:372:
/home/EB/sebastian_h/archive/gcc-git/libgcc/config/rs6000/ibm-ldouble.c: 
In function 'fmsub':
/home/EB/sebastian_h/archive/gcc-git/libgcc/soft-fp/op-common.h:900:10: 
warning: this statement may fall through [-Wimplicit-fallthrough=]
     R##_s = X##_s;     \
/home/EB/sebastian_h/archive/gcc-git/libgcc/soft-fp/quad.h:182:29: note: 
in expansion of macro '_FP_MUL'
  # define FP_MUL_Q(R, X, Y)  _FP_MUL (Q, 4, R, X, Y)
                              ^~~~~~~
/home/EB/sebastian_h/archive/gcc-git/libgcc/config/rs6000/ibm-ldouble.c:417:5: 
note: in expansion of macro 'FP_MUL_Q'
      FP_MUL_Q(U,X,Y);
      ^~~~~~~~
/home/EB/sebastian_h/archive/gcc-git/libgcc/soft-fp/op-common.h:902:2: 
note: here
   case _FP_CLS_COMBINE (FP_CLS_INF, FP_CLS_INF):  \
   ^
/home/EB/sebastian_h/archive/gcc-git/libgcc/soft-fp/quad.h:182:29: note: 
in expansion of macro '_FP_MUL'
  # define FP_MUL_Q(R, X, Y)  _FP_MUL (Q, 4, R, X, Y)
                              ^~~~~~~
/home/EB/sebastian_h/archive/gcc-git/libgcc/config/rs6000/ibm-ldouble.c:417:5: 
note: in expansion of macro 'FP_MUL_Q'
      FP_MUL_Q(U,X,Y);
      ^~~~~~~~
/home/EB/sebastian_h/archive/gcc-git/libgcc/soft-fp/op-common.h:913:10: 
warning: this statement may fall through [-Wimplicit-fallthrough=]
     R##_s = Y##_s;     \
/home/EB/sebastian_h/archive/gcc-git/libgcc/soft-fp/quad.h:182:29: note: 
in expansion of macro '_FP_MUL'
  # define FP_MUL_Q(R, X, Y)  _FP_MUL (Q, 4, R, X, Y)
                              ^~~~~~~
/home/EB/sebastian_h/archive/gcc-git/libgcc/config/rs6000/ibm-ldouble.c:417:5: 
note: in expansion of macro 'FP_MUL_Q'
      FP_MUL_Q(U,X,Y);
      ^~~~~~~~
/home/EB/sebastian_h/archive/gcc-git/libgcc/soft-fp/op-common.h:915:2: 
note: here
   case _FP_CLS_COMBINE (FP_CLS_NORMAL, FP_CLS_INF): \
   ^
/home/EB/sebastian_h/archive/gcc-git/libgcc/soft-fp/quad.h:182:29: note: 
in expansion of macro '_FP_MUL'
  # define FP_MUL_Q(R, X, Y)  _FP_MUL (Q, 4, R, X, Y)
                              ^~~~~~~
/home/EB/sebastian_h/archive/gcc-git/libgcc/config/rs6000/ibm-ldouble.c:417:5: 
note: in expansion of macro 'FP_MUL_Q'
      FP_MUL_Q(U,X,Y);
      ^~~~~~~~

/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc 
-B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/ -nostdinc 
-B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/ 
-isystem 
/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/targ-include 
-isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include 
-B/opt/rtems-4.12/powerpc-rtems4.12/bin/ 
-B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem 
/opt/rtems-4.12/powerpc-rtems4.12/include -isystem 
/opt/rtems-4.12/powerpc-rtems4.12/sys-include    -g -O2 -mcpu=e6500 -m64 
-msoft-float -mno-altivec -O2 
-I/home/EB/sebastian_h/archive/gcc-git/libgcc/../newlib/libc/sys/rtems/include 
-g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing 
-Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes 
-Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 
-fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -I. -I. 
-I../../../../../.././gcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc 
-I/home/EB/sebastian_h/archive/gcc-git/libgcc/. 
-I/home/EB/sebastian_h/archive/gcc-git/libgcc/../gcc 
-I/home/EB/sebastian_h/archive/gcc-git/libgcc/../include    -o 
unwind-dw2-fde.o -MT unwind-dw2-fde.o -MD -MP -MF unwind-dw2-fde.dep 
-fexceptions -c 
/home/EB/sebastian_h/archive/gcc-git/libgcc/unwind-dw2-fde.c 
-fvisibility=hidden -DHIDE_EXPORTS
/home/EB/sebastian_h/archive/gcc-git/libgcc/unwind-dw2-fde.c: In 
function 'search_object':
/home/EB/sebastian_h/archive/gcc-git/libgcc/unwind-dw2-fde.c:588:25: 
internal compiler error: in emit_move_insn, at expr.c:3698
         v1->array[i1+i2] = v1->array[i1-1];
         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
0x6c49bb emit_move_insn(rtx_def*, rtx_def*)
         /home/EB/sebastian_h/archive/gcc-git/gcc/expr.c:3697
0x6a5c2b force_reg
         /home/EB/sebastian_h/archive/gcc-git/gcc/explow.c:648
0xd61994 rs6000_legitimize_address
/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:8873
0x6a6a21 memory_address_addr_space(machine_mode, rtx_def*, unsigned char)
         /home/EB/sebastian_h/archive/gcc-git/gcc/explow.c:432
0x6bfa0a expand_expr_real_1(tree_node*, rtx_def*, machine_mode, 
expand_modifier, rtx_def**, bool)
         /home/EB/sebastian_h/archive/gcc-git/gcc/expr.c:10040
0x6cdb8c expand_expr
         /home/EB/sebastian_h/archive/gcc-git/gcc/expr.h:276
0x6cdb8c expand_assignment(tree_node*, tree_node*, bool)
         /home/EB/sebastian_h/archive/gcc-git/gcc/expr.c:5257
0x5b325c expand_gimple_stmt_1
         /home/EB/sebastian_h/archive/gcc-git/gcc/cfgexpand.c:3641
0x5b325c expand_gimple_stmt
         /home/EB/sebastian_h/archive/gcc-git/gcc/cfgexpand.c:3737
0x5b50b9 expand_gimple_basic_block
         /home/EB/sebastian_h/archive/gcc-git/gcc/cfgexpand.c:5744
0x5bab16 execute
         /home/EB/sebastian_h/archive/gcc-git/gcc/cfgexpand.c:6357
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc 
-B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/ -nostdinc 
-B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/ 
-isystem 
/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/targ-include 
-isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include 
-B/opt/rtems-4.12/powerpc-rtems4.12/bin/ 
-B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem 
/opt/rtems-4.12/powerpc-rtems4.12/include -isystem 
/opt/rtems-4.12/powerpc-rtems4.12/sys-include    -g -O2 -mcpu=e6500 -m64 
-O2 
-I/home/EB/sebastian_h/archive/gcc-git/libgcc/../newlib/libc/sys/rtems/include 
-g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing 
-Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes 
-Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 
-fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -I. -I. 
-I../../../.././gcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc 
-I/home/EB/sebastian_h/archive/gcc-git/libgcc/. 
-I/home/EB/sebastian_h/archive/gcc-git/libgcc/../gcc 
-I/home/EB/sebastian_h/archive/gcc-git/libgcc/../include    -o emutls.o 
-MT emutls.o -MD -MP -MF emutls.dep -fexceptions -c 
/home/EB/sebastian_h/archive/gcc-git/libgcc/emutls.c -fvisibility=hidden 
-DHIDE_EXPORTS
/home/EB/sebastian_h/archive/gcc-git/libgcc/emutls.c: In function 
'__emutls_get_address':
/home/EB/sebastian_h/archive/gcc-git/libgcc/emutls.c:159:13: warning: 
implicit declaration of function 'calloc' [-Wimplicit-function-declaration]
        arr = calloc (size + 1, sizeof (void *));
              ^~~~~~
/home/EB/sebastian_h/archive/gcc-git/libgcc/emutls.c:159:13: warning: 
incompatible implicit declaration of built-in function 'calloc'
/home/EB/sebastian_h/archive/gcc-git/libgcc/emutls.c:159:13: note: 
include '<stdlib.h>' or provide a declaration of 'calloc'
/home/EB/sebastian_h/archive/gcc-git/libgcc/emutls.c:171:13: warning: 
implicit declaration of function 'realloc' [-Wimplicit-function-declaration]
        arr = realloc (arr, (size + 1) * sizeof (void *));
              ^~~~~~~
/home/EB/sebastian_h/archive/gcc-git/libgcc/emutls.c:171:13: warning: 
incompatible implicit declaration of built-in function 'realloc'
/home/EB/sebastian_h/archive/gcc-git/libgcc/emutls.c:171:13: note: 
include '<stdlib.h>' or provide a declaration of 'realloc'
/tmp/ccoZ1J0W.s: Assembler messages:
/tmp/ccoZ1J0W.s:125: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccoZ1J0W.s:125: Error: expression too complex
/tmp/ccoZ1J0W.s:133: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
--
/tmp/ccUIJR3G.s:531: Error: expression too complex
/tmp/ccUIJR3G.s:3339: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:3339: Error: expression too complex
/tmp/ccUIJR3G.s:3550: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:3550: Error: expression too complex
/tmp/ccUIJR3G.s:4147: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:4147: Error: expression too complex
/tmp/ccUIJR3G.s:4249: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:4249: Error: expression too complex
/tmp/ccUIJR3G.s:4342: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:4342: Error: expression too complex
/tmp/ccUIJR3G.s:4385: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:4385: Error: expression too complex
/tmp/ccUIJR3G.s:4556: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:4556: Error: expression too complex
/tmp/ccUIJR3G.s:5415: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:5415: Error: expression too complex
/tmp/ccUIJR3G.s:5437: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:5437: Error: expression too complex
/tmp/ccUIJR3G.s:5656: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:5656: Error: expression too complex
/tmp/ccUIJR3G.s:5797: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:5797: Error: expression too complex
/tmp/ccUIJR3G.s:5859: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:5859: Error: expression too complex
/tmp/ccUIJR3G.s:5918: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:5918: Error: expression too complex
/tmp/ccUIJR3G.s:6041: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:6041: Error: expression too complex
/tmp/ccUIJR3G.s:6042: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:6042: Error: expression too complex
/tmp/ccUIJR3G.s:6050: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:6050: Error: expression too complex
/tmp/ccUIJR3G.s:6363: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:6363: Error: expression too complex
/tmp/ccUIJR3G.s:6912: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:6912: Error: expression too complex
/tmp/ccUIJR3G.s:6957: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:6957: Error: expression too complex
/tmp/ccUIJR3G.s:7030: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:7030: Error: expression too complex
/tmp/ccUIJR3G.s:7127: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:7127: Error: expression too complex
/tmp/ccUIJR3G.s:7254: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:7254: Error: expression too complex
/tmp/ccUIJR3G.s:7371: Error: can't resolve `.got' {.got section} - 
`.LCTOC1' {*UND* section}
/tmp/ccUIJR3G.s:7371: Error: expression too complex

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


[-- Attachment #2: 0001-64-bit-powerpc-for-RTEMS.patch --]
[-- Type: text/x-patch, Size: 4942 bytes --]

From dd242e2ec42d23c87c1f50859f12b63b508bd596 Mon Sep 17 00:00:00 2001
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Fri, 20 Jan 2017 10:05:52 +0100
Subject: [PATCH] 64-bit powerpc for RTEMS

---
 gcc/config.gcc            |  2 +-
 gcc/config/rs6000/rtems.h | 64 +++++++++++++++++++++++++++++++++++++++--------
 gcc/config/rs6000/sysv4.h |  2 +-
 gcc/config/rs6000/t-rtems |  5 ++++
 4 files changed, 60 insertions(+), 13 deletions(-)

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 90308cd..228f941 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2381,7 +2381,7 @@ powerpc-*-eabi*)
 	use_gcc_stdint=wrap
 	;;
 powerpc-*-rtems*)
-	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
+	tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
 	extra_options="${extra_options} rs6000/sysv4.opt"
 	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
 	;;
diff --git a/gcc/config/rs6000/rtems.h b/gcc/config/rs6000/rtems.h
index 54a36de..1278737 100644
--- a/gcc/config/rs6000/rtems.h
+++ b/gcc/config/rs6000/rtems.h
@@ -21,17 +21,29 @@
 /* Specify predefined symbols in preprocessor.  */
 
 #undef TARGET_OS_CPP_BUILTINS
-#define TARGET_OS_CPP_BUILTINS()          \
-  do                                      \
-    {                                     \
-      builtin_define_std ("PPC");         \
-      builtin_define ("__rtems__");       \
-      builtin_define ("__USE_INIT_FINI__"); \
-      builtin_assert ("system=rtems");    \
-      builtin_assert ("cpu=powerpc");     \
-      builtin_assert ("machine=powerpc"); \
-      TARGET_OS_SYSV_CPP_BUILTINS ();     \
-    }                                     \
+#define TARGET_OS_CPP_BUILTINS()			\
+  do							\
+    {							\
+      builtin_define ("__rtems__");			\
+      builtin_define ("__USE_INIT_FINI__");		\
+      builtin_assert ("system=rtems");			\
+      if (TARGET_64BIT)					\
+	{						\
+	  builtin_define ("__PPC__");			\
+	  builtin_define ("__PPC64__");			\
+	  builtin_define ("__powerpc64__");		\
+	  builtin_assert ("cpu=powerpc64");		\
+	  builtin_assert ("machine=powerpc64");		\
+	}						\
+      else						\
+	{						\
+	  builtin_define_std ("PPC");			\
+	  builtin_define_std ("powerpc");		\
+	  builtin_assert ("cpu=powerpc");		\
+	  builtin_assert ("machine=powerpc");		\
+	  TARGET_OS_SYSV_CPP_BUILTINS ();		\
+	}						\
+    }							\
   while (0)
 
 #undef TARGET_LIBGCC_SDATA_SECTION
@@ -58,3 +70,33 @@
 #undef  SUBSUBTARGET_EXTRA_SPECS
 #define SUBSUBTARGET_EXTRA_SPECS \
   { "cpp_os_rtems",		CPP_OS_RTEMS_SPEC }
+
+#define INVALID_64BIT "-m%s not supported in this configuration"
+
+#undef	SUBSUBTARGET_OVERRIDE_OPTIONS
+#define	SUBSUBTARGET_OVERRIDE_OPTIONS				\
+  do								\
+    {								\
+      if (rs6000_isa_flags & OPTION_MASK_64BIT)			\
+	{							\
+	  rs6000_elf_abi = 2;					\
+	  rs6000_current_abi = ABI_ELFv2;			\
+	  rs6000_isa_flags &= ~OPTION_MASK_EABI;		\
+	  if (rs6000_isa_flags & OPTION_MASK_RELOCATABLE)	\
+	    {							\
+	      rs6000_isa_flags &= ~OPTION_MASK_RELOCATABLE;	\
+	      error (INVALID_64BIT, "relocatable");		\
+	    }							\
+	  if (TARGET_PROTOTYPE)					\
+	    {							\
+	      target_prototype = 0;				\
+	      error (INVALID_64BIT, "prototype");		\
+	    }							\
+	  if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0)	\
+	    {							\
+	      rs6000_isa_flags |= OPTION_MASK_POWERPC64;	\
+	      error ("-m64 requires a PowerPC64 cpu");		\
+	    }							\
+	}							\
+    }								\
+  while (0)
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index a5abeee..fccb1f0 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -533,7 +533,7 @@ extern int fixuplabelno;
 #define DEFAULT_ASM_ENDIAN " -mbig"
 
 #undef	ASM_SPEC
-#define	ASM_SPEC "%(asm_cpu) \
+#define	ASM_SPEC "%{!m64:-a32}%{m64:-a64} %(asm_cpu) \
 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \
 %{mrelocatable} %{mrelocatable-lib} %{" FPIE_OR_FPIC_SPEC ":-K PIC} \
 %{memb|msdata=eabi: -memb}" \
diff --git a/gcc/config/rs6000/t-rtems b/gcc/config/rs6000/t-rtems
index 7c7637d..8ff0656 100644
--- a/gcc/config/rs6000/t-rtems
+++ b/gcc/config/rs6000/t-rtems
@@ -30,6 +30,9 @@ MULTILIB_DIRNAMES += m403 m505 m603e m604 m860 m7400 m8540 me6500
 MULTILIB_OPTIONS += m32
 MULTILIB_DIRNAMES += m32
 
+MULTILIB_OPTIONS += m64
+MULTILIB_DIRNAMES += m64
+
 MULTILIB_OPTIONS += msoft-float/mfloat-gprs=double
 MULTILIB_DIRNAMES += nof gprsdouble
 
@@ -77,3 +80,5 @@ MULTILIB_REQUIRED += mcpu=8540/mfloat-gprs=double
 MULTILIB_REQUIRED += mcpu=860
 MULTILIB_REQUIRED += mcpu=e6500/m32
 MULTILIB_REQUIRED += mcpu=e6500/m32/msoft-float/mno-altivec
+MULTILIB_REQUIRED += mcpu=e6500/m64
+MULTILIB_REQUIRED += mcpu=e6500/m64/msoft-float/mno-altivec
-- 
1.8.4.5


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

* Re: How to configure a bi-arch PowerPC GCC?
  2017-01-23  8:19       ` Sebastian Huber
@ 2017-01-23 17:18         ` Segher Boessenkool
  2017-01-25 12:14           ` Sebastian Huber
       [not found]           ` <58889605.4060501@embedded-brains.de>
  0 siblings, 2 replies; 16+ messages in thread
From: Segher Boessenkool @ 2017-01-23 17:18 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: GCC Development

Hello again,

On Mon, Jan 23, 2017 at 09:19:04AM +0100, Sebastian Huber wrote:
> >>I am flexible in terms of the ABI choice for the 64-bit PowerPC. I guess
> >>the ABI_ELFv2 is the way to go?
> >It certainly is the most modern ABI.  It makes some requirements to what
> >Power ISA features are required, which may or may not be a problem for
> >your platform.  If you want to use BE, that should work with ELFv2 fine
> >(and it did in the past at least), but it doesn't get serious testing.
> 
> I use now the attached patch and get the following error types (for 
> several multilibs):


> /home/EB/sebastian_h/archive/gcc-git/libgcc/config/rs6000/ibm-ldouble.c:374:0:
> /home/EB/sebastian_h/archive/gcc-git/libgcc/soft-fp/quad.h:72:1: error: 
> unable to emulate 'TF'
>  typedef float TFtype __attribute__ ((mode (TF)));
>  ^~~~~~~

From rs6000.c (rs6000_scalar_mode_supported_p):
  else if (TARGET_FLOAT128_TYPE && (mode == KFmode || mode == IFmode))
    return true;
  else
    return default_scalar_mode_supported_p (mode);
and the latter has
      if (precision == LONG_DOUBLE_TYPE_SIZE)
        return true;
      return false;

so you have no 128-bit FP type at all.  Maybe your TARGET_IEEEQUAD definition
is wrong, maybe something else...  What type *do* you want for float128?


> /home/EB/sebastian_h/archive/gcc-git/libgcc/unwind-dw2-fde.c: In 
> function 'search_object':
> /home/EB/sebastian_h/archive/gcc-git/libgcc/unwind-dw2-fde.c:588:25: 
> internal compiler error: in emit_move_insn, at expr.c:3698
>         v1->array[i1+i2] = v1->array[i1-1];
>         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
> 0x6c49bb emit_move_insn(rtx_def*, rtx_def*)
>         /home/EB/sebastian_h/archive/gcc-git/gcc/expr.c:3697
> 0x6a5c2b force_reg
>         /home/EB/sebastian_h/archive/gcc-git/gcc/explow.c:648
> 0xd61994 rs6000_legitimize_address
> /home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:8873

rs6000_legitimize_address called force_reg which ICEs in emit_move_insn
because the source is not the same mode as the dest (or an immediate, etc.)

You'll have to debug this a bit more to see what is going on.


> /home/EB/sebastian_h/archive/gcc-git/libgcc/emutls.c:171:13: note: 
> include '<stdlib.h>' or provide a declaration of 'realloc'
> /tmp/ccoZ1J0W.s: Assembler messages:
> /tmp/ccoZ1J0W.s:125: Error: can't resolve `.got' {.got section} - 
> `.LCTOC1' {*UND* section}

Your TLS is misconfigured.  Or something.


> --- a/gcc/config.gcc
> +++ b/gcc/config.gcc
> @@ -2381,7 +2381,7 @@ powerpc-*-eabi*)
>  	use_gcc_stdint=wrap
>  	;;
>  powerpc-*-rtems*)
> -	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
> +	tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
>  	extra_options="${extra_options} rs6000/sysv4.opt"
>  	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
>  	;;

You might want to break this line into parts.  It isn't so easy to see what
you changed now :-)

Have you checked if your generated files (say, those in libgcc) are
actually ELFv2 now, and if they look correct?


Segher

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

* Re: How to configure a bi-arch PowerPC GCC?
  2017-01-23 17:18         ` Segher Boessenkool
@ 2017-01-25 12:14           ` Sebastian Huber
       [not found]           ` <58889605.4060501@embedded-brains.de>
  1 sibling, 0 replies; 16+ messages in thread
From: Sebastian Huber @ 2017-01-25 12:14 UTC (permalink / raw)
  To: GCC Development

[-- Attachment #1: Type: text/plain, Size: 12618 bytes --]

On 23/01/17 18:18, Segher Boessenkool wrote:
> Hello again,
>
> On Mon, Jan 23, 2017 at 09:19:04AM +0100, Sebastian Huber wrote:
>>>> I am flexible in terms of the ABI choice for the 64-bit PowerPC. I guess
>>>> the ABI_ELFv2 is the way to go?
>>> It certainly is the most modern ABI.  It makes some requirements to what
>>> Power ISA features are required, which may or may not be a problem for
>>> your platform.  If you want to use BE, that should work with ELFv2 fine
>>> (and it did in the past at least), but it doesn't get serious testing.
>> I use now the attached patch and get the following error types (for
>> several multilibs):
>
>> /home/EB/sebastian_h/archive/gcc-git/libgcc/config/rs6000/ibm-ldouble.c:374:0:
>> /home/EB/sebastian_h/archive/gcc-git/libgcc/soft-fp/quad.h:72:1: error:
>> unable to emulate 'TF'
>>   typedef float TFtype __attribute__ ((mode (TF)));
>>   ^~~~~~~
>  From rs6000.c (rs6000_scalar_mode_supported_p):
>    else if (TARGET_FLOAT128_TYPE && (mode == KFmode || mode == IFmode))
>      return true;
>    else
>      return default_scalar_mode_supported_p (mode);
> and the latter has
>        if (precision == LONG_DOUBLE_TYPE_SIZE)
>          return true;
>        return false;
>
> so you have no 128-bit FP type at all.  Maybe your TARGET_IEEEQUAD definition
> is wrong, maybe something else...  What type *do* you want for float128?

I disabled the ibm-ldouble.c for RTEMS. Enabling the 128-bit FP support 
for the 32-bit powerpc-rtems resulted in a lot of ICEs.

https://gcc.gnu.org/ml/gcc/2017-01/msg00215.html

With -m64 I set now:

+      if (rs6000_isa_flags & OPTION_MASK_64BIT)                        \
+       {                                                       \
+         rs6000_long_double_type_size = 128;                   \
+         rs6000_elf_abi = 2;                                   \
+         rs6000_current_abi = ABI_ELFv2;                       \
+         rs6000_isa_flags &= ~OPTION_MASK_EABI; \

>
>
>> /home/EB/sebastian_h/archive/gcc-git/libgcc/unwind-dw2-fde.c: In
>> function 'search_object':
>> /home/EB/sebastian_h/archive/gcc-git/libgcc/unwind-dw2-fde.c:588:25:
>> internal compiler error: in emit_move_insn, at expr.c:3698
>>          v1->array[i1+i2] = v1->array[i1-1];
>>          ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
>> 0x6c49bb emit_move_insn(rtx_def*, rtx_def*)
>>          /home/EB/sebastian_h/archive/gcc-git/gcc/expr.c:3697
>> 0x6a5c2b force_reg
>>          /home/EB/sebastian_h/archive/gcc-git/gcc/explow.c:648
>> 0xd61994 rs6000_legitimize_address
>> /home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:8873
> rs6000_legitimize_address called force_reg which ICEs in emit_move_insn
> because the source is not the same mode as the dest (or an immediate, etc.)
>
> You'll have to debug this a bit more to see what is going on.

I still get a lot of ICEs with the attached two patches (examples):

/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c: In function 
'__multc3':
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: error: 
unrecognizable insn:
   }
   ^
(insn 59 58 60 2 (set (reg:CCFP 219)
          (compare:CCFP (reg/v:TF 193 [ x ])
              (reg/v:TF 193 [ x ]))) 
"/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c":1990 -1
       (nil))
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: internal 
compiler error: in extract_insn, at recog.c:2311
0x9945f5 _fatal_insn(char const*, rtx_def const*, char const*, int, char 
const*)
      /home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:108
0x994629 _fatal_insn_not_found(rtx_def const*, char const*, int, char 
const*)
      /home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:116
0x965ee7 extract_insn(rtx_insn*)
      /home/EB/sebastian_h/archive/gcc-git/gcc/recog.c:2311
0x7238c2 instantiate_virtual_regs_in_insn
      /home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1589
0x7238c2 instantiate_virtual_regs
      /home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1957
0x7238c2 execute
      /home/EB/sebastian_h/archive/gcc-git/gcc/function.c:2006
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

/home/EB/sebastian_h/archive/gcc-git/libgcc/unwind-dw2-fde.c: In 
function 'search_object':
/home/EB/sebastian_h/archive/gcc-git/libgcc/unwind-dw2-fde.c:588:25: 
internal compiler error: in emit_move_insn, at expr.c:3698
          v1->array[i1+i2] = v1->array[i1-1];
          ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
0x6c54ab emit_move_insn(rtx_def*, rtx_def*)
      /home/EB/sebastian_h/archive/gcc-git/gcc/expr.c:3697
0x6a68eb force_reg
      /home/EB/sebastian_h/archive/gcc-git/gcc/explow.c:648
0xd6bbc4 rs6000_legitimize_address
/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:8871
0x6a76e1 memory_address_addr_space(machine_mode, rtx_def*, unsigned char)
      /home/EB/sebastian_h/archive/gcc-git/gcc/explow.c:432
0x6c0551 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, 
expand_modifier, rtx_def**, bool)
      /home/EB/sebastian_h/archive/gcc-git/gcc/expr.c:10054
0x6ce5cc expand_expr
      /home/EB/sebastian_h/archive/gcc-git/gcc/expr.h:276
0x6ce5cc expand_assignment(tree_node*, tree_node*, bool)
      /home/EB/sebastian_h/archive/gcc-git/gcc/expr.c:5257
0x5b3dcc expand_gimple_stmt_1
      /home/EB/sebastian_h/archive/gcc-git/gcc/cfgexpand.c:3641
0x5b3dcc expand_gimple_stmt
      /home/EB/sebastian_h/archive/gcc-git/gcc/cfgexpand.c:3737
0x5b5c29 expand_gimple_basic_block
      /home/EB/sebastian_h/archive/gcc-git/gcc/cfgexpand.c:5744
0x5bb686 execute
      /home/EB/sebastian_h/archive/gcc-git/gcc/cfgexpand.c:6357
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c: In function 
'__multc3':
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: error: 
unable to generate reloads for:
   }
   ^
(insn 138 1211 139 16 (set (reg/v:TF 203 [ a ])
          (unspec:TF [
                  (reg:TF 237)
                  (reg/v:TF 203 [ a ])
                  (reg:TF 238)
              ] UNSPEC_COPYSIGN)) 
"/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c":1998 940 
{copysigntf3_soft}
       (expr_list:REG_DEAD (reg:TF 238)
          (nil)))
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: internal 
compiler error: in curr_insn_transform, at lra-constraints.c:3743
0x9945f5 _fatal_insn(char const*, rtx_def const*, char const*, int, char 
const*)
      /home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:108
0x892303 curr_insn_transform
      /home/EB/sebastian_h/archive/gcc-git/gcc/lra-constraints.c:3743
0x8931e6 lra_constraints(bool)
      /home/EB/sebastian_h/archive/gcc-git/gcc/lra-constraints.c:4699
0x87ce06 lra(_IO_FILE*)
      /home/EB/sebastian_h/archive/gcc-git/gcc/lra.c:2377
0x8337df do_reload
      /home/EB/sebastian_h/archive/gcc-git/gcc/ira.c:5400
0x8337df execute
      /home/EB/sebastian_h/archive/gcc-git/gcc/ira.c:5584
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

The libstdc++ build revealed this:

/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/mt_allocator.cc: 
In function 'void {anonymous}::_M_destroy_thread_key(void*)':
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/mt_allocator.cc:82:57: 
error: cast from 'void*' to 'uintptr_t {aka unsigned int}' loses 
precision [-fpermissive]
         uintptr_t _M_id = reinterpret_cast<uintptr_t>(__id);
                                                           ^
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/mt_allocator.cc: 
In member function 'std::size_t 
__gnu_cxx::__pool<true>::_M_get_thread_id()':
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/mt_allocator.cc:635:31: 
error: cast from 'void*' to 'uintptr_t {aka unsigned int}' loses 
precision [-fpermissive]
    uintptr_t _M_id = (uintptr_t)v;
                                 ^
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/mt_allocator.cc:648:52: 
warning: cast to pointer from integer of different size 
[-Wint-to-pointer-cast]
        __gthread_setspecific(freelist._M_key, (void*)_M_id);
                                                      ^~~~~

>
>
>> /home/EB/sebastian_h/archive/gcc-git/libgcc/emutls.c:171:13: note:
>> include '<stdlib.h>' or provide a declaration of 'realloc'
>> /tmp/ccoZ1J0W.s: Assembler messages:
>> /tmp/ccoZ1J0W.s:125: Error: can't resolve `.got' {.got section} -
>> `.LCTOC1' {*UND* section}
> Your TLS is misconfigured.  Or something.

I compared the linux64.h and freebsd64.h and as a wild guess I added:

+#undef TARGET_AIX
+#define        TARGET_AIX TARGET_64BIT
+

This seems to fix this issue. I don't know why.

>
>
>> --- a/gcc/config.gcc
>> +++ b/gcc/config.gcc
>> @@ -2381,7 +2381,7 @@ powerpc-*-eabi*)
>>   	use_gcc_stdint=wrap
>>   	;;
>>   powerpc-*-rtems*)
>> -	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
>> +	tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
>>   	extra_options="${extra_options} rs6000/sysv4.opt"
>>   	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
>>   	;;
> You might want to break this line into parts.  It isn't so easy to see what
> you changed now :-)

I simply added rs6000/biarch64.h to the head of the list.

>
> Have you checked if your generated files (say, those in libgcc) are
> actually ELFv2 now, and if they look correct?

The resulting objects look not completely bad:

powerpc-rtems4.12-readelf -h ./powerpc-rtems4.12/me6500/m32/libgcc/tramp.o
ELF Header:
    Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
    Class:                             ELF32
    Data:                              2's complement, big endian
    Version:                           1 (current)
    OS/ABI:                            UNIX - System V
    ABI Version:                       0
    Type:                              REL (Relocatable file)
    Machine:                           PowerPC
    Version:                           0x1
    Entry point address:               0x0
    Start of program headers:          0 (bytes into file)
    Start of section headers:          1056 (bytes into file)
    Flags:                             0x0
    Size of this header:               52 (bytes)
    Size of program headers:           0 (bytes)
    Number of program headers:         0
    Size of section headers:           40 (bytes)
    Number of section headers:         15
    Section header string table index: 14

powerpc-rtems4.12-readelf -h ./powerpc-rtems4.12/me6500/m64/libgcc/tramp.o
ELF Header:
    Magic:   7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00
    Class:                             ELF64
    Data:                              2's complement, big endian
    Version:                           1 (current)
    OS/ABI:                            UNIX - System V
    ABI Version:                       0
    Type:                              REL (Relocatable file)
    Machine:                           PowerPC64
    Version:                           0x1
    Entry point address:               0x0
    Start of program headers:          0 (bytes into file)
    Start of section headers:          1472 (bytes into file)
    Flags:                             0x2, abiv2
    Size of this header:               64 (bytes)
    Size of program headers:           0 (bytes)
    Number of program headers:         0
    Size of section headers:           64 (bytes)
    Number of section headers:         17
    Section header string table index: 16

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



[-- Attachment #2: 0001-RTEMS-Define-__powerpc__.patch --]
[-- Type: text/x-patch, Size: 1532 bytes --]

From 7a35ba21fa00567a986461ca66dce58019c6de31 Mon Sep 17 00:00:00 2001
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Tue, 24 Jan 2017 11:20:22 +0100
Subject: [PATCH 1/2] RTEMS: Define __powerpc__

---
 gcc/config/rs6000/rtems.h          | 1 +
 libgcc/config/rs6000/ibm-ldouble.c | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/config/rs6000/rtems.h b/gcc/config/rs6000/rtems.h
index 54a36de..531379a 100644
--- a/gcc/config/rs6000/rtems.h
+++ b/gcc/config/rs6000/rtems.h
@@ -25,6 +25,7 @@
   do                                      \
     {                                     \
       builtin_define_std ("PPC");         \
+      builtin_define_std ("powerpc");     \
       builtin_define ("__rtems__");       \
       builtin_define ("__USE_INIT_FINI__"); \
       builtin_assert ("system=rtems");    \
diff --git a/libgcc/config/rs6000/ibm-ldouble.c b/libgcc/config/rs6000/ibm-ldouble.c
index 949b50c..e99652e 100644
--- a/libgcc/config/rs6000/ibm-ldouble.c
+++ b/libgcc/config/rs6000/ibm-ldouble.c
@@ -45,7 +45,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    This code currently assumes the most significant double is in
    the lower numbered register or lower addressed memory.  */
 
-#if defined (__MACH__) || defined (__powerpc__) || defined (_AIX)
+#if (defined (__MACH__) || defined (__powerpc__) || defined (_AIX)) \
+    && !defined (__rtems__)
 
 #define fabs(x) __builtin_fabs(x)
 #define isless(x, y) __builtin_isless (x, y)
-- 
1.8.4.5



[-- Attachment #3: 0002-RTEMS-Add-64-bit-PowerPC-support.patch --]
[-- Type: text/x-patch, Size: 5154 bytes --]

From 17510dac36db4d9cd46a9b94492efb69b8457093 Mon Sep 17 00:00:00 2001
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Fri, 20 Jan 2017 10:05:52 +0100
Subject: [PATCH 2/2] RTEMS: Add 64-bit PowerPC support

---
 gcc/config.gcc            |  2 +-
 gcc/config/rs6000/rtems.h | 72 +++++++++++++++++++++++++++++++++++++++--------
 gcc/config/rs6000/sysv4.h |  2 +-
 gcc/config/rs6000/t-rtems |  5 ++++
 4 files changed, 67 insertions(+), 14 deletions(-)

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 03b1894..b293a2e 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2381,7 +2381,7 @@ powerpc-*-eabi*)
 	use_gcc_stdint=wrap
 	;;
 powerpc-*-rtems*)
-	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
+	tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
 	extra_options="${extra_options} rs6000/sysv4.opt"
 	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
 	;;
diff --git a/gcc/config/rs6000/rtems.h b/gcc/config/rs6000/rtems.h
index 531379a..fbaf5d3 100644
--- a/gcc/config/rs6000/rtems.h
+++ b/gcc/config/rs6000/rtems.h
@@ -20,19 +20,33 @@
 
 /* Specify predefined symbols in preprocessor.  */
 
+#undef	TARGET_AIX
+#define	TARGET_AIX TARGET_64BIT
+
 #undef TARGET_OS_CPP_BUILTINS
-#define TARGET_OS_CPP_BUILTINS()          \
-  do                                      \
-    {                                     \
-      builtin_define_std ("PPC");         \
-      builtin_define_std ("powerpc");     \
-      builtin_define ("__rtems__");       \
-      builtin_define ("__USE_INIT_FINI__"); \
-      builtin_assert ("system=rtems");    \
-      builtin_assert ("cpu=powerpc");     \
-      builtin_assert ("machine=powerpc"); \
-      TARGET_OS_SYSV_CPP_BUILTINS ();     \
-    }                                     \
+#define TARGET_OS_CPP_BUILTINS()			\
+  do							\
+    {							\
+      builtin_define ("__rtems__");			\
+      builtin_define ("__USE_INIT_FINI__");		\
+      builtin_assert ("system=rtems");			\
+      if (TARGET_64BIT)					\
+	{						\
+	  builtin_define ("__PPC__");			\
+	  builtin_define ("__PPC64__");			\
+	  builtin_define ("__powerpc64__");		\
+	  builtin_assert ("cpu=powerpc64");		\
+	  builtin_assert ("machine=powerpc64");		\
+	}						\
+      else						\
+	{						\
+	  builtin_define_std ("PPC");			\
+	  builtin_define_std ("powerpc");		\
+	  builtin_assert ("cpu=powerpc");		\
+	  builtin_assert ("machine=powerpc");		\
+	  TARGET_OS_SYSV_CPP_BUILTINS ();		\
+	}						\
+    }							\
   while (0)
 
 #undef TARGET_LIBGCC_SDATA_SECTION
@@ -59,3 +73,37 @@
 #undef  SUBSUBTARGET_EXTRA_SPECS
 #define SUBSUBTARGET_EXTRA_SPECS \
   { "cpp_os_rtems",		CPP_OS_RTEMS_SPEC }
+
+#define INVALID_64BIT "-m%s not supported in this configuration"
+
+#undef	SUBSUBTARGET_OVERRIDE_OPTIONS
+#define	SUBSUBTARGET_OVERRIDE_OPTIONS				\
+  do								\
+    {								\
+      if (rs6000_isa_flags & OPTION_MASK_64BIT)			\
+	{							\
+	  rs6000_long_double_type_size = 128;			\
+	  rs6000_elf_abi = 2;					\
+	  rs6000_current_abi = ABI_ELFv2;			\
+	  rs6000_isa_flags &= ~OPTION_MASK_EABI;		\
+	  if (rs6000_isa_flags & OPTION_MASK_RELOCATABLE)	\
+	    {							\
+	      rs6000_isa_flags &= ~OPTION_MASK_RELOCATABLE;	\
+	      error (INVALID_64BIT, "relocatable");		\
+	    }							\
+	  if (TARGET_PROTOTYPE)					\
+	    {							\
+	      target_prototype = 0;				\
+	      error (INVALID_64BIT, "prototype");		\
+	    }							\
+	  if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0)	\
+	    {							\
+	      rs6000_isa_flags |= OPTION_MASK_POWERPC64;	\
+	      error ("-m64 requires a PowerPC64 cpu");		\
+	    }							\
+	}							\
+    }								\
+  while (0)
+
+#undef TARGET_IEEEQUAD
+#define TARGET_IEEEQUAD 1
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index a5abeee..fccb1f0 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -533,7 +533,7 @@ extern int fixuplabelno;
 #define DEFAULT_ASM_ENDIAN " -mbig"
 
 #undef	ASM_SPEC
-#define	ASM_SPEC "%(asm_cpu) \
+#define	ASM_SPEC "%{!m64:-a32}%{m64:-a64} %(asm_cpu) \
 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \
 %{mrelocatable} %{mrelocatable-lib} %{" FPIE_OR_FPIC_SPEC ":-K PIC} \
 %{memb|msdata=eabi: -memb}" \
diff --git a/gcc/config/rs6000/t-rtems b/gcc/config/rs6000/t-rtems
index 7c7637d..8ff0656 100644
--- a/gcc/config/rs6000/t-rtems
+++ b/gcc/config/rs6000/t-rtems
@@ -30,6 +30,9 @@ MULTILIB_DIRNAMES += m403 m505 m603e m604 m860 m7400 m8540 me6500
 MULTILIB_OPTIONS += m32
 MULTILIB_DIRNAMES += m32
 
+MULTILIB_OPTIONS += m64
+MULTILIB_DIRNAMES += m64
+
 MULTILIB_OPTIONS += msoft-float/mfloat-gprs=double
 MULTILIB_DIRNAMES += nof gprsdouble
 
@@ -77,3 +80,5 @@ MULTILIB_REQUIRED += mcpu=8540/mfloat-gprs=double
 MULTILIB_REQUIRED += mcpu=860
 MULTILIB_REQUIRED += mcpu=e6500/m32
 MULTILIB_REQUIRED += mcpu=e6500/m32/msoft-float/mno-altivec
+MULTILIB_REQUIRED += mcpu=e6500/m64
+MULTILIB_REQUIRED += mcpu=e6500/m64/msoft-float/mno-altivec
-- 
1.8.4.5



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

* Re: How to configure a bi-arch PowerPC GCC?
       [not found]           ` <58889605.4060501@embedded-brains.de>
@ 2017-01-25 17:55             ` Segher Boessenkool
  2017-01-30 10:38               ` Sebastian Huber
  0 siblings, 1 reply; 16+ messages in thread
From: Segher Boessenkool @ 2017-01-25 17:55 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: GCC Development

On Wed, Jan 25, 2017 at 01:11:49PM +0100, Sebastian Huber wrote:
> I still get a lot of ICEs with the attached two patches (examples):

> /home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c: In function 
> '__multc3':
> /home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: error: 
> unrecognizable insn:
>  }
>  ^
> (insn 59 58 60 2 (set (reg:CCFP 219)
>         (compare:CCFP (reg/v:TF 193 [ x ])
>             (reg/v:TF 193 [ x ]))) 
> "/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c":1990 -1
>      (nil))
> /home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: internal 
> compiler error: in extract_insn, at recog.c:2311

The IEEE128 code almost certainly has some bugs on non-Linux configurations.
You could try debugging it, or you could avoid it (for now) by e.g. making
long double the same as double.

> /home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/mt_allocator.cc: 
> In function 'void {anonymous}::_M_destroy_thread_key(void*)':
> /home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/mt_allocator.cc:82:57: 
> error: cast from 'void*' to 'uintptr_t {aka unsigned int}' loses precision 
> [-fpermissive]
>        uintptr_t _M_id = reinterpret_cast<uintptr_t>(__id);
>                                                          ^

This sounds like your uintptr_t is a 32-bit type?  That won't work.

> >>/home/EB/sebastian_h/archive/gcc-git/libgcc/emutls.c:171:13: note:
> >>include '<stdlib.h>' or provide a declaration of 'realloc'
> >>/tmp/ccoZ1J0W.s: Assembler messages:
> >>/tmp/ccoZ1J0W.s:125: Error: can't resolve `.got' {.got section} -
> >>`.LCTOC1' {*UND* section}
> >Your TLS is misconfigured.  Or something.
> 
> I compared the linux64.h and freebsd64.h and as a wild guess I added:
> 
> +#undef TARGET_AIX
> +#define        TARGET_AIX TARGET_64BIT
> +
> 
> This seems to fix this issue. I don't know why.

Me neither.

> The resulting objects look not completely bad:

>   Flags:                             0x2, abiv2

Yup, looks correct.


Segher

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

* Re: How to configure a bi-arch PowerPC GCC?
  2017-01-25 17:55             ` Segher Boessenkool
@ 2017-01-30 10:38               ` Sebastian Huber
  2017-01-30 12:13                 ` Sebastian Huber
                                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Sebastian Huber @ 2017-01-30 10:38 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: GCC Development

[-- Attachment #1: Type: text/plain, Size: 1906 bytes --]

On 25/01/17 18:55, Segher Boessenkool wrote:
> On Wed, Jan 25, 2017 at 01:11:49PM +0100, Sebastian Huber wrote:
>> >I still get a lot of ICEs with the attached two patches (examples):
>> >/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c: In function
>> >'__multc3':
>> >/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: error:
>> >unrecognizable insn:
>> >  }
>> >  ^
>> >(insn 59 58 60 2 (set (reg:CCFP 219)
>> >         (compare:CCFP (reg/v:TF 193 [ x ])
>> >             (reg/v:TF 193 [ x ])))
>> >"/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c":1990 -1
>> >      (nil))
>> >/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: internal
>> >compiler error: in extract_insn, at recog.c:2311
> The IEEE128 code almost certainly has some bugs on non-Linux configurations.
> You could try debugging it, or you could avoid it (for now) by e.g. making
> long double the same as double.
>

If I set rs6000_long_double_type_size to 64, then I can build all libgcc 
multilibs including the one for -m64 -mcpu=e6500. I am a bit surprised 
that the GCC support for 64-bit PowerPC is so extremely Linux-dependent. 
I guess that I have to figure out all the magic configuration bits to 
get everything set up like it is on Linux.  It would be nice if the 
working Linux configuration bits are the default.

With rs6000_long_double_type_size == 128, then I get the attached ICEs.

I would be glad to get some advice how I can debug them, since I have no 
idea how the compiler works actually if it comes to code generation.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


[-- Attachment #2: gcc.log --]
[-- Type: text/plain, Size: 60237 bytes --]

/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/ -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include    -g -O2 -mcpu=e6500 -m64 -O2 -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../newlib/libc/sys/rtems/include -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../../.././gcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc/. -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../gcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../include  -DHAVE_CC_TLS  -o _multc3.o -MT _multc3.o -MD -MP -MF _multc3.dep -DL_multc3 -c /home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c: In function '__multc3':
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: error: unrecognizable insn:
 }
 ^
(insn 59 58 60 2 (set (reg:CCFP 219)
        (compare:CCFP (reg/v:TF 193 [ x ])
            (reg/v:TF 193 [ x ]))) "/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c":1990 -1
     (nil))
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: internal compiler error: in extract_insn, at recog.c:2311
0x994ea5 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:108
0x994ed9 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:116
0x966797 extract_insn(rtx_insn*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/recog.c:2311
0x723ca2 instantiate_virtual_regs_in_insn
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1589
0x723ca2 instantiate_virtual_regs
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1957
0x723ca2 execute
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:2006
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: [_multc3.o] Error 1 (ignored)
/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/ -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include    -g -O2 -mcpu=e6500 -m64 -O2 -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../newlib/libc/sys/rtems/include -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../../.././gcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc/. -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../gcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../include  -DHAVE_CC_TLS  -o _divtc3.o -MT _divtc3.o -MD -MP -MF _divtc3.dep -DL_divtc3 -c /home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c: In function '__divtc3':
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2094:1: error: unrecognizable insn:
 }
 ^
(insn 30 29 31 2 (set (reg:CCFP 241)
        (compare:CCFP (reg:TF 238)
            (reg:TF 240))) "/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c":2051 -1
     (nil))
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2094:1: internal compiler error: in extract_insn, at recog.c:2311
0x994ea5 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:108
0x994ed9 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:116
0x966797 extract_insn(rtx_insn*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/recog.c:2311
0x723ca2 instantiate_virtual_regs_in_insn
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1589
0x723ca2 instantiate_virtual_regs
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1957
0x723ca2 execute
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:2006
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: [_divtc3.o] Error 1 (ignored)
/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/ -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include    -g -O2 -mcpu=e6500 -m64 -O2 -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../newlib/libc/sys/rtems/include -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../../.././gcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc/. -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../gcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../include  -DHAVE_CC_TLS  -o _fixtfdi.o -MT _fixtfdi.o -MD -MP -MF _fixtfdi.dep -DL_fixtfdi -c /home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c: In function '__fixtfti':
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:1394:1: error: unrecognizable insn:
 }
 ^
(insn 8 7 9 2 (set (reg:CCFP 163)
        (compare:CCFP (reg/v:TF 160 [ a ])
            (reg:TF 161))) "/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c":1391 -1
     (nil))
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:1394:1: internal compiler error: in extract_insn, at recog.c:2311
0x994ea5 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:108
0x994ed9 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:116
0x966797 extract_insn(rtx_insn*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/recog.c:2311
0x723ca2 instantiate_virtual_regs_in_insn
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1589
0x723ca2 instantiate_virtual_regs
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1957
0x723ca2 execute
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:2006
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: [_fixtfdi.o] Error 1 (ignored)
/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/ -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include    -g -O2 -mcpu=e6500 -m64 -O2 -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../newlib/libc/sys/rtems/include -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../../.././gcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc/. -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../gcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../include  -DHAVE_CC_TLS  -o _fixunstfdi.o -MT _fixunstfdi.o -MD -MP -MF _fixunstfdi.dep -DL_fixunstfdi -c /home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c: In function '__fixunstfti':
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:1384:1: error: unrecognizable insn:
 }
 ^
(insn 9 8 10 2 (set (reg:CCFP 170)
        (compare:CCFP (reg/v:TF 167 [ a ])
            (reg:TF 168))) "/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c":1365 -1
     (nil))
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:1384:1: internal compiler error: in extract_insn, at recog.c:2311
0x994ea5 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:108
0x994ed9 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:116
0x966797 extract_insn(rtx_insn*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/recog.c:2311
0x723ca2 instantiate_virtual_regs_in_insn
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1589
0x723ca2 instantiate_virtual_regs
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1957
0x723ca2 execute
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:2006
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/ -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include    -g -O2 -mcpu=e6500 -m64 -msoft-float -mno-altivec -O2 -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../newlib/libc/sys/rtems/include -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../../../../.././gcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc/. -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../gcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../include  -DHAVE_CC_TLS  -o _multc3.o -MT _multc3.o -MD -MP -MF _multc3.dep -DL_multc3 -c /home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c: In function '__multc3':
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: error: unable to generate reloads for:
 }
 ^
(insn 138 1211 139 16 (set (reg/v:TF 203 [ a ])
        (unspec:TF [
                (reg:TF 237)
                (reg/v:TF 203 [ a ])
                (reg:TF 238)
            ] UNSPEC_COPYSIGN)) "/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c":1998 940 {copysigntf3_soft}
     (expr_list:REG_DEAD (reg:TF 238)
        (nil)))
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: internal compiler error: in curr_insn_transform, at lra-constraints.c:3773
0x994ea5 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:108
0x892863 curr_insn_transform
	/home/EB/sebastian_h/archive/gcc-git/gcc/lra-constraints.c:3773
0x893746 lra_constraints(bool)
	/home/EB/sebastian_h/archive/gcc-git/gcc/lra-constraints.c:4732
0x87d1e1 lra(_IO_FILE*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/lra.c:2378
0x833bcf do_reload
	/home/EB/sebastian_h/archive/gcc-git/gcc/ira.c:5400
0x833bcf execute
	/home/EB/sebastian_h/archive/gcc-git/gcc/ira.c:5584
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: [_multc3.o] Error 1 (ignored)
/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/ -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include    -g -O2 -mcpu=e6500 -m64 -msoft-float -mno-altivec -O2 -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../newlib/libc/sys/rtems/include -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../../../../.././gcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc/. -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../gcc -I/home/EB/sebastian_h/archive/gcc-git/libgcc/../include  -DHAVE_CC_TLS  -o _divtc3.o -MT _divtc3.o -MD -MP -MF _divtc3.dep -DL_divtc3 -c /home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c: In function '__divtc3':
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2094:1: error: unable to generate reloads for:
 }
 ^
(insn 189 1186 190 11 (set (reg:TF 167 [ _25 ])
        (unspec:TF [
                (reg:TF 267)
                (reg/v:TF 227 [ c ])
                (reg:TF 268)
            ] UNSPEC_COPYSIGN)) "/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c":2072 940 {copysigntf3_soft}
     (expr_list:REG_DEAD (reg:TF 268)
        (expr_list:REG_DEAD (reg:TF 267)
            (expr_list:REG_DEAD (reg/v:TF 227 [ c ])
                (nil)))))
/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2094:1: internal compiler error: in curr_insn_transform, at lra-constraints.c:3773
0x994ea5 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:108
0x892863 curr_insn_transform
	/home/EB/sebastian_h/archive/gcc-git/gcc/lra-constraints.c:3773
0x893746 lra_constraints(bool)
	/home/EB/sebastian_h/archive/gcc-git/gcc/lra-constraints.c:4732
0x87d1e1 lra(_IO_FILE*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/lra.c:2378
0x833bcf do_reload
	/home/EB/sebastian_h/archive/gcc-git/gcc/ira.c:5400
0x833bcf execute
	/home/EB/sebastian_h/archive/gcc-git/gcc/ira.c:5584
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/ -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include  -mcpu=e6500 -m64 -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.5.0\" -DPACKAGE_STRING=\"newlib\ 2.5.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I/home/EB/sebastian_h/archive/gcc-git/newlib/libm/common -D_COMPILING_NEWLIB -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN -D_NO_POSIX_SPAWN -D_I386MACH_ALLOW_HW_INTERRUPTS -fno-builtin      -g -O2  -mcpu=e6500 -m64 -c -o lib_a-sqrtl.o `test -f 'sqrtl.c' || echo '/home/EB/sebastian_h/archive/gcc-git/newlib/libm/common/'`sqrtl.c
/home/EB/sebastian_h/archive/gcc-git/newlib/libm/common/sqrtl.c: In function 'sqrtl':
/home/EB/sebastian_h/archive/gcc-git/newlib/libm/common/sqrtl.c:192:1: error: unrecognizable insn:
 }
 ^
(insn 32 31 33 5 (set (reg:CCFP 211)
        (compare:CCFP (reg/v:TF 203 [ x ])
            (reg:TF 209))) "/home/EB/sebastian_h/archive/gcc-git/newlib/libm/common/sqrtl.c":136 -1
     (nil))
/home/EB/sebastian_h/archive/gcc-git/newlib/libm/common/sqrtl.c:192:1: internal compiler error: in extract_insn, at recog.c:2311
0x994ea5 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:108
0x994ed9 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:116
0x966797 extract_insn(rtx_insn*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/recog.c:2311
0x723ca2 instantiate_virtual_regs_in_insn
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1589
0x723ca2 instantiate_virtual_regs
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1957
0x723ca2 execute
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:2006
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[8]: [lib_a-sqrtl.o] Error 1 (ignored)
/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/ -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include  -mcpu=e6500 -m64 -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.5.0\" -DPACKAGE_STRING=\"newlib\ 2.5.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I/home/EB/sebastian_h/archive/gcc-git/newlib/libm/common -D_COMPILING_NEWLIB -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN -D_NO_POSIX_SPAWN -D_I386MACH_ALLOW_HW_INTERRUPTS -fno-builtin      -g -O2  -mcpu=e6500 -m64 -c -o lib_a-sl_finite.o `test -f 'sl_finite.c' || echo '/home/EB/sebastian_h/archive/gcc-git/newlib/libm/common/'`sl_finite.c
/home/EB/sebastian_h/archive/gcc-git/newlib/libm/common/sl_finite.c: In function 'finitel':
/home/EB/sebastian_h/archive/gcc-git/newlib/libm/common/sl_finite.c:22:10: internal compiler error: in validate_condition_mode, at config/rs6000/rs6000.c:20551
   return __builtin_isfinite (x);
          ^~~~~~~~~~~~~~~~~~~~~~
0xd5ed1b validate_condition_mode(rtx_code, machine_mode)
	/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:20547
0xd5f12c rs6000_generate_compare
	/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:24323
0xd63a92 rs6000_emit_sCOND(machine_mode, rtx_def**)
	/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:24736
0xf0998a gen_cstoretf4(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11703
0x905588 maybe_expand_insn(insn_code, unsigned int, expand_operand*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/optabs.c:7057
0x6b2c59 emit_cstore(rtx_def*, insn_code, rtx_code, machine_mode, machine_mode, int, rtx_def*, rtx_def*, int, machine_mode)
	/home/EB/sebastian_h/archive/gcc-git/gcc/expmed.c:5267
0x6b39bf emit_store_flag_1
	/home/EB/sebastian_h/archive/gcc-git/gcc/expmed.c:5506
0x6b2e12 emit_store_flag(rtx_def*, rtx_code, rtx_def*, rtx_def*, machine_mode, int, int)
	/home/EB/sebastian_h/archive/gcc-git/gcc/expmed.c:5557
0x6b3e9a emit_store_flag_force(rtx_def*, rtx_code, rtx_def*, rtx_def*, machine_mode, int, int)
	/home/EB/sebastian_h/archive/gcc-git/gcc/expmed.c:5880
0x6d5d4b do_store_flag
	/home/EB/sebastian_h/archive/gcc-git/gcc/expr.c:11453
0x6d5d4b expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier)
	/home/EB/sebastian_h/archive/gcc-git/gcc/expr.c:9205
0x6c2de9 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool)
	/home/EB/sebastian_h/archive/gcc-git/gcc/expr.c:9730
0x6d4e24 expand_expr
	/home/EB/sebastian_h/archive/gcc-git/gcc/expr.h:276
0x6d4e24 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier)
	/home/EB/sebastian_h/archive/gcc-git/gcc/expr.c:9004
0x6c2de9 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool)
	/home/EB/sebastian_h/archive/gcc-git/gcc/expr.c:9730
0x6d4b1e expand_expr
	/home/EB/sebastian_h/archive/gcc-git/gcc/expr.h:276
0x6d4b1e expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier)
	/home/EB/sebastian_h/archive/gcc-git/gcc/expr.c:8315
0x6c2de9 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool)
	/home/EB/sebastian_h/archive/gcc-git/gcc/expr.c:9730
0x5b40bd expand_expr
	/home/EB/sebastian_h/archive/gcc-git/gcc/expr.h:276
0x5b40bd expand_return
	/home/EB/sebastian_h/archive/gcc-git/gcc/cfgexpand.c:3526
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
libtool: compile:  /build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -shared-libgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc -nostdinc++ -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/.libs -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/libsupc++/.libs -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include -mcpu=e6500 -m64 -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/../libgcc -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include/powerpc-rtems4.12 -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=fundamental_type_info.lo -g -O2 -mcpu=e6500 -m64 -c /home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++/fundamental_type_info.cc -o fundamental_type_info.o
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++/fundamental_type_info.cc:35:1: internal compiler error: in write_builtin_type, at cp/mangle.c:2574
 }
 ^
0x65a189 write_builtin_type
	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/mangle.c:2574
0x65a189 write_type
	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/mangle.c:2172
0x65fda2 mangle_special_for_type
	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/mangle.c:3968
0x5b09fe get_tinfo_decl(tree_node*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/rtti.c:417
0x5b3e49 emit_support_tinfo_1
	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/rtti.c:1492
0x5b404b emit_support_tinfo_1
	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/rtti.c:1483
0x5b404b emit_support_tinfos()
	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/rtti.c:1562
0x5564ac c_parse_final_cleanups()
	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/decl2.c:4511
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[8]: [fundamental_type_info.lo] Error 1 (ignored)
/bin/sh ../libtool --tag CXX --tag disable-shared   --mode=link /build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -shared-libgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc -nostdinc++ -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/.libs -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/libsupc++/.libs -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include  -mcpu=e6500 -m64     -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi  -fdiagnostics-show-location=once    -ffunction-sections -fdata-sections  -frandom-seed=libsupc++convenience.la  '-mcpu=e6500' '-m64' -o libsupc++convenience.la  array_type_info.lo atexit_arm.lo atexit_thread.lo bad_alloc.lo bad_array_length.lo bad_array_new.lo bad_cast.lo bad_typeid.lo class_type_info.lo del_op.lo del_ops.lo del_opnt.lo del_opv.lo del_opvs.lo del_opvnt.lo dyncast.lo eh_alloc.lo eh_arm.lo eh_aux_runtime.lo eh_call.lo eh_catch.lo eh_exception.lo eh_globals.lo eh_personality.lo eh_ptr.lo eh_term_handler.lo eh_terminate.lo eh_tm.lo eh_throw.lo eh_type.lo eh_unex_handler.lo enum_type_info.lo function_type_info.lo fundamental_type_info.lo guard.lo guard_error.lo hash_bytes.lo nested_exception.lo new_handler.lo new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo new_opa.lo new_opant.lo new_opva.lo new_opvant.lo del_opa.lo del_opant.lo del_opsa.lo del_opva.lo del_opvant.lo del_opvsa.lo pbase_type_info.lo pmem_type_info.lo pointer_type_info.lo pure.lo si_class_type_info.lo tinfo.lo tinfo2.lo vec.lo vmi_class_type_info.lo vterminate.lo cp-demangle.lo   
libtool: link: `fundamental_type_info.lo' is not a valid libtool object
make[8]: [libsupc++convenience.la] Error 1 (ignored)
/bin/sh ../libtool --tag CXX --tag disable-shared   --mode=link /build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -shared-libgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc -nostdinc++ -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/.libs -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/libsupc++/.libs -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include  -mcpu=e6500 -m64     -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi  -fdiagnostics-show-location=once    -ffunction-sections -fdata-sections  -frandom-seed=libsupc++.la  '-mcpu=e6500' '-m64' -o libsupc++.la -rpath /opt/rtems-4.12/lib64/gcc/powerpc-rtems4.12/7.0.1/me6500/m64 array_type_info.lo atexit_arm.lo atexit_thread.lo bad_alloc.lo bad_array_length.lo bad_array_new.lo bad_cast.lo bad_typeid.lo class_type_info.lo del_op.lo del_ops.lo del_opnt.lo del_opv.lo del_opvs.lo del_opvnt.lo dyncast.lo eh_alloc.lo eh_arm.lo eh_aux_runtime.lo eh_call.lo eh_catch.lo eh_exception.lo eh_globals.lo eh_personality.lo eh_ptr.lo eh_term_handler.lo eh_terminate.lo eh_tm.lo eh_throw.lo eh_type.lo eh_unex_handler.lo enum_type_info.lo function_type_info.lo fundamental_type_info.lo guard.lo guard_error.lo hash_bytes.lo nested_exception.lo new_handler.lo new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo new_opa.lo new_opant.lo new_opva.lo new_opvant.lo del_opa.lo del_opant.lo del_opsa.lo del_opva.lo del_opvant.lo del_opvsa.lo pbase_type_info.lo pmem_type_info.lo pointer_type_info.lo pure.lo si_class_type_info.lo tinfo.lo tinfo2.lo vec.lo vmi_class_type_info.lo vterminate.lo cp-demangle.lo   
libtool: link: `fundamental_type_info.lo' is not a valid libtool object
make[8]: [libsupc++.la] Error 1 (ignored)
make[8]: Leaving directory `/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/libsupc++'
Making all in src
make[8]: Entering directory `/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src'
Making all in c++98
make[9]: Entering directory `/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/c++98'
/bin/sh ../../libtool --tag CXX --tag disable-shared   --mode=compile /build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -shared-libgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc -nostdinc++ -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/.libs -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/libsupc++/.libs -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include  -mcpu=e6500 -m64 -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/../libgcc -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include/powerpc-rtems4.12 -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++   -std=gnu++98   -fno-implicit-templates  -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi  -fdiagnostics-show-location=once   -ffunction-sections -fdata-sections  -frandom-seed=hash_tr1.lo -g -O2  -mcpu=e6500 -m64  -c -o hash_tr1.lo /home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/hash_tr1.cc
libtool: compile:  /build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -shared-libgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc -nostdinc++ -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/.libs -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/libsupc++/.libs -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include -mcpu=e6500 -m64 -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/../libgcc -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include/powerpc-rtems4.12 -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++ -std=gnu++98 -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=hash_tr1.lo -g -O2 -mcpu=e6500 -m64 -c /home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/hash_tr1.cc -o hash_tr1.o
In file included from /home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/hash_tr1.cc:29:0:
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/hash-long-double-tr1-aux.cc: In member function 'std::size_t std::tr1::hash<_Tp>::operator()(_Tp) const [with _Tp = long double]':
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/hash-long-double-tr1-aux.cc:54:7: error: unrecognizable insn:
       }
       ^
(insn 10 9 11 2 (set (reg:CCFP 172)
        (compare:CCFP (reg/v:TF 169 [ __val ])
            (reg:TF 170))) "/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/hash-long-double-tr1-aux.cc":36 -1
     (nil))
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/hash-long-double-tr1-aux.cc:54:7: internal compiler error: in extract_insn, at recog.c:2311
0xb73c95 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:108
0xb73cc9 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:116
0xb45587 extract_insn(rtx_insn*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/recog.c:2311
0x90c2f2 instantiate_virtual_regs_in_insn
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1589
0x90c2f2 instantiate_virtual_regs
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1957
0x90c2f2 execute
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:2006
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[9]: [hash_tr1.lo] Error 1 (ignored)
/bin/sh ../../libtool --tag CXX --tag disable-shared   --mode=compile /build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -shared-libgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc -nostdinc++ -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/.libs -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/libsupc++/.libs -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include  -mcpu=e6500 -m64 -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/../libgcc -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include/powerpc-rtems4.12 -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++   -std=gnu++98   -fno-implicit-templates  -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi  -fdiagnostics-show-location=once   -ffunction-sections -fdata-sections  -frandom-seed=math_stubs_long_double.lo -g -O2  -mcpu=e6500 -m64  -c -o math_stubs_long_double.lo /home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/math_stubs_long_double.cc
libtool: compile:  /build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -shared-libgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc -nostdinc++ -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/.libs -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/libsupc++/.libs -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include -mcpu=e6500 -m64 -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/../libgcc -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include/powerpc-rtems4.12 -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++ -std=gnu++98 -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=math_stubs_long_double.lo -g -O2 -mcpu=e6500 -m64 -c /home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/math_stubs_long_double.cc -o math_stubs_long_double.o
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/math_stubs_long_double.cc: In function 'long double hypotl(long double, long double)':
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/math_stubs_long_double.cc:146:3: error: unrecognizable insn:
   }
   ^
(insn 33 32 34 2 (set (reg:CCFP 181)
        (compare:CCFP (reg/v:TF 169 [ <retval> ])
            (reg:TF 179))) "/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/math_stubs_long_double.cc":142 -1
     (nil))
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++98/math_stubs_long_double.cc:146:3: internal compiler error: in extract_insn, at recog.c:2311
0xb73c95 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:108
0xb73cc9 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:116
0xb45587 extract_insn(rtx_insn*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/recog.c:2311
0x90c2f2 instantiate_virtual_regs_in_insn
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1589
0x90c2f2 instantiate_virtual_regs
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1957
0x90c2f2 execute
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:2006
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[9]: [math_stubs_long_double.lo] Error 1 (ignored)
/bin/sh ../../libtool --tag CXX --tag disable-shared   --mode=compile /build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -shared-libgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc -nostdinc++ -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/.libs -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/libsupc++/.libs -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include  -mcpu=e6500 -m64 -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/../libgcc -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include/powerpc-rtems4.12 -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++   -std=gnu++98   -fno-implicit-templates  -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi  -fdiagnostics-show-location=once   -ffunction-sections -fdata-sections  -frandom-seed=c++locale.lo -g -O2  -mcpu=e6500 -m64  -fimplicit-templates -c c++locale.cc
libtool: compile:  /build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -shared-libgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc -nostdinc++ -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/.libs -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/libsupc++/.libs -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include -mcpu=e6500 -m64 -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/../libgcc -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include/powerpc-rtems4.12 -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++ -std=gnu++98 -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=c++locale.lo -g -O2 -mcpu=e6500 -m64 -fimplicit-templates -c c++locale.cc -o c++locale.o
c++locale.cc: In function 'void std::__convert_to_v(const char*, _Tp&, std::ios_base::iostate&, int* const&) [with _Tp = long double]':
c++locale.cc:217:5: error: unrecognizable insn:
     }
     ^
(insn 62 61 63 7 (set (reg:CCFP 186)
        (compare:CCFP (reg:TF 156 [ _2 ])
            (reg:TF 184))) "c++locale.cc":203 -1
     (nil))
c++locale.cc:217:5: internal compiler error: in extract_insn, at recog.c:2311
0xb73c95 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:108
0xb73cc9 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:116
0xb45587 extract_insn(rtx_insn*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/recog.c:2311
0x90c2f2 instantiate_virtual_regs_in_insn
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1589
0x90c2f2 instantiate_virtual_regs
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1957
0x90c2f2 execute
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:2006
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[9]: [c++locale.lo] Error 1 (ignored)
/bin/sh ../../libtool --tag CXX --tag disable-shared   --mode=link /build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -shared-libgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc -nostdinc++ -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/.libs -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/libsupc++/.libs -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include  -mcpu=e6500 -m64    -std=gnu++98   -fno-implicit-templates  -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi  -fdiagnostics-show-location=once   -ffunction-sections -fdata-sections  -frandom-seed=libc++98convenience.la  '-mcpu=e6500' '-m64' -o libc++98convenience.la  bitmap_allocator.lo pool_allocator.lo mt_allocator.lo codecvt.lo complex_io.lo globals_io.lo hash_tr1.lo hashtable_tr1.lo ios_failure.lo ios_init.lo ios_locale.lo list.lo list-aux.lo list-aux-2.lo list_associated.lo list_associated-2.lo locale.lo locale_init.lo locale_facets.lo localename.lo math_stubs_float.lo math_stubs_long_double.lo stdexcept.lo strstream.lo tree.lo istream.lo istream-string.lo streambuf.lo valarray.lo cow-istream-string.lo collate_members_cow.lo messages_members_cow.lo monetary_members_cow.lo numeric_members_cow.lo atomicity.lo codecvt_members.lo collate_members.lo messages_members.lo monetary_members.lo numeric_members.lo time_members.lo basic_file.lo c++locale.lo allocator-inst.lo concept-inst.lo ext-inst.lo misc-inst.lo parallel_settings.lo  
libtool: link: `hash_tr1.lo' is not a valid libtool object
make[9]: [libc++98convenience.la] Error 1 (ignored)
make[9]: Leaving directory `/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/c++98'
Making all in c++11
make[9]: Entering directory `/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/c++11'
/bin/sh ../../libtool --tag CXX --tag disable-shared   --mode=compile /build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -shared-libgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc -nostdinc++ -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/.libs -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/libsupc++/.libs -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include  -mcpu=e6500 -m64 -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/../libgcc -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include/powerpc-rtems4.12 -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++   -std=gnu++11   -fno-implicit-templates  -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi  -fdiagnostics-show-location=once   -ffunction-sections -fdata-sections  -frandom-seed=hash_c++0x.lo -g -O2  -mcpu=e6500 -m64  -c -o hash_c++0x.lo /home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++11/hash_c++0x.cc
libtool: compile:  /build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -shared-libgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc -nostdinc++ -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/.libs -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/libsupc++/.libs -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include -mcpu=e6500 -m64 -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/../libgcc -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include/powerpc-rtems4.12 -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++ -std=gnu++11 -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=hash_c++0x.lo -g -O2 -mcpu=e6500 -m64 -c /home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++11/hash_c++0x.cc -o hash_c++0x.o
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++11/hash_c++0x.cc: In member function 'std::size_t std::hash<long double>::operator()(long double) const':
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++11/hash_c++0x.cc:56:3: error: unrecognizable insn:
   }
   ^
(insn 10 9 11 2 (set (reg:CCFP 172)
        (compare:CCFP (reg/v:TF 169 [ __val ])
            (reg:TF 170))) "/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++11/hash_c++0x.cc":38 -1
     (nil))
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++11/hash_c++0x.cc:56:3: internal compiler error: in extract_insn, at recog.c:2311
0xb73c95 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:108
0xb73cc9 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:116
0xb45587 extract_insn(rtx_insn*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/recog.c:2311
0x90c2f2 instantiate_virtual_regs_in_insn
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1589
0x90c2f2 instantiate_virtual_regs
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1957
0x90c2f2 execute
	/home/EB/sebastian_h/archive/gcc-git/gcc/function.c:2006
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[9]: [hash_c++0x.lo] Error 1 (ignored)
/bin/sh ../../libtool --tag CXX --tag disable-shared   --mode=compile /build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -shared-libgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc -nostdinc++ -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/.libs -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/libsupc++/.libs -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include  -mcpu=e6500 -m64 -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/../libgcc -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include/powerpc-rtems4.12 -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++   -std=gnu++11   -fno-implicit-templates  -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi  -fdiagnostics-show-location=once   -ffunction-sections -fdata-sections  -frandom-seed=hashtable_c++0x.lo -g -O2  -mcpu=e6500 -m64  -fimplicit-templates -c /home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++11/hashtable_c++0x.cc
libtool: compile:  /build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -shared-libgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc -nostdinc++ -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/src/.libs -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/libsupc++/.libs -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include -mcpu=e6500 -m64 -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/../libgcc -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include/powerpc-rtems4.12 -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/libstdc++-v3/include -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++ -std=gnu++11 -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=hashtable_c++0x.lo -g -O2 -mcpu=e6500 -m64 -fimplicit-templates -c /home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++11/hashtable_c++0x.cc -o hashtable_c++0x.o
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++11/hashtable_c++0x.cc: In member function 'std::pair<bool, long unsigned int> std::__detail::_Prime_rehash_policy::_M_need_rehash(std::size_t, std::size_t, std::size_t) const':
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/src/c++11/hashtable_c++0x.cc:94:3: internal compiler error: in validate_condition_mode, at config/rs6000/rs6000.c:20551
   _Prime_rehash_policy::
   ^~~~~~~~~~~~~~~~~~~~
0xf3ce1b validate_condition_mode(rtx_code, machine_mode)
	/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:20547
0xf3d22c rs6000_generate_compare
	/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:24323
0xf41e26 rs6000_emit_cbranch(machine_mode, rtx_def**)
	/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:24797
0x10e672a gen_cbranchtf4(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11411
0xaea9b4 insn_gen_fn::operator()(rtx_def*, rtx_def*, rtx_def*, rtx_def*) const
	/home/EB/sebastian_h/archive/gcc-git/gcc/recog.h:303
0xaea9b4 emit_cmp_and_jump_insn_1
	/home/EB/sebastian_h/archive/gcc-git/gcc/optabs.c:3996
0xaea9b4 emit_cmp_and_jump_insns(rtx_def*, rtx_def*, rtx_code, rtx_def*, machine_mode, int, rtx_def*, int)
	/home/EB/sebastian_h/archive/gcc-git/gcc/optabs.c:4052
0x812f27 do_compare_rtx_and_jump(rtx_def*, rtx_def*, rtx_code, int, machine_mode, rtx_def*, rtx_code_label*, rtx_code_label*, int)
	/home/EB/sebastian_h/archive/gcc-git/gcc/dojump.c:1145
0x813ef1 do_compare_and_jump
	/home/EB/sebastian_h/archive/gcc-git/gcc/dojump.c:1224
0x815a18 do_jump_1(tree_code, tree_node*, tree_node*, rtx_code_label*, rtx_code_label*, int)
	/home/EB/sebastian_h/archive/gcc-git/gcc/dojump.c:276
0x79d28a expand_gimple_cond
	/home/EB/sebastian_h/archive/gcc-git/gcc/cfgexpand.c:2479
0x79d28a expand_gimple_basic_block
	/home/EB/sebastian_h/archive/gcc-git/gcc/cfgexpand.c:5612
0x7a1e26 execute
	/home/EB/sebastian_h/archive/gcc-git/gcc/cfgexpand.c:6357
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
libtool: compile:  /build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/xgcc -shared-libgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc -nostdinc++ -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/nof/noaltivec/libstdc++-v3/src -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/nof/noaltivec/libstdc++-v3/src/.libs -L/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/nof/noaltivec/libstdc++-v3/libsupc++/.libs -nostdinc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/nof/noaltivec/newlib/ -isystem /build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/nof/noaltivec/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/powerpc-rtems4.12/bin/ -B/opt/rtems-4.12/powerpc-rtems4.12/lib/ -isystem /opt/rtems-4.12/powerpc-rtems4.12/include -isystem /opt/rtems-4.12/powerpc-rtems4.12/sys-include -mcpu=e6500 -m64 -msoft-float -mno-altivec -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/../libgcc -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/nof/noaltivec/libstdc++-v3/include/powerpc-rtems4.12 -I/build/git-build/b-gcc-git-powerpc-rtems4.12/powerpc-rtems4.12/me6500/m64/nof/noaltivec/libstdc++-v3/include -I/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=fundamental_type_info.lo -g -O2 -mcpu=e6500 -m64 -msoft-float -mno-altivec -c /home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++/fundamental_type_info.cc -o fundamental_type_info.o
/home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++/fundamental_type_info.cc:35:1: internal compiler error: in write_builtin_type, at cp/mangle.c:2574
 }
 ^
0x65a189 write_builtin_type
	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/mangle.c:2574
0x65a189 write_type
	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/mangle.c:2172
0x65fda2 mangle_special_for_type
	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/mangle.c:3968
0x5b09fe get_tinfo_decl(tree_node*)
	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/rtti.c:417
0x5b3e49 emit_support_tinfo_1
	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/rtti.c:1492
0x5b404b emit_support_tinfo_1
	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/rtti.c:1483
0x5b404b emit_support_tinfos()
	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/rtti.c:1562
0x5564ac c_parse_final_cleanups()
	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/decl2.c:4511
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

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

* Re: How to configure a bi-arch PowerPC GCC?
  2017-01-30 10:38               ` Sebastian Huber
@ 2017-01-30 12:13                 ` Sebastian Huber
  2017-01-31  5:57                   ` Segher Boessenkool
  2017-01-31  8:16                 ` Segher Boessenkool
  2017-07-20 22:40                 ` Sebastian Huber
  2 siblings, 1 reply; 16+ messages in thread
From: Sebastian Huber @ 2017-01-30 12:13 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: GCC Development



On 30/01/17 11:38, Sebastian Huber wrote:
> On 25/01/17 18:55, Segher Boessenkool wrote:
>> On Wed, Jan 25, 2017 at 01:11:49PM +0100, Sebastian Huber wrote:
>>> >I still get a lot of ICEs with the attached two patches (examples):
>>> >/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c: In function
>>> >'__multc3':
>>> >/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: error:
>>> >unrecognizable insn:
>>> >  }
>>> >  ^
>>> >(insn 59 58 60 2 (set (reg:CCFP 219)
>>> >         (compare:CCFP (reg/v:TF 193 [ x ])
>>> >             (reg/v:TF 193 [ x ])))
>>> >"/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c":1990 -1
>>> >      (nil))
>>> >/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: internal
>>> >compiler error: in extract_insn, at recog.c:2311
>> The IEEE128 code almost certainly has some bugs on non-Linux 
>> configurations.
>> You could try debugging it, or you could avoid it (for now) by e.g. 
>> making
>> long double the same as double.
>>
>
> If I set rs6000_long_double_type_size to 64, then I can build all 
> libgcc multilibs including the one for -m64 -mcpu=e6500. I am a bit 
> surprised that the GCC support for 64-bit PowerPC is so extremely 
> Linux-dependent. I guess that I have to figure out all the magic 
> configuration bits to get everything set up like it is on Linux.  It 
> would be nice if the working Linux configuration bits are the default.
>
> With rs6000_long_double_type_size == 128, then I get the attached ICEs.
>
> I would be glad to get some advice how I can debug them, since I have 
> no idea how the compiler works actually if it comes to code generation.
>

The compiler build shows these warnings:

/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11023:1: warning: 
source missing a mode?
/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11034:1: warning: 
source missing a mode?
/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11034:1: warning: 
source missing a mode?
/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11050:1: warning: 
source missing a mode?
/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11050:1: warning: 
source missing a mode?
/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11060:1: warning: 
source missing a mode?
/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11060:1: warning: 
source missing a mode?
/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11998:1: warning: 
operand 1 missing mode?
/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/spe.md:3467:1: 
warning: operand 1 missing mode?
/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/spe.md:3467:1: 
warning: operand 2 missing mode?
Statistics for recog:
   Number of decisions:  15193
   longest path:           604 (code:    593)
   longest backtrack:       43 (code:   1619)
Statistics for split_insns:
   Number of decisions:   2991
   longest path:            53 (code:    576)
   longest backtrack:       18 (code:    574)
Statistics for peephole2_insns:
   Number of decisions:    267
   longest path:            47 (code:      7)
   longest backtrack:        3 (code:     26)

Is this something to worry about?

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

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

* Re: How to configure a bi-arch PowerPC GCC?
  2017-01-30 12:13                 ` Sebastian Huber
@ 2017-01-31  5:57                   ` Segher Boessenkool
  0 siblings, 0 replies; 16+ messages in thread
From: Segher Boessenkool @ 2017-01-31  5:57 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: GCC Development

Hi,

On Mon, Jan 30, 2017 at 01:13:13PM +0100, Sebastian Huber wrote:
> The compiler build shows these warnings:
> 
> /home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11023:1: 
> warning: source missing a mode?
> /home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11034:1: 
> warning: source missing a mode?
> /home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11034:1: 
> warning: source missing a mode?
> /home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11050:1: 
> warning: source missing a mode?
> /home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11050:1: 
> warning: source missing a mode?
> /home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11060:1: 
> warning: source missing a mode?
> /home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11060:1: 
> warning: source missing a mode?

These are normal.  Maybe it would work (and not warn) if we left off
the constraints as well, hrm.

> /home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11998:1: 
> warning: operand 1 missing mode?

This is an SPE pattern, won't be a problem for you.  It should probably
be CCmode fwiw.

> /home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/spe.md:3467:1: 
> warning: operand 1 missing mode?
> /home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/spe.md:3467:1: 
> warning: operand 2 missing mode?

Similar.

> Statistics for recog:
>   Number of decisions:  15193
>   longest path:           604 (code:    593)
>   longest backtrack:       43 (code:   1619)
> Statistics for split_insns:
>   Number of decisions:   2991
>   longest path:            53 (code:    576)
>   longest backtrack:       18 (code:    574)
> Statistics for peephole2_insns:
>   Number of decisions:    267
>   longest path:            47 (code:      7)
>   longest backtrack:        3 (code:     26)
> 
> Is this something to worry about?

Nope, perfectly normal.


Segher

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

* Re: How to configure a bi-arch PowerPC GCC?
  2017-01-30 10:38               ` Sebastian Huber
  2017-01-30 12:13                 ` Sebastian Huber
@ 2017-01-31  8:16                 ` Segher Boessenkool
  2017-07-20 22:40                 ` Sebastian Huber
  2 siblings, 0 replies; 16+ messages in thread
From: Segher Boessenkool @ 2017-01-31  8:16 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: GCC Development

On Mon, Jan 30, 2017 at 11:38:19AM +0100, Sebastian Huber wrote:
> >The IEEE128 code almost certainly has some bugs on non-Linux 
> >configurations.
> >You could try debugging it, or you could avoid it (for now) by e.g. making
> >long double the same as double.
> 
> If I set rs6000_long_double_type_size to 64, then I can build all libgcc 
> multilibs including the one for -m64 -mcpu=e6500.

Good, so you have a way forward now.  You probably do not want to keep
this forever, of course ;-)

> I am a bit surprised 
> that the GCC support for 64-bit PowerPC is so extremely Linux-dependent. 

It is not.  It also supports FreeBSD (which of course is very much like
Linux), and AIX and Darwin.

But the focus is on Linux, sure.

> I guess that I have to figure out all the magic configuration bits to 
> get everything set up like it is on Linux.  It would be nice if the 
> working Linux configuration bits are the default.

There are hundreds of knobs you can turn.  Not all combinations make
sense.  Not all the non-sensical combinations are handled gracefully.

> With rs6000_long_double_type_size == 128, then I get the attached ICEs.
> 
> I would be glad to get some advice how I can debug them, since I have no 
> idea how the compiler works actually if it comes to code generation.

The IEEE128 code is quite new, and of course still has bugs.  You do
not want to use "double-double" in a new ABI though.

> /home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: error: unrecognizable insn:
>  }
>  ^
> (insn 59 58 60 2 (set (reg:CCFP 219)
>         (compare:CCFP (reg/v:TF 193 [ x ])
>             (reg/v:TF 193 [ x ]))) "/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c":1990 -1
>      (nil))

This is probably created via:
(define_expand "cbranch<mode>4"
  [(use (match_operator 0 "rs6000_cbranch_operator"
         [(match_operand:FP 1 "gpc_reg_operand" "")
          (match_operand:FP 2 "gpc_reg_operand" "")]))
   (use (match_operand 3 ""))]
  ""
  "
{
  rs6000_emit_cbranch (<MODE>mode, operands);
  DONE;
}")

which does
  condition_rtx = rs6000_generate_compare (operands[0], mode);

which then does
  if (!TARGET_FLOAT128_HW && FLOAT128_VECTOR_P (mode))
    comp_mode = CCmode;
  else if (FLOAT_MODE_P (mode))
    comp_mode = CCFPmode;
  else
    ....

so it seems you have TARGET_FLOAT128_HW set?

> /home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c: In function '__multc3':
> /home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: error: unable to generate reloads for:
>  }
>  ^
> (insn 138 1211 139 16 (set (reg/v:TF 203 [ a ])
>         (unspec:TF [
>                 (reg:TF 237)
>                 (reg/v:TF 203 [ a ])
>                 (reg:TF 238)
>             ] UNSPEC_COPYSIGN)) "/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c":1998 940 {copysigntf3_soft}
>      (expr_list:REG_DEAD (reg:TF 238)
>         (nil)))

But this one has it off.  Huh.  (The _soft is only generated with it off).

> /home/EB/sebastian_h/archive/gcc-git/newlib/libm/common/sl_finite.c:22:10: internal compiler error: in validate_condition_mode, at config/rs6000/rs6000.c:20551
>    return __builtin_isfinite (x);
>           ^~~~~~~~~~~~~~~~~~~~~~
> 0xd5ed1b validate_condition_mode(rtx_code, machine_mode)
> 	/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:20547
> 0xd5f12c rs6000_generate_compare
> 	/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:24323
> 0xd63a92 rs6000_emit_sCOND(machine_mode, rtx_def**)
> 	/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:24736
> 0xf0998a gen_cstoretf4(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
> 	/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.md:11703

Machine mode is CCFPmode, but what is the RTL code?  rs6000_generate_compare
made a mess here.

> /home/EB/sebastian_h/archive/gcc-git/libstdc++-v3/libsupc++/fundamental_type_info.cc:35:1: internal compiler error: in write_builtin_type, at cp/mangle.c:2574
>  }
>  ^
> 0x65a189 write_builtin_type
> 	/home/EB/sebastian_h/archive/gcc-git/gcc/cp/mangle.c:2574

So it doesn't have a valid FP type here.

All the rest of your errors are duplicates or fallout from earlier
errors.


Segher

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

* Re: How to configure a bi-arch PowerPC GCC?
  2017-01-30 10:38               ` Sebastian Huber
  2017-01-30 12:13                 ` Sebastian Huber
  2017-01-31  8:16                 ` Segher Boessenkool
@ 2017-07-20 22:40                 ` Sebastian Huber
  2017-07-23 13:16                   ` Segher Boessenkool
  2017-09-13 13:11                   ` Andreas Schwab
  2 siblings, 2 replies; 16+ messages in thread
From: Sebastian Huber @ 2017-07-20 22:40 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: GCC Development



On 30/01/17 11:38, Sebastian Huber wrote:
> On 25/01/17 18:55, Segher Boessenkool wrote:
>> On Wed, Jan 25, 2017 at 01:11:49PM +0100, Sebastian Huber wrote:
>>> >I still get a lot of ICEs with the attached two patches (examples):
>>> >/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c: In function
>>> >'__multc3':
>>> >/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: error:
>>> >unrecognizable insn:
>>> >  }
>>> >  ^
>>> >(insn 59 58 60 2 (set (reg:CCFP 219)
>>> >         (compare:CCFP (reg/v:TF 193 [ x ])
>>> >             (reg/v:TF 193 [ x ])))
>>> >"/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c":1990 -1
>>> >      (nil))
>>> >/home/EB/sebastian_h/archive/gcc-git/libgcc/libgcc2.c:2035:1: internal
>>> >compiler error: in extract_insn, at recog.c:2311
>> The IEEE128 code almost certainly has some bugs on non-Linux 
>> configurations.
>> You could try debugging it, or you could avoid it (for now) by e.g. 
>> making
>> long double the same as double.
>>
>
> If I set rs6000_long_double_type_size to 64, then I can build all 
> libgcc multilibs including the one for -m64 -mcpu=e6500. I am a bit 
> surprised that the GCC support for 64-bit PowerPC is so extremely 
> Linux-dependent. I guess that I have to figure out all the magic 
> configuration bits to get everything set up like it is on Linux.  It 
> would be nice if the working Linux configuration bits are the default.
>
> With rs6000_long_double_type_size == 128, then I get the attached ICEs.
>
> I would be glad to get some advice how I can debug them, since I have 
> no idea how the compiler works actually if it comes to code generation.
>

I gave it a new try after the SPE split up. I still have problems to 
build a bi-arch PowerPC compiler for RTEMS. I get an ICE with this test 
case:

typedef float TFtype __attribute__ ((mode (TF)));
void
f (TFtype b)
{
   if (b - b) {
     __asm__ volatile ("");
   }
}

xgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/ -mcpu=e6500 
-m64 -O2 -fpreprocessed -S test-v0.i -o /dev/null 2>&1
test-v0.i: In function 'f':
test-v0.i:8:1: error: unrecognizable insn:
  }
  ^
(insn 12 11 13 2 (set (reg:CCFP 126)
         (compare:CCFP (reg:TF 123)
             (reg:TF 124))) "test-v0.i":5 -1
      (nil))
during RTL pass: vregs
test-v0.i:8:1: internal compiler error: in extract_insn, at recog.c:2311
0x40a233 _fatal_insn(char const*, rtx_def const*, char const*, int, char 
const*)
         /home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:108
0x40a252 _fatal_insn_not_found(rtx_def const*, char const*, int, char 
const*)
         /home/EB/sebastian_h/archive/gcc-git/gcc/rtl-error.c:116
0x965abf extract_insn(rtx_insn*)
         /home/EB/sebastian_h/archive/gcc-git/gcc/recog.c:2311
0x71dd73 instantiate_virtual_regs_in_insn
         /home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1589
0x71dd73 instantiate_virtual_regs
         /home/EB/sebastian_h/archive/gcc-git/gcc/function.c:1957
0x71dd73 execute
         /home/EB/sebastian_h/archive/gcc-git/gcc/function.c:2006
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

I built a native GCC on gcc112. It produces:

./install-gcc-git/bin/gcc -S -O2 -mcpu=e6500 -m64 -o - test.c
         .file   "test.c"
         .abiversion 2
         .globl __gcc_qsub
         .section        ".text"
         .align 2
         .p2align 4,,15
         .globl f
         .type   f, @function
f:
.LCF0:
0:      addis 2,12,.TOC.-.LCF0@ha
         addi 2,2,.TOC.-.LCF0@l
         .localentry     f,.-f
         fmr 4,2
         mflr 0
         fmr 3,1
         std 0,16(1)
         stdu 1,-32(1)
         bl __gcc_qsub
         nop
         addis 9,2,.LC0@toc@ha
         addi 9,9,.LC0@toc@l
         lfd 12,0(9)
         lfd 13,8(9)
         fcmpu 7,1,12
         bne 7,$+8
         fcmpu 7,2,13
         beq- 7,.L1
.L1:
         addi 1,1,32
         ld 0,16(1)
         mtlr 0
         blr
         .long 0
         .byte 0,0,0,1,128,0,0,0
         .size   f,.-f
         .section        .rodata.cst16,"aM",@progbits,16
         .align 4
.LC0:
         .long   0
         .long   0
         .long   0
         .long   0
         .ident  "GCC: (GNU) 8.0.0 20170720 (experimental) [master 
revision f37822f:0bf6d30:61658d61fdbd0e76bb1b7ea20c3bb8dc334568cd]"
         .gnu_attribute 4, 5
         .section        .note.GNU-stack,"",@progbits

So, I looked for " __gcc_qsub" in the GCC sources. It seems this is 
generated by rs6000_init_libfuncs() for some "sub_optab" stuff. If I run 
my bi-arch GCC in GDB, then I get:

Breakpoint 1, rs6000_init_libfuncs () at 
/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:18670
18670     if (TARGET_FLOAT128_TYPE)
(gdb) n
18677     if (TARGET_LONG_DOUBLE_128)
(gdb)
18684           init_float128_ieee (TFmode);
(gdb) s
init_float128_ieee (mode=TFmode) at 
/home/EB/sebastian_h/archive/gcc-git/gcc/config/rs6000/rs6000.c:18581
18581     if (FLOAT128_VECTOR_P (mode))
(gdb) n
18580   {
(gdb)
18581     if (FLOAT128_VECTOR_P (mode))
(gdb)
18640         set_optab_libfunc (add_optab, mode, "_q_add");
(gdb)
18641         set_optab_libfunc (sub_optab, mode, "_q_sub");

Ok, so why do I get a "error: unrecognizable insn:"? How can I debug a 
message like this:

(insn 12 11 13 2 (set (reg:CCFP 126)
         (compare:CCFP (reg:TF 123)
             (reg:TF 124))) "test-v0.i":5 -1
      (nil))

I don't know how I can figure out the corresponding GCC sources that are 
involved here.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

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

* Re: How to configure a bi-arch PowerPC GCC?
  2017-07-20 22:40                 ` Sebastian Huber
@ 2017-07-23 13:16                   ` Segher Boessenkool
  2017-09-13 13:11                   ` Andreas Schwab
  1 sibling, 0 replies; 16+ messages in thread
From: Segher Boessenkool @ 2017-07-23 13:16 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: GCC Development

Hi!

On Thu, Jul 20, 2017 at 02:46:41PM +0200, Sebastian Huber wrote:
> xgcc -B/build/git-build/b-gcc-git-powerpc-rtems4.12/./gcc/ -mcpu=e6500 
> -m64 -O2 -fpreprocessed -S test-v0.i -o /dev/null 2>&1
> test-v0.i: In function 'f':
> test-v0.i:8:1: error: unrecognizable insn:
>  }
>  ^
> (insn 12 11 13 2 (set (reg:CCFP 126)
>         (compare:CCFP (reg:TF 123)
>             (reg:TF 124))) "test-v0.i":5 -1
>      (nil))
> during RTL pass: vregs
> test-v0.i:8:1: internal compiler error: in extract_insn, at recog.c:2311
> 0x40a233 _fatal_insn(char const*, rtx_def const*, char const*, int, char 
> const*)

So, this instruction is what was expanded, but it is not a valid
instruction for your configuration.

> So, I looked for " __gcc_qsub" in the GCC sources. It seems this is 
> generated by rs6000_init_libfuncs() for some "sub_optab" stuff.

It ends up in libgcc.a, from ibm-ldouble.c .

> I don't know how I can figure out the corresponding GCC sources that are 
> involved here.

In your testcase you use TFmode directly.  This either is the
"double-double" ("IBM128") format, or IEEE 128-bit format (another
option for "long double" is to make it the same as "double").

Using a 64-bit long double has as downside that it is not bigger than
double.

Using double-double has as downsides that we are trying to move away
from it, it has funny rounding, historically it has had quite a few
bugs.

IEEE 128-bit is currently only supported on systems with VSX.  If you
want to use it on other systems you'll have to make emulation support
for it in libgcc -- which then will work on *all* systems.  Maybe
this is a bit much work.


Segher

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

* Re: How to configure a bi-arch PowerPC GCC?
  2017-07-20 22:40                 ` Sebastian Huber
  2017-07-23 13:16                   ` Segher Boessenkool
@ 2017-09-13 13:11                   ` Andreas Schwab
  2017-09-14 11:50                     ` Sebastian Huber
  1 sibling, 1 reply; 16+ messages in thread
From: Andreas Schwab @ 2017-09-13 13:11 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: Segher Boessenkool, GCC Development

On Jul 20 2017, Sebastian Huber <sebastian.huber@embedded-brains.de> wrote:

> Ok, so why do I get a "error: unrecognizable insn:"? How can I debug a
> message like this:
>
> (insn 12 11 13 2 (set (reg:CCFP 126)
>         (compare:CCFP (reg:TF 123)
>             (reg:TF 124))) "test-v0.i":5 -1
>      (nil))

This is supposed to be matched by the cmptf_internal1 pattern with
-mabi=ibmlongdouble.  Looks like your configuration defaults to
-mabi=ieeelongdouble.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

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

* Re: How to configure a bi-arch PowerPC GCC?
  2017-09-13 13:11                   ` Andreas Schwab
@ 2017-09-14 11:50                     ` Sebastian Huber
  0 siblings, 0 replies; 16+ messages in thread
From: Sebastian Huber @ 2017-09-14 11:50 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Segher Boessenkool, GCC Development

On 13/09/17 15:11, Andreas Schwab wrote:

> On Jul 20 2017, Sebastian Huber<sebastian.huber@embedded-brains.de>  wrote:
>
>> Ok, so why do I get a "error: unrecognizable insn:"? How can I debug a
>> message like this:
>>
>> (insn 12 11 13 2 (set (reg:CCFP 126)
>>          (compare:CCFP (reg:TF 123)
>>              (reg:TF 124))) "test-v0.i":5 -1
>>       (nil))
> This is supposed to be matched by the cmptf_internal1 pattern with
> -mabi=ibmlongdouble.  Looks like your configuration defaults to
> -mabi=ieeelongdouble.

Yes, originally I tried to enable the 128-bit IEEE float support. I use 
now the default settings.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

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

end of thread, other threads:[~2017-09-14 11:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-19 12:41 How to configure a bi-arch PowerPC GCC? Sebastian Huber
2017-01-20  1:04 ` Segher Boessenkool
2017-01-20  7:35   ` Sebastian Huber
2017-01-21  0:46     ` Segher Boessenkool
2017-01-23  8:19       ` Sebastian Huber
2017-01-23 17:18         ` Segher Boessenkool
2017-01-25 12:14           ` Sebastian Huber
     [not found]           ` <58889605.4060501@embedded-brains.de>
2017-01-25 17:55             ` Segher Boessenkool
2017-01-30 10:38               ` Sebastian Huber
2017-01-30 12:13                 ` Sebastian Huber
2017-01-31  5:57                   ` Segher Boessenkool
2017-01-31  8:16                 ` Segher Boessenkool
2017-07-20 22:40                 ` Sebastian Huber
2017-07-23 13:16                   ` Segher Boessenkool
2017-09-13 13:11                   ` Andreas Schwab
2017-09-14 11:50                     ` Sebastian Huber

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