7f5dc0ebb515dd9fe6cd8bcd284bc8a74ae2f670
[riscv-isa-sim.git] / hwacha / insn_template_hwacha_ut.cc
1 // See LICENSE for license details.
2 #include "insn_template_hwacha_ut.h"
3
4 reg_t hwacha_NAME(processor_t* p, insn_t insn, reg_t pc)
5 {
6 int xlen = 64;
7 reg_t npc = sext_xlen(pc + insn_length(OPCODE));
8 hwacha_t* h = static_cast<hwacha_t*>(p->get_extension());
9 do {
10 #include "insns_ut/NAME.h"
11 WRITE_UTIDX(UTIDX+1);
12 } while (UTIDX < VL);
13 WRITE_UTIDX(0);
14 return npc;
15 }