aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2015-09-14 12:05:58 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2015-09-14 12:05:58 +0000
commit641f1ab4ed20677f2c9515bb039d8263a463576f (patch)
tree398a783cdb04633f54a688b0b925ce64ca5f3e06 /gcc/optabs.c
parentaa9f4b4c73b8ed63936ba1d932605fafff70cc41 (diff)
downloadgcc-641f1ab4ed20677f2c9515bb039d8263a463576f.zip
gcc-641f1ab4ed20677f2c9515bb039d8263a463576f.tar.gz
gcc-641f1ab4ed20677f2c9515bb039d8263a463576f.tar.bz2
re PR middle-end/67401 (Incorrect expand of __atomic_compare_exchange_8 using __sync_val_compare_and_swap_8)
PR middle-end/67401 * optabs.c (expand_atomic_compare_and_swap): Move result of emitting sync_compare_and_swap_optab libcall to target_oval. From-SVN: r227746
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r--gcc/optabs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 79c6f06..c2a9b1c 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -7521,9 +7521,10 @@ expand_atomic_compare_and_swap (rtx *ptarget_bool, rtx *ptarget_oval,
if (libfunc != NULL)
{
rtx addr = convert_memory_address (ptr_mode, XEXP (mem, 0));
- target_oval = emit_library_call_value (libfunc, NULL_RTX, LCT_NORMAL,
- mode, 3, addr, ptr_mode,
- expected, mode, desired, mode);
+ rtx target = emit_library_call_value (libfunc, NULL_RTX, LCT_NORMAL,
+ mode, 3, addr, ptr_mode,
+ expected, mode, desired, mode);
+ emit_move_insn (target_oval, target);
/* Compute the boolean return value only if requested. */
if (ptarget_bool)