From: Luke Kenneth Casson Leighton Date: Tue, 23 Oct 2018 05:13:53 +0000 (+0100) Subject: add type signed identification, add lh/sh to insn ld/store types X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6656a68fbbc1c3f6cd5e20f92e0067b5dfd0f83c;p=riscv-isa-sim.git add type signed identification, add lh/sh to insn ld/store types --- diff --git a/id_regs.py b/id_regs.py index ab31521..ccb4f38 100644 --- a/id_regs.py +++ b/id_regs.py @@ -189,11 +189,10 @@ if __name__ == '__main__': if insn in ['beq', 'bne', 'blt', 'bltu', 'bge', 'bgeu']: txt += "#define INSN_TYPE_BRANCH\n" is_branch = 'STD' # standard branch - if insn in ['lb', 'lbu', 'lw', 'lwu', 'ld', 'ldu']: - load_insn = True + if insn in ['lb', 'lbu', 'lh', 'lhu', 'lw', 'lwu', 'ld', 'ldu']: twin_predication = True txt += "#define INSN_TYPE_LOAD\n" - elif insn in ['sb', 'sbu', 'sw', 'swu', 'sd', 'sdu']: + elif insn in ['sb', 'sbu', 'sh', 'shu', 'sw', 'swu', 'sd', 'sdu']: twin_predication = True txt += "#define INSN_TYPE_STORE\n" elif insn in ['c_lwsp', 'c_ldsp', 'c_lqsp', 'c_flwsp', 'c_fldsp']: @@ -228,6 +227,10 @@ if __name__ == '__main__': txt += "#define INSN_TYPE_FP_BRANCH\n" if twin_predication: txt += "\n#define INSN_CATEGORY_TWINPREDICATION\n" + if insn in ['lb', 'lh', 'lw', 'ld', + 'sb', 'sh', 'sw', 'sd'] or \ + insn.endswith('w'): + txt += "#define INSN_TYPE_SIGNED\n" txt += find_registers(fname, insn, twin_predication, immed_offset, is_branch) f.write(txt)