|
|
@ -91,9 +91,9 @@ def formatValueRaw(num, t):
|
|
|
|
return str(num)
|
|
|
|
return str(num)
|
|
|
|
|
|
|
|
|
|
|
|
def formatValueHex(num, t):
|
|
|
|
def formatValueHex(num, t):
|
|
|
|
if t == "f32":
|
|
|
|
if t == "f32" or t == "i32":
|
|
|
|
return "{0:#0{1}x}".format(int(num), 8+2)
|
|
|
|
return "{0:#0{1}x}".format(int(num), 8+2)
|
|
|
|
elif t == "f64":
|
|
|
|
elif t == "f64" or t == "i64":
|
|
|
|
return "{0:#0{1}x}".format(int(num), 16+2)
|
|
|
|
return "{0:#0{1}x}".format(int(num), 16+2)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
return str(num)
|
|
|
|
return str(num)
|
|
|
@ -217,8 +217,8 @@ def runInvoke(test):
|
|
|
|
value = str(test.expected[0]['value'])
|
|
|
|
value = str(test.expected[0]['value'])
|
|
|
|
expect = "result " + value
|
|
|
|
expect = "result " + value
|
|
|
|
|
|
|
|
|
|
|
|
if actual_val != None and (t == "f32" or t == "f64"):
|
|
|
|
if actual_val != None:
|
|
|
|
if (value == "<Canonical NaN>" or value == "<Arithmetic NaN>"):
|
|
|
|
if (t == "f32" or t == "f64") and (value == "<Canonical NaN>" or value == "<Arithmetic NaN>"):
|
|
|
|
val = binaryToFloat(actual_val, t)
|
|
|
|
val = binaryToFloat(actual_val, t)
|
|
|
|
#warning(f"{actual_val} => {val}")
|
|
|
|
#warning(f"{actual_val} => {val}")
|
|
|
|
if math.isnan(val):
|
|
|
|
if math.isnan(val):
|
|
|
@ -277,25 +277,38 @@ elif args.all:
|
|
|
|
jsonFiles.sort()
|
|
|
|
jsonFiles.sort()
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
jsonFiles = list(map(lambda x : f"./core/{x}.json", [
|
|
|
|
jsonFiles = list(map(lambda x : f"./core/{x}.json", [
|
|
|
|
#--- Complete ---
|
|
|
|
#--- 100% Complete ---
|
|
|
|
"i32", "i64", "stack", "fac",
|
|
|
|
"i32", "i64", "stack", "fac",
|
|
|
|
|
|
|
|
"f32", "f64",
|
|
|
|
"f32_cmp", "f64_cmp",
|
|
|
|
"f32_cmp", "f64_cmp",
|
|
|
|
"f32_bitwise", "f64_bitwise",
|
|
|
|
"f32_bitwise", "f64_bitwise",
|
|
|
|
"f32", "f64",
|
|
|
|
"call", "break-drop",
|
|
|
|
"float_misc",
|
|
|
|
"tee_local", "set_local",
|
|
|
|
"conversions",
|
|
|
|
"forward",
|
|
|
|
#--- In progress ---
|
|
|
|
"func_ptrs",
|
|
|
|
|
|
|
|
#--- Almost ready ---
|
|
|
|
|
|
|
|
#"address", "align",
|
|
|
|
|
|
|
|
#"memory",
|
|
|
|
|
|
|
|
#"if",
|
|
|
|
|
|
|
|
#"nop",
|
|
|
|
|
|
|
|
#"call_indirect",
|
|
|
|
#"float_literals",
|
|
|
|
#"float_literals",
|
|
|
|
#"float_exprs",
|
|
|
|
#"float_misc",
|
|
|
|
|
|
|
|
#--- In progress ---
|
|
|
|
|
|
|
|
#"return",
|
|
|
|
#"endianness",
|
|
|
|
#"endianness",
|
|
|
|
#"int_literals",
|
|
|
|
#"conversions",
|
|
|
|
|
|
|
|
#"globals",
|
|
|
|
|
|
|
|
#"func",
|
|
|
|
|
|
|
|
#"unreachable", "loop", "block", "br", "br_if", "br_table",
|
|
|
|
|
|
|
|
#--- Future ---
|
|
|
|
|
|
|
|
#"float_memory",
|
|
|
|
|
|
|
|
#"float_exprs",
|
|
|
|
|
|
|
|
#"int_literals", # stack underflow
|
|
|
|
#"int_exprs",
|
|
|
|
#"int_exprs",
|
|
|
|
#"if",
|
|
|
|
|
|
|
|
#"elem",
|
|
|
|
#"elem",
|
|
|
|
#"switch",
|
|
|
|
#"switch",
|
|
|
|
#"call",
|
|
|
|
|
|
|
|
#"get_local",
|
|
|
|
#"get_local",
|
|
|
|
#"tee_local",
|
|
|
|
|
|
|
|
]))
|
|
|
|
]))
|
|
|
|
|
|
|
|
|
|
|
|
for fn in jsonFiles:
|
|
|
|
for fn in jsonFiles:
|
|
|
|