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']:
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)