diff options
author | Paul Koning <ni1d@arrl.net> | 2011-01-24 12:46:15 -0500 |
---|---|---|
committer | Paul Koning <pkoning@gcc.gnu.org> | 2011-01-24 12:46:15 -0500 |
commit | e046112d14648977428c9f3b512a662a9adb70bf (patch) | |
tree | 7ce3c5b84df986d5791187d594d7a2efbcfd557d /gcc/builtins.c | |
parent | a6c5070a126d967c37c0ebb492c6e1894176c3e6 (diff) | |
download | gcc-e046112d14648977428c9f3b512a662a9adb70bf.zip gcc-e046112d14648977428c9f3b512a662a9adb70bf.tar.gz gcc-e046112d14648977428c9f3b512a662a9adb70bf.tar.bz2 |
builtins.c (c_readstr): Fix byte order if BYTES_BIG_ENDIAN != WORDS_BIG_ENDIAN.
* builtins.c (c_readstr): Fix byte order if BYTES_BIG_ENDIAN !=
WORDS_BIG_ENDIAN.
From-SVN: r169174
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 ec0aecf..5b7b673 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); |