4 #if !defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(CC_HAVE_ASM_GOTO)
8 #define __GEN_RMWcc(fullop, var, cc, ...) \
10 asm_volatile_goto (fullop "; j" #cc " %l[cc_label]" \
11 : : "m" (var), ## __VA_ARGS__ \
12 : "memory" : cc_label); \
18 #define GEN_UNARY_RMWcc(op, var, arg0, cc) \
19 __GEN_RMWcc(op " " arg0, var, cc)
21 #define GEN_BINARY_RMWcc(op, var, vcon, val, arg0, cc) \
22 __GEN_RMWcc(op " %1, " arg0, var, cc, vcon (val))
24 #else /* defined(__GCC_ASM_FLAG_OUTPUTS__) || !defined(CC_HAVE_ASM_GOTO) */
26 /* Use flags output or a set instruction */
28 #define __GEN_RMWcc(fullop, var, cc, ...) \
31 asm volatile (fullop ";" CC_SET(cc) \
32 : "+m" (var), CC_OUT(cc) (c) \
33 : __VA_ARGS__ : "memory"); \
37 #define GEN_UNARY_RMWcc(op, var, arg0, cc) \
38 __GEN_RMWcc(op " " arg0, var, cc)
40 #define GEN_BINARY_RMWcc(op, var, vcon, val, arg0, cc) \
41 __GEN_RMWcc(op " %2, " arg0, var, cc, vcon (val))
43 #endif /* defined(__GCC_ASM_FLAG_OUTPUTS__) || !defined(CC_HAVE_ASM_GOTO) */
45 #endif /* _ASM_X86_RMWcc */