comparison src/cpu/x86/vm/templateInterpreter_x86_64.cpp @ 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 0094485b46c7
children b9a918201d47 aeaca88565e6
comparison
equal deleted inserted replaced
8872:53028d751155 8873:e961c11b85fe
1077 1077
1078 // Call the native method. 1078 // Call the native method.
1079 __ call(rax); 1079 __ call(rax);
1080 // result potentially in rax or xmm0 1080 // result potentially in rax or xmm0
1081 1081
1082 // Depending on runtime options, either restore the MXCSR 1082 // Verify or restore cpu control state after JNI call
1083 // register after returning from the JNI Call or verify that 1083 __ restore_cpu_control_state_after_jni();
1084 // it wasn't changed during -Xcheck:jni.
1085 if (RestoreMXCSROnJNICalls) {
1086 __ ldmxcsr(ExternalAddress(StubRoutines::x86::mxcsr_std()));
1087 }
1088 else if (CheckJNICalls) {
1089 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::x86::verify_mxcsr_entry())));
1090 }
1091 1084
1092 // NOTE: The order of these pushes is known to frame::interpreter_frame_result 1085 // NOTE: The order of these pushes is known to frame::interpreter_frame_result
1093 // in order to extract the result of a method call. If the order of these 1086 // in order to extract the result of a method call. If the order of these
1094 // pushes change or anything else is added to the stack then the code in 1087 // pushes change or anything else is added to the stack then the code in
1095 // interpreter_frame_result must also change. 1088 // interpreter_frame_result must also change.