Mercurial > hg > truffle
comparison src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp @ 686:a9d9d7e06593
Merge
author | trims |
---|---|
date | Thu, 02 Apr 2009 17:01:00 -0700 |
parents | d0994e5bebce |
children | bd02caa94611 |
comparison
equal
deleted
inserted
replaced
663:032c6af894da | 686:a9d9d7e06593 |
---|---|
59 #else | 59 #else |
60 __asm__ volatile ("movl 0(%%esp),%0" : "=r" (dummy) : : "memory"); | 60 __asm__ volatile ("movl 0(%%esp),%0" : "=r" (dummy) : : "memory"); |
61 #endif // AMD64 | 61 #endif // AMD64 |
62 } | 62 } |
63 inline void _OrderAccess_fence() { | 63 inline void _OrderAccess_fence() { |
64 #ifdef AMD64 | 64 // Always use locked addl since mfence is sometimes expensive |
65 __asm__ __volatile__ ("mfence":::"memory"); | |
66 #else | |
67 __asm__ volatile ("lock; addl $0,0(%%esp)" : : : "cc", "memory"); | 65 __asm__ volatile ("lock; addl $0,0(%%esp)" : : : "cc", "memory"); |
68 #endif // AMD64 | |
69 } | 66 } |
70 | 67 |
71 } | 68 } |
72 | 69 |
73 #endif // GNU_SOURCE | 70 #endif // GNU_SOURCE |