WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

Commit d502900b authored by Kunshan Wang's avatar Kunshan Wang
Browse files

move all scripts to the new injection framework

parent 7c13bff4
......@@ -90,6 +90,9 @@ class StandardInjectableFile(object):
new_txt = inject_lines(txt, inj_begin, inj_end, inj_content)
txt = new_txt
if not txt.endswith("\n"):
txt += "\n"
with tempfile.NamedTemporaryFile("w", delete=False) as f:
print("Backup to temporary file: {} -> {}".format(self.path, f.name))
f.write(orig_txt)
......@@ -102,23 +105,15 @@ def make_injectable_file_set(
root_path: str,
items : List[Tuple[str, str, List[str]]],
) -> Mapping[str, StandardInjectableFile]:
m = {}
m = InjectableFileSet()
for name, path, inj_points in items:
full_path = os.path.join(root_path, path)
sif = StandardInjectableFile(full_path, inj_points)
m[name] = sif
return m
class InjectableFileSet(object):
def __init__(self, m: Mapping[str, List[str]]):
self.injectable_files = {}
for path, inj_points in m.items():
inj_file = StandardInjectableFile(path, inj_points)
self.injectable_files[path] = inj_file
def __getitem__(self, key):
try:
return self.injectable_files[key]
except KeyError as e:
raise Exception("Unknown injectable file {}".format(key))
class InjectableFileSet(dict):
def inject_many(self, m: Mapping[str, Mapping[str, str]]):
for name, mm in m.items():
self[name].inject_many(mm)
"""
Converts MuCtx methods in muapi.h to nativeClientSupport
USAGE: python3 muapitoncs.py < cbinding/muapi.h | xclip -selection c
USAGE: python3 muapitoncs.py
then paste in function signatures, then paste the result in
src/main/scala/uvm/refimpl/nat/nativeClientSupport.scala
Code will be automatically generated to cStubs.scala
Use pbcopy on Mac.
"""
import sys
......@@ -17,6 +15,7 @@ from typing import Tuple
import muapiparser
import injecttools
from refimpl2injectablefiles import injectable_files, muapi_h_path
target_begin = '/// SCRIPT: GENERATED CODE BEGIN'
target_end = '/// SCRIPT: GENERATED CODE END'
......@@ -421,27 +420,16 @@ def generate_things(ast):
return "\n".join([stubs, enums, enum_convs])
src_path = "cbinding/muapi.h"
dst_path = "src/main/scala/uvm/refimpl/nat/cStubs.scala"
def main():
with open(src_path) as f:
with open(muapi_h_path) as f:
src_text = f.read()
ast = muapiparser.parse_muapi(src_text)
generated = generate_things(ast)
with open(dst_path) as f:
dst_text = f.read()
result_text = inject_generated_code(dst_text, generated)
with tempfile.NamedTemporaryFile("w") as f:
print("Backup to temporary file:", f.name)
f.write(dst_text)
with open(dst_path, "w") as f:
f.write(result_text)
injectable_files["cStubs.scala"].inject_many({
"STUBS": generated,
})
main()
......@@ -8,7 +8,7 @@ import muapiparser
import sys, os
from collections import namedtuple
from refimpl2injectablefiles import injectable_files
from refimpl2injectablefiles import injectable_files, muapi_h_path
start_id_comminst = 0x300 # this is in the spec
#start_id_constant = 0x400
......@@ -179,10 +179,6 @@ def gen_comminsts_impls(comminsts):
return "\n".join(lines)
my_dir = os.path.dirname(__file__)
muapi_h_path = os.path.join(my_dir, "../cbinding/muapi.h")
#dst_path = os.path.join(my_dir, "../pythonbinding/libmu.py")
def main():
with open(muapi_h_path) as f:
txt = f.read()
......@@ -197,14 +193,16 @@ def main():
#print(comminsts_defs)
injectable_files["comminsts.scala"].inject_many({
"IRBUILDER_COMMINSTS": comminsts_defs,
})
injectable_files["internals.scala"].inject_many({
"IRBUILDER_RETVALS": comminsts_retvals,
})
injectable_files["ir-ci-exec"].inject_many({
"IRBUILDER_IMPL": comminsts_impls,
injectable_files.inject_many({
"comminsts.scala": {
"IRBUILDER_COMMINSTS": comminsts_defs,
},
"internals.scala": {
"IRBUILDER_RETVALS": comminsts_retvals,
},
"ir-ci-exec": {
"IRBUILDER_IMPL": comminsts_impls,
},
})
#print()
......
......@@ -11,14 +11,7 @@ import tempfile
from typing import Tuple
import muapiparser
import injecttools
region_pattern = '## GEN:{}:{}'
def inject_region(parent, name, generated):
begin = region_pattern.format("BEGIN", name)
end = region_pattern.format("END", name)
return injecttools.inject_lines(parent, begin, end, generated)
from refimpl2injectablefiles import injectable_files, muapi_h_path
# C types to ctypes types
......@@ -287,40 +280,24 @@ def generate_stubs_for_struct(ast, name) -> str:
return "\n".join(results)
my_dir = os.path.dirname(__file__)
src_path = os.path.join(my_dir, "../cbinding/muapi.h")
dst_path = os.path.join(my_dir, "../pythonbinding/libmu.py")
def main():
with open(src_path) as f:
with open(muapi_h_path) as f:
src_text = f.read()
ast = muapiparser.parse_muapi(src_text)
with open(dst_path) as f:
dst_text = f.read()
c_types = generate_ctypes(ast)
c_enums = generate_cenums(ast)
muvalues = generate_muvalues(ast)
muvm_stubs = generate_stubs_for_struct(ast, "MuVM")
muctx_stubs = generate_stubs_for_struct(ast, "MuCtx")
result_text = dst_text
result_text = inject_region(result_text, "CTYPES", c_types)
result_text = inject_region(result_text, "CENUMS", c_enums)
result_text = inject_region(result_text, "MUVALUE", muvalues)
result_text = inject_region(result_text, "MuVM", muvm_stubs)
result_text = inject_region(result_text, "MuCtx", muctx_stubs)
if not result_text.endswith("\n"):
result_text += "\n"
with tempfile.NamedTemporaryFile("w") as f:
print("Backup to temporary file:", f.name)
f.write(dst_text)
with open(dst_path, "w") as f:
f.write(result_text)
injectable_files["libmu.py"].inject_many({
"CTYPES": c_types,
"CENUMS": c_enums,
"MUVALUE": muvalues,
"MuVM": muvm_stubs,
"MuCtx": muctx_stubs,
})
main()
"""
Converts MuCtx methods in muapi.h to nativeClientSupport
USAGE: python3 muapitoncs.py < cbinding/muapi.h | xclip -selection c
then paste in function signatures, then paste the result in
src/main/scala/uvm/refimpl/nat/nativeClientSupport.scala
Use pbcopy on Mac.
"""
import sys
import re
r_comment = re.compile(r'//.*$', re.MULTILINE)
r_decl = re.compile(r'(?P<ret>\w+)\s*\(\s*\*\s*(?P<name>\w+)\s*\)\s*\((?P<params>[^)]*)\)\s*;')
r_param = re.compile(r'\s*(?P<type>\w+)\s*(?P<ptr>\*?)\s*(?P<name>\w+)')
r_value_ty = re.compile(r'Mu\w*(Value|Node)')
begin = "/// IR Builder API"
end = "// Common instruction opcodes"
lines = sys.stdin.read().splitlines()
l1 = [n for (n,l) in enumerate(lines) if begin in l][0]
l2 = [n for (n,l) in enumerate(lines) if end in l][0]
text = "\n".join(lines[l1+1:l2])
text = r_comment.sub("", text)
_simple_map = {
"void": "Unit",
"int": "Int",
"long": "Long",
"uint64_t": "Long",
"uint64_t*": "LongPtr",
"float": "Float",
"double": "Double",
}
def conv_ret_ty(ty):
if ty in _simple_map:
ty = _simple_map[ty]
m = r_value_ty.match(ty)
if m is not None:
return (True, "MuValueFak")
else:
return (False, ty)
_special_case = {
"id": "ID",
"uptr": "UPtr",
"ufuncptr": "UFuncPtr",
"iref": "IRef",
"weakref": "WeakRef",
"funcref": "FuncRef",
"tagref64": "TagRef64",
"threadref": "ThreadRef",
"stackref": "StackRef",
"framecursorref": "FrameCursorRef",
"irnoderef": "IRNodeRef",
"funcsig": "FuncSig",
"bb": "BB",
"keepalives": "KeepAlives",
"binop": "BinOp",
"tailcall": "TailCall",
"extractvalue": "ExtractValue",
"insertvalue" : "InsertValue",
"extractelement": "ExtractElement",
"insertelement" : "InsertElement",
"shufflevector" : "ShuffleVector",
"newhybrid" : "NewHybrid",
"allocahybrid" : "AllocaHybrid",
"getiref" : "GetIRef",
"getfieldiref" : "GetFieldIRef",
"getelemiref" : "GetElemIRef",
"shiftiref" : "ShiftIRef",
"getvarpartiref": "GetVarPartIRef",
"cmpxchg" : "CmpXchg",
"atomicrmw" : "AtomicRMW",
"watchpoint" : "WatchPoint",
"wpbranch" : "WPBranch",
"ccall" : "CCall",
"newthread" : "NewThread",
"newstack" : "NewStack",
"swapstack" : "SwapStack",
"comminst" : "CommInst",
}
def toCamelCase(name):
ins = name.split("_")
outs = [ins[0]]
for inn in ins[1:]:
if inn in _special_case:
outs.append(_special_case[inn])
else:
outs.append(inn[0].upper()+inn[1:])
return "".join(outs)
_special_param = {
}
def conv_param_ty(name, ty):
if ty == "MuCtx*":
return "MuCtx"
elif r_value_ty.match(ty) is not None and ty.endswith("*"):
return "MuValueFakArrayPtr"
elif ty == "MuFlag*":
return "MuFlagArrayPtr"
elif name == "threadlocal" and ty == "MuVarNode":
return "Option[MuVarNode]"
elif ty in _special_param:
return _special_param[ty]
elif ty in _simple_map:
return _simple_map[ty]
else:
return ty
def conv_param_val(func, name, ty):
if ty == "MuValueFakArrayPtr":
if func == "set_newstack_pass_values":
lenvar = "nvars"
else:
lenvar = "n" + name
return "readFromValueFakArray({}, {})".format(name, lenvar)
elif ty == "MuFlagArrayPtr":
lenvar = "n" + name
return "readFromFlagArray({}, {})".format(name, lenvar)
elif name in ["is_ptr", "is_weak"]:
return name + " != 0"
else:
return name
_num_params = "nfieldtys nfixedtys nparamtys nrettys nelems nargs nrvs nvars nflags ntys nsigs nret_tys".split()
def forward_call(func, params):
params = [p for p in params if p[0] not in _num_params]
return "ctx.{}({})".format(toCamelCase(func), ", ".join(
conv_param_val(func, n, t) for n,t in params))
for m in r_decl.finditer(text):
name, params, ret = [m.groupdict()[k] for k in "name params ret".split()]
params_out = []
params = params.split(",")
for param in params:
mp = r_param.search(param)
pt, pp, pn = [mp.groupdict()[k] for k in "type ptr name".split()]
pt = conv_param_ty(pn, pt+pp)
params_out.append((pn, pt))
params_out_str = ", ".join("{}: {}".format(pn, pt) for pn, pt in params_out)
is_value, ret = conv_ret_ty(ret)
impl = forward_call(name, params_out[1:])
if is_value:
impl = "exposeMuValue(ctx, {})".format(impl)
print(" def {}({}): {} = {}".format(name, params_out_str, ret, impl))
......@@ -8,7 +8,13 @@ def _make_injectable_file_set(m):
m2 = {os.path.join(_refimpl2_root, k): v for k,v in m.items()}
return InjectableFileSet(m2)
muapi_h_path = os.path.join(_my_dir, "../cbinding/muapi.h")
injectable_files = injecttools.make_injectable_file_set(_refimpl2_root, [
("cStubs.scala", "src/main/scala/uvm/refimpl/nat/cStubs.scala",
["STUBS"]),
("libmu.py", "pythonbinding/libmu.py",
["CTYPES", "CENUMS", "MUVALUE", "MuVM", "MuCtx"]),
("comminsts.scala", "src/main/scala/uvm/comminsts/comminsts.scala",
["IRBUILDER_COMMINSTS"]),
("internals.scala", "src/main/scala/uvm/refimpl/internals.scala",
......
......@@ -157,4 +157,4 @@ object CommInsts extends SimpleNamespace[CommInst] {
commInst(0x357, "@uvm.irbuilder.set_newstack_throw_exc")
commInst(0x358, "@uvm.irbuilder.new_comminst")
/// GEN:END:IRBUILDER_COMMINSTS
}
\ No newline at end of file
}
......@@ -287,4 +287,4 @@ object TypeInferer {
/// GEN:END:IRBUILDER_RETVALS
}
}
}
\ No newline at end of file
}
......@@ -128,4 +128,4 @@ trait IRBuilderCommInstExecutor extends InterpreterActions with ObjectPinner {
}
}
}
\ No newline at end of file
}
......@@ -17,7 +17,7 @@ object CDefs {
import NativeClientSupport._
// generated from migrate_scripts/muapitocstubs.py
/// SCRIPT: GENERATED CODE BEGIN
/// GEN:BEGIN:STUBS
val MUVM__NEW_CONTEXT = exposedMethod("MuVM.new_context", JType.POINTER, Array(JType.POINTER)) { _jffiBuffer =>
val _raw_mvm = _jffiBuffer.getAddress(0)
val mvm = getMicroVM(_raw_mvm)
......@@ -612,12 +612,12 @@ val _RV = ctx.newStack(func)
val _RV_FAK = exposeMuValue(ctx, _RV)
_jffiBuffer.setAddressReturn(_RV_FAK)
}
val MUCTX__NEW_THREAD_NOR = exposedMethod("MuCtx.new_thread_nor", JType.POINTER, Array(JType.POINTER, JType.POINTER, JType.POINTER, JType.POINTER, JType.SINT)) { _jffiBuffer =>
val MUCTX__NEW_THREAD_NOR = exposedMethod("MuCtx.new_thread_nor", JType.POINTER, Array(JType.POINTER, JType.POINTER, JType.POINTER, JType.POINTER, JType.POINTER)) { _jffiBuffer =>
val _raw_ctx = _jffiBuffer.getAddress(0)
val _raw_stack = _jffiBuffer.getAddress(1)
val _raw_threadlocal = _jffiBuffer.getAddress(2)
val _raw_vals = _jffiBuffer.getAddress(3)
val _raw_nvals = _jffiBuffer.getInt(4)
val _raw_nvals = _jffiBuffer.getAddress(4)
val ctx = getMuCtx(_raw_ctx)
val stack = getMuValueNotNull(_raw_stack).asInstanceOf[MuStackRefValue]
val threadlocal = getMuValueNullable(_raw_threadlocal).asInstanceOf[Option[MuRefValue]]
......@@ -2290,7 +2290,7 @@ val MU_CI_UVM_TR64_FROM_REF = 0x216
val MU_CI_UVM_TR64_TO_FP = 0x217
val MU_CI_UVM_TR64_TO_INT = 0x218
val MU_CI_UVM_TR64_TO_REF = 0x219
val MU_CI_UVM_TR64_TO_TAG = 0x21A
val MU_CI_UVM_TR64_TO_TAG = 0x21a
val MU_CI_UVM_FUTEX_WAIT = 0x220
val MU_CI_UVM_FUTEX_WAIT_TIMEOUT = 0x221
val MU_CI_UVM_FUTEX_WAKE = 0x222
......@@ -2311,13 +2311,102 @@ val MU_CI_UVM_META_COPY_CURSOR = 0x256
val MU_CI_UVM_META_CLOSE_CURSOR = 0x257
val MU_CI_UVM_META_CUR_FUNC = 0x258
val MU_CI_UVM_META_CUR_FUNC_VER = 0x259
val MU_CI_UVM_META_CUR_INST = 0x25A
val MU_CI_UVM_META_DUMP_KEEPALIVES = 0x25B
val MU_CI_UVM_META_POP_FRAMES_TO = 0x25C
val MU_CI_UVM_META_PUSH_FRAME = 0x25D
val MU_CI_UVM_META_ENABLE_WATCHPOINT = 0x25E
val MU_CI_UVM_META_DISABLE_WATCHPOINT = 0x25F
val MU_CI_UVM_META_CUR_INST = 0x25a
val MU_CI_UVM_META_DUMP_KEEPALIVES = 0x25b
val MU_CI_UVM_META_POP_FRAMES_TO = 0x25c
val MU_CI_UVM_META_PUSH_FRAME = 0x25d
val MU_CI_UVM_META_ENABLE_WATCHPOINT = 0x25e
val MU_CI_UVM_META_DISABLE_WATCHPOINT = 0x25f
val MU_CI_UVM_META_SET_TRAP_HANDLER = 0x260
val MU_CI_UVM_IRBUILDER_NEW_BUNDLE = 0x300
val MU_CI_UVM_IRBUILDER_LOAD_BUNDLE_FROM_NODE = 0x301
val MU_CI_UVM_IRBUILDER_ABORT_BUNDLE_NODE = 0x302
val MU_CI_UVM_IRBUILDER_GET_NODE = 0x303
val MU_CI_UVM_IRBUILDER_GET_ID = 0x304
val MU_CI_UVM_IRBUILDER_SET_NAME = 0x305
val MU_CI_UVM_IRBUILDER_NEW_TYPE_INT = 0x306
val MU_CI_UVM_IRBUILDER_NEW_TYPE_FLOAT = 0x307
val MU_CI_UVM_IRBUILDER_NEW_TYPE_DOUBLE = 0x308
val MU_CI_UVM_IRBUILDER_NEW_TYPE_UPTR = 0x309
val MU_CI_UVM_IRBUILDER_SET_TYPE_UPTR = 0x30a
val MU_CI_UVM_IRBUILDER_NEW_TYPE_UFUNCPTR = 0x30b
val MU_CI_UVM_IRBUILDER_SET_TYPE_UFUNCPTR = 0x30c
val MU_CI_UVM_IRBUILDER_NEW_TYPE_STRUCT = 0x30d
val MU_CI_UVM_IRBUILDER_NEW_TYPE_HYBRID = 0x30e
val MU_CI_UVM_IRBUILDER_NEW_TYPE_ARRAY = 0x30f
val MU_CI_UVM_IRBUILDER_NEW_TYPE_VECTOR = 0x310
val MU_CI_UVM_IRBUILDER_NEW_TYPE_VOID = 0x311
val MU_CI_UVM_IRBUILDER_NEW_TYPE_REF = 0x312
val MU_CI_UVM_IRBUILDER_SET_TYPE_REF = 0x313
val MU_CI_UVM_IRBUILDER_NEW_TYPE_IREF = 0x314
val MU_CI_UVM_IRBUILDER_SET_TYPE_IREF = 0x315
val MU_CI_UVM_IRBUILDER_NEW_TYPE_WEAKREF = 0x316
val MU_CI_UVM_IRBUILDER_SET_TYPE_WEAKREF = 0x317
val MU_CI_UVM_IRBUILDER_NEW_TYPE_FUNCREF = 0x318
val MU_CI_UVM_IRBUILDER_SET_TYPE_FUNCREF = 0x319
val MU_CI_UVM_IRBUILDER_NEW_TYPE_TAGREF64 = 0x31a
val MU_CI_UVM_IRBUILDER_NEW_TYPE_THREADREF = 0x31b
val MU_CI_UVM_IRBUILDER_NEW_TYPE_STACKREF = 0x31c
val MU_CI_UVM_IRBUILDER_NEW_TYPE_FRAMECURSORREF = 0x31d
val MU_CI_UVM_IRBUILDER_NEW_TYPE_IRNODEREF = 0x31e
val MU_CI_UVM_IRBUILDER_NEW_FUNCSIG = 0x31f
val MU_CI_UVM_IRBUILDER_NEW_CONST_INT = 0x320
val MU_CI_UVM_IRBUILDER_NEW_CONST_INT_EX = 0x321
val MU_CI_UVM_IRBUILDER_NEW_CONST_FLOAT = 0x322
val MU_CI_UVM_IRBUILDER_NEW_CONST_DOUBLE = 0x323
val MU_CI_UVM_IRBUILDER_NEW_CONST_NULL = 0x324
val MU_CI_UVM_IRBUILDER_NEW_CONST_SEQ = 0x325
val MU_CI_UVM_IRBUILDER_NEW_GLOBAL_CELL = 0x326
val MU_CI_UVM_IRBUILDER_NEW_FUNC = 0x327
val MU_CI_UVM_IRBUILDER_NEW_FUNC_VER = 0x328
val MU_CI_UVM_IRBUILDER_NEW_EXP_FUNC = 0x329
val MU_CI_UVM_IRBUILDER_NEW_BB = 0x32a
val MU_CI_UVM_IRBUILDER_NEW_NOR_PARAM = 0x32b
val MU_CI_UVM_IRBUILDER_NEW_EXC_PARAM = 0x32c
val MU_CI_UVM_IRBUILDER_NEW_INST_RES = 0x32d
val MU_CI_UVM_IRBUILDER_ADD_DEST = 0x32e
val MU_CI_UVM_IRBUILDER_ADD_KEEPALIVES = 0x32f
val MU_CI_UVM_IRBUILDER_NEW_BINOP = 0x330
val MU_CI_UVM_IRBUILDER_NEW_CMP = 0x331
val MU_CI_UVM_IRBUILDER_NEW_CONV = 0x332
val MU_CI_UVM_IRBUILDER_NEW_SELECT = 0x333
val MU_CI_UVM_IRBUILDER_NEW_BRANCH = 0x334
val MU_CI_UVM_IRBUILDER_NEW_BRANCH2 = 0x335
val MU_CI_UVM_IRBUILDER_NEW_SWITCH = 0x336
val MU_CI_UVM_IRBUILDER_ADD_SWITCH_DEST = 0x337
val MU_CI_UVM_IRBUILDER_NEW_CALL = 0x338
val MU_CI_UVM_IRBUILDER_NEW_TAILCALL = 0x339
val MU_CI_UVM_IRBUILDER_NEW_RET = 0x33a
val MU_CI_UVM_IRBUILDER_NEW_THROW = 0x33b
val MU_CI_UVM_IRBUILDER_NEW_EXTRACTVALUE = 0x33c
val MU_CI_UVM_IRBUILDER_NEW_INSERTVALUE = 0x33d
val MU_CI_UVM_IRBUILDER_NEW_EXTRACTELEMENT = 0x33e
val MU_CI_UVM_IRBUILDER_NEW_INSERTELEMENT = 0x33f
val MU_CI_UVM_IRBUILDER_NEW_SHUFFLEVECTOR = 0x340
val MU_CI_UVM_IRBUILDER_NEW_NEW = 0x341
val MU_CI_UVM_IRBUILDER_NEW_NEWHYBRID = 0x342
val MU_CI_UVM_IRBUILDER_NEW_ALLOCA = 0x343
val MU_CI_UVM_IRBUILDER_NEW_ALLOCAHYBRID = 0x344
val MU_CI_UVM_IRBUILDER_NEW_GETIREF = 0x345
val MU_CI_UVM_IRBUILDER_NEW_GETFIELDIREF = 0x346
val MU_CI_UVM_IRBUILDER_NEW_GETELEMIREF = 0x347
val MU_CI_UVM_IRBUILDER_NEW_SHIFTIREF = 0x348
val MU_CI_UVM_IRBUILDER_NEW_GETVARPARTIREF = 0x349
val MU_CI_UVM_IRBUILDER_NEW_LOAD = 0x34a
val MU_CI_UVM_IRBUILDER_NEW_STORE = 0x34b
val MU_CI_UVM_IRBUILDER_NEW_CMPXCHG = 0x34c
val MU_CI_UVM_IRBUILDER_NEW_ATOMICRMW = 0x34d
val MU_CI_UVM_IRBUILDER_NEW_FENCE = 0x34e
val MU_CI_UVM_IRBUILDER_NEW_TRAP = 0x34f
val MU_CI_UVM_IRBUILDER_NEW_WATCHPOINT = 0x350
val MU_CI_UVM_IRBUILDER_NEW_WPBRANCH = 0x351
val MU_CI_UVM_IRBUILDER_NEW_CCALL = 0x352
val MU_CI_UVM_IRBUILDER_NEW_NEWTHREAD = 0x353
val MU_CI_UVM_IRBUILDER_NEW_SWAPSTACK_RET = 0x354
val MU_CI_UVM_IRBUILDER_NEW_SWAPSTACK_KILL = 0x355
val MU_CI_UVM_IRBUILDER_SET_NEWSTACK_PASS_VALUES = 0x356
val MU_CI_UVM_IRBUILDER_SET_NEWSTACK_THROW_EXC = 0x357
val MU_CI_UVM_IRBUILDER_NEW_COMMINST = 0x358
def toDestKind(cval: MuDestKind): DestKind.Value = cval match {
case 0x01 => DestKind.NORMAL
case 0x02 => DestKind.EXCEPT
......@@ -2411,5 +2500,5 @@ def toAtomicRMWOptr(cval: MuAtomicRMWOptr): AtomicRMWOptr.Value = cval match {
case 0x09 => AtomicRMWOptr.UMAX
case 0x0A => AtomicRMWOptr.UMIN
}
/// SCRIPT: GENERATED CODE END
}
\ No newline at end of file
/// GEN:END:STUBS
}
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