Commit 5c22bb48 by Tamar Christina Committed by Tamar Christina

aarch64.c (aarch64_reinterpret_float_as_int): Correct endianness.

2017-08-02  Tamar Christina  <tamar.christina@arm.com>

	* config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
	Correct endianness.

From-SVN: r250818
parent e4f0733a
2017-08-02 Tamar Christina <tamar.christina@arm.com>
* config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
Correct endianness.
2017-08-02 Jakub Jelinek <jakub@redhat.com> 2017-08-02 Jakub Jelinek <jakub@redhat.com>
PR middle-end/79499 PR middle-end/79499
......
...@@ -4733,9 +4733,14 @@ aarch64_reinterpret_float_as_int (rtx value, unsigned HOST_WIDE_INT *intval) ...@@ -4733,9 +4733,14 @@ aarch64_reinterpret_float_as_int (rtx value, unsigned HOST_WIDE_INT *intval)
CONST_DOUBLE_REAL_VALUE (value), CONST_DOUBLE_REAL_VALUE (value),
REAL_MODE_FORMAT (mode)); REAL_MODE_FORMAT (mode));
ival = zext_hwi (res[0], 32); if (mode == DFmode)
if (GET_MODE_BITSIZE (mode) == GET_MODE_BITSIZE (DFmode)) {
ival |= (zext_hwi (res[1], 32) << 32); int order = BYTES_BIG_ENDIAN ? 1 : 0;
ival = zext_hwi (res[order], 32);
ival |= (zext_hwi (res[1 - order], 32) << 32);
}
else
ival = zext_hwi (res[0], 32);
*intval = ival; *intval = ival;
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment