{
if (TARGET_SYNC_LIBCALL)
{
- rtx libfunc = init_one_libfunc ("__sync_lock_test_and_set_1");
+ rtx libfunc = optab_libfunc (sync_lock_test_and_set_optab, QImode);
+ rtx addr = convert_memory_address (Pmode, XEXP (operands[0], 0));
- emit_library_call (libfunc, LCT_NORMAL, VOIDmode,
- XEXP (operands[0], 0), Pmode,
+ emit_library_call (libfunc, LCT_NORMAL, VOIDmode, addr, Pmode,
operands[1], QImode);
DONE;
}
{
if (TARGET_SYNC_LIBCALL)
{
- rtx libfunc = init_one_libfunc ("__sync_lock_test_and_set_2");
+ rtx libfunc = optab_libfunc (sync_lock_test_and_set_optab, HImode);
+ rtx addr = convert_memory_address (Pmode, XEXP (operands[0], 0));
- emit_library_call (libfunc, LCT_NORMAL, VOIDmode,
- XEXP (operands[0], 0), Pmode,
+ emit_library_call (libfunc, LCT_NORMAL, VOIDmode, addr, Pmode,
operands[1], HImode);
DONE;
}
{
if (TARGET_SYNC_LIBCALL)
{
- rtx libfunc = init_one_libfunc ("__sync_lock_test_and_set_4");
+ rtx libfunc = optab_libfunc (sync_lock_test_and_set_optab, SImode);
+ rtx addr = convert_memory_address (Pmode, XEXP (operands[0], 0));
- emit_library_call (libfunc, LCT_NORMAL, VOIDmode,
- XEXP (operands[0], 0), Pmode,
+ emit_library_call (libfunc, LCT_NORMAL, VOIDmode, addr, Pmode,
operands[1], SImode);
DONE;
}
if (TARGET_SYNC_LIBCALL)
{
- rtx libfunc = init_one_libfunc ("__sync_lock_test_and_set_8");
+ rtx libfunc = optab_libfunc (sync_lock_test_and_set_optab, DImode);
+ rtx addr = convert_memory_address (Pmode, XEXP (operands[0], 0));
- emit_library_call (libfunc, LCT_NORMAL, VOIDmode,
- XEXP (operands[0], 0), Pmode,
+ emit_library_call (libfunc, LCT_NORMAL, VOIDmode, addr, Pmode,
operands[1], DImode);
DONE;
}