]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
AVR: target/117681 - Set UNWIND_WORD_MODE to Pmode.
authorGeorg-Johann Lay <avr@gjlay.de>
Fri, 29 Nov 2024 17:26:17 +0000 (18:26 +0100)
committerGeorg-Johann Lay <avr@gjlay.de>
Fri, 29 Nov 2024 18:03:06 +0000 (19:03 +0100)
This patch fixes a build warning for libgcc/unwind-sjlj.c
which used word_mode for _Unwind_Word but should use Pmode.

PR target/117681
gcc/
* config/avr/avr.cc (TARGET_UNWIND_WORD_MODE): Define to...
(avr_unwind_word_mode): ...this new static function.

gcc/config/avr/avr.cc

index fc9f17704209f7a5f15978dc294cdaba368819b7..c5c39d30c4776a14de994afe4be9629cda072786 100644 (file)
@@ -15661,6 +15661,15 @@ avr_float_lib_compare_returns_bool (machine_mode mode, rtx_code)
 }
 
 
+/* Implement `TARGET_UNWIND_WORD_MODE'.  */
+
+static scalar_int_mode
+avr_unwind_word_mode ()
+{
+  return Pmode;
+}
+
+
 /* Implement `TARGET_LRA_P'.  */
 
 static bool
@@ -15867,6 +15876,9 @@ avr_use_lra_p ()
 #undef  TARGET_CANONICALIZE_COMPARISON
 #define TARGET_CANONICALIZE_COMPARISON avr_canonicalize_comparison
 
+#undef  TARGET_UNWIND_WORD_MODE
+#define TARGET_UNWIND_WORD_MODE avr_unwind_word_mode
+
 /* According to the opening comment in PR86772, the following applies:
   "If the port does not (and never will in the future) need to mitigate
    against unsafe speculation."  */