Mercurial > hg > graal-jvmci-8
annotate src/os_cpu/solaris_x86/vm/assembler_solaris_x86.cpp @ 24234:ea6f94ab283b default tip
Added tag jvmci-0.36 for changeset 8128b98d4736
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Mon, 18 Sep 2017 18:49:45 +0200 |
parents | 3ad3f93fe3d2 |
children |
rev | line source |
---|---|
0 | 1 /* |
23465
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
2 * Copyright (c) 1999, 2015, Oracle and/or its affiliates. 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 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
304
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
304
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:
304
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #include "precompiled.hpp" |
7199
cd3d6a6b95d9
8003240: x86: move MacroAssembler into separate file
twisti
parents:
1972
diff
changeset
|
26 #include "asm/macroAssembler.inline.hpp" |
1972 | 27 #include "runtime/os.hpp" |
28 #include "runtime/threadLocalStorage.hpp" | |
23465
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
29 #include "runtime/thread.inline.hpp" |
0 | 30 |
31 void MacroAssembler::int3() { | |
304 | 32 push(rax); |
33 push(rdx); | |
34 push(rcx); | |
0 | 35 call(RuntimeAddress(CAST_FROM_FN_PTR(address, os::breakpoint))); |
304 | 36 pop(rcx); |
37 pop(rdx); | |
38 pop(rax); | |
0 | 39 } |
40 | |
23465
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
41 // This is simply a call to ThreadLocalStorage::thread() |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
42 void MacroAssembler::get_thread(Register thread) { |
0 | 43 if (thread != rax) { |
23465
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
44 push(rax); |
304 | 45 } |
23465
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
46 push(rdi); |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
47 push(rsi); |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
48 push(rdx); |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
49 push(rcx); |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
50 push(r8); |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
51 push(r9); |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
52 push(r10); |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
53 push(r11); |
304 | 54 |
23465
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
55 call(RuntimeAddress(CAST_FROM_FN_PTR(address, ThreadLocalStorage::thread))); |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
56 |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
57 pop(r11); |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
58 pop(r10); |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
59 pop(r9); |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
60 pop(r8); |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
61 pop(rcx); |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
62 pop(rdx); |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
63 pop(rsi); |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
64 pop(rdi); |
304 | 65 if (thread != rax) { |
23465
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
66 movl(thread, rax); |
3ad3f93fe3d2
8130212: Thread::current() might access freed memory on Solaris
dholmes
parents:
7430
diff
changeset
|
67 pop(rax); |
304 | 68 } |
0 | 69 } |