annotate src/os_cpu/solaris_x86/vm/solaris_x86_32.il @ 5061:e808627bd16f

Renamed projects.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Thu, 08 Mar 2012 19:24:17 +0100
parents 7ab5f6318694
children da4be62fb889
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 //
2114
4fc084dac61e 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
2 // Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 //
a61af66fc99e Initial load
duke
parents:
diff changeset
5 // This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 // under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 // published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 //
a61af66fc99e Initial load
duke
parents:
diff changeset
9 // This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 // version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 // accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 //
a61af66fc99e Initial load
duke
parents:
diff changeset
15 // You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 // 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 //
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1547
diff changeset
19 // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1547
diff changeset
20 // or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1547
diff changeset
21 // questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 //
a61af66fc99e Initial load
duke
parents:
diff changeset
23 //
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25
a61af66fc99e Initial load
duke
parents:
diff changeset
26 // Support for u8 os::setup_fpu()
a61af66fc99e Initial load
duke
parents:
diff changeset
27 .inline _solaris_raw_setup_fpu,1
a61af66fc99e Initial load
duke
parents:
diff changeset
28 movl 0(%esp), %eax
a61af66fc99e Initial load
duke
parents:
diff changeset
29 fldcw (%eax)
a61af66fc99e Initial load
duke
parents:
diff changeset
30 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
31
a61af66fc99e Initial load
duke
parents:
diff changeset
32 // The argument size of each inline directive is ignored by the compiler
a61af66fc99e Initial load
duke
parents:
diff changeset
33 // and is set to 0 for compatibility reason.
a61af66fc99e Initial load
duke
parents:
diff changeset
34
a61af66fc99e Initial load
duke
parents:
diff changeset
35 // Get the raw thread ID from %gs:0
a61af66fc99e Initial load
duke
parents:
diff changeset
36 .inline _raw_thread_id,0
a61af66fc99e Initial load
duke
parents:
diff changeset
37 movl %gs:0, %eax
a61af66fc99e Initial load
duke
parents:
diff changeset
38 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
39
472
7b920868b475 6773838: There is no calling stack for Compiler thread in hs_err file on x86
coleenp
parents: 0
diff changeset
40 // Get current fp
7b920868b475 6773838: There is no calling stack for Compiler thread in hs_err file on x86
coleenp
parents: 0
diff changeset
41 .inline _get_current_fp,0
7b920868b475 6773838: There is no calling stack for Compiler thread in hs_err file on x86
coleenp
parents: 0
diff changeset
42 .volatile
0
a61af66fc99e Initial load
duke
parents:
diff changeset
43 movl %ebp, %eax
a61af66fc99e Initial load
duke
parents:
diff changeset
44 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
45
4749
7ab5f6318694 7125934: Add a fast unordered timestamp capability to Hotspot on x86/x64
phh
parents: 2120
diff changeset
46 // Support for os::rdtsc()
7ab5f6318694 7125934: Add a fast unordered timestamp capability to Hotspot on x86/x64
phh
parents: 2120
diff changeset
47 .inline _raw_rdtsc,0
7ab5f6318694 7125934: Add a fast unordered timestamp capability to Hotspot on x86/x64
phh
parents: 2120
diff changeset
48 rdtsc
7ab5f6318694 7125934: Add a fast unordered timestamp capability to Hotspot on x86/x64
phh
parents: 2120
diff changeset
49 .end
7ab5f6318694 7125934: Add a fast unordered timestamp capability to Hotspot on x86/x64
phh
parents: 2120
diff changeset
50
0
a61af66fc99e Initial load
duke
parents:
diff changeset
51 // Support for jint Atomic::add(jint inc, volatile jint* dest)
a61af66fc99e Initial load
duke
parents:
diff changeset
52 // An additional bool (os::is_MP()) is passed as the last argument.
a61af66fc99e Initial load
duke
parents:
diff changeset
53 .inline _Atomic_add,3
a61af66fc99e Initial load
duke
parents:
diff changeset
54 movl 0(%esp), %eax // inc
a61af66fc99e Initial load
duke
parents:
diff changeset
55 movl 4(%esp), %edx // dest
a61af66fc99e Initial load
duke
parents:
diff changeset
56 movl %eax, %ecx
a61af66fc99e Initial load
duke
parents:
diff changeset
57 cmpl $0, 8(%esp) // MP test
1547
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
58 jne 1f
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
59 xaddl %eax, (%edx)
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
60 jmp 2f
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
61 1: lock
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
62 xaddl %eax, (%edx)
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
63 2: addl %ecx, %eax
0
a61af66fc99e Initial load
duke
parents:
diff changeset
64 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
65
a61af66fc99e Initial load
duke
parents:
diff changeset
66 // Support for jint Atomic::xchg(jint exchange_value, volatile jint* dest).
a61af66fc99e Initial load
duke
parents:
diff changeset
67 .inline _Atomic_xchg,2
a61af66fc99e Initial load
duke
parents:
diff changeset
68 movl 0(%esp), %eax // exchange_value
a61af66fc99e Initial load
duke
parents:
diff changeset
69 movl 4(%esp), %ecx // dest
a61af66fc99e Initial load
duke
parents:
diff changeset
70 xchgl (%ecx), %eax
a61af66fc99e Initial load
duke
parents:
diff changeset
71 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
72
a61af66fc99e Initial load
duke
parents:
diff changeset
73 // Support for jint Atomic::cmpxchg(jint exchange_value,
a61af66fc99e Initial load
duke
parents:
diff changeset
74 // volatile jint *dest,
a61af66fc99e Initial load
duke
parents:
diff changeset
75 // jint compare_value)
a61af66fc99e Initial load
duke
parents:
diff changeset
76 // An additional bool (os::is_MP()) is passed as the last argument.
a61af66fc99e Initial load
duke
parents:
diff changeset
77 .inline _Atomic_cmpxchg,4
a61af66fc99e Initial load
duke
parents:
diff changeset
78 movl 8(%esp), %eax // compare_value
a61af66fc99e Initial load
duke
parents:
diff changeset
79 movl 0(%esp), %ecx // exchange_value
a61af66fc99e Initial load
duke
parents:
diff changeset
80 movl 4(%esp), %edx // dest
a61af66fc99e Initial load
duke
parents:
diff changeset
81 cmp $0, 12(%esp) // MP test
1547
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
82 jne 1f
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
83 cmpxchgl %ecx, (%edx)
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
84 jmp 2f
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
85 1: lock
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
86 cmpxchgl %ecx, (%edx)
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
87 2:
0
a61af66fc99e Initial load
duke
parents:
diff changeset
88 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
89
a61af66fc99e Initial load
duke
parents:
diff changeset
90 // Support for jlong Atomic::cmpxchg(jlong exchange_value,
a61af66fc99e Initial load
duke
parents:
diff changeset
91 // volatile jlong* dest,
a61af66fc99e Initial load
duke
parents:
diff changeset
92 // jlong compare_value)
a61af66fc99e Initial load
duke
parents:
diff changeset
93 // An additional bool (os::is_MP()) is passed as the last argument.
a61af66fc99e Initial load
duke
parents:
diff changeset
94 .inline _Atomic_cmpxchg_long,6
a61af66fc99e Initial load
duke
parents:
diff changeset
95 pushl %ebx
a61af66fc99e Initial load
duke
parents:
diff changeset
96 pushl %edi
a61af66fc99e Initial load
duke
parents:
diff changeset
97 movl 20(%esp), %eax // compare_value (low)
a61af66fc99e Initial load
duke
parents:
diff changeset
98 movl 24(%esp), %edx // compare_value (high)
a61af66fc99e Initial load
duke
parents:
diff changeset
99 movl 16(%esp), %edi // dest
a61af66fc99e Initial load
duke
parents:
diff changeset
100 movl 8(%esp), %ebx // exchange_value (low)
a61af66fc99e Initial load
duke
parents:
diff changeset
101 movl 12(%esp), %ecx // exchange_high (high)
a61af66fc99e Initial load
duke
parents:
diff changeset
102 cmp $0, 28(%esp) // MP test
1547
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
103 jne 1f
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
104 cmpxchg8b (%edi)
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
105 jmp 2f
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
106 1: lock
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
107 cmpxchg8b (%edi)
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 894
diff changeset
108 2: popl %edi
0
a61af66fc99e Initial load
duke
parents:
diff changeset
109 popl %ebx
a61af66fc99e Initial load
duke
parents:
diff changeset
110 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
111
2114
4fc084dac61e 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
112 // Support for jlong Atomic::load and Atomic::store.
4fc084dac61e 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
113 // void _Atomic_move_long(volatile jlong* src, volatile jlong* dst)
4fc084dac61e 7009756: volatile variables could be broken throw reflection API
kvn
parents: 1552
diff changeset
114 .inline _Atomic_move_long,2
894
665be97e8704 6863420: os::javaTimeNanos() go backward on Solaris x86
kvn
parents: 579
diff changeset
115 movl 0(%esp), %eax // src
665be97e8704 6863420: os::javaTimeNanos() go backward on Solaris x86
kvn
parents: 579
diff changeset
116 fildll (%eax)
665be97e8704 6863420: os::javaTimeNanos() go backward on Solaris x86
kvn
parents: 579
diff changeset
117 movl 4(%esp), %eax // dest
665be97e8704 6863420: os::javaTimeNanos() go backward on Solaris x86
kvn
parents: 579
diff changeset
118 fistpll (%eax)
665be97e8704 6863420: os::javaTimeNanos() go backward on Solaris x86
kvn
parents: 579
diff changeset
119 .end
665be97e8704 6863420: os::javaTimeNanos() go backward on Solaris x86
kvn
parents: 579
diff changeset
120
0
a61af66fc99e Initial load
duke
parents:
diff changeset
121 // Support for OrderAccess::acquire()
a61af66fc99e Initial load
duke
parents:
diff changeset
122 .inline _OrderAccess_acquire,0
a61af66fc99e Initial load
duke
parents:
diff changeset
123 movl 0(%esp), %eax
a61af66fc99e Initial load
duke
parents:
diff changeset
124 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
125
a61af66fc99e Initial load
duke
parents:
diff changeset
126 // Support for OrderAccess::fence()
a61af66fc99e Initial load
duke
parents:
diff changeset
127 .inline _OrderAccess_fence,0
a61af66fc99e Initial load
duke
parents:
diff changeset
128 lock
a61af66fc99e Initial load
duke
parents:
diff changeset
129 addl $0, (%esp)
a61af66fc99e Initial load
duke
parents:
diff changeset
130 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
131
a61af66fc99e Initial load
duke
parents:
diff changeset
132 // Support for u2 Bytes::swap_u2(u2 x)
a61af66fc99e Initial load
duke
parents:
diff changeset
133 .inline _raw_swap_u2,1
a61af66fc99e Initial load
duke
parents:
diff changeset
134 movl 0(%esp), %eax
a61af66fc99e Initial load
duke
parents:
diff changeset
135 xchgb %al, %ah
a61af66fc99e Initial load
duke
parents:
diff changeset
136 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
137
a61af66fc99e Initial load
duke
parents:
diff changeset
138 // Support for u4 Bytes::swap_u4(u4 x)
a61af66fc99e Initial load
duke
parents:
diff changeset
139 .inline _raw_swap_u4,1
a61af66fc99e Initial load
duke
parents:
diff changeset
140 movl 0(%esp), %eax
a61af66fc99e Initial load
duke
parents:
diff changeset
141 bswap %eax
a61af66fc99e Initial load
duke
parents:
diff changeset
142 .end
a61af66fc99e Initial load
duke
parents:
diff changeset
143
a61af66fc99e Initial load
duke
parents:
diff changeset
144 // Support for u8 Bytes::swap_u8_base(u4 x, u4 y)
a61af66fc99e Initial load
duke
parents:
diff changeset
145 .inline _raw_swap_u8,2
a61af66fc99e Initial load
duke
parents:
diff changeset
146 movl 4(%esp), %eax // y
a61af66fc99e Initial load
duke
parents:
diff changeset
147 movl 0(%esp), %edx // x
a61af66fc99e Initial load
duke
parents:
diff changeset
148 bswap %eax
a61af66fc99e Initial load
duke
parents:
diff changeset
149 bswap %edx
a61af66fc99e Initial load
duke
parents:
diff changeset
150 .end