1// -*- mode:c++ -*- 2 3// Copyright (c) 2003-2006 The Regents of The University of Michigan 4// All rights reserved. 5// 6// Redistribution and use in source and binary forms, with or without 7// modification, are permitted provided that the following conditions are 8// met: redistributions of source code must retain the above copyright --- 214 unchanged lines hidden (view full) --- 223 } 224 225}}; 226 227def format IntOp(code, *opt_flags) {{ 228 iop = InstObjParams(name, Name, 'IntOp', CodeBlock(code), opt_flags) 229 header_output = BasicDeclare.subst(iop) 230 decoder_output = BasicConstructor.subst(iop) |
231 decode_block = RegNopCheckDecode.subst(iop) |
232 exec_output = BasicExecute.subst(iop) 233}}; 234 235def format IntImmOp(code, *opt_flags) {{ 236 iop = InstObjParams(name, Name, 'IntImmOp', CodeBlock(code), opt_flags) 237 header_output = BasicDeclare.subst(iop) 238 decoder_output = BasicConstructor.subst(iop) |
239 decode_block = ImmNopCheckDecode.subst(iop) |
240 exec_output = BasicExecute.subst(iop) 241}}; 242 243def format HiLoOp(code, *opt_flags) {{ 244 if '.sd' in code: 245 code = 'int64_t ' + code 246 elif '.ud' in code: 247 code = 'uint64_t ' + code 248 249 code += 'HI = val<63:32>;\n' 250 code += 'LO = val<31:0>;\n' 251 252 iop = InstObjParams(name, Name, 'HiLoOp', CodeBlock(code), opt_flags) 253 header_output = BasicDeclare.subst(iop) 254 decoder_output = BasicConstructor.subst(iop) |
255 decode_block = BasicDecode.subst(iop) |
256 exec_output = HiLoExecute.subst(iop) 257}}; 258 259def format HiLoMiscOp(code, *opt_flags) {{ 260 iop = InstObjParams(name, Name, 'HiLoMiscOp', CodeBlock(code), opt_flags) 261 header_output = BasicDeclare.subst(iop) 262 decoder_output = BasicConstructor.subst(iop) |
263 decode_block = BasicDecode.subst(iop) |
264 exec_output = HiLoExecute.subst(iop) 265}}; 266 267 268 269 270 |