diff src/share/vm/graal/graalCompilerToGPU.cpp @ 12743:f1a55428a8d7

more HSAIL support in the C++ layer for executing HSAIL code on the simulator Contributed-by: Eric Caspole <eric.caspole@amd.com>
author Doug Simon <doug.simon@oracle.com>
date Sun, 10 Nov 2013 13:18:09 +0100
parents 1a7e7011a341
children ca10e53c03ab
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompilerToGPU.cpp	Sun Nov 10 11:42:31 2013 +0100
+++ b/src/share/vm/graal/graalCompilerToGPU.cpp	Sun Nov 10 13:18:09 2013 +0100
@@ -117,7 +117,6 @@
     }
     return JNIHandles::make_local(o);
   }
-
 C2V_END
 
 C2V_VMENTRY(jobject, executeParallelMethodVarargs, (JNIEnv *env,
@@ -139,9 +138,14 @@
   // start value is the kernel
   jlong startValue = HotSpotInstalledCode::codeStart(hotspotInstalledCode);
 
+  if (UseHSAILSimulator) {
+    gpu::execute_kernel_void_1d((address)startValue, dimX, args, mh);
+    return NULL;
+  }
+
   PTXKernelArguments ptxka(signature, (arrayOop) JNIHandles::resolve(args), mh->is_static());
   JavaValue result(ptxka.get_ret_type());
-if (!gpu::execute_warp(dimX, dimY, dimZ, (address)startValue, ptxka, result)) {
+  if (!gpu::execute_warp(dimX, dimY, dimZ, (address) startValue, ptxka, result)) {
     return NULL;
   }
 
@@ -169,7 +173,6 @@
     }
     return JNIHandles::make_local(o);
   }
-
 C2V_END
 
 C2V_VMENTRY(jboolean, deviceInit, (JNIEnv *env, jobject))