ISA parser: Set up op_src_decl and op_dest_decl for pc operands.
authorGabe Black <gblack@eecs.umich.edu>
Thu, 24 Mar 2011 17:55:16 +0000 (13:55 -0400)
committerGabe Black <gblack@eecs.umich.edu>
Thu, 24 Mar 2011 17:55:16 +0000 (13:55 -0400)
src/arch/isa_parser.py

index 00bfd33d20423e48df4d6552232aa2b9a33586c7..947742354ba16a36dbfdbaaa89fe19b9bad1aed6 100755 (executable)
@@ -181,6 +181,12 @@ class Template(object):
                       operands.concatSomeAttrStrings(is_src, 'op_src_decl')
             myDict['op_dest_decl'] = \
                       operands.concatSomeAttrStrings(is_dest, 'op_dest_decl')
+            if operands.readPC:
+                myDict['op_src_decl'] += \
+                    'TheISA::PCState __parserAutoPCState;\n'
+            if operands.setPC:
+                myDict['op_dest_decl'] += \
+                    'TheISA::PCState __parserAutoPCState;\n'
 
             myDict['op_rd'] = operands.concatAttrStrings('op_rd')
             if operands.readPC: