comparison src/cpu/x86/vm/templateInterpreterGenerator_x86_32.cpp @ 12320:3f551de87e59

8169711: CDS does not patch entry trampoline if intrinsic method is disabled Summary: Always create interpreter method entries for intrinsified methods but replace them with vanilla entries if the intrinsic is disabled at runtime. Reviewed-by: kvn, iklam
author thartmann
date Mon, 21 Nov 2016 08:27:10 +0100
parents ca56c5db7157
children
comparison
equal deleted inserted replaced
6:0f5fa6a12157 7:86874f05dce5
340 // stack: [ ret adr ] <-- rsp 340 // stack: [ ret adr ] <-- rsp
341 // [ lo(arg) ] 341 // [ lo(arg) ]
342 // [ hi(arg) ] 342 // [ hi(arg) ]
343 // 343 //
344 if (kind == Interpreter::java_lang_math_fmaD) { 344 if (kind == Interpreter::java_lang_math_fmaD) {
345 if (!UseFMA) {
346 return NULL; // Generate a vanilla entry
347 }
345 __ movdbl(xmm2, Address(rsp, 5 * wordSize)); 348 __ movdbl(xmm2, Address(rsp, 5 * wordSize));
346 __ movdbl(xmm1, Address(rsp, 3 * wordSize)); 349 __ movdbl(xmm1, Address(rsp, 3 * wordSize));
347 __ movdbl(xmm0, Address(rsp, 1 * wordSize)); 350 __ movdbl(xmm0, Address(rsp, 1 * wordSize));
348 __ fmad(xmm0, xmm1, xmm2, xmm0); 351 __ fmad(xmm0, xmm1, xmm2, xmm0);
349 __ pop(rdi); // get return address 352 __ pop(rdi); // get return address
350 __ mov(rsp, rsi); // set sp to sender sp 353 __ mov(rsp, rsi); // set sp to sender sp
351 __ jmp(rdi); 354 __ jmp(rdi);
352 355
353 return entry_point; 356 return entry_point;
354 } else if (kind == Interpreter::java_lang_math_fmaF) { 357 } else if (kind == Interpreter::java_lang_math_fmaF) {
358 if (!UseFMA) {
359 return NULL; // Generate a vanilla entry
360 }
355 __ movflt(xmm2, Address(rsp, 3 * wordSize)); 361 __ movflt(xmm2, Address(rsp, 3 * wordSize));
356 __ movflt(xmm1, Address(rsp, 2 * wordSize)); 362 __ movflt(xmm1, Address(rsp, 2 * wordSize));
357 __ movflt(xmm0, Address(rsp, 1 * wordSize)); 363 __ movflt(xmm0, Address(rsp, 1 * wordSize));
358 __ fmaf(xmm0, xmm1, xmm2, xmm0); 364 __ fmaf(xmm0, xmm1, xmm2, xmm0);
359 __ pop(rdi); // get return address 365 __ pop(rdi); // get return address