PAPI 7.1.0.0
Loading...
Searching...
No Matches
gcc/ia64.h File Reference
Include dependency graph for gcc/ia64.h:

Go to the source code of this file.

Macros

#define AO_LEN   "8"
 
#define AO_IN_ADDR   "r"(addr)
 
#define AO_OUT_ADDR
 
#define AO_SWIZZLE
 
#define AO_MASK(ptr)   /* empty */
 
#define AO_HAVE_nop_full
 
#define AO_HAVE_fetch_and_add1_acquire
 
#define AO_HAVE_fetch_and_add1_release
 
#define AO_HAVE_fetch_and_sub1_acquire
 
#define AO_HAVE_fetch_and_sub1_release
 
#define AO_HAVE_fetch_compare_and_swap_acquire
 
#define AO_HAVE_fetch_compare_and_swap_release
 
#define AO_HAVE_char_fetch_compare_and_swap_acquire
 
#define AO_HAVE_char_fetch_compare_and_swap_release
 
#define AO_HAVE_short_fetch_compare_and_swap_acquire
 
#define AO_HAVE_short_fetch_compare_and_swap_release
 
#define AO_HAVE_int_fetch_and_add1_acquire
 
#define AO_HAVE_int_fetch_and_add1_release
 
#define AO_HAVE_int_fetch_and_sub1_acquire
 
#define AO_HAVE_int_fetch_and_sub1_release
 
#define AO_HAVE_int_fetch_compare_and_swap_acquire
 
#define AO_HAVE_int_fetch_compare_and_swap_release
 

Functions

AO_INLINE void AO_nop_full (void)
 
AO_INLINE AO_t AO_fetch_and_add1_acquire (volatile AO_t *addr)
 
AO_INLINE AO_t AO_fetch_and_add1_release (volatile AO_t *addr)
 
AO_INLINE AO_t AO_fetch_and_sub1_acquire (volatile AO_t *addr)
 
AO_INLINE AO_t AO_fetch_and_sub1_release (volatile AO_t *addr)
 
AO_INLINE AO_t AO_fetch_compare_and_swap_acquire (volatile AO_t *addr, AO_t old, AO_t new_val)
 
AO_INLINE AO_t AO_fetch_compare_and_swap_release (volatile AO_t *addr, AO_t old, AO_t new_val)
 
AO_INLINE unsigned char AO_char_fetch_compare_and_swap_acquire (volatile unsigned char *addr, unsigned char old, unsigned char new_val)
 
AO_INLINE unsigned char AO_char_fetch_compare_and_swap_release (volatile unsigned char *addr, unsigned char old, unsigned char new_val)
 
AO_INLINE unsigned short AO_short_fetch_compare_and_swap_acquire (volatile unsigned short *addr, unsigned short old, unsigned short new_val)
 
AO_INLINE unsigned short AO_short_fetch_compare_and_swap_release (volatile unsigned short *addr, unsigned short old, unsigned short new_val)
 
AO_INLINE unsigned int AO_int_fetch_and_add1_acquire (volatile unsigned int *addr)
 
AO_INLINE unsigned int AO_int_fetch_and_add1_release (volatile unsigned int *addr)
 
AO_INLINE unsigned int AO_int_fetch_and_sub1_acquire (volatile unsigned int *addr)
 
AO_INLINE unsigned int AO_int_fetch_and_sub1_release (volatile unsigned int *addr)
 
AO_INLINE unsigned int AO_int_fetch_compare_and_swap_acquire (volatile unsigned int *addr, unsigned int old, unsigned int new_val)
 
AO_INLINE unsigned int AO_int_fetch_compare_and_swap_release (volatile unsigned int *addr, unsigned int old, unsigned int new_val)
 

Macro Definition Documentation

◆ AO_HAVE_char_fetch_compare_and_swap_acquire

#define AO_HAVE_char_fetch_compare_and_swap_acquire

Definition at line 156 of file gcc/ia64.h.

◆ AO_HAVE_char_fetch_compare_and_swap_release

#define AO_HAVE_char_fetch_compare_and_swap_release

Definition at line 170 of file gcc/ia64.h.

◆ AO_HAVE_fetch_and_add1_acquire

#define AO_HAVE_fetch_and_add1_acquire

