diff options
Diffstat (limited to 'src/arch/riscv/isa/formats')
-rw-r--r-- | src/arch/riscv/isa/formats/compressed.isa | 15 | ||||
-rw-r--r-- | src/arch/riscv/isa/formats/standard.isa | 4 |
2 files changed, 4 insertions, 15 deletions
diff --git a/src/arch/riscv/isa/formats/compressed.isa b/src/arch/riscv/isa/formats/compressed.isa index 3c47a906f..03b7fb179 100644 --- a/src/arch/riscv/isa/formats/compressed.isa +++ b/src/arch/riscv/isa/formats/compressed.isa @@ -36,20 +36,9 @@ def format CROp(code, *opt_flags) {{ exec_output = BasicExecute.subst(iop) }}; -def format CIOp(imm_code, code, *opt_flags) {{ +def format CIOp(imm_code, code, imm_type='int64_t', *opt_flags) {{ regs = ['_destRegIdx[0]','_srcRegIdx[0]'] - iop = InstObjParams(name, Name, 'ImmOp<int64_t>', - {'code': code, 'imm_code': imm_code, - 'regs': ','.join(regs)}, opt_flags) - header_output = ImmDeclare.subst(iop) - decoder_output = ImmConstructor.subst(iop) - decode_block = BasicDecode.subst(iop) - exec_output = ImmExecute.subst(iop) -}}; - -def format CUIOp(imm_code, code, *opt_flags) {{ - regs = ['_destRegIdx[0]','_srcRegIdx[0]'] - iop = InstObjParams(name, Name, 'ImmOp<uint64_t>', + iop = InstObjParams(name, Name, 'ImmOp<%s>' % imm_type, {'code': code, 'imm_code': imm_code, 'regs': ','.join(regs)}, opt_flags) header_output = ImmDeclare.subst(iop) diff --git a/src/arch/riscv/isa/formats/standard.isa b/src/arch/riscv/isa/formats/standard.isa index 517313d70..ebe157160 100644 --- a/src/arch/riscv/isa/formats/standard.isa +++ b/src/arch/riscv/isa/formats/standard.isa @@ -218,9 +218,9 @@ def format ROp(code, *opt_flags) {{ exec_output = BasicExecute.subst(iop) }}; -def format IOp(code, *opt_flags) {{ +def format IOp(code, imm_type='int64_t', *opt_flags) {{ regs = ['_destRegIdx[0]','_srcRegIdx[0]'] - iop = InstObjParams(name, Name, 'ImmOp<int64_t>', + iop = InstObjParams(name, Name, 'ImmOp<%s>' % imm_type, {'code': code, 'imm_code': 'imm = sext<12>(IMM12);', 'regs': ','.join(regs)}, opt_flags) header_output = ImmDeclare.subst(iop) |