base.isa (8565:d9b69f03e7af) base.isa (8588:ef28ed90449d)
1// Copyright (c) 2006-2007 The Regents of The University of Michigan
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met: redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer;
8// redistributions in binary form must reproduce the above copyright

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

176}};
177
178let {{
179 def filterDoubles(code):
180 assignRE = re.compile(r'\s*=(?!=)', re.MULTILINE)
181 for opName in ("Frd", "Frs1", "Frs2", "Frd_N"):
182 next_pos = 0
183 operandsREString = (r'''
1// Copyright (c) 2006-2007 The Regents of The University of Michigan
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met: redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer;
8// redistributions in binary form must reproduce the above copyright

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

176}};
177
178let {{
179 def filterDoubles(code):
180 assignRE = re.compile(r'\s*=(?!=)', re.MULTILINE)
181 for opName in ("Frd", "Frs1", "Frs2", "Frd_N"):
182 next_pos = 0
183 operandsREString = (r'''
184 (?<![\w\.]) # neg. lookbehind assertion: prevent partial matches
185 ((%s)(?:\.(\w+))?) # match: operand with optional '.' then suffix
186 (?![\w\.]) # neg. lookahead assertion: prevent partial matches
184 (?<!\w) # neg. lookbehind assertion: prevent partial matches
185 ((%s)(?:_([^\W_]+))?) # match: operand with optional '.' then suffix
186 (?!\w) # neg. lookahead assertion: prevent partial matches
187 ''' % opName)
188 operandsRE = re.compile(operandsREString, re.MULTILINE|re.VERBOSE)
189 is_src = False
190 is_dest = False
191 extension = None
192 foundOne = False
193 while 1:
194 match = operandsRE.search(code, next_pos)

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

224 code = ("uint64_t %s;" % opName) + code
225 else:
226 code = ("double %s;" % opName) + code
227 return code
228}};
229
230let {{
231 def splitOutImm(code):
187 ''' % opName)
188 operandsRE = re.compile(operandsREString, re.MULTILINE|re.VERBOSE)
189 is_src = False
190 is_dest = False
191 extension = None
192 foundOne = False
193 while 1:
194 match = operandsRE.search(code, next_pos)

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

224 code = ("uint64_t %s;" % opName) + code
225 else:
226 code = ("double %s;" % opName) + code
227 return code
228}};
229
230let {{
231 def splitOutImm(code):
232 matcher = re.compile(r'Rs(?P<rNum>\d)_or_imm(?P<iNum>\d+)(?P<typeQual>\.\w+)?')
232 matcher = re.compile(r'Rs(?P<rNum>\d)_or_imm(?P<iNum>\d+)(?P<typeQual>_[^\W_]+)?')
233 rOrImmMatch = matcher.search(code)
234 if (rOrImmMatch == None):
235 return (False, code, '', '', '')
236 rString = rOrImmMatch.group("rNum")
237 if (rOrImmMatch.group("typeQual") != None):
238 rString += rOrImmMatch.group("typeQual")
239 iString = rOrImmMatch.group("iNum")
240 orig_code = code

--- 342 unchanged lines hidden ---
233 rOrImmMatch = matcher.search(code)
234 if (rOrImmMatch == None):
235 return (False, code, '', '', '')
236 rString = rOrImmMatch.group("rNum")
237 if (rOrImmMatch.group("typeQual") != None):
238 rString += rOrImmMatch.group("typeQual")
239 iString = rOrImmMatch.group("iNum")
240 orig_code = code

--- 342 unchanged lines hidden ---