summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx_ir.h
diff options
context:
space:
mode:
authorAmruth <[email protected]>2018-04-19 18:13:44 -0700
committerAmruth <[email protected]>2018-04-19 18:13:44 -0700
commit60017ca1ddbe844a93f631fe2b86bc4101850037 (patch)
treef5caa8e773ece5956e4fc5ddfa9589e1e2a1c604 /src/cuda-sim/ptx_ir.h
parent8ea33c977b26cfe96beb98cdda289b81b8fda899 (diff)
Crash when array pointers are passed
Diffstat (limited to 'src/cuda-sim/ptx_ir.h')
-rw-r--r--src/cuda-sim/ptx_ir.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cuda-sim/ptx_ir.h b/src/cuda-sim/ptx_ir.h
index 6731763..58d5f49 100644
--- a/src/cuda-sim/ptx_ir.h
+++ b/src/cuda-sim/ptx_ir.h
@@ -164,6 +164,7 @@ public:
m_is_global = false;
m_is_local = false;
m_is_param_local = false;
+ m_is_param_kernel = false;
m_is_tex = false;
m_is_func_addr = false;
m_reg_num_valid = false;
@@ -177,6 +178,7 @@ public:
if ( type ) m_is_global = type->get_key().is_global();
if ( type ) m_is_local = type->get_key().is_local();
if ( type ) m_is_param_local = type->get_key().is_param_local();
+ if ( type ) m_is_param_kernel = type->get_key().is_param_kernel();
if ( type ) m_is_tex = type->get_key().is_tex();
if ( type ) m_is_func_addr = type->get_key().is_func_addr();
}
@@ -227,6 +229,7 @@ public:
bool is_global() const { return m_is_global;}
bool is_local() const { return m_is_local;}
bool is_param_local() const { return m_is_param_local; }
+ bool is_param_kernel() const { return m_is_param_kernel; }
bool is_tex() const { return m_is_tex;}
bool is_func_addr() const { return m_is_func_addr; }
bool is_reg() const
@@ -284,6 +287,7 @@ private:
bool m_is_global;
bool m_is_local;
bool m_is_param_local;
+ bool m_is_param_kernel;
bool m_is_tex;
bool m_is_func_addr;
unsigned m_reg_num;
@@ -400,6 +404,8 @@ public:
m_type = symbolic_t;
} else if ( addr->is_param_local() ) {
m_type = symbolic_t;
+ } else if ( addr->is_param_kernel() ) {
+ m_type = symbolic_t;
} else if ( addr->is_tex() ) {
m_type = symbolic_t;
} else if ( addr->is_func_addr() ) {
@@ -676,6 +682,13 @@ public:
return m_value.m_symbolic->type()->get_key().is_param_local();
}
+ bool is_param_kernel() const
+ {
+ if ( m_type != symbolic_t )
+ return false;
+ return m_value.m_symbolic->type()->get_key().is_param_kernel();
+ }
+
bool is_vector() const
{
if ( m_vector) return true;