pred.isa (6265:154338c2c6f6) | pred.isa (6270:e5794c49dd7c) |
---|---|
1// -*- mode:c++ -*- 2 3// Copyright (c) 2007-2008 The Florida State University 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 --- 57 unchanged lines hidden (view full) --- 66 } else { 67 if (machInst.sField == 0) 68 return new %(class_name)s(machInst); 69 else 70 return new %(class_name)sCc(machInst); 71 } 72}}; 73 | 1// -*- mode:c++ -*- 2 3// Copyright (c) 2007-2008 The Florida State University 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 --- 57 unchanged lines hidden (view full) --- 66 } else { 67 if (machInst.sField == 0) 68 return new %(class_name)s(machInst); 69 else 70 return new %(class_name)sCc(machInst); 71 } 72}}; 73 |
74def template DataImmDecode {{ 75 if (machInst.sField == 0) 76 return new %(class_name)s(machInst); 77 else 78 return new %(class_name)sCc(machInst); 79}}; 80 |
|
74let {{ 75 76 calcCcCode = ''' 77 uint16_t _ic, _iv, _iz, _in; 78 79 _in = (resTemp >> 31) & 1; 80 _iz = (resTemp == 0); 81 _iv = %(ivValue)s & 1; --- 38 unchanged lines hidden (view full) --- 120 BasicConstructor.subst(immCcIop) 121 exec_output = PredOpExecute.subst(regIop) + \ 122 PredOpExecute.subst(immIop) + \ 123 PredOpExecute.subst(regCcIop) + \ 124 PredOpExecute.subst(immCcIop) 125 decode_block = DataDecode.subst(regIop) 126}}; 127 | 81let {{ 82 83 calcCcCode = ''' 84 uint16_t _ic, _iv, _iz, _in; 85 86 _in = (resTemp >> 31) & 1; 87 _iz = (resTemp == 0); 88 _iv = %(ivValue)s & 1; --- 38 unchanged lines hidden (view full) --- 127 BasicConstructor.subst(immCcIop) 128 exec_output = PredOpExecute.subst(regIop) + \ 129 PredOpExecute.subst(immIop) + \ 130 PredOpExecute.subst(regCcIop) + \ 131 PredOpExecute.subst(immCcIop) 132 decode_block = DataDecode.subst(regIop) 133}}; 134 |
135def format DataImmOp(code, icValue, ivValue) {{ 136 code += "resTemp = resTemp;" 137 iop = InstObjParams(name, Name, 'PredImmOp', 138 {"code": code, 139 "predicate_test": predicateTest}) 140 ccIop = InstObjParams(name, Name + "Cc", 'PredImmOp', 141 {"code": code + calcCcCode % vars(), 142 "predicate_test": predicateTest}) 143 header_output = BasicDeclare.subst(iop) + \ 144 BasicDeclare.subst(ccIop) 145 decoder_output = BasicConstructor.subst(iop) + \ 146 BasicConstructor.subst(ccIop) 147 exec_output = PredOpExecute.subst(iop) + \ 148 PredOpExecute.subst(ccIop) 149 decode_block = DataImmDecode.subst(iop) 150}}; 151 |
|
128def format PredOp(code, *opt_flags) {{ 129 iop = InstObjParams(name, Name, 'PredOp', 130 {"code": code, 131 "predicate_test": predicateTest}, 132 opt_flags) 133 header_output = BasicDeclare.subst(iop) 134 decoder_output = BasicConstructor.subst(iop) 135 decode_block = BasicDecode.subst(iop) --- 55 unchanged lines hidden --- | 152def format PredOp(code, *opt_flags) {{ 153 iop = InstObjParams(name, Name, 'PredOp', 154 {"code": code, 155 "predicate_test": predicateTest}, 156 opt_flags) 157 header_output = BasicDeclare.subst(iop) 158 decoder_output = BasicConstructor.subst(iop) 159 decode_block = BasicDecode.subst(iop) --- 55 unchanged lines hidden --- |