summaryrefslogtreecommitdiff
path: root/src/arch/isa_parser.py
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-03-20 06:08:52 +0000
committerGabe Black <gblack@eecs.umich.edu>2007-03-20 06:08:52 +0000
commite7b015cee1ac44b0e160fbaeb26fa524c2418920 (patch)
treeb5f5d78d90244523f8ae3240075ed73b1037b373 /src/arch/isa_parser.py
parent4df9411e598933d40fae661dd5d5ca0c5bd6b4f1 (diff)
downloadgem5-e7b015cee1ac44b0e160fbaeb26fa524c2418920.tar.xz
Added syntax for structure oriented extMachInsts.
--HG-- extra : convert_revision : 4a30c58019ad8e3dd8dffb4c4c08eb6914e5c5be
Diffstat (limited to 'src/arch/isa_parser.py')
-rwxr-xr-xsrc/arch/isa_parser.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/arch/isa_parser.py b/src/arch/isa_parser.py
index 21860a2e1..da17f5a9d 100755
--- a/src/arch/isa_parser.py
+++ b/src/arch/isa_parser.py
@@ -363,6 +363,17 @@ def p_def_bitfield_1(t):
hash_define = '#undef %s\n#define %s\t%s\n' % (t[4], t[4], expr)
t[0] = GenCode(header_output = hash_define)
+# alternate form for structure member: 'def bitfield <ID> <ID>'
+def p_def_bitfield_2(t):
+ 'def_bitfield : DEF nothing BITFIELD ID ID SEMI'
+ expr = 'machInst.%s' % t[5]
+ hash_define = '#undef %s\n#define %s\t%s\n' % (t[4], t[4], expr)
+ t[0] = GenCode(header_output = hash_define)
+
+def p_nothing(t):
+ 'nothing : empty'
+ t[0] = ''
+
def p_opt_signed_0(t):
'opt_signed : SIGNED'
t[0] = t[1]