equal
deleted
inserted
replaced
23 */ |
23 */ |
24 |
24 |
25 #include "precompiled.hpp" |
25 #include "precompiled.hpp" |
26 #include "asm/macroAssembler.inline.hpp" |
26 #include "asm/macroAssembler.inline.hpp" |
27 #include "runtime/os.hpp" |
27 #include "runtime/os.hpp" |
28 #include "runtime/threadLocalStorage.hpp" |
|
29 #include "runtime/thread.inline.hpp" |
|
30 |
28 |
31 void MacroAssembler::int3() { |
29 void MacroAssembler::int3() { |
32 push(rax); |
30 push(rax); |
33 push(rdx); |
31 push(rdx); |
34 push(rcx); |
32 push(rcx); |
35 call(RuntimeAddress(CAST_FROM_FN_PTR(address, os::breakpoint))); |
33 call(RuntimeAddress(CAST_FROM_FN_PTR(address, os::breakpoint))); |
36 pop(rcx); |
34 pop(rcx); |
37 pop(rdx); |
35 pop(rdx); |
38 pop(rax); |
36 pop(rax); |
39 } |
37 } |
40 |
|
41 // This is simply a call to ThreadLocalStorage::thread() |
|
42 void MacroAssembler::get_thread(Register thread) { |
|
43 if (thread != rax) { |
|
44 push(rax); |
|
45 } |
|
46 push(rdi); |
|
47 push(rsi); |
|
48 push(rdx); |
|
49 push(rcx); |
|
50 push(r8); |
|
51 push(r9); |
|
52 push(r10); |
|
53 push(r11); |
|
54 |
|
55 call(RuntimeAddress(CAST_FROM_FN_PTR(address, ThreadLocalStorage::thread))); |
|
56 |
|
57 pop(r11); |
|
58 pop(r10); |
|
59 pop(r9); |
|
60 pop(r8); |
|
61 pop(rcx); |
|
62 pop(rdx); |
|
63 pop(rsi); |
|
64 pop(rdi); |
|
65 if (thread != rax) { |
|
66 movl(thread, rax); |
|
67 pop(rax); |
|
68 } |
|
69 } |
|