summaryrefslogtreecommitdiff
path: root/src/cuda-sim
diff options
context:
space:
mode:
authorJin Wang <[email protected]>2014-10-01 23:23:51 -0400
committerJin Wang <[email protected]>2016-07-05 08:59:56 -0400
commit5cc6392a98bf736a05ffa7c7c557c4556753c8c2 (patch)
tree82a1e5831dad0ff5e2267cb39ab06d25bc297213 /src/cuda-sim
parente340759d5d886661722e978912b28cd1259c00ec (diff)
ADD: handle child kernel name in mov instruction. ADD: detect call cudaGetParameterBufferV2 and call cudaLaunchDeviceV2
Diffstat (limited to 'src/cuda-sim')
-rw-r--r--src/cuda-sim/instructions.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/cuda-sim/instructions.cc b/src/cuda-sim/instructions.cc
index cf7f04a..254427b 100644
--- a/src/cuda-sim/instructions.cc
+++ b/src/cuda-sim/instructions.cc
@@ -148,6 +148,9 @@ ptx_reg_t ptx_thread_info::get_operand_value( const operand_info &op, operand_in
result.u64 = op.get_symbol()->get_address();
} else if ( op.is_local() ) {
result.u64 = op.get_symbol()->get_address();
+ } else if ( op.is_function_address() ) {
+ result.u64 = op.get_symbol()->get_pc()->get_start_PC();
+ printf("Get pc for kernel function %u\n", op.get_symbol()->get_pc()->get_start_PC());
} else {
const char *name = op.name().c_str();
printf("GPGPU-Sim PTX: ERROR ** get_operand_value : unknown operand type for %s\n", name );
@@ -1407,7 +1410,15 @@ void call_impl( const ptx_instruction *pI, ptx_thread_info *thread )
if( fname == "vprintf" ) {
gpgpusim_cuda_vprintf(pI, thread, target_func);
return;
- }
+ }
+ else if(fname == "cudaGetParameterBufferV2") {
+ printf("calling cudaGetParameterBufferV2\n");
+ return;
+ }
+ else if(fname == "cudaLaunchDeviceV2") {
+ printf("calling cudaLaunchDeviceV2\n");
+ return;
+ }
// read source arguements into register specified in declaration of function
arg_buffer_list_t arg_values;