symfpu: Add altsqrt

No denormalization here.  That can be a problem for later (or not at all).
This commit is contained in:
Krystine Sherwin
2026-07-15 14:50:29 +12:00
parent 91928a7329
commit 9943484dbc
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -447,7 +447,8 @@ struct SymFpuPass : public Pass {
} }
if (args[argidx] == "-op" && argidx+1 < args.size()) { if (args[argidx] == "-op" && argidx+1 < args.size()) {
op = args[++argidx]; op = args[++argidx];
if (op.compare("sqrt") == 0) if (op.compare("sqrt") == 0
|| op.compare("altsqrt") == 0) // currently undocumented
inputs = 1; inputs = 1;
else if (op.compare("add") == 0 else if (op.compare("add") == 0
|| op.compare("sub") == 0 || op.compare("sub") == 0
@@ -534,6 +535,8 @@ struct SymFpuPass : public Pass {
return symfpu::falseDivide_flagged(format, rounding_mode, a, b, prop(true)); return symfpu::falseDivide_flagged(format, rounding_mode, a, b, prop(true));
else if (op.compare("alt2div") == 0) else if (op.compare("alt2div") == 0)
return symfpu::falseDivide_flagged(format, rounding_mode, a, b, prop(false)); return symfpu::falseDivide_flagged(format, rounding_mode, a, b, prop(false));
else if (op.compare("altsqrt") == 0)
return symfpu::falseSqrt_flagged(format, rounding_mode, a);
else else
log_abort(); log_abort();
}; };