comparison gcc/config/arc/atomic.md @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 ;; GCC machine description for ARC atomic instructions. 1 ;; GCC machine description for ARC atomic instructions.
2 ;; Copyright (C) 2015-2017 Free Software Foundation, Inc. 2 ;; Copyright (C) 2015-2018 Free Software Foundation, Inc.
3 ;; 3 ;;
4 ;; This file is part of GCC. 4 ;; This file is part of GCC.
5 ;; 5 ;;
6 ;; GCC is free software; you can redistribute it and/or modify 6 ;; GCC is free software; you can redistribute it and/or modify
7 ;; it under the terms of the GNU General Public License as published by 7 ;; it under the terms of the GNU General Public License as published by
118 (define_expand "atomic_exchangesi" 118 (define_expand "atomic_exchangesi"
119 [(match_operand:SI 0 "register_operand" "") 119 [(match_operand:SI 0 "register_operand" "")
120 (match_operand:SI 1 "mem_noofs_operand" "") 120 (match_operand:SI 1 "mem_noofs_operand" "")
121 (match_operand:SI 2 "register_operand" "") 121 (match_operand:SI 2 "register_operand" "")
122 (match_operand:SI 3 "const_int_operand" "")] 122 (match_operand:SI 3 "const_int_operand" "")]
123 "TARGET_ATOMIC" 123 "TARGET_ARC700 || TARGET_V2"
124 { 124 {
125 enum memmodel model = (enum memmodel) INTVAL (operands[3]); 125 enum memmodel model = (enum memmodel) INTVAL (operands[3]);
126 126
127 if (model == MEMMODEL_SEQ_CST) 127 if (model == MEMMODEL_SEQ_CST)
128 emit_insn (gen_sync (const1_rtx)); 128 emit_insn (gen_sync (const1_rtx));