Mercurial > hg > graal-jvmci-8
comparison src/os_cpu/linux_x86/vm/linux_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 |
---|---|
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 | 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 %} | 58 %} |
73 | 59 |
74 | 60 |
75 // Platform dependent source | 61 // Platform dependent source |
76 | 62 |
77 source %{ | 63 source %{ |
78 | 64 |
79 int MachCallRuntimeNode::ret_addr_offset() { | |
80 return 13; // movq r10,#addr; callq (r10) | |
81 } | |
82 | |
83 %} | 65 %} |