I486 does not support SMP or CMPXCHG8B. */
| 377 | |
| 378 | /* I486 does not support SMP or CMPXCHG8B. */ |
| 379 | static __inline int |
| 380 | atomic_cmpset_64_i386(volatile uint64_t *dst, uint64_t expect, uint64_t src) |
| 381 | { |
| 382 | volatile uint32_t *p; |
| 383 | u_char res; |
| 384 | |
| 385 | p = (volatile uint32_t *)dst; |
| 386 | __asm __volatile( |
| 387 | " pushfl ; " |
| 388 | " cli ; " |
| 389 | " xorl %1,%%eax ; " |
| 390 | " xorl %2,%%edx ; " |
| 391 | " orl %%edx,%%eax ; " |
| 392 | " jne 1f ; " |
| 393 | " movl %4,%1 ; " |
| 394 | " movl %5,%2 ; " |
| 395 | "1: " |
| 396 | " sete %3 ; " |
| 397 | " popfl" |
| 398 | : "+A" (expect), /* 0 */ |
| 399 | "+m" (*p), /* 1 */ |
| 400 | "+m" (*(p + 1)), /* 2 */ |
| 401 | "=q" (res) /* 3 */ |
| 402 | : "r" ((uint32_t)src), /* 4 */ |
| 403 | "r" ((uint32_t)(src >> 32)) /* 5 */ |
| 404 | : "memory", "cc"); |
| 405 | return (res); |
| 406 | } |
| 407 | |
| 408 | static __inline int |
| 409 | atomic_fcmpset_64_i386(volatile uint64_t *dst, uint64_t *expect, uint64_t src) |
no outgoing calls
no test coverage detected