SVP64LDSTmode, SVP64PredCR,
SVP64PredInt, SVP64PredMode,
SVP64RMMode, SVPType, XER_bits,
- insns, spr_byname, spr_dict)
+ insns, spr_byname, spr_dict,
+ BFP_FLAG_NAMES)
from openpower.decoder.power_insn import SVP64Instruction
from openpower.decoder.power_svp64 import SVP64RM, decode_extra
from openpower.decoder.selectable_int import (FieldSelectableInt,
'XLEN': 64 # elwidth overrides
})
+ for name in BFP_FLAG_NAMES:
+ setattr(self, name, 0)
+
# update pc to requested start point
self.set_pc(initial_pc)
MSRSpec = namedtuple("MSRSpec", ["dr", "pr", "sf"])
+# flags for bfp_* functions
+BFP_FLAG_NAMES = (
+ 'vxsnan_flag',
+ 'vximz_flag',
+ 'vxidi_flag',
+ 'vxisi_flag',
+ 'vxzdz_flag',
+ 'vxsqrt_flag',
+ 'vxcvi_flag',
+ 'vxvc_flag',
+ 'ox_flag',
+ 'ux_flag',
+ 'xx_flag',
+ 'zx_flag',
+ 'inc_flag',
+)
+
if __name__ == '__main__':
# find out what the heck is in SPR enum :)
print("sprs full", len(SPRfull))
from openpower.decoder.pseudo.lexer import (
IndentLexer, raise_syntax_error, SyntaxError2)
from openpower.decoder.orderedset import OrderedSet
+from openpower.decoder.power_enums import BFP_FLAG_NAMES
# I use the Python AST
#from compiler import ast
'SVSHAPE0', 'SVSHAPE1', 'SVSHAPE2', 'SVSHAPE3']:
self.special_regs.add(name)
self.write_regs.add(name) # and add to list to write
- if name in ('XLEN', 'FPSCR'):
+ if name in ('XLEN', 'FPSCR') or name in BFP_FLAG_NAMES:
attr = ast.Name("self", ast.Load())
p[0] = ast.Attribute(attr, name, ast.Load(), lineno=p.lineno(1))
else: