From: petrcvekcz@gmail.com (Petr Cvek)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM: pxa/corgi: armv5te kernel 4.12 fails to decompress compiled with gcc7
Date: Wed, 18 Oct 2017 11:57:13 +0200 [thread overview]
Message-ID: <8d660a74-afd5-a757-8a59-39283404c2f9@gmail.com> (raw)
In-Reply-To: <20171017203311.obi4nqtdvlrxwarm@darkstar.musicnaut.iki.fi>
Dne 17.10.2017 v 22:33 Aaro Koskinen napsal(a):
> Hi,
>
Hi,
> On Mon, Oct 16, 2017 at 01:55:18PM +0200, Petr Cvek wrote:
>> Dne 15.10.2017 v 12:46 Aaro Koskinen napsal(a):
>>> This seems to be simpler to debug/reproduce using busybox. Compiling
>>> just busybox with GCC 7.2 and march=armv5te/mtune=xscale already
>>> produces failing xz decompression:
>>
>> Does it fail too when compiled with gcc 7.2 and with march=armv5t and/or
>> march=armv4t ?
>
> At least armv4t seems to work.
>
Are you sure you used gcc 7.2 and parameters march=armv5te +
mtune=xscale? I've compiled the bugzilla code with these same parameters:
-march=armv5te -mtune=xscale -marm -O2 -c strd.c
For me (on gcc 7.1.0) only mtune=xscale/iwmmxt doesn't generate STRD.
Other mtune variants (arm1020e, arm926ej-s generate it). Here is a
table, which was tested on a real hardware.
-march=armv5te -mtune=xscale OK, code very long
-march=armv5te -mtune=iwmmxt OK, same code as v5te/xscale
-march=iwmmxt OK, same code as v5te/xscale
-march=armv5t OK, less opcodes than v5te/xscale
-march=armv5 OK, same as armv5t
-march=armv5te KO, unaligned STRD, alignment exception
-march=armv5tej KO, unaligned STRD (PXA27x is only v5te)
BTW gcc 6.3.0 generates even longer code and it doesn't support armvtej.
Perhaps your 7.2 has even more optimalizations even for mtune=xscale.
So I suppose compiling kernel and userspace with -match=armv5t or less
should be fine for now (unless there is another similar problem due to
7.x optimizations).
>
>> I've just found my old gcc 6.3 compiled some code with a default armv4t.
>
> You can set the default with compiling GCC using --with-arch=...
Yeah I know about that, it seems something probably override my settings
(most likely my scripts for separate crosstool and buildroot).
>
> BTW, the failing instruction seems to be STRD and there seems to be
> already a related bug report:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82445
Big thanks for info.
>
> A.
>
Petr
next prev parent reply other threads:[~2017-10-18 9:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-19 13:13 ARM: pxa/corgi: armv5te kernel 4.12 fails to decompress compiled with gcc7 Andrea Adami
2017-07-20 6:57 ` Robert Jarzmik
2017-09-02 21:50 ` Andrea Adami
2017-10-14 21:50 ` Aaro Koskinen
2017-10-14 21:57 ` Robert Jarzmik
2017-10-15 10:46 ` Aaro Koskinen
2017-10-15 13:01 ` Russell King - ARM Linux
2017-10-15 15:14 ` Aaro Koskinen
2017-10-16 11:55 ` Petr Cvek
2017-10-17 8:02 ` Andrea Adami
2017-10-17 8:10 ` Petr Cvek
2017-10-17 8:18 ` Andrea Adami
2017-10-18 10:39 ` Petr Cvek
2017-10-18 10:44 ` Russell King - ARM Linux
2017-10-18 11:12 ` Petr Cvek
2017-10-24 8:34 ` Andrea Adami
2017-10-24 8:43 ` Andrea Adami
2017-10-17 20:33 ` Aaro Koskinen
2017-10-18 9:57 ` Petr Cvek [this message]
2017-10-14 22:00 ` Petr Cvek
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=8d660a74-afd5-a757-8a59-39283404c2f9@gmail.com \
--to=petrcvekcz@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.