diff options
author | pkoning <pkoning@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-24 17:46:15 +0000 |
---|---|---|
committer | pkoning <pkoning@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-24 17:46:15 +0000 |
commit | ad8f8e521f512346e6c87aae2cfa22373d95f17e (patch) | |
tree | 7ce3c5b84df986d5791187d594d7a2efbcfd557d /gcc/builtins.c | |
parent | bc189236e9f9069c8ba2cde685a5360bbd498fd0 (diff) | |
download | ppe42-gcc-ad8f8e521f512346e6c87aae2cfa22373d95f17e.tar.gz ppe42-gcc-ad8f8e521f512346e6c87aae2cfa22373d95f17e.zip |
* builtins.c (c_readstr): Fix byte order if BYTES_BIG_ENDIAN !=
WORDS_BIG_ENDIAN.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169174 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index ec0aecf98ea..5b7b673f90e 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -605,7 +605,7 @@ c_readstr (const char *str, enum machine_mode mode) if (WORDS_BIG_ENDIAN) j = GET_MODE_SIZE (mode) - i - 1; if (BYTES_BIG_ENDIAN != WORDS_BIG_ENDIAN - && GET_MODE_SIZE (mode) > UNITS_PER_WORD) + && GET_MODE_SIZE (mode) >= UNITS_PER_WORD) j = j + UNITS_PER_WORD - 2 * (j % UNITS_PER_WORD) - 1; j *= BITS_PER_UNIT; gcc_assert (j < 2 * HOST_BITS_PER_WIDE_INT); |