Mercurial > hg > truffle
annotate src/os_cpu/solaris_x86/vm/solaris_x86_32.il @ 1378:9f5b60a14736
6939930: exception unwind changes in 6919934 hurts compilation speed
Reviewed-by: twisti
author | never |
---|---|
date | Thu, 15 Apr 2010 18:14:49 -0700 |
parents | 665be97e8704 |
children | fb1a39993f69 |
rev | line source |
---|---|
0 | 1 // |
579 | 2 // Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. |
0 | 3 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 // | |
5 // This code is free software; you can redistribute it and/or modify it | |
6 // under the terms of the GNU General Public License version 2 only, as | |
7 // published by the Free Software Foundation. | |
8 // | |
9 // This code is distributed in the hope that it will be useful, but WITHOUT | |
10 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 // version 2 for more details (a copy is included in the LICENSE file that | |
13 // accompanied this code). | |
14 // | |
15 // You should have received a copy of the GNU General Public License version | |
16 // 2 along with this work; if not, write to the Free Software Foundation, | |
17 // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 // | |
19 // Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
20 // CA 95054 USA or visit www.sun.com if you need additional information or | |
21 // have any questions. | |
22 // | |
23 // | |
24 | |
25 | |
26 // Support for u8 os::setup_fpu() | |
27 .inline _solaris_raw_setup_fpu,1 | |
28 movl 0(%esp), %eax | |
29 fldcw (%eax) | |
30 .end | |
31 | |
32 // The argument size of each inline directive is ignored by the compiler | |
33 // and is set to 0 for compatibility reason. | |
34 | |
35 // Get the raw thread ID from %gs:0 | |
36 .inline _raw_thread_id,0 | |
37 movl %gs:0, %eax | |
38 .end | |
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 | 43 movl %ebp, %eax |
44 .end | |
45 | |
46 // Support for jint Atomic::add(jint inc, volatile jint* dest) | |
47 // An additional bool (os::is_MP()) is passed as the last argument. | |
48 .inline _Atomic_add,3 | |
49 movl 0(%esp), %eax // inc | |
50 movl 4(%esp), %edx // dest | |
51 movl %eax, %ecx | |
52 cmpl $0, 8(%esp) // MP test | |
53 je 1f | |
54 lock | |
55 1: xaddl %eax, (%edx) | |
56 addl %ecx, %eax | |
57 .end | |
58 | |
59 // Support for jint Atomic::xchg(jint exchange_value, volatile jint* dest). | |
60 .inline _Atomic_xchg,2 | |
61 movl 0(%esp), %eax // exchange_value | |
62 movl 4(%esp), %ecx // dest | |
63 xchgl (%ecx), %eax | |
64 .end | |
65 | |
66 // Support for jint Atomic::cmpxchg(jint exchange_value, | |
67 // volatile jint *dest, | |
68 // jint compare_value) | |
69 // An additional bool (os::is_MP()) is passed as the last argument. | |
70 .inline _Atomic_cmpxchg,4 | |
71 movl 8(%esp), %eax // compare_value | |
72 movl 0(%esp), %ecx // exchange_value | |
73 movl 4(%esp), %edx // dest | |
74 cmp $0, 12(%esp) // MP test | |
75 je 1f | |
76 lock | |
77 1: cmpxchgl %ecx, (%edx) | |
78 .end | |
79 | |
80 // Support for jlong Atomic::cmpxchg(jlong exchange_value, | |
81 // volatile jlong* dest, | |
82 // jlong compare_value) | |
83 // An additional bool (os::is_MP()) is passed as the last argument. | |
84 .inline _Atomic_cmpxchg_long,6 | |
85 pushl %ebx | |
86 pushl %edi | |
87 movl 20(%esp), %eax // compare_value (low) | |
88 movl 24(%esp), %edx // compare_value (high) | |
89 movl 16(%esp), %edi // dest | |
90 movl 8(%esp), %ebx // exchange_value (low) | |
91 movl 12(%esp), %ecx // exchange_high (high) | |
92 cmp $0, 28(%esp) // MP test | |
93 je 1f | |
94 lock | |
95 1: cmpxchg8b (%edi) | |
96 popl %edi | |
97 popl %ebx | |
98 .end | |
99 | |
894
665be97e8704
6863420: os::javaTimeNanos() go backward on Solaris x86
kvn
parents:
579
diff
changeset
|
100 // Support for void Atomic::load(volatile jlong* src, volatile jlong* dest). |
665be97e8704
6863420: os::javaTimeNanos() go backward on Solaris x86
kvn
parents:
579
diff
changeset
|
101 .inline _Atomic_load_long,2 |
665be97e8704
6863420: os::javaTimeNanos() go backward on Solaris x86
kvn
parents:
579
diff
changeset
|
102 movl 0(%esp), %eax // src |
665be97e8704
6863420: os::javaTimeNanos() go backward on Solaris x86
kvn
parents:
579
diff
changeset
|
103 fildll (%eax) |
665be97e8704
6863420: os::javaTimeNanos() go backward on Solaris x86
kvn
parents:
579
diff
changeset
|
104 movl 4(%esp), %eax // dest |
665be97e8704
6863420: os::javaTimeNanos() go backward on Solaris x86
kvn
parents:
579
diff
changeset
|
105 fistpll (%eax) |
665be97e8704
6863420: os::javaTimeNanos() go backward on Solaris x86
kvn
parents:
579
diff
changeset
|
106 .end |
665be97e8704
6863420: os::javaTimeNanos() go backward on Solaris x86
kvn
parents:
579
diff
changeset
|
107 |
665be97e8704
6863420: os::javaTimeNanos() go backward on Solaris x86
kvn
parents:
579
diff
changeset
|
108 |
0 | 109 // Support for OrderAccess::acquire() |
110 .inline _OrderAccess_acquire,0 | |
111 movl 0(%esp), %eax | |
112 .end | |
113 | |
114 // Support for OrderAccess::fence() | |
115 .inline _OrderAccess_fence,0 | |
116 lock | |
117 addl $0, (%esp) | |
118 .end | |
119 | |
120 // Support for u2 Bytes::swap_u2(u2 x) | |
121 .inline _raw_swap_u2,1 | |
122 movl 0(%esp), %eax | |
123 xchgb %al, %ah | |
124 .end | |
125 | |
126 // Support for u4 Bytes::swap_u4(u4 x) | |
127 .inline _raw_swap_u4,1 | |
128 movl 0(%esp), %eax | |
129 bswap %eax | |
130 .end | |
131 | |
132 // Support for u8 Bytes::swap_u8_base(u4 x, u4 y) | |
133 .inline _raw_swap_u8,2 | |
134 movl 4(%esp), %eax // y | |
135 movl 0(%esp), %edx // x | |
136 bswap %eax | |
137 bswap %edx | |
138 .end |