This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re : PPC440, GCC-4.1.1 supposes cr{2,3,4} saved but the hard real time kernel doesn't...
- From: Etienne Lorrain <etienne_lorrain at yahoo dot fr>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 28 Nov 2006 15:55:33 +0000 (GMT)
- Subject: Re : PPC440, GCC-4.1.1 supposes cr{2,3,4} saved but the hard real time kernel doesn't...
Thanks,
Unfortunately that is not my source code...
powerpc-eabi-gcc -Wall -W -O2 -g -fno-strict-aliasing -ffunction-sections -fdata-sections -fno-schedule-insns -std=gnu99 -fcall-used-cr2 -fcall-used-cr3 -fcall-used-cr4 -Xassembler -mregnames ... *.c
../net/src/net_dbg.c:668: error: Attempt to delete prologue/epilogue insn:
(insn 238 237 239 22 ../net/src/net_dbg.c:668 (set (reg:SI 12 12)
(mem:SI (plus:SI (reg/f:SI 1 1)
(const_int 12 [0xc])) [0 S4 A8])) -1 (nil)
(nil))
../net/src/net_dbg.c:668: internal compiler error: in propagate_one_insn, at flow.c:1699
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
../net/src/rtab_fr.c:299: error: Attempt to delete prologue/epilogue insn:
(insn 457 456 458 47 ../net/src/rtab_fr.c:299 (set (reg:SI 12 12)
(mem:SI (plus:SI (reg/f:SI 1 1)
(const_int 12 [0xc])) [0 S4 A8])) -1 (nil)
(nil))
../net/src/rtab_fr.c:299: internal compiler error: in propagate_one_insn, at flow.c:1699
Please submit a full bug report,
with preprocessed source if appropriate.
If I just give the option"-fcall-used-cr4" and not cr2/3, I just have the first ICE
$ powerpc-eabi-gcc -v
Using built-in specs.
Target: powerpc-eabi
Configured with: ../gcc-4.1.1/configure --target=powerpc-eabi --with-cpu=440 --enable-languages=c,c++
Thread model: single
gcc version 4.1.1
The initial i386 compiler is GCC-4.1.1 bootstrapped on cygwin:
$ gcc -v
Using built-in specs.
Target: i686-pc-cygwin
Configured with: ../gcc-4.1.1/configure
Thread model: single
gcc version 4.1.1
Etienne.
----- Message d'origine ----
De : Ian Lance Taylor <iant@google.com>
À : Etienne Lorrain <etienne_lorrain@yahoo.fr>
Cc : gcc@gcc.gnu.org
Envoyé le : Mardi, 28 Novembre 2006, 15h26mn 27s
Objet : Re: PPC440, GCC-4.1.1 supposes cr{2,3,4} saved but the hard real time kernel doesn't...
Etienne Lorrain <etienne_lorrain@yahoo.fr> writes:
> My problem is quite simple, the PPC has few conditions registers and some are assumed to be saved over function calls (in my test case NU_Sleep()), but the hard real time kernel do not save those (partial flags) registers.
> This behaviour is perfectly documented in gcc-4.1.1/gcc/config/rs6000 line 709, but is there a simple solution (maybe involving recompiling the compiler) to force re-testing values after function calls?
> I do remember the i386 option -mreg-alloc="dacbSDB", but it does not seem to be supported for PPC; the best would be a compiler option to say "full CC register clobber by function call".
You want the -fcall-used-REG option. See the documentation.
Ian
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com