This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[ptx] immediate operands
- From: Nathan Sidwell <nathan at acm dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 19 Nov 2015 09:41:19 -0500
- Subject: [ptx] immediate operands
- Authentication-results: sourceware.org; auth=none
The atomic instructions can take immediate operands. Applied to trunk.
nathan
2015-11-19 Nathan Sidwell <nathanacm.org>
* config/nvptx/nvptx.md (atomic_compare_and_swap<mode>_1,
atomic_exchange<mode>): Input values can be immediates.
Index: gcc/config/nvptx/nvptx.md
===================================================================
--- gcc/config/nvptx/nvptx.md (revision 230605)
+++ gcc/config/nvptx/nvptx.md (working copy)
@@ -1494,8 +1494,8 @@
[(set (match_operand:SDIM 0 "nvptx_register_operand" "=R")
(unspec_volatile:SDIM
[(match_operand:SDIM 1 "memory_operand" "+m")
- (match_operand:SDIM 2 "nvptx_register_operand" "R")
- (match_operand:SDIM 3 "nvptx_register_operand" "R")
+ (match_operand:SDIM 2 "nvptx_nonmemory_operand" "Ri")
+ (match_operand:SDIM 3 "nvptx_nonmemory_operand" "Ri")
(match_operand:SI 4 "const_int_operand")]
UNSPECV_CAS))
(set (match_dup 1)
@@ -1510,7 +1510,7 @@
(match_operand:SI 3 "const_int_operand")] ;; model
UNSPECV_XCHG))
(set (match_dup 1)
- (match_operand:SDIM 2 "nvptx_register_operand" "R"))] ;; input
+ (match_operand:SDIM 2 "nvptx_nonmemory_operand" "Ri"))] ;; input
""
"%.\\tatom%A1.exch.b%T0\\t%0, %1, %2;")