diff options
| author | Tor Aamodt <[email protected]> | 2010-07-17 10:29:05 -0800 |
|---|---|---|
| committer | Tor Aamodt <[email protected]> | 2010-07-17 10:29:05 -0800 |
| commit | d3d0b38b90f14660ecb6243373daa921f8ae02b1 (patch) | |
| tree | 9211056ccf334f37babafcecc662400bc42d278b /src/cuda-sim/ptx_sim.h | |
| parent | 9b43d5685c269331ea6d15fe3ed0dade063a798a (diff) | |
integrating Wilson's bugfixes from release branch
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 6869]
Diffstat (limited to 'src/cuda-sim/ptx_sim.h')
| -rw-r--r-- | src/cuda-sim/ptx_sim.h | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/src/cuda-sim/ptx_sim.h b/src/cuda-sim/ptx_sim.h index 976ce70..c07308e 100644 --- a/src/cuda-sim/ptx_sim.h +++ b/src/cuda-sim/ptx_sim.h @@ -94,25 +94,23 @@ struct gpgpu_ptx_sim_kernel_info { #include <assert.h> #include "opcodes.h" -struct param_t { - union { - float float_value; - int int_value; - double double_value; - unsigned long long ptr_value; - } data; - int type; -}; - #ifdef __cplusplus #include <string> #include <map> #include <set> #include <list> + #include <unordered_map> #include "memory.h" +struct param_t { + const void *pdata; + int type; + size_t size; + size_t offset; +}; + union ptx_reg_t { ptx_reg_t() { bits.ms = 0; @@ -421,9 +419,11 @@ public: } void dump_regs(); void dump_modifiedregs(); - void clear_modifiedregs() { m_debug_trace_regs_modified.back().clear();} + void clear_modifiedregs() { m_debug_trace_regs_modified.clear();} function_info *get_finfo() { return m_func_info; } + void enable_debug_trace() { m_enable_debug_trace = true; } + public: addr_t m_last_effective_address; bool m_branch_taken; @@ -465,8 +465,12 @@ private: std::list<stack_entry> m_callstack; - std::list<std::map<std::string,ptx_reg_t> > m_regs; - std::list<std::map<std::string,ptx_reg_t> > m_debug_trace_regs_modified; + // typedef std::unordered_map<std::string,ptx_reg_t> reg_map_t; + typedef std::unordered_map<const symbol*,ptx_reg_t> reg_map_t; + std::list<reg_map_t> m_regs; + + bool m_enable_debug_trace; + reg_map_t m_debug_trace_regs_modified; // track the modified register for each executed insn }; unsigned type_decode( unsigned type, size_t &size, int &t ); |
