res.append('#define PRED_ARGS %s' % ','.join(predargs))
offsargs = []
+ suboargs = []
for i in range(len(predargs)):
offsargs.append(predargs[i].replace('pred', 'offs').replace("&", ''))
res.append('#define OFFS_ARGS %s' % ','.join(offsargs))
+ for i in range(len(predargs)):
+ suboargs.append(predargs[i].replace('pred', 'subo').replace("&", ''))
+ res.append('#define SUBO_ARGS %s' % ','.join(suboargs))
return '\n'.join(res)
twin_predication = False
immed_offset = False
is_branch = False
+ print regsname
with open(regsname, "w") as f:
txt = "\n#define INSN_%s\n" % insn.upper()
# help identify type of register
#define SRC_PREDINT 1
#define PRED_ARGS dest_pred,dest_pred,dest_pred,dest_pred,dest_pred,&dest_pred
#define OFFS_ARGS dest_offs,dest_offs,dest_offs,dest_offs,dest_offs,dest_offs
+#define SUBO_ARGS dest_subo,dest_subo,dest_subo,dest_subo,dest_subo,dest_subo
#else
#define sv_enabled true
#endif
#endif
sv_insn_t insn(p, sv_enabled, bits, floatintmap, xlen,
INSN_SRC_FLEN, INSN_DEST_FLEN,
- PRED_ARGS, OFFS_ARGS,
+ PRED_ARGS, OFFS_ARGS, SUBO_ARGS,
#ifdef INSN_TYPE_SIGNED
true
#else
uint64_t &p_sp, uint64_t *p_im,
int *o_rd, int *o_rs1, int *o_rs2, int *o_rs3, int *o_sp,
int *o_imm,
+ int *s_rd, int *s_rs1, int *s_rs2, int *s_rs3, int *s_sp,
+ int *s_imm,
bool _sign) :
insn_t(bits), p(pr), src_bitwidth(0),
xlen(_xlen), src_flen(_src_flen), dest_flen(_dest_flen),
offs_rd(o_rd), offs_rs1(o_rs1), offs_rs2(o_rs2), offs_rs3(o_rs3),
offs_sp(o_sp),
offs_imm(o_imm),
+ subo_rd(s_rd), subo_rs1(s_rs1), subo_rs2(s_rs2), subo_rs3(s_rs3),
+ subo_sp(s_sp),
+ subo_imm(s_imm),
prd(p_rd), prs1(p_rs1), prs2(p_rs2), prs3(p_rs3), psp(p_sp),
save_branch_addr(0)
{
{
reg_t reg;
int *offset;
+ int *suboff;
bool isvec;
bool signextend;
};
uint64_t &p_sp, uint64_t *p_im,
int *o_rd, int *o_rs1, int *o_rs2, int *o_rs3, int *o_sp,
int *o_imm,
+ int *s_rd, int *s_rs1, int *s_rs2, int *s_rs3, int *s_sp,
+ int *s_imm,
bool _sign);
uint8_t reg_elwidth(reg_t reg, bool intreg);
int *offs_rs3;
int *offs_sp;
int *offs_imm;
+
+ int *subo_rd;
+ int *subo_rs1;
+ int *subo_rs2;
+ int *subo_rs3;
+ int *subo_sp;
+ int *subo_imm;
+
uint64_t &prd;
uint64_t &prs1;
uint64_t &prs2;