Mercurial > hg > truffle
comparison src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp @ 693:2c1dbb844832
Merge
author | acorn |
---|---|
date | Thu, 02 Apr 2009 18:17:03 -0400 |
parents | d0994e5bebce |
children | bd02caa94611 |
comparison
equal
deleted
inserted
replaced
692:23276f80d930 | 693:2c1dbb844832 |
---|---|
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 |