aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/builtins.c
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2010-07-23 19:37:40 +0000
committerH.J. Lu <hongjiu.lu@intel.com>2010-07-23 19:37:40 +0000
commite59b0ef2e7a1fb44791d473ee416aeb01fcb169c (patch)
tree437dca120093cc7b1f6debf6f6b31779526c7192 /gcc/java/builtins.c
parentf25b023a0d9de6a6c1e1965d93ba6028cb03fc7d (diff)
parent92ac755201aad4366eaff2b75b3239637bee3590 (diff)
Merged with trunk at revision 162480.ifunc
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/ifunc@162483 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/builtins.c')
-rw-r--r--gcc/java/builtins.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/java/builtins.c b/gcc/java/builtins.c
index 74859411758..527c4e6fb9a 100644
--- a/gcc/java/builtins.c
+++ b/gcc/java/builtins.c
@@ -323,7 +323,8 @@ compareAndSwapInt_builtin (tree method_return_type ATTRIBUTE_UNUSED,
tree orig_call)
{
enum machine_mode mode = TYPE_MODE (int_type_node);
- if (sync_compare_and_swap[mode] != CODE_FOR_nothing
+ if (direct_optab_handler (sync_compare_and_swap_optab, mode)
+ != CODE_FOR_nothing
|| flag_use_atomic_builtins)
{
tree addr, stmt;
@@ -344,7 +345,8 @@ compareAndSwapLong_builtin (tree method_return_type ATTRIBUTE_UNUSED,
tree orig_call)
{
enum machine_mode mode = TYPE_MODE (long_type_node);
- if (sync_compare_and_swap[mode] != CODE_FOR_nothing
+ if (direct_optab_handler (sync_compare_and_swap_optab, mode)
+ != CODE_FOR_nothing
|| (GET_MODE_SIZE (mode) <= GET_MODE_SIZE (word_mode)
&& flag_use_atomic_builtins))
/* We don't trust flag_use_atomic_builtins for multi-word
@@ -368,7 +370,8 @@ compareAndSwapObject_builtin (tree method_return_type ATTRIBUTE_UNUSED,
tree orig_call)
{
enum machine_mode mode = TYPE_MODE (ptr_type_node);
- if (sync_compare_and_swap[mode] != CODE_FOR_nothing
+ if (direct_optab_handler (sync_compare_and_swap_optab, mode)
+ != CODE_FOR_nothing
|| flag_use_atomic_builtins)
{
tree addr, stmt;
@@ -448,7 +451,8 @@ VMSupportsCS8_builtin (tree method_return_type,
{
enum machine_mode mode = TYPE_MODE (long_type_node);
gcc_assert (method_return_type == boolean_type_node);
- if (sync_compare_and_swap[mode] != CODE_FOR_nothing)
+ if (direct_optab_handler (sync_compare_and_swap_optab, mode)
+ != CODE_FOR_nothing)
return boolean_true_node;
else
return boolean_false_node;