This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: target/5107: ICE when building an ARM/Thumb cross compiler for/on HP-UX.
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 14 Dec 2001 10:56:01 -0000
- Subject: Re: target/5107: ICE when building an ARM/Thumb cross compiler for/on HP-UX.
- Reply-to: Richard Earnshaw <rearnsha at arm dot com>
The following reply was made to PR target/5107; it has been noted by GNATS.
From: Richard Earnshaw <rearnsha@arm.com>
To: Klaus.k.pedersen@nokia.com
Cc: gcc-gnats@gcc.gnu.org, Richard.Earnshaw@arm.com
Subject: Re: target/5107: ICE when building an ARM/Thumb cross compiler
for/on HP-UX.
Date: Fri, 14 Dec 2001 10:53:25 +0000
> I am trying to build an ARM/THUMB cross compiler on HP-UX 11 and
> HP-UX 10.20. It doesn't work, even with the latest snapshot.
Hmm, I built just the C compiler on our HPUX-11 machine and didn't see
this problem...
> When xgcc is building the "thumb libgcc2" version of muldi3 it
> stops with an internal error:
>
> -------------
> ../../gcc-20011203/gcc/libgcc2.c: In function `__muldi3':
> ../../gcc-20011203/gcc/libgcc2.c:367: could not split insn
>
> (insn 175 70 72 (set (reg:SI 2 r2)
> (const_int 65536 [0x10000])) 176 {*thumb_movsi_insn} (nil)
> (nil))
The compiler certainly has a define_split that should match this (and that
is indeed what happens on the Sun dump you posted).
> When you compare the dumps from the machines side-by-side, you
> will notice that there are not a single pair that are equal !
> -------------
> coicxxx -> diff hp-dumps/libgcc2.i.00.rtl sun-dumps/libgcc2.i.00.rtl
> 16c16
> < (note 9 7 15 7bf703c0 NOTE_INSN_BLOCK_BEG)
> ---
> > (note 9 7 15 4003c0 NOTE_INSN_BLOCK_BEG)
> 26c26
> < (note 19 17 22 7bf70380 NOTE_INSN_BLOCK_BEG)
> ---
> > (note 19 17 22 400380 NOTE_INSN_BLOCK_BEG)
> [...]
These are pointers (don't know why they are useful, and yes, they do make
comparing across machines a pain). So there isn't a problem here. The
problem first shows up in dump 23 (ie some between postreload and flow2).
It's most likely in a "split_all_insns" pass, which should turn the pseudo
instruction
set r2 = 65536
into the real thumb instructions
set r2 = 128
set r2 = r2 << 9
> My configure string:
> -------------
> ../gcc-20011203/configure \
> --prefix=/opt/arm-elf-gcc --target=arm-elf --nfp \
> --enable-languages=c,c++ --with-dwarf2 --enable-target-optspace \
> --with-as=/opt/arm-elf-gcc/bin/arm-elf-as \
> --with-ld=/opt/arm-elf-gcc/bin/arm-elf-ld
What *native* compiler where you using to build your cross-compiler? gcc?
if so, which version? I used the HP compiler and as mentioned, didn't see
a problem (but that can't build the c++ compiler).