summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/sync.md
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-12 00:00:53 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-12 00:00:53 +0000
commit7211bb77b6032be79f0617088f6b1074f69266fb (patch)
tree401c22aaaaa8d6fc8fa355cd99b13368cd61c84a /gcc/config/rs6000/sync.md
parent05b105358a3f35af230a69f690d41882c30297d5 (diff)
downloadgcc-7211bb77b6032be79f0617088f6b1074f69266fb.tar.gz
* config/rs6000/rs6000.c (rs6000_pre_atomic_barrier): Remove SYNC
variants cases from switch. (rs6000_post_atomic_barrier): Same. (rs6000_expand_atomic_compare_and_swap): Use memmodel_base. (rs6000_expand_atomic_exchange): Same. (rs6000_expand_atomic_op): Same. * config/rs6000/sync.md (mem_thread_fence): Use memodel_base. Remove SYNC variants cases from switch. (atomic_load): Same. (atomic_store): Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224401 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/sync.md')
-rw-r--r--gcc/config/rs6000/sync.md13
1 files changed, 3 insertions, 10 deletions
diff --git a/gcc/config/rs6000/sync.md b/gcc/config/rs6000/sync.md
index 8ba30b98658..d97df8b67fa 100644
--- a/gcc/config/rs6000/sync.md
+++ b/gcc/config/rs6000/sync.md
@@ -41,21 +41,18 @@
[(match_operand:SI 0 "const_int_operand" "")] ;; model
""
{
- enum memmodel model = memmodel_from_int (INTVAL (operands[0]));
+ enum memmodel model = memmodel_base (INTVAL (operands[0]));
switch (model)
{
case MEMMODEL_RELAXED:
break;
case MEMMODEL_CONSUME:
case MEMMODEL_ACQUIRE:
- case MEMMODEL_SYNC_ACQUIRE:
case MEMMODEL_RELEASE:
- case MEMMODEL_SYNC_RELEASE:
case MEMMODEL_ACQ_REL:
emit_insn (gen_lwsync ());
break;
case MEMMODEL_SEQ_CST:
- case MEMMODEL_SYNC_SEQ_CST:
emit_insn (gen_hwsync ());
break;
default:
@@ -147,7 +144,7 @@
if (<MODE>mode == TImode && !TARGET_SYNC_TI)
FAIL;
- enum memmodel model = memmodel_from_int (INTVAL (operands[2]));
+ enum memmodel model = memmodel_base (INTVAL (operands[2]));
if (is_mm_seq_cst (model))
emit_insn (gen_hwsync ());
@@ -185,9 +182,7 @@
break;
case MEMMODEL_CONSUME:
case MEMMODEL_ACQUIRE:
- case MEMMODEL_SYNC_ACQUIRE:
case MEMMODEL_SEQ_CST:
- case MEMMODEL_SYNC_SEQ_CST:
emit_insn (gen_loadsync_<mode> (operands[0]));
break;
default:
@@ -214,17 +209,15 @@
if (<MODE>mode == TImode && !TARGET_SYNC_TI)
FAIL;
- enum memmodel model = memmodel_from_int (INTVAL (operands[2]));
+ enum memmodel model = memmodel_base (INTVAL (operands[2]));
switch (model)
{
case MEMMODEL_RELAXED:
break;
case MEMMODEL_RELEASE:
- case MEMMODEL_SYNC_RELEASE:
emit_insn (gen_lwsync ());
break;
case MEMMODEL_SEQ_CST:
- case MEMMODEL_SYNC_SEQ_CST:
emit_insn (gen_hwsync ());
break;
default: