update groovy template to extract used registers

This commit is contained in:
Eyck Jentzsch 2021-03-26 08:23:47 +00:00
parent 412a4bd9bb
commit 78c7064295
2 changed files with 242 additions and 91 deletions

View File

@ -201,9 +201,11 @@ private:
<%}%>
}
// prepare execution
uint${addrDataWidth}_t* X = reinterpret_cast<uint${addrDataWidth}_t*>(this->regs_base_ptr+arch::traits<ARCH>::reg_byte_offsets[arch::traits<ARCH>::X0]);
uint${addrDataWidth}_t* PC = reinterpret_cast<uint${addrDataWidth}_t*>(this->regs_base_ptr+arch::traits<ARCH>::reg_byte_offsets[arch::traits<ARCH>::PC]);
uint${addrDataWidth}_t* NEXT_PC = reinterpret_cast<uint${addrDataWidth}_t*>(this->regs_base_ptr+arch::traits<ARCH>::reg_byte_offsets[arch::traits<ARCH>::NEXT_PC]);
// used registers<%instr.usedVariables.each{%>
uint${it.value.size}_t* ${it.key} = reinterpret_cast<uint${it.value.size}_t*>(this->regs_base_ptr+arch::traits<ARCH>::reg_byte_offsets[arch::traits<ARCH>::${it.key}]);
<%}%>// calculate next pc value
*NEXT_PC = *PC + ${instr.length/8};
// execute instruction
<%instr.behavior.eachLine{%>${it}

File diff suppressed because it is too large Load Diff