1 /*===--------------- cmpccxaddintrin.h - CMPCCXADD intrinsics--------------===
4 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 * See https://llvm.org/LICENSE.txt for license information.
6 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 *===-----------------------------------------------------------------------===
10 #ifndef __X86GPRINTRIN_H
12 "Never use <cmpccxaddintrin.h> directly; include <x86gprintrin.h> instead."
13 #endif // __X86GPRINTRIN_H
15 #ifndef __CMPCCXADDINTRIN_H
16 #define __CMPCCXADDINTRIN_H
20 _CMPCCX_O
, /* Overflow. */
21 _CMPCCX_NO
, /* No overflow. */
22 _CMPCCX_B
, /* Below. */
23 _CMPCCX_NB
, /* Not below. */
24 _CMPCCX_Z
, /* Zero. */
25 _CMPCCX_NZ
, /* Not zero. */
26 _CMPCCX_BE
, /* Below or equal. */
27 _CMPCCX_NBE
, /* Neither below nor equal. */
28 _CMPCCX_S
, /* Sign. */
29 _CMPCCX_NS
, /* No sign. */
30 _CMPCCX_P
, /* Parity. */
31 _CMPCCX_NP
, /* No parity. */
32 _CMPCCX_L
, /* Less. */
33 _CMPCCX_NL
, /* Not less. */
34 _CMPCCX_LE
, /* Less or equal. */
35 _CMPCCX_NLE
, /* Neither less nor equal. */
38 /// Compares the value from the memory __A with the value of __B. If the
39 /// specified condition __D is met, then add the third operand __C to the
40 /// __A and write it into __A, else the value of __A is unchanged. The return
41 /// value is the original value of __A.
43 /// \headerfile <immintrin.h>
45 /// This intrinsic corresponds to the \c CMPCCXADD instructions.
48 /// __A pointer specifying the memory address.
51 /// A integer operand.
54 /// A integer operand.
57 /// The specified condition.
59 /// \returns a integer which is the original value of first operand.
61 #define _cmpccxadd_epi32(__A, __B, __C, __D) \
62 ((int)(__builtin_ia32_cmpccxadd32((void *)(__A), (int)(__B), (int)(__C), \
65 #define _cmpccxadd_epi64(__A, __B, __C, __D) \
66 ((long long)(__builtin_ia32_cmpccxadd64((void *)(__A), (long long)(__B), \
67 (long long)(__C), (int)(__D))))
70 #endif // __CMPCCXADDINTRIN_H