diff options
author | jgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-05 08:47:44 +0000 |
---|---|---|
committer | jgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-05 08:47:44 +0000 |
commit | 62589f76c4184aed77f0628313d2391e23b91548 (patch) | |
tree | 82d9c2575620e32072c7edef398aa1b818a54acb | |
parent | ff6e6cb626adfc378ece611b3d35c0893071c95d (diff) | |
download | gcc-62589f76c4184aed77f0628313d2391e23b91548.tar.gz |
[Patch] The comparison in a compare exchange should not take place in VOIDmode
gcc/
* builtins.c (expand_builtin_atomic_compare_exchange): Call
emit_cmp_and_jump_insns with the mode of target.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224148 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/builtins.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5eb2f40239e..6a6707f61ff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-06-05 James Greenhalgh <james.greenhalgh@arm.com> + + * builtins.c (expand_builtin_atomic_compare_exchange): Call + emit_cmp_and_jump_insns with the mode of target. + 2015-06-05 Venkataramanan Kumar <venkataramanan.kumar@amd.com> * config/i386/sse.md (sse3_mwait): Swap the operand constriants. diff --git a/gcc/builtins.c b/gcc/builtins.c index f20608b29e9..8772158af94 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -5471,7 +5471,8 @@ expand_builtin_atomic_compare_exchange (machine_mode mode, tree exp, the normal case where EXPECT is totally private, i.e. a register. At which point the store can be unconditional. */ label = gen_label_rtx (); - emit_cmp_and_jump_insns (target, const0_rtx, NE, NULL, VOIDmode, 1, label); + emit_cmp_and_jump_insns (target, const0_rtx, NE, NULL, + GET_MODE (target), 1, label); emit_move_insn (expect, oldval); emit_label (label); |