79e7c2f0846741130a4428d644df531b63cb4f45
[riscv-isa-sim.git] / hwacha / insn_template_hwacha_ut.cc
1 // See LICENSE for license details.
2
3 #include "config.h"
4 #include "processor.h"
5 #include "mmu.h"
6 #include "softfloat.h"
7 #include "platform.h" // softfloat isNaNF32UI, etc.
8 #include "internals.h" // ditto
9 #include "hwacha.h"
10 #include "decode_hwacha_ut.h"
11 #include <assert.h>
12
13 reg_t hwacha_NAME(processor_t* p, insn_t insn, reg_t pc)
14 {
15 int xprlen = 64;
16 reg_t npc = sext_xprlen(pc + insn_length(OPCODE));
17 hwacha_t* h = static_cast<hwacha_t*>(p->get_extension());
18 do {
19 #include "insns_ut/NAME.h"
20 WRITE_UTIDX(UTIDX+1);
21 } while (UTIDX < VL);
22 WRITE_UTIDX(0);
23 return npc;
24 }