1// Copyright (c) 2006-2007 The Regents of The University of Michigan 2// All rights reserved. 3// 4// Redistribution and use in source and binary forms, with or without 5// modification, are permitted provided that the following conditions are 6// met: redistributions of source code must retain the above copyright 7// notice, this list of conditions and the following disclaimer; 8// redistributions in binary form must reproduce the above copyright --- 83 unchanged lines hidden (view full) --- 92 93// Basic decode template, passing mnemonic in as string arg to constructor. 94def template BasicDecodeWithMnemonic {{ 95 return new %(class_name)s("%(mnemonic)s", machInst); 96}}; 97 98// The most basic instruction format... used only for a few misc. insts 99def format BasicOperate(code, *flags) {{ |
100 code = filterDoubles(code) |
101 iop = InstObjParams(name, Name, 'SparcStaticInst', code, flags) 102 header_output = BasicDeclare.subst(iop) 103 decoder_output = BasicConstructor.subst(iop) 104 decode_block = BasicDecode.subst(iop) 105 exec_output = BasicExecute.subst(iop) 106}}; 107 108def format FpBasic(code, *flags) {{ --- 27 unchanged lines hidden (view full) --- 136 137 fp_code += """ 138#if defined(__sun) || defined (__OpenBSD__) 139 fpsetround(oldrnd); 140#else 141 fesetround(oldrnd); 142#endif 143""" |
144 fp_code = filterDoubles(fp_code) |
145 iop = InstObjParams(name, Name, 'SparcStaticInst', fp_code, flags) 146 header_output = BasicDeclare.subst(iop) 147 decoder_output = BasicConstructor.subst(iop) 148 decode_block = BasicDecode.subst(iop) 149 exec_output = BasicExecute.subst(iop) 150}}; |