From: Greg Weeks <greg.weeks@timesys.com>
To: Chiradeep Vittal <chiradeep@matissenetworks.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Linux Kernel Issue: MPC8540 Errata (CPU29)
Date: Thu, 28 Apr 2005 14:50:25 -0400 [thread overview]
Message-ID: <42713071.9010803@timesys.com> (raw)
In-Reply-To: <F237EFC9919B064C8BF5A44CDA5DA0C212F681@matisse01.matissenetworks.com>
Chiradeep Vittal wrote:
>It turns out to be a compiler issue.
>We're using gcc 3.4.3 with optimization level -Os. The following program will generate the illegal instruction with -Os but not with -O2
> int main (int argc, char** argv)
> {
> int seq[] = {0, 1, 2};
> return 0;
> }
>The reason is that the compiler generates code with the stswi instruction which is not supported by the e500. Here's our compiler configuration:
>Configured with: /home/steve/perforce/sw/opt/crosstool/build/powerpc-8540-linux-gnu/gcc-3.4.3-glibc-2.3.2/gcc-3.4.3/configure --target=powerpc-8540-linux-gnu --host=i686-host_pc-linux-gnu --prefix=/home/steve/perforce/sw/opt/cross-compile/powerpc-8540-linux-gnu/gcc-3.4.3-glibc-2.3.2 --with-cpu=8540 --enable-cxx-flags=-mcpu=8540 --with-headers=/home/steve/perforce/sw/opt/cross-compile/powerpc-8540-linux-gnu/gcc-3.4.3-glibc-2.3.2/powerpc-8540-linux-gnu/include --with-local-prefix=/home/steve/perforce/sw/opt/cross-compile/powerpc-8540-linux-gnu/gcc-3.4.3-glibc-2.3.2/powerpc-8540-linux-gnu --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long
>
>Any recommendations?
>
>
Here's the patch we use to get GCC to stop generating the invalid
intructions.
Greg Weeks
--- gcc-orig/gcc/config/rs6000/rs6000.h 2003-12-08 20:57:45.000000000
-0500
+++ gcc-new/gcc/config/rs6000/rs6000.h 2004-09-15 14:23:36.680978222
-0400
@@ -550,10 +550,10 @@
#define TARGET_LONG_DOUBLE_128 (rs6000_long_double_type_size == 128)
#define TARGET_ALTIVEC_ABI rs6000_altivec_abi
#define TARGET_ALTIVEC_VRSAVE rs6000_altivec_vrsave
+#define TARGET_E500 (rs6000_cpu == PROCESSOR_PPC8540)
#define TARGET_SPE_ABI 0
#define TARGET_SPE 0
-#define TARGET_E500 0
#define TARGET_ISEL 0
#define TARGET_FPRS 1
next prev parent reply other threads:[~2005-04-28 18:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-28 18:31 Linux Kernel Issue: MPC8540 Errata (CPU29) Chiradeep Vittal
2005-04-28 18:50 ` Greg Weeks [this message]
2005-04-28 22:21 ` Kylo Ginsberg
2005-04-28 23:18 ` Kumar Gala
2005-04-29 6:02 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2005-04-27 17:46 Chiradeep Vittal
2005-04-27 18:36 ` Kumar Gala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42713071.9010803@timesys.com \
--to=greg.weeks@timesys.com \
--cc=chiradeep@matissenetworks.com \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).