base.isa (7571:405f840c4ae1) base.isa (7620:3d8a23caa1ef)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 The Hewlett-Packard Development Company
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

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

73 using namespace RomLabels;
74 return %s;
75 }
76 '''
77
78 def __init__(self, name):
79 self.name = name
80
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 The Hewlett-Packard Development Company
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

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

73 using namespace RomLabels;
74 return %s;
75 }
76 '''
77
78 def __init__(self, name):
79 self.name = name
80
81 # This converts a python bool into a C++ bool
82 def cppBool(self, val):
83 if val:
84 return "true"
85 else:
86 return "false"
81 def microFlagsText(self, flags):
82 wrapped = ("(1ULL << StaticInst::%s)" % flag for flag in flags)
83 return " | ".join(wrapped)
87
84
88 # This converts a list of python bools into
89 # a comma seperated list of C++ bools.
90 def microFlagsText(self, vals):
91 text = ""
92 for val in vals:
93 text += ", %s" % self.cppBool(val)
94 return text
95
96 def getGeneratorDef(self, micropc):
97 return self.generatorTemplate % \
98 (self.className, micropc, \
85 def getGeneratorDef(self, micropc):
86 return self.generatorTemplate % \
87 (self.className, micropc, \
99 self.getAllocator(True, True, False, False))
88 self.getAllocator(["IsMicroop", "IsDelayedCommit"]))
100
101 def getGenerator(self, micropc):
102 return self.generatorNameTemplate % (self.className, micropc)
103}};
89
90 def getGenerator(self, micropc):
91 return self.generatorNameTemplate % (self.className, micropc)
92}};