summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMahmoud <[email protected]>2019-09-16 10:14:28 -0400
committerMahmoud <[email protected]>2019-09-16 10:14:28 -0400
commitde903552c8d716e6b2bd6d0c816063523e35c6c5 (patch)
treedecbb1b5b35e0e73732ea9aebd28c8a7dc0faffc
parent44a614b24d2e647d1f145b5ee9bcbc2996b0f741 (diff)
updating the parser
-rw-r--r--src/trace-driven/gpgpusim_trace_driven_main.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/trace-driven/gpgpusim_trace_driven_main.cc b/src/trace-driven/gpgpusim_trace_driven_main.cc
index c61810f..2560338 100644
--- a/src/trace-driven/gpgpusim_trace_driven_main.cc
+++ b/src/trace-driven/gpgpusim_trace_driven_main.cc
@@ -342,14 +342,21 @@ bool trace_warp_inst_t::parse_from_string(std::string trace){
ar2 = 0;
memory_op = no_memory_op;
data_size = 0;
-
- num_regs = reg_srcs_num+1;
- num_operands = num_regs;
op = ALU_OP;
mem_op= NOT_TEX;
+ //get opcode and category
+ std::unordered_map<const char*,OpcodeChar>::const_iterator it= OpcodeMap.find(opcode1.c_str());
+ if (it != OpcodeMap.end()) {
+ m_opcode = it->second.opcode;
+ op = (op_type)(it->second.opcode_category);
+ }
+ else
+ assert(0 && "undefined instruction");
//fill regs information
+ num_regs = reg_srcs_num+1;
+ num_operands = num_regs;
outcount=1;
out[0]=reg_dest;
arch_reg.dst[0]=reg_dest;
@@ -362,16 +369,6 @@ bool trace_warp_inst_t::parse_from_string(std::string trace){
//handle: vector, store insts have no output, double inst and hmma, and 64 bit address
- //get opcode and category
- std::unordered_map<const char*,OpcodeChar>::const_iterator it= OpcodeMap.find(opcode1.c_str());
- if (it != OpcodeMap.end()) {
- m_opcode = it->second.opcode;
- op = (op_type)(it->second.opcode_category);
- }
- else
- assert(0 && "undefined instruction");
-
-
//fill latency and initl
set_latency(op);
@@ -381,6 +378,9 @@ bool trace_warp_inst_t::parse_from_string(std::string trace){
set_addr(i, mem_addresses[i]);
}
+ // barrier_type bar_type;
+ // reduction_type red_type;
+
//fill memory space
switch(m_opcode){
case OP_LD: