annotate gcc/config/nios2/sync.md @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ;; Machine Description for Altera Nios II synchronization primitives.
kono
parents:
diff changeset
2 ;; Copyright (C) 2014-2017 Free Software Foundation, Inc.
kono
parents:
diff changeset
3 ;; Contributed by Mentor Graphics, Inc.
kono
parents:
diff changeset
4 ;;
kono
parents:
diff changeset
5 ;; This file is part of GCC.
kono
parents:
diff changeset
6 ;;
kono
parents:
diff changeset
7 ;; GCC is free software; you can redistribute it and/or modify
kono
parents:
diff changeset
8 ;; it under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
9 ;; the Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
10 ;; any later version.
kono
parents:
diff changeset
11 ;;
kono
parents:
diff changeset
12 ;; GCC is distributed in the hope that it will be useful,
kono
parents:
diff changeset
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
kono
parents:
diff changeset
15 ;; GNU General Public License for more details.
kono
parents:
diff changeset
16 ;;
kono
parents:
diff changeset
17 ;; You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
18 ;; along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
19 ;; <http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 (define_int_iterator UNSPECV_LOAD_EXCLUSIVE [UNSPECV_LDEX UNSPECV_LDSEX])
kono
parents:
diff changeset
22 (define_int_attr load_exclusive [(UNSPECV_LDEX "ldex")
kono
parents:
diff changeset
23 (UNSPECV_LDSEX "ldsex")])
kono
parents:
diff changeset
24 (define_insn "<load_exclusive>"
kono
parents:
diff changeset
25 [(set (match_operand:SI 0 "register_operand" "=r")
kono
parents:
diff changeset
26 (unspec_volatile:SI
kono
parents:
diff changeset
27 [(match_operand:SI 1 "ldstex_memory_operand" "v")]
kono
parents:
diff changeset
28 UNSPECV_LOAD_EXCLUSIVE))]
kono
parents:
diff changeset
29 "TARGET_ARCH_R2"
kono
parents:
diff changeset
30 "<load_exclusive>\\t%0, %A1"
kono
parents:
diff changeset
31 [(set_attr "type" "ld")])
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 (define_int_iterator UNSPECV_STORE_EXCLUSIVE [UNSPECV_STEX UNSPECV_STSEX])
kono
parents:
diff changeset
34 (define_int_attr store_exclusive [(UNSPECV_STEX "stex")
kono
parents:
diff changeset
35 (UNSPECV_STSEX "stsex")])
kono
parents:
diff changeset
36 (define_insn "<store_exclusive>"
kono
parents:
diff changeset
37 [(set (match_operand:SI 2 "register_operand" "=r")
kono
parents:
diff changeset
38 (unspec_volatile:SI [(const_int 0)] UNSPECV_STORE_EXCLUSIVE))
kono
parents:
diff changeset
39 (set (match_operand:SI 0 "ldstex_memory_operand" "=v")
kono
parents:
diff changeset
40 (unspec_volatile:SI
kono
parents:
diff changeset
41 [(match_operand:SI 1 "reg_or_0_operand" "rM")]
kono
parents:
diff changeset
42 UNSPECV_STORE_EXCLUSIVE))]
kono
parents:
diff changeset
43 "TARGET_ARCH_R2"
kono
parents:
diff changeset
44 "<store_exclusive>\\t%2, %z1, %A0"
kono
parents:
diff changeset
45 [(set_attr "type" "st")])