Commit 725df50e authored by Kunshan Wang's avatar Kunshan Wang

Functions for building IR.

The 'irbuilderref' type is no longer used. 'irnoderef' is the only newly
introduced Mu type. A bundle node now works as a namespace. All other
nodes are children of the bundle node. After a bundle node is loaded
into Mu (or aborted), Mu may de-allocate the bundle node and all of its
children for space efficiency.
parent b22b04f4
......@@ -152,7 +152,7 @@ Return the created ``tagref64`` value.
[0x217]@uvm.tr64.to_fp (%tr: tagref64) -> double
[0x218]@uvm.tr64.to_int (%tr: tagref64) -> int<52>
[0x219]@uvm.tr64.to_ref (%tr: tagref64) -> ref<void>
[0x21a]@uvm.tr64.to_ref (%tr: tagref64) -> int<6>
[0x21a]@uvm.tr64.to_tag (%tr: tagref64) -> int<6>
- ``to_fp`` returns the FP number held by ``%tr``.
- ``to_int`` returns the integer held by ``%tr``.
This diff is collapsed.
#/usr/bin/env python3
Extract comminst definitions from into C macros.
USAGE: python3 script/ <
import re
import sys
pat = re.compile(r'\[(0x[0-9a-f]+)\]@([a-zA-Z0-9_.]+)', re.MULTILINE)
defs = []
longest = 0
text =
for opcode, name in pat.findall(text):
macro_name = "MU_CI_" + name.upper().replace(".", "_")
opcode = opcode.upper()
defs.append((macro_name, opcode))
longest = max(longest, len(macro_name))
for macro_name, opcode in defs:
print("#define {} {}".format(macro_name.ljust(longest), opcode))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment