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).
return ret;
}
+#endif
/* Set VAL to correct enum value according to the indirect-branch or
function-return attribute in ATTR. */
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. */
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
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. */
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. */
#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