comparison src/os_cpu/solaris_x86/vm/solaris_x86_64.ad @ 8873:e961c11b85fe

8011102: Clear AVX registers after return from JNI call Summary: Execute vzeroupper instruction after JNI call and on exits in jit compiled code which use 256bit vectors. Reviewed-by: roland
author kvn
date Wed, 03 Apr 2013 11:12:57 -0700
parents 9b8ce46870df
children
comparison
equal deleted inserted replaced
8872:53028d751155 8873:e961c11b85fe
52 // encoding scheme (opcode, rm, sib, immediate), and call them from C++ 52 // encoding scheme (opcode, rm, sib, immediate), and call them from C++
53 // code in the enc_class source block. Emit functions will live in the 53 // code in the enc_class source block. Emit functions will live in the
54 // main source block for now. In future, we can generalize this by 54 // main source block for now. In future, we can generalize this by
55 // adding a syntax that specifies the sizes of fields in an order, 55 // adding a syntax that specifies the sizes of fields in an order,
56 // so that the adlc can build the emit functions automagically 56 // so that the adlc can build the emit functions automagically
57
58 enc_class Java_To_Runtime(method meth) %{
59 // No relocation needed
60
61 // movq r10, <meth>
62 emit_opcode(cbuf, Assembler::REX_WB);
63 emit_opcode(cbuf, 0xB8 | (R10_enc - 8));
64 emit_d64(cbuf, (int64_t) $meth$$method);
65
66 // call (r10)
67 emit_opcode(cbuf, Assembler::REX_B);
68 emit_opcode(cbuf, 0xFF);
69 emit_opcode(cbuf, 0xD0 | (R10_enc - 8));
70 %}
71
72 enc_class post_call_verify_mxcsr %{
73 MacroAssembler _masm(&cbuf);
74 if (RestoreMXCSROnJNICalls) {
75 __ ldmxcsr(ExternalAddress(StubRoutines::amd64::mxcsr_std()));
76 }
77 else if (CheckJNICalls) {
78 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::amd64::verify_mxcsr_entry())));
79 }
80 %}
81 %} 57 %}
82 58
83 59
84 // Platform dependent source 60 // Platform dependent source
85 61
86 source %{ 62 source %{
87
88 int MachCallRuntimeNode::ret_addr_offset() {
89 return 13; // movq r10,#addr; callq (r10)
90 }
91
92 %} 63 %}