7f283452c8
Remove upstream patches: 0002-fix-building-on-ppc64.patch765527ad37
0003-libsanitizer-Use-pre-computed-size.patch61f38c64c0
942-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patchb685411208
943-sanitizer-linux.patch8937b94d1a
870-xtensa-fix-PR-target-82181.patchdbbb835381
871-xtensa-fix-PR-target-65416.patch36f42654cb
872-gcc-xtensa-fix-NAND-code-in-xtensa_expand_atomic.patch using patch9f149a1a92
Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
49 lines
1.7 KiB
Diff
49 lines
1.7 KiB
Diff
Backport from upstream, see
|
||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68467
|
||
|
||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||
|
||
diff -Nur gcc-6.4.0.orig/gcc/config/m68k/m68k.c gcc-6.4.0/gcc/config/m68k/m68k.c
|
||
--- gcc-6.4.0.orig/gcc/config/m68k/m68k.c 2016-01-04 15:30:50.652828000 +0100
|
||
+++ gcc-6.4.0/gcc/config/m68k/m68k.c 2018-02-17 19:08:16.313168186 +0100
|
||
@@ -180,6 +180,8 @@
|
||
const_tree, bool);
|
||
static bool m68k_cannot_force_const_mem (machine_mode mode, rtx x);
|
||
static bool m68k_output_addr_const_extra (FILE *, rtx);
|
||
+static machine_mode m68k_promote_function_mode (const_tree, machine_mode,
|
||
+ int *, const_tree, int);
|
||
static void m68k_init_sync_libfuncs (void) ATTRIBUTE_UNUSED;
|
||
|
||
/* Initialize the GCC target structure. */
|
||
@@ -322,6 +324,9 @@
|
||
#undef TARGET_ATOMIC_TEST_AND_SET_TRUEVAL
|
||
#define TARGET_ATOMIC_TEST_AND_SET_TRUEVAL 128
|
||
|
||
+#undef TARGET_PROMOTE_FUNCTION_MODE
|
||
+#define TARGET_PROMOTE_FUNCTION_MODE m68k_promote_function_mode
|
||
+
|
||
static const struct attribute_spec m68k_attribute_table[] =
|
||
{
|
||
/* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
|
||
@@ -6524,4 +6529,20 @@
|
||
== m68k_fk_interrupt_handler));
|
||
}
|
||
|
||
+/* Implement TARGET_PROMOTE_FUNCTION_MODE. */
|
||
+
|
||
+static machine_mode
|
||
+m68k_promote_function_mode (const_tree type, machine_mode mode,
|
||
+ int *punsignedp ATTRIBUTE_UNUSED,
|
||
+ const_tree fntype ATTRIBUTE_UNUSED,
|
||
+ int for_return)
|
||
+{
|
||
+ /* Promote libcall arguments narrower than int to match the normal C
|
||
+ ABI (for which promotions are handled via
|
||
+ TARGET_PROMOTE_PROTOTYPES). */
|
||
+ if (type == NULL_TREE && !for_return && (mode == QImode || mode == HImode))
|
||
+ return SImode;
|
||
+ return mode;
|
||
+}
|
||
+
|
||
#include "gt-m68k.h"
|