59 .inline _Atomic_add,3
60 movl 0(%esp), %eax // inc
61 movl 4(%esp), %edx // dest
62 movl %eax, %ecx
63 cmpl $0, 8(%esp) // MP test
64 jne 1f
65 xaddl %eax, (%edx)
66 jmp 2f
67 1: lock
68 xaddl %eax, (%edx)
69 2: addl %ecx, %eax
70 .end
71
72 // Support for jint Atomic::xchg(jint exchange_value, volatile jint* dest).
73 .inline _Atomic_xchg,2
74 movl 0(%esp), %eax // exchange_value
75 movl 4(%esp), %ecx // dest
76 xchgl (%ecx), %eax
77 .end
78
79 // Support for jint Atomic::cmpxchg(jint exchange_value,
80 // volatile jint *dest,
81 // jint compare_value)
82 // An additional bool (os::is_MP()) is passed as the last argument.
83 .inline _Atomic_cmpxchg,4
84 movl 8(%esp), %eax // compare_value
85 movl 0(%esp), %ecx // exchange_value
86 movl 4(%esp), %edx // dest
87 cmp $0, 12(%esp) // MP test
88 jne 1f
89 cmpxchgl %ecx, (%edx)
90 jmp 2f
91 1: lock
92 cmpxchgl %ecx, (%edx)
93 2:
94 .end
95
96 // Support for jlong Atomic::cmpxchg(jlong exchange_value,
97 // volatile jlong* dest,
98 // jlong compare_value)
|
59 .inline _Atomic_add,3
60 movl 0(%esp), %eax // inc
61 movl 4(%esp), %edx // dest
62 movl %eax, %ecx
63 cmpl $0, 8(%esp) // MP test
64 jne 1f
65 xaddl %eax, (%edx)
66 jmp 2f
67 1: lock
68 xaddl %eax, (%edx)
69 2: addl %ecx, %eax
70 .end
71
72 // Support for jint Atomic::xchg(jint exchange_value, volatile jint* dest).
73 .inline _Atomic_xchg,2
74 movl 0(%esp), %eax // exchange_value
75 movl 4(%esp), %ecx // dest
76 xchgl (%ecx), %eax
77 .end
78
79 // Support fori jbyte Atomic::cmpxchg(jbyte exchange_value,
80 // volatile jbyte *dest,
81 // jbyte compare_value)
82 // An additional bool (os::is_MP()) is passed as the last argument.
83 .inline _Atomic_cmpxchg_byte,4
84 movb 8(%esp), %al // compare_value
85 movb 0(%esp), %cl // exchange_value
86 movl 4(%esp), %edx // dest
87 cmp $0, 12(%esp) // MP test
88 jne 1f
89 cmpxchgb %cl, (%edx)
90 jmp 2f
91 1: lock
92 cmpxchgl %cl, (%edx)
93 2:
94 .end
95
96 // Support for jint Atomic::cmpxchg(jint exchange_value,
97 // volatile jint *dest,
98 // jint compare_value)
99 // An additional bool (os::is_MP()) is passed as the last argument.
100 .inline _Atomic_cmpxchg,4
101 movl 8(%esp), %eax // compare_value
102 movl 0(%esp), %ecx // exchange_value
103 movl 4(%esp), %edx // dest
104 cmp $0, 12(%esp) // MP test
105 jne 1f
106 cmpxchgl %ecx, (%edx)
107 jmp 2f
108 1: lock
109 cmpxchgl %ecx, (%edx)
110 2:
111 .end
112
113 // Support for jlong Atomic::cmpxchg(jlong exchange_value,
114 // volatile jlong* dest,
115 // jlong compare_value)
|