Definition at line 75 of file gcc/ia64.h.

◆ AO_HAVE_fetch_and_add1_release

#define AO_HAVE_fetch_and_add1_release

Definition at line 87 of file gcc/ia64.h.

◆ AO_HAVE_fetch_and_sub1_acquire

#define AO_HAVE_fetch_and_sub1_acquire

Definition at line 99 of file gcc/ia64.h.

◆ AO_HAVE_fetch_and_sub1_release

#define AO_HAVE_fetch_and_sub1_release

Definition at line 111 of file gcc/ia64.h.

◆ AO_HAVE_fetch_compare_and_swap_acquire

#define AO_HAVE_fetch_compare_and_swap_acquire

Definition at line 127 of file gcc/ia64.h.

◆ AO_HAVE_fetch_compare_and_swap_release

#define AO_HAVE_fetch_compare_and_swap_release

Definition at line 142 of file gcc/ia64.h.

◆ AO_HAVE_int_fetch_and_add1_acquire

#define AO_HAVE_int_fetch_and_add1_acquire

Definition at line 217 of file gcc/ia64.h.

◆ AO_HAVE_int_fetch_and_add1_release

#define AO_HAVE_int_fetch_and_add1_release

Definition at line 228 of file gcc/ia64.h.

◆ AO_HAVE_int_fetch_and_sub1_acquire

#define AO_HAVE_int_fetch_and_sub1_acquire

Definition at line 239 of file gcc/ia64.h.

◆ AO_HAVE_int_fetch_and_sub1_release

#define AO_HAVE_int_fetch_and_sub1_release

Definition at line 250 of file gcc/ia64.h.

◆ AO_HAVE_int_fetch_compare_and_swap_acquire

#define AO_HAVE_int_fetch_compare_and_swap_acquire

Definition at line 264 of file gcc/ia64.h.

◆ AO_HAVE_int_fetch_compare_and_swap_release

#define AO_HAVE_int_fetch_compare_and_swap_release

Definition at line 277 of file gcc/ia64.h.

◆ AO_HAVE_nop_full

#define AO_HAVE_nop_full

Definition at line 62 of file gcc/ia64.h.

◆ AO_HAVE_short_fetch_compare_and_swap_acquire

#define AO_HAVE_short_fetch_compare_and_swap_acquire

Definition at line 184 of file gcc/ia64.h.

◆ AO_HAVE_short_fetch_compare_and_swap_release

#define AO_HAVE_short_fetch_compare_and_swap_release

Definition at line 198 of file gcc/ia64.h.

◆ AO_IN_ADDR

#define AO_IN_ADDR   "r"(addr)

Definition at line 51 of file gcc/ia64.h.

◆ AO_LEN

#define AO_LEN   "8"

Definition at line 50 of file gcc/ia64.h.

◆ AO_MASK

#define AO_MASK (   ptr)    /* empty */

Definition at line 54 of file gcc/ia64.h.

◆ AO_OUT_ADDR

#define AO_OUT_ADDR

Definition at line 52 of file gcc/ia64.h.

◆ AO_SWIZZLE

#define AO_SWIZZLE

Definition at line 53 of file gcc/ia64.h.

Function Documentation

◆ AO_char_fetch_compare_and_swap_acquire()

AO_INLINE unsigned char AO_char_fetch_compare_and_swap_acquire ( volatile unsigned char *  addr,
unsigned char  old,
unsigned char  new_val 
)

Definition at line 145 of file gcc/ia64.h.

147{
148 unsigned char fetched_val;
149 __asm__ __volatile__(AO_SWIZZLE
150 "mov ar.ccv=%[old] ;; cmpxchg1.acq %0=[%1],%[new_val],ar.ccv"
151 : "=r"(fetched_val) AO_OUT_ADDR
152 : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"((AO_t)old)
153 : "memory");
154 return fetched_val;
155}
#define AO_t
Definition: atomic_ops.h:156
#define AO_SWIZZLE
Definition: gcc/ia64.h:53
#define AO_OUT_ADDR
Definition: gcc/ia64.h:52
#define AO_IN_ADDR
Definition: gcc/ia64.h:51

◆ AO_char_fetch_compare_and_swap_release()

