fp.isa (6252:af2c9d9accda) fp.isa (6724:70129fdded75)
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

--- 105 unchanged lines hidden (view full) ---

114 calcFPCcCode = '''
115 uint16_t _in, _iz, _ic, _iv;
116
117 _in = %(fReg1)s < %(fReg2)s;
118 _iz = %(fReg1)s == %(fReg2)s;
119 _ic = %(fReg1)s >= %(fReg2)s;
120 _iv = (isnan(%(fReg1)s) || isnan(%(fReg2)s)) & 1;
121
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

--- 105 unchanged lines hidden (view full) ---

114 calcFPCcCode = '''
115 uint16_t _in, _iz, _ic, _iv;
116
117 _in = %(fReg1)s < %(fReg2)s;
118 _iz = %(fReg1)s == %(fReg2)s;
119 _ic = %(fReg1)s >= %(fReg2)s;
120 _iv = (isnan(%(fReg1)s) || isnan(%(fReg2)s)) & 1;
121
122 Cpsr = _in << 31 | _iz << 30 | _ic << 29 | _iv << 28 |
123 (Cpsr & 0x0FFFFFFF);
122 CondCodes = _in << 31 | _iz << 30 | _ic << 29 | _iv << 28 |
123 (CondCodes & 0x0FFFFFFF);
124 '''
125}};
126
127def format FloatCmp(fReg1, fReg2, *flags) {{
128 code = calcFPCcCode % vars()
129 iop = InstObjParams(name, Name, 'PredOp',
130 {"code": code,
131 "predicate_test": predicateTest},
132 flags)
133 header_output = BasicDeclare.subst(iop)
134 decoder_output = BasicConstructor.subst(iop)
135 decode_block = BasicDecode.subst(iop)
136 exec_output = FPAExecute.subst(iop)
137}};
138
139
124 '''
125}};
126
127def format FloatCmp(fReg1, fReg2, *flags) {{
128 code = calcFPCcCode % vars()
129 iop = InstObjParams(name, Name, 'PredOp',
130 {"code": code,
131 "predicate_test": predicateTest},
132 flags)
133 header_output = BasicDeclare.subst(iop)
134 decoder_output = BasicConstructor.subst(iop)
135 decode_block = BasicDecode.subst(iop)
136 exec_output = FPAExecute.subst(iop)
137}};
138
139