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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
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
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: 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
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
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
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
27 #include "runtime/os.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
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
a61af66fc99e Initial load
duke
parents:
diff changeset
30
a61af66fc99e Initial load
duke
parents:
diff changeset
31 void MacroAssembler::int3() {
304
dc7f315e41f7 5108146: Merge i486 and amd64 cpu directories
never
parents: 237
diff changeset
32 push(rax);
dc7f315e41f7 5108146: Merge i486 and amd64 cpu directories
never
parents: 237
diff changeset
33 push(rdx);
dc7f315e41f7 5108146: Merge i486 and amd64 cpu directories
never
parents: 237
diff changeset
34 push(rcx);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
35 call(RuntimeAddress(CAST_FROM_FN_PTR(address, os::breakpoint)));
304
dc7f315e41f7 5108146: Merge i486 and amd64 cpu directories
never
parents: 237
diff changeset
36 pop(rcx);
dc7f315e41f7 5108146: Merge i486 and amd64 cpu directories
never
parents: 237
diff changeset
37 pop(rdx);
dc7f315e41f7 5108146: Merge i486 and amd64 cpu directories
never
parents: 237
diff changeset
38 pop(rax);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
39 }
a61af66fc99e Initial load
duke
parents:
diff changeset
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
a61af66fc99e Initial load
duke
parents:
diff changeset
43 if (thread != rax) {
23465
3ad3f93fe3d2 8130212: Thread::current() might access freed memory on Solaris
dholmes
parents: 7430
diff changeset
44 push(rax);
304
dc7f315e41f7 5108146: Merge i486 and amd64 cpu directories
never
parents: 237
diff changeset
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
dc7f315e41f7 5108146: Merge i486 and amd64 cpu directories
never
parents: 237
diff changeset
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
dc7f315e41f7 5108146: Merge i486 and amd64 cpu directories
never
parents: 237
diff changeset
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
dc7f315e41f7 5108146: Merge i486 and amd64 cpu directories
never
parents: 237
diff changeset
68 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
69 }