diff options
| author | Jonathan <[email protected]> | 2018-08-10 16:27:26 -0700 |
|---|---|---|
| committer | Jonathan <[email protected]> | 2018-08-10 16:27:26 -0700 |
| commit | 1a3de9dba3ddf4adab4256fadf5e815b410862ae (patch) | |
| tree | 44e0b33c429bd6eccdd15f0d720bf59f739dd733 /src/cuda-sim/ptx_parser.cc | |
| parent | bc89f8c7ebc77db6a28f5600d17c120fe693e988 (diff) | |
fixes ptxjitplus and cuLaunchKernel
Diffstat (limited to 'src/cuda-sim/ptx_parser.cc')
| -rw-r--r-- | src/cuda-sim/ptx_parser.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cuda-sim/ptx_parser.cc b/src/cuda-sim/ptx_parser.cc index e6d6325..3f3485c 100644 --- a/src/cuda-sim/ptx_parser.cc +++ b/src/cuda-sim/ptx_parser.cc @@ -571,7 +571,9 @@ void add_function_arg() if( g_func_info ) { PTX_PARSE_DPRINTF("add_function_arg \"%s\"", g_last_symbol->name().c_str() ); g_func_info->add_arg(g_last_symbol); - g_func_info->add_config_param( g_size, g_alignment_spec ); + unsigned alignment = (g_alignment_spec==-1) ? g_size : g_alignment_spec; + assert(alignment<=8); + g_func_info->add_config_param( g_size, alignment); } } |
