aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-02-18 12:16:33 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-02-18 12:16:33 +0100
commita10e76edcee03f7c0a5136a6e4b1ac483ee0d70f (patch)
tree3ad14e446778823e3bd3f99e6e19fe78d0d41ddf /gcc
parent14653c37cf034f95b553ad242e123e611c40f2f5 (diff)
downloadgcc-a10e76edcee03f7c0a5136a6e4b1ac483ee0d70f.zip
gcc-a10e76edcee03f7c0a5136a6e4b1ac483ee0d70f.tar.gz
gcc-a10e76edcee03f7c0a5136a6e4b1ac483ee0d70f.tar.bz2
re PR target/89361 (s390 broken without S390_USE_TARGET_ATTRIBUTE, likely since r257489)
PR target/89361 * config/s390/s390.c (s390_indirect_branch_attrvalue, s390_indirect_branch_settings): Define unconditionally. (s390_set_current_function): Likewise, but guard the whole body except the s390_indirect_branch_settings call with #if S390_USE_TARGET_ATTRIBUTE. (TARGET_SET_CURRENT_FUNCTION): Redefine unconditionally. From-SVN: r268983
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/s390/s390.c9
2 files changed, 14 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7dfa7c3..45b5d5d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,13 @@
2019-02-18 Jakub Jelinek <jakub@redhat.com>
+ PR target/89361
+ * config/s390/s390.c (s390_indirect_branch_attrvalue,
+ s390_indirect_branch_settings): Define unconditionally.
+ (s390_set_current_function): Likewise, but guard the whole body except
+ the s390_indirect_branch_settings call with
+ #if S390_USE_TARGET_ATTRIBUTE.
+ (TARGET_SET_CURRENT_FUNCTION): Redefine unconditionally.
+
* config/s390/s390.md (*<risbg_n>_ior_and_sr_ze,
*<risbg_n>_<mode>_ior_and_lshiftrt, *<risbg_n>_sidi_ior_and_lshiftrt):
Use HOST_WIDE_INT_M1U instead of ~(0ULL).
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 713973a..aff2718 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -15462,6 +15462,7 @@ s390_can_inline_p (tree caller, tree callee)
return ret;
}
+#endif
/* Set VAL to correct enum value according to the indirect-branch or
function-return attribute in ATTR. */
@@ -15535,6 +15536,7 @@ s390_indirect_branch_settings (tree fndecl)
s390_indirect_branch_attrvalue (attr, &cfun->machine->function_return_mem);
}
+#if S390_USE_TARGET_ATTRIBUTE
/* Restore targets globals from NEW_TREE and invalidate s390_previous_fndecl
cache. */
@@ -15550,6 +15552,7 @@ s390_activate_target_options (tree new_tree)
TREE_TARGET_GLOBALS (new_tree) = save_target_globals_default_opts ();
s390_previous_fndecl = NULL_TREE;
}
+#endif
/* Establish appropriate back-end context for processing the function
FNDECL. The argument might be NULL to indicate processing at top
@@ -15557,6 +15560,7 @@ s390_activate_target_options (tree new_tree)
static void
s390_set_current_function (tree fndecl)
{
+#if S390_USE_TARGET_ATTRIBUTE
/* Only change the context if the function changes. This hook is called
several times in the course of compiling a function, and we don't want to
slow things down too much or call target_reinit when it isn't safe. */
@@ -15588,10 +15592,9 @@ s390_set_current_function (tree fndecl)
if (old_tree != new_tree)
s390_activate_target_options (new_tree);
s390_previous_fndecl = fndecl;
-
+#endif
s390_indirect_branch_settings (fndecl);
}
-#endif
/* Implement TARGET_USE_BY_PIECES_INFRASTRUCTURE_P. */
@@ -16331,10 +16334,10 @@ s390_case_values_threshold (void)
#undef TARGET_ASM_FILE_END
#define TARGET_ASM_FILE_END s390_asm_file_end
-#if S390_USE_TARGET_ATTRIBUTE
#undef TARGET_SET_CURRENT_FUNCTION
#define TARGET_SET_CURRENT_FUNCTION s390_set_current_function
+#if S390_USE_TARGET_ATTRIBUTE
#undef TARGET_OPTION_VALID_ATTRIBUTE_P
#define TARGET_OPTION_VALID_ATTRIBUTE_P s390_valid_target_attribute_p