summaryrefslogtreecommitdiff
path: root/src/arch/isa_parser.py
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-04-05 11:35:31 +0000
committerGabe Black <gblack@eecs.umich.edu>2007-04-05 11:35:31 +0000
commit077183f7ece6aa7fcb009fb078e2e1a3370f9327 (patch)
tree3e9d50d4583a196f54b166ab1d92577f8f6cabaa /src/arch/isa_parser.py
parent3d2a434e42b10ef30bbb590722e72ed104be669a (diff)
parentff7b89beeeabec340d5b84ed813466682a93f928 (diff)
downloadgem5-077183f7ece6aa7fcb009fb078e2e1a3370f9327.tar.xz
Merge zizzer.eecs.umich.edu:/bk/newmem
into ahchoo.blinky.homelinux.org:/home/gblack/m5/newmem-x86 --HG-- extra : convert_revision : efdbf9787383dc1df544b7276f8120285e69bf69
Diffstat (limited to 'src/arch/isa_parser.py')
-rwxr-xr-xsrc/arch/isa_parser.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/arch/isa_parser.py b/src/arch/isa_parser.py
index a0d671da1..4c8d0706d 100755
--- a/src/arch/isa_parser.py
+++ b/src/arch/isa_parser.py
@@ -866,7 +866,11 @@ class Format:
context = {}
updateExportContext()
context.update(exportContext)
- context.update({ 'name': name, 'Name': string.capitalize(name) })
+ if len(name):
+ Name = name[0].upper()
+ if len(name) > 1:
+ Name += name[1:]
+ context.update({ 'name': name, 'Name': Name })
try:
vars = self.func(self.user_code, context, *args[0], **args[1])
except Exception, exc:
@@ -1028,7 +1032,7 @@ def substBitOps(code):
# Template objects are format strings that allow substitution from
# the attribute spaces of other objects (e.g. InstObjParams instances).
-labelRE = re.compile(r'[^%]%\(([^\)]+)\)[sd]')
+labelRE = re.compile(r'(?<!%)%\(([^\)]+)\)[sd]')
class Template:
def __init__(self, t):