AO_INLINE unsigned char AO_char_fetch_compare_and_swap_release ( volatile unsigned char *  addr,
unsigned char  old,
unsigned char  new_val 
)

Definition at line 159 of file gcc/ia64.h.

161{
162 unsigned char fetched_val;
163 __asm__ __volatile__(AO_SWIZZLE
164 "mov ar.ccv=%[old] ;; cmpxchg1.rel %0=[%1],%[new_val],ar.ccv"
165 : "=r"(fetched_val) AO_OUT_ADDR
166 : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"((AO_t)old)
167 : "memory");
168 return fetched_val;
169}

◆ AO_fetch_and_add1_acquire()

AO_INLINE AO_t AO_fetch_and_add1_acquire ( volatile AO_t addr)

Definition at line 66 of file gcc/ia64.h.

67{
69
70 __asm__ __volatile__ (AO_SWIZZLE
71 "fetchadd" AO_LEN ".acq %0=[%1],1":
72 "=r" (result) AO_OUT_ADDR: AO_IN_ADDR :"memory");
73 return result;
74}
volatile int result
#define AO_LEN
Definition: gcc/ia64.h:50

◆ AO_fetch_and_add1_release()

AO_INLINE AO_t AO_fetch_and_add1_release ( volatile AO_t addr)

Definition at line 78 of file gcc/ia64.h.

79{
81
82 __asm__ __volatile__ (AO_SWIZZLE
83 "fetchadd" AO_LEN ".rel %0=[%1],1":
84 "=r" (result) AO_OUT_ADDR: AO_IN_ADDR :"memory");
85 return result;
86}

◆ AO_fetch_and_sub1_acquire()

AO_INLINE AO_t AO_fetch_and_sub1_acquire ( volatile AO_t addr)

Definition at line 90 of file gcc/ia64.h.

91{
93
94 __asm__ __volatile__ (AO_SWIZZLE
95 "fetchadd" AO_LEN ".acq %0=[%1],-1":
96 "=r" (result) AO_OUT_ADDR: AO_IN_ADDR :"memory");
97 return result;
98}

◆ AO_fetch_and_sub1_release()

AO_INLINE AO_t AO_fetch_and_sub1_release ( volatile AO_t addr)

Definition at line 102 of file gcc/ia64.h.

103{
104 AO_t result;
105
106 __asm__ __volatile__ (AO_SWIZZLE
107 "fetchadd" AO_LEN ".rel %0=[%1],-1":
108 "=r" (result) AO_OUT_ADDR: AO_IN_ADDR :"memory");
109 return result;
110}

◆ AO_fetch_compare_and_swap_acquire()

AO_INLINE AO_t AO_fetch_compare_and_swap_acquire ( volatile AO_t addr,
AO_t  old,
AO_t  new_val 
)

Definition at line 115 of file gcc/ia64.h.

116{
117 AO_t fetched_val;
118 AO_MASK(old);
119 __asm__ __volatile__(AO_SWIZZLE
120 "mov ar.ccv=%[old] ;; cmpxchg" AO_LEN
121 ".acq %0=[%1],%[new_val],ar.ccv"
122 : "=r"(fetched_val) AO_OUT_ADDR
123 : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"(old)
124 : "memory");
125 return fetched_val;
126}
#define AO_MASK(ptr)
Definition: gcc/ia64.h:54

◆ AO_fetch_compare_and_swap_release()

AO_INLINE AO_t AO_fetch_compare_and_swap_release ( volatile AO_t addr,
AO_t  old,
AO_t  new_val 
)

Definition at line 130 of file gcc/ia64.h.

131{
132 AO_t fetched_val;
133 AO_MASK(old);
134 __asm__ __volatile__(AO_SWIZZLE
135 "mov ar.ccv=%[old] ;; cmpxchg" AO_LEN
136 ".rel %0=[%1],%[new_val],ar.ccv"
137 : "=r"(fetched_val) AO_OUT_ADDR
138 : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"(old)
139 : "memory");
140 return fetched_val;
141}

◆ AO_int_fetch_and_add1_acquire()

AO_INLINE unsigned int AO_int_fetch_and_add1_acquire ( volatile unsigned int addr)

Definition at line 209 of file gcc/ia64.h.

