from openpower.decoder.selectable_int import SelectableInt
from openpower.decoder.selectable_int import selectconcat as concat
from openpower.decoder.orderedset import OrderedSet
+from openpower.decoder.isafunctions.bcd import BCD_TO_DPD, DPD_TO_BCD
"""
from openpower.decoder.isafunctions.fpfromint import INT2FP
from openpower.decoder.isafunctions.double2single import DOUBLE
-
"""
iinfo_template = """instruction_info(func=%s,
op_fname = "op_%s" % page.replace(".", "_")
f.write(" @inject()\n")
f.write(" def %s(%s):\n" % (op_fname, args))
- if 'NIA' in pycode: # HACK - TODO fix
- f.write(" global NIA\n")
+ # blech! this works in combination with ISACaller
+ # @inject decorator, which works by injecting
+ # global variables into the function namespace.
+ for blech in ['NIA', 'end_loop']:
+ if blech in pycode: # HACK - TODO fix
+ f.write(" global %s\n" % blech)
pycode = pycode.split("\n")
pycode = '\n'.join(map(lambda x: " %s" % x, pycode))
pycode = pycode.rstrip()