diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2011-12-09 22:05:26 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2011-12-09 22:05:26 +0000 |
commit | 67fafdd15aaf6ede71ded4054073dbd2aab5b7d9 (patch) | |
tree | b7d95696ada2ba75617979d123bb2a15adb775e5 /gcc/tree.c | |
parent | 8f420307e03a391b8e4bcd57be36d8d6325c7638 (diff) | |
download | gcc-67fafdd15aaf6ede71ded4054073dbd2aab5b7d9.zip gcc-67fafdd15aaf6ede71ded4054073dbd2aab5b7d9.tar.gz gcc-67fafdd15aaf6ede71ded4054073dbd2aab5b7d9.tar.bz2 |
tree.c (build_common_builtin_nodes): Do not use TM_PURE attribute unless language has support for TM.
PR/51291
* tree.c (build_common_builtin_nodes): Do not use TM_PURE
attribute unless language has support for TM.
* config/i386/i386.c (ix86_init_tm_builtins): Exit gracefully in
the absence of TM builtins.
From-SVN: r182179
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -9437,6 +9437,7 @@ void build_common_builtin_nodes (void) { tree tmp, ftype; + int ecf_flags; if (!builtin_decl_explicit_p (BUILT_IN_MEMCPY) || !builtin_decl_explicit_p (BUILT_IN_MEMMOVE)) @@ -9589,9 +9590,12 @@ build_common_builtin_nodes (void) its value in the landing pad. */ ftype = build_function_type_list (ptr_type_node, integer_type_node, NULL_TREE); + ecf_flags = ECF_PURE | ECF_NOTHROW | ECF_LEAF; + /* Only use TM_PURE if we we have TM language support. */ + if (builtin_decl_explicit_p (BUILT_IN_TM_LOAD_1)) + ecf_flags |= ECF_TM_PURE; local_define_builtin ("__builtin_eh_pointer", ftype, BUILT_IN_EH_POINTER, - "__builtin_eh_pointer", - ECF_PURE | ECF_NOTHROW | ECF_LEAF | ECF_TM_PURE); + "__builtin_eh_pointer", ecf_flags); tmp = lang_hooks.types.type_for_mode (targetm.eh_return_filter_mode (), 0); ftype = build_function_type_list (tmp, integer_type_node, NULL_TREE); |