210 {
211 unsigned int result;
212 __asm__ __volatile__("fetchadd4.acq %0=[%1],1"
213 : "=r" (result) : AO_IN_ADDR
214 : "memory");
215 return result;
216 }

◆ AO_int_fetch_and_add1_release()

AO_INLINE unsigned int AO_int_fetch_and_add1_release ( volatile unsigned int addr)

Definition at line 220 of file gcc/ia64.h.

221 {
222 unsigned int result;
223 __asm__ __volatile__("fetchadd4.rel %0=[%1],1"
224 : "=r" (result) : AO_IN_ADDR
225 : "memory");
226 return result;
227 }

◆ AO_int_fetch_and_sub1_acquire()

AO_INLINE unsigned int AO_int_fetch_and_sub1_acquire ( volatile unsigned int addr)

Definition at line 231 of file gcc/ia64.h.

232 {
233 unsigned int result;
234 __asm__ __volatile__("fetchadd4.acq %0=[%1],-1"
235 : "=r" (result) : AO_IN_ADDR
236 : "memory");
237 return result;
238 }

◆ AO_int_fetch_and_sub1_release()

AO_INLINE unsigned int AO_int_fetch_and_sub1_release ( volatile unsigned int addr)

Definition at line 242 of file gcc/ia64.h.

243 {
244 unsigned int result;
245 __asm__ __volatile__("fetchadd4.rel %0=[%1],-1"
246 : "=r" (result) : AO_IN_ADDR
247 : "memory");
248 return result;
249 }

◆ AO_int_fetch_compare_and_swap_acquire()

AO_INLINE unsigned int AO_int_fetch_compare_and_swap_acquire ( volatile unsigned int addr,
unsigned int  old,
unsigned int  new_val 
)

Definition at line 254 of file gcc/ia64.h.

256 {
257 unsigned int fetched_val;
258 __asm__ __volatile__("mov ar.ccv=%3 ;; cmpxchg4.acq %0=[%1],%2,ar.ccv"
259 : "=r"(fetched_val)
260 : AO_IN_ADDR, "r"(new_val), "r"((AO_t)old)
261 : "memory");
262 return fetched_val;
263 }

◆ AO_int_fetch_compare_and_swap_release()

AO_INLINE unsigned int AO_int_fetch_compare_and_swap_release ( volatile unsigned int addr,
unsigned int  old,
unsigned int  new_val 
)

Definition at line 267 of file gcc/ia64.h.

269 {
270 unsigned int fetched_val;
271 __asm__ __volatile__("mov ar.ccv=%3 ;; cmpxchg4.rel %0=[%1],%2,ar.ccv"
272 : "=r"(fetched_val)
273 : AO_IN_ADDR, "r"(new_val), "r"((AO_t)old)
274 : "memory");
275 return fetched_val;
276 }

◆ AO_nop_full()

AO_INLINE void AO_nop_full ( void  )

Definition at line 58 of file gcc/ia64.h.

59{
60 __asm__ __volatile__("mf" : : : "memory");
61}

◆ AO_short_fetch_compare_and_swap_acquire()

AO_INLINE unsigned short AO_short_fetch_compare_and_swap_acquire ( volatile unsigned short *  addr,
unsigned short  old,
unsigned short  new_val 
)

Definition at line 173 of file gcc/ia64.h.

175{
176 unsigned short fetched_val;
177 __asm__ __volatile__(AO_SWIZZLE
178 "mov ar.ccv=%[old] ;; cmpxchg2.acq %0=[%1],%[new_val],ar.ccv"
179 : "=r"(fetched_val) AO_OUT_ADDR
180 : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"((AO_t)old)
181 : "memory");
182 return fetched_val;
183}

◆ AO_short_fetch_compare_and_swap_release()

AO_INLINE unsigned short AO_short_fetch_compare_and_swap_release ( volatile unsigned short *  addr,
unsigned short  old,
unsigned short  new_val 
)

Definition at line 187 of file gcc/ia64.h.

189{
190 unsigned short fetched_val;
191 __asm__ __volatile__(AO_SWIZZLE
192 "mov ar.ccv=%[old] ;; cmpxchg2.rel %0=[%1],%[new_val],ar.ccv"
193 : "=r"(fetched_val) AO_OUT_ADDR
194 : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"((AO_t)old)
195 : "memory");
196 return fetched_val;
197}