diff -r 2e7aa74993f9 -r 73d1e7e4bfff src/arch/isa_parser.py --- a/src/arch/isa_parser.py Thu Jun 12 14:49:52 2014 -0500 +++ b/src/arch/isa_parser.py Thu Jun 12 14:49:54 2014 -0500 @@ -1119,17 +1119,7 @@ self.flags = self.operands.concatAttrLists('flags') - # Make a basic guess on the operand class (function unit type). - # These are good enough for most cases, and can be overridden - # later otherwise. - if 'IsStore' in self.flags: - self.op_class = 'MemWriteOp' - elif 'IsLoad' in self.flags or 'IsPrefetch' in self.flags: - self.op_class = 'MemReadOp' - elif 'IsFloating' in self.flags: - self.op_class = 'FloatAddOp' - else: - self.op_class = 'IntAluOp' + self.op_class = "" # Optional arguments are assumed to be either StaticInst flags # or an OpClass value. To avoid having to import a complete @@ -1144,6 +1134,18 @@ error('InstObjParams: optional arg "%s" not recognized ' 'as StaticInst::Flag or OpClass.' % oa) + # Make a basic guess on the operand class if not set. + # These are good enough for most cases. + if not self.op_class: + if 'IsStore' in self.flags: + self.op_class = 'MemWriteOp' + elif 'IsLoad' in self.flags or 'IsPrefetch' in self.flags: + self.op_class = 'MemReadOp' + elif 'IsFloating' in self.flags: + self.op_class = 'FloatAddOp' + else: + self.op_class = 'IntAluOp' + # add flag initialization to contructor here to include # any flags added via opt_args self.constructor += makeFlagConstructor(self.flags)