mem.isa (8303:5a95f1d2494e) mem.isa (8304:16911ff780d3)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2010 ARM Limited
4// All rights reserved
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating

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

115 exec_output += PanicExecute.subst(iop) + \
116 PanicInitiateAcc.subst(iop) + \
117 PanicCompleteAcc.subst(iop)
118
119 return (header_output, decoder_output, exec_output)
120
121 def pickPredicate(blobs):
122 opt_nz = True
1// -*- mode:c++ -*-
2
3// Copyright (c) 2010 ARM Limited
4// All rights reserved
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating

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

115 exec_output += PanicExecute.subst(iop) + \
116 PanicInitiateAcc.subst(iop) + \
117 PanicCompleteAcc.subst(iop)
118
119 return (header_output, decoder_output, exec_output)
120
121 def pickPredicate(blobs):
122 opt_nz = True
123 opt_c = True
123 opt_c = 'opt'
124 opt_v = True
124 opt_v = True
125 for val in blobs.values():
126 if re.search('(?<!Opt)CondCodesNZ', val):
125
126 if not isinstance(blobs, dict):
127 vals = [blobs]
128 else:
129 vals = blobs.values()
130 for val in vals:
131 if re.search('(?<!Opt)CondCodesNZ(?!.*=)', val):
127 opt_nz = False
132 opt_nz = False
128 if re.search('(?<!Opt)CondCodesC', val):
129 opt_c = False
130 if re.search('(?<!Opt)CondCodesV', val):
133 if re.search('OptShiftRmCondCodesC(?!.*=)', val):
134 opt_c = 'opt_shift_rm'
135 elif re.search('(?<!Opt)CondCodesC(?!.*=)', val):
136 opt_c = 'none'
137 if re.search('(?<!Opt)CondCodesV(?!.*=)', val):
131 opt_v = False
132
133 # Build up the predicate piece by piece depending on which
134 # flags the instruction needs
135 predicate = 'testPredicate('
136 if opt_nz:
137 predicate += 'OptCondCodesNZ, '
138 else:
139 predicate += 'CondCodesNZ, '
138 opt_v = False
139
140 # Build up the predicate piece by piece depending on which
141 # flags the instruction needs
142 predicate = 'testPredicate('
143 if opt_nz:
144 predicate += 'OptCondCodesNZ, '
145 else:
146 predicate += 'CondCodesNZ, '
140 if opt_c:
147 if opt_c == 'opt':
141 predicate += 'OptCondCodesC, '
148 predicate += 'OptCondCodesC, '
149 elif opt_c == 'opt_shift_rm':
150 predicate += 'OptShiftRmCondCodesC, '
142 else:
143 predicate += 'CondCodesC, '
144 if opt_v:
145 predicate += 'OptCondCodesV, '
146 else:
147 predicate += 'CondCodesV, '
148 predicate += 'condCode)'
151 else:
152 predicate += 'CondCodesC, '
153 if opt_v:
154 predicate += 'OptCondCodesV, '
155 else:
156 predicate += 'CondCodesV, '
157 predicate += 'condCode)'
149
158 predicate += '/*auto*/'
150 return predicate
151
152 def memClassName(base, post, add, writeback, \
153 size=4, sign=False, user=False):
154 Name = base
155
156 parts = { "P" : post, "A" : add, "W" : writeback,
157 "S" : sign, "U" : user }

--- 41 unchanged lines hidden ---
159 return predicate
160
161 def memClassName(base, post, add, writeback, \
162 size=4, sign=False, user=False):
163 Name = base
164
165 parts = { "P" : post, "A" : add, "W" : writeback,
166 "S" : sign, "U" : user }

--- 41 unchanged lines hidden ---