Mercurial > hg > truffle
comparison src/cpu/x86/vm/stubGenerator_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 | e2e6bf86682c |
children | b9a918201d47 3f281b313240 |
comparison
equal
deleted
inserted
replaced
8872:53028d751155 | 8873:e961c11b85fe |
---|---|
1329 __ movdqu(xmm1, Address(end_from, qword_count, Address::times_8, - 8)); | 1329 __ movdqu(xmm1, Address(end_from, qword_count, Address::times_8, - 8)); |
1330 __ movdqu(Address(end_to, qword_count, Address::times_8, - 8), xmm1); | 1330 __ movdqu(Address(end_to, qword_count, Address::times_8, - 8), xmm1); |
1331 } | 1331 } |
1332 __ addptr(qword_count, 4); | 1332 __ addptr(qword_count, 4); |
1333 __ BIND(L_end); | 1333 __ BIND(L_end); |
1334 if (UseAVX >= 2) { | |
1335 // clean upper bits of YMM registers | |
1336 __ vzeroupper(); | |
1337 } | |
1334 } else { | 1338 } else { |
1335 // Copy 32-bytes per iteration | 1339 // Copy 32-bytes per iteration |
1336 __ BIND(L_loop); | 1340 __ BIND(L_loop); |
1337 __ movq(to, Address(end_from, qword_count, Address::times_8, -24)); | 1341 __ movq(to, Address(end_from, qword_count, Address::times_8, -24)); |
1338 __ movq(Address(end_to, qword_count, Address::times_8, -24), to); | 1342 __ movq(Address(end_to, qword_count, Address::times_8, -24), to); |
1402 __ movdqu(xmm1, Address(from, qword_count, Address::times_8, 0)); | 1406 __ movdqu(xmm1, Address(from, qword_count, Address::times_8, 0)); |
1403 __ movdqu(Address(dest, qword_count, Address::times_8, 0), xmm1); | 1407 __ movdqu(Address(dest, qword_count, Address::times_8, 0), xmm1); |
1404 } | 1408 } |
1405 __ subptr(qword_count, 4); | 1409 __ subptr(qword_count, 4); |
1406 __ BIND(L_end); | 1410 __ BIND(L_end); |
1411 if (UseAVX >= 2) { | |
1412 // clean upper bits of YMM registers | |
1413 __ vzeroupper(); | |
1414 } | |
1407 } else { | 1415 } else { |
1408 // Copy 32-bytes per iteration | 1416 // Copy 32-bytes per iteration |
1409 __ BIND(L_loop); | 1417 __ BIND(L_loop); |
1410 __ movq(to, Address(from, qword_count, Address::times_8, 24)); | 1418 __ movq(to, Address(from, qword_count, Address::times_8, 24)); |
1411 __ movq(Address(dest, qword_count, Address::times_8, 24), to); | 1419 __ movq(Address(dest, qword_count, Address::times_8, 24), to); |