standard.isa (12328:95ba4611788a) | standard.isa (12428:ddc6b7179c81) |
---|---|
1// -*- mode:c++ -*- 2 3// Copyright (c) 2015 RISC-V Foundation 4// Copyright (c) 2016-2017 The University of Virginia 5// All rights reserved. 6// 7// Redistribution and use in source and binary forms, with or without 8// modification, are permitted provided that the following conditions are --- 204 unchanged lines hidden (view full) --- 213def format ROp(code, *opt_flags) {{ 214 iop = InstObjParams(name, Name, 'RegOp', code, opt_flags) 215 header_output = BasicDeclare.subst(iop) 216 decoder_output = BasicConstructor.subst(iop) 217 decode_block = BasicDecode.subst(iop) 218 exec_output = BasicExecute.subst(iop) 219}}; 220 | 1// -*- mode:c++ -*- 2 3// Copyright (c) 2015 RISC-V Foundation 4// Copyright (c) 2016-2017 The University of Virginia 5// All rights reserved. 6// 7// Redistribution and use in source and binary forms, with or without 8// modification, are permitted provided that the following conditions are --- 204 unchanged lines hidden (view full) --- 213def format ROp(code, *opt_flags) {{ 214 iop = InstObjParams(name, Name, 'RegOp', code, opt_flags) 215 header_output = BasicDeclare.subst(iop) 216 decoder_output = BasicConstructor.subst(iop) 217 decode_block = BasicDecode.subst(iop) 218 exec_output = BasicExecute.subst(iop) 219}}; 220 |
221def format IOp(code, *opt_flags) {{ | 221def format IOp(code, imm_type='int64_t', *opt_flags) {{ |
222 regs = ['_destRegIdx[0]','_srcRegIdx[0]'] | 222 regs = ['_destRegIdx[0]','_srcRegIdx[0]'] |
223 iop = InstObjParams(name, Name, 'ImmOp<int64_t>', | 223 iop = InstObjParams(name, Name, 'ImmOp<%s>' % imm_type, |
224 {'code': code, 'imm_code': 'imm = sext<12>(IMM12);', 225 'regs': ','.join(regs)}, opt_flags) 226 header_output = ImmDeclare.subst(iop) 227 decoder_output = ImmConstructor.subst(iop) 228 decode_block = BasicDecode.subst(iop) 229 exec_output = ImmExecute.subst(iop) 230}}; 231 --- 74 unchanged lines hidden --- | 224 {'code': code, 'imm_code': 'imm = sext<12>(IMM12);', 225 'regs': ','.join(regs)}, opt_flags) 226 header_output = ImmDeclare.subst(iop) 227 decoder_output = ImmConstructor.subst(iop) 228 decode_block = BasicDecode.subst(iop) 229 exec_output = ImmExecute.subst(iop) 230}}; 231 --- 74 unchanged lines hidden --- |