gcc/binutils: update to latest releases, improve riscv support
[openadk.git] / toolchain / gcc / 7.3.0 / m68k-coldfire-pr68467.patch
blob45e9eb0ba851f2185eba7e3e5bc8f3dbb6fb99e5
1 diff -Nur gcc-7.2.0.orig/gcc/config/m68k/m68k.c gcc-7.2.0/gcc/config/m68k/m68k.c
2 --- gcc-7.2.0.orig/gcc/config/m68k/m68k.c 2017-04-03 22:30:56.274463000 +0000
3 +++ gcc-7.2.0/gcc/config/m68k/m68k.c 2018-01-27 02:16:53.779367849 +0000
4 @@ -182,6 +182,8 @@
5 const_tree, bool);
6 static bool m68k_cannot_force_const_mem (machine_mode mode, rtx x);
7 static bool m68k_output_addr_const_extra (FILE *, rtx);
8 +static machine_mode m68k_promote_function_mode (const_tree, machine_mode,
9 + int *, const_tree, int);
10 static void m68k_init_sync_libfuncs (void) ATTRIBUTE_UNUSED;
11 static enum flt_eval_method
12 m68k_excess_precision (enum excess_precision_type);
13 @@ -332,6 +334,9 @@
14 #undef TARGET_ATOMIC_TEST_AND_SET_TRUEVAL
15 #define TARGET_ATOMIC_TEST_AND_SET_TRUEVAL 128
17 +#undef TARGET_PROMOTE_FUNCTION_MODE
18 +#define TARGET_PROMOTE_FUNCTION_MODE m68k_promote_function_mode
20 static const struct attribute_spec m68k_attribute_table[] =
22 /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
23 @@ -6571,4 +6576,20 @@
24 return FLT_EVAL_METHOD_UNPREDICTABLE;
27 +/* Implement TARGET_PROMOTE_FUNCTION_MODE. */
29 +static machine_mode
30 +m68k_promote_function_mode (const_tree type, machine_mode mode,
31 + int *punsignedp ATTRIBUTE_UNUSED,
32 + const_tree fntype ATTRIBUTE_UNUSED,
33 + int for_return)
35 + /* Promote libcall arguments narrower than int to match the normal C
36 + ABI (for which promotions are handled via
37 + TARGET_PROMOTE_PROTOTYPES). */
38 + if (type == NULL_TREE && !for_return && (mode == QImode || mode == HImode))
39 + return SImode;
40 + return mode;
43 #include "gt-m68k.h"