OLD | NEW |
1 // Copyright 2014 Bloomberg Finance LP. All rights reserved. | 1 // Copyright 2014 Bloomberg Finance LP. All rights reserved. |
2 // | 2 // |
3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
5 // met: | 5 // met: |
6 // | 6 // |
7 // * Redistributions of source code must retain the above copyright | 7 // * Redistributions of source code must retain the above copyright |
8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
9 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
10 // copyright notice, this list of conditions and the following disclaimer | 10 // copyright notice, this list of conditions and the following disclaimer |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 " bne- 1b \n\t" | 86 " bne- 1b \n\t" |
87 : [res] "=&b" (result) | 87 : [res] "=&b" (result) |
88 : [obj] "b" (ptr), | 88 : [obj] "b" (ptr), |
89 [val] "b" (increment), | 89 [val] "b" (increment), |
90 [zero] "i" (0) | 90 [zero] "i" (0) |
91 : "cr0", "ctr"); | 91 : "cr0", "ctr"); |
92 | 92 |
93 return result; | 93 return result; |
94 } | 94 } |
95 | 95 |
96 inline void MemoryBarrier(void) { | 96 inline void MemoryBarrierInternal(void) { |
97 asm volatile ( | 97 asm volatile ( |
98 " lwsync \n\t" | 98 " lwsync \n\t" |
99 " isync \n\t" | 99 " isync \n\t" |
100 : | 100 : |
101 : | 101 : |
102 : "memory"); | 102 : "memory"); |
103 } | 103 } |
104 | 104 |
105 inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr, | 105 inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr, |
106 Atomic32 increment) { | 106 Atomic32 increment) { |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 | 431 |
432 return result; | 432 return result; |
433 } | 433 } |
434 #endif | 434 #endif |
435 | 435 |
436 } // namespace internal | 436 } // namespace internal |
437 } // namespace protobuf | 437 } // namespace protobuf |
438 } // namespace google | 438 } // namespace google |
439 | 439 |
440 #endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_SPARC_GCC_H_ | 440 #endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_SPARC_GCC_H_ |
OLD | NEW |