fp.isa (6242:1cee707c1228) | fp.isa (6243:3a1698fbbc9f) |
---|---|
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 --- 51 unchanged lines hidden (view full) --- 60 { 61 Fault fault = NoFault; 62 63 %(fp_enable_check)s; 64 65 %(op_decl)s; 66 %(op_rd)s; 67 | 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 --- 51 unchanged lines hidden (view full) --- 60 { 61 Fault fault = NoFault; 62 63 %(fp_enable_check)s; 64 65 %(op_decl)s; 66 %(op_rd)s; 67 |
68 %(code)s; 69 70 if (testPredicate(xc->readMiscReg(ArmISA::MISCREG_CPSR), condCode) && 71 fault == NoFault) 72 { 73 %(op_wb)s; | 68 if (%(predicate_test)s) { 69 %(code)s; 70 if (fault == NoFault) { 71 %(op_wb)s; 72 } |
74 } 75 76 return fault; 77 } 78}}; 79 80def template FloatDoubleDecode {{ 81 { --- 15 unchanged lines hidden (view full) --- 97 } 98}}; 99 100// Primary format for float point operate instructions: 101def format FloatOp(code, *flags) {{ 102 orig_code = code 103 104 cblk = code | 73 } 74 75 return fault; 76 } 77}}; 78 79def template FloatDoubleDecode {{ 80 { --- 15 unchanged lines hidden (view full) --- 96 } 97}}; 98 99// Primary format for float point operate instructions: 100def format FloatOp(code, *flags) {{ 101 orig_code = code 102 103 cblk = code |
105 iop = InstObjParams(name, Name, 'FPAOp', cblk, flags) | 104 iop = InstObjParams(name, Name, 'FPAOp', 105 {"code": cblk, 106 "predicate_test": predicateTest}, 107 flags) |
106 header_output = BasicDeclare.subst(iop) 107 decoder_output = BasicConstructor.subst(iop) 108 exec_output = FPAExecute.subst(iop) 109 110 sng_cblk = code | 108 header_output = BasicDeclare.subst(iop) 109 decoder_output = BasicConstructor.subst(iop) 110 exec_output = FPAExecute.subst(iop) 111 112 sng_cblk = code |
111 sng_iop = InstObjParams(name, Name+'S', 'FPAOp', sng_cblk, flags) | 113 sng_iop = InstObjParams(name, Name+'S', 'FPAOp', 114 {"code": sng_cblk, 115 "predicate_test": predicateTest}, 116 flags) |
112 header_output += BasicDeclare.subst(sng_iop) 113 decoder_output += BasicConstructor.subst(sng_iop) 114 exec_output += FPAExecute.subst(sng_iop) 115 116 dbl_code = re.sub(r'\.sf', '.df', orig_code) 117 118 dbl_cblk = dbl_code | 117 header_output += BasicDeclare.subst(sng_iop) 118 decoder_output += BasicConstructor.subst(sng_iop) 119 exec_output += FPAExecute.subst(sng_iop) 120 121 dbl_code = re.sub(r'\.sf', '.df', orig_code) 122 123 dbl_cblk = dbl_code |
119 dbl_iop = InstObjParams(name, Name+'D', 'FPAOp', dbl_cblk, flags) | 124 dbl_iop = InstObjParams(name, Name+'D', 'FPAOp', 125 {"code": dbl_cblk, 126 "predicate_test": predicateTest}, 127 flags) |
120 header_output += BasicDeclare.subst(dbl_iop) 121 decoder_output += BasicConstructor.subst(dbl_iop) 122 exec_output += FPAExecute.subst(dbl_iop) 123 124 decode_block = FloatDoubleDecode.subst(iop) 125}}; 126 127let {{ --- 7 unchanged lines hidden (view full) --- 135 136 Cpsr = _in << 31 | _iz << 30 | _ic << 29 | _iv << 28 | 137 (Cpsr & 0x0FFFFFFF); 138 ''' 139}}; 140 141def format FloatCmp(fReg1, fReg2, *flags) {{ 142 code = calcFPCcCode % vars() | 128 header_output += BasicDeclare.subst(dbl_iop) 129 decoder_output += BasicConstructor.subst(dbl_iop) 130 exec_output += FPAExecute.subst(dbl_iop) 131 132 decode_block = FloatDoubleDecode.subst(iop) 133}}; 134 135let {{ --- 7 unchanged lines hidden (view full) --- 143 144 Cpsr = _in << 31 | _iz << 30 | _ic << 29 | _iv << 28 | 145 (Cpsr & 0x0FFFFFFF); 146 ''' 147}}; 148 149def format FloatCmp(fReg1, fReg2, *flags) {{ 150 code = calcFPCcCode % vars() |
143 iop = InstObjParams(name, Name, 'FPAOp', code, flags) | 151 iop = InstObjParams(name, Name, 'FPAOp', 152 {"code": code, 153 "predicate_test": predicateTest}, 154 flags) |
144 header_output = BasicDeclare.subst(iop) 145 decoder_output = BasicConstructor.subst(iop) 146 decode_block = BasicDecode.subst(iop) 147 exec_output = FPAExecute.subst(iop) 148}}; 149 150 | 155 header_output = BasicDeclare.subst(iop) 156 decoder_output = BasicConstructor.subst(iop) 157 decode_block = BasicDecode.subst(iop) 158 exec_output = FPAExecute.subst(iop) 159}}; 160 161 |