Changeset 6653 in vbox
- Timestamp:
- Jan 31, 2008 12:13:00 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 27719
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asm.h
r6651 r6653 2602 2602 uint64_t u64Ret; 2603 2603 # if defined(PIC) || defined(RT_OS_DARWIN) /* darwin: 4.0.1 compiler option / bug? */ 2604 __asm__ __volatile__("xchgl %%ebx, %2\n\t" 2605 "lock; cmpxchg8b %4\n\t" 2606 "xchgl %%ebx, %2\n\t" 2607 : "=A" (u64Ret), 2608 "=m" (*pu64) 2604 /* NB: this code uses a memory clobber description, because the clean 2605 * solution with an output value for *pu64 makes gcc run out of registers. 2606 * This will cause suboptimal code, and anyone with a better solution is 2607 * welcome to improve this. */ 2608 __asm__ __volatile__("xchgl %%ebx, %1\n\t" 2609 "lock; cmpxchg8b %3\n\t" 2610 "xchgl %%ebx, %1\n\t" 2611 : "=A" (u64Ret) 2609 2612 : "DS" ((uint32_t)u64New), 2610 2613 "c" ((uint32_t)(u64New >> 32)), 2611 2614 "m" (*pu64), 2612 "0" (u64Old)); 2615 "0" (u64Old) 2616 : "memory" ); 2613 2617 # else /* !PIC */ 2614 2618 __asm__ __volatile__("lock; cmpxchg8b %4\n\t"
Note:
See TracChangeset
for help on using the changeset viewer.