[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: [Bug target/31938] Wrong code on int to short cast on armeb
From: "bigfoot at private dot dk" <gcc-bugzilla () gcc ! gnu ! org>
Date: 2007-05-31 21:22:11
Message-ID: 20070531212211.6831.qmail () sourceware ! org
[Download RAW message or body]
------- Comment #2 from bigfoot at private dot dk 2007-05-31 21:22 -------
(In reply to comment #1)
> However, I suspect your test case is wrong. Unpatched versions of gcc default
> to little-endian mode on arm, even if you configure with
> --target=arm${foo}b-${bar}.
> Since you didn't pass -mbig-endian when compiling the test case, gcc will
> generate code assuming little-endian data representation. The assembly code you
> listed is actually correct for little-endian.
Yes, indeed it is correct for little endian, so I assumed it was some
optimisation wrongly applied to big endian. However, you're entirely right.
Using -mbig-endian makes it produce code that looks more correct.
What I'm asking myself now is what sense there is to this default. Shouldn't it
default to big endian?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31938
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic