pred.isa (6253:988a001820f8) | pred.isa (6265:154338c2c6f6) |
---|---|
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 --- 43 unchanged lines hidden (view full) --- 52 %(op_wb)s; 53 } 54 } 55 56 return fault; 57 } 58}}; 59 | 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 --- 43 unchanged lines hidden (view full) --- 52 %(op_wb)s; 53 } 54 } 55 56 return fault; 57 } 58}}; 59 |
60def template DataDecode {{ 61 if (machInst.opcode4 == 0) { 62 if (machInst.sField == 0) 63 return new %(class_name)sImm(machInst); 64 else 65 return new %(class_name)sImmCc(machInst); 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 |
|
60let {{ 61 62 calcCcCode = ''' 63 uint16_t _ic, _iv, _iz, _in; 64 65 _in = (resTemp >> 31) & 1; 66 _iz = (resTemp == 0); 67 _iv = %(ivValue)s & 1; --- 5 unchanged lines hidden (view full) --- 73 DPRINTF(Arm, "in = %%d\\n", _in); 74 DPRINTF(Arm, "iz = %%d\\n", _iz); 75 DPRINTF(Arm, "ic = %%d\\n", _ic); 76 DPRINTF(Arm, "iv = %%d\\n", _iv); 77 ''' 78 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; --- 5 unchanged lines hidden (view full) --- 87 DPRINTF(Arm, "in = %%d\\n", _in); 88 DPRINTF(Arm, "iz = %%d\\n", _iz); 89 DPRINTF(Arm, "ic = %%d\\n", _ic); 90 DPRINTF(Arm, "iv = %%d\\n", _iv); 91 ''' 92 93}}; 94 |
95def format DataOp(code, icValue, ivValue) {{ 96 code += "resTemp = resTemp;" 97 regCode = re.sub(r'op2', 'shift_rm_rs(Rm, Rs, \ 98 shift, Cpsr<29:0>)', code) 99 immCode = re.sub(r'op2', 'shift_rm_imm(Rm, shift_size, \ 100 shift, Cpsr<29:0>)', code) 101 regIop = InstObjParams(name, Name, 'PredIntOp', 102 {"code": regCode, 103 "predicate_test": predicateTest}) 104 immIop = InstObjParams(name, Name + "Imm", 'PredIntOp', 105 {"code": immCode, 106 "predicate_test": predicateTest}) 107 regCcIop = InstObjParams(name, Name + "Cc", 'PredIntOp', 108 {"code": regCode + calcCcCode % vars(), 109 "predicate_test": predicateTest}) 110 immCcIop = InstObjParams(name, Name + "ImmCc", 'PredIntOp', 111 {"code": immCode + calcCcCode % vars(), 112 "predicate_test": predicateTest}) 113 header_output = BasicDeclare.subst(regIop) + \ 114 BasicDeclare.subst(immIop) + \ 115 BasicDeclare.subst(regCcIop) + \ 116 BasicDeclare.subst(immCcIop) 117 decoder_output = BasicConstructor.subst(regIop) + \ 118 BasicConstructor.subst(immIop) + \ 119 BasicConstructor.subst(regCcIop) + \ 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 |
|
81def format PredOp(code, *opt_flags) {{ 82 iop = InstObjParams(name, Name, 'PredOp', 83 {"code": code, 84 "predicate_test": predicateTest}, 85 opt_flags) 86 header_output = BasicDeclare.subst(iop) 87 decoder_output = BasicConstructor.subst(iop) 88 decode_block = BasicDecode.subst(iop) --- 55 unchanged lines hidden --- | 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 --- |