public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-8616] AVR: target/114752 - Fix ICE on inline asm const 64-bit float operand
@ 2024-04-17 9:10 Georg-Johann Lay
0 siblings, 0 replies; only message in thread
From: Georg-Johann Lay @ 2024-04-17 9:10 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:ca7d454804045a39d10a9b1f691a940aeacdf25b
commit r13-8616-gca7d454804045a39d10a9b1f691a940aeacdf25b
Author: Georg-Johann Lay <avr@gjlay.de>
Date: Wed Apr 17 10:26:05 2024 +0200
AVR: target/114752 - Fix ICE on inline asm const 64-bit float operand
gcc/
PR target/114752
* config/avr/avr.cc (avr_print_operand) [CONST_DOUBLE_P]: Handle DFmode.
(cherry picked from commit 909c6faf2c726178d115726e56304eac91cff6e9)
Diff:
---
gcc/config/avr/avr.cc | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/gcc/config/avr/avr.cc b/gcc/config/avr/avr.cc
index d91fa51e78c..f8c4eb327a2 100644
--- a/gcc/config/avr/avr.cc
+++ b/gcc/config/avr/avr.cc
@@ -3333,11 +3333,20 @@ avr_print_operand (FILE *file, rtx x, int code)
}
else if (CONST_DOUBLE_P (x))
{
- long val;
- if (GET_MODE (x) != SFmode)
- fatal_insn ("internal compiler error. Unknown mode:", x);
- REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), val);
- fprintf (file, "0x%lx", val);
+ if (GET_MODE (x) == SFmode)
+ {
+ long val;
+ REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), val);
+ fprintf (file, "0x%lx", val);
+ }
+ else if (GET_MODE (x) == DFmode)
+ {
+ long l[2];
+ REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (x), l);
+ fprintf (file, "0x%lx%08lx", l[1] & 0xffffffff, l[0] & 0xffffffff);
+ }
+ else
+ fatal_insn ("internal compiler error. Unknown mode:", x);
}
else if (GET_CODE (x) == CONST_STRING)
fputs (XSTR (x, 0), file);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-17 9:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 9:10 [gcc r13-8616] AVR: target/114752 - Fix ICE on inline asm const 64-bit float operand Georg-Johann Lay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).