diff options
Diffstat (limited to 'gcc/config/pa/pa.md')
-rw-r--r-- | gcc/config/pa/pa.md | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index f124c30..af5449a 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -10366,10 +10366,12 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" { if (TARGET_SYNC_LIBCALL) { - rtx mem = operands[0]; - rtx val = operands[1]; - if (pa_maybe_emit_compare_and_swap_exchange_loop (NULL_RTX, mem, val)) - DONE; + rtx libfunc = init_one_libfunc ("__sync_lock_test_and_set_1"); + + emit_library_call (libfunc, LCT_NORMAL, VOIDmode, + XEXP (operands[0], 0), Pmode, + operands[1], QImode); + DONE; } FAIL; }) @@ -10384,10 +10386,12 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" { if (TARGET_SYNC_LIBCALL) { - rtx mem = operands[0]; - rtx val = operands[1]; - if (pa_maybe_emit_compare_and_swap_exchange_loop (NULL_RTX, mem, val)) - DONE; + rtx libfunc = init_one_libfunc ("__sync_lock_test_and_set_2"); + + emit_library_call (libfunc, LCT_NORMAL, VOIDmode, + XEXP (operands[0], 0), Pmode, + operands[1], HImode); + DONE; } FAIL; }) @@ -10402,10 +10406,12 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" { if (TARGET_SYNC_LIBCALL) { - rtx mem = operands[0]; - rtx val = operands[1]; - if (pa_maybe_emit_compare_and_swap_exchange_loop (NULL_RTX, mem, val)) - DONE; + rtx libfunc = init_one_libfunc ("__sync_lock_test_and_set_4"); + + emit_library_call (libfunc, LCT_NORMAL, VOIDmode, + XEXP (operands[0], 0), Pmode, + operands[1], SImode); + DONE; } FAIL; }) @@ -10453,10 +10459,12 @@ add,l %2,%3,%3\;bv,n %%r0(%3)" if (TARGET_SYNC_LIBCALL) { - rtx mem = operands[0]; - rtx val = operands[1]; - if (pa_maybe_emit_compare_and_swap_exchange_loop (NULL_RTX, mem, val)) - DONE; + rtx libfunc = init_one_libfunc ("__sync_lock_test_and_set_8"); + + emit_library_call (libfunc, LCT_NORMAL, VOIDmode, + XEXP (operands[0], 0), Pmode, + operands[1], DImode); + DONE; } if (TARGET_64BIT || TARGET_SOFT_FLOAT) |