symfpu: Add alt2div

`altdiv` but without denormalization, because as it turns out HardFloat unpacks subnorms in the same way, so lets just support both styles.
This commit is contained in:
Krystine Sherwin 2026-03-11 12:58:56 +13:00
parent 1312668092
commit 8a764230af
No known key found for this signature in database
2 changed files with 5 additions and 2 deletions

@ -1 +1 @@
Subproject commit 04da5d2283989b51fe0ab44472cc598c9c50c83f
Subproject commit 95b27d8f2f7cd965e13ca5ff33fd7b47c410b561

View File

@ -453,6 +453,7 @@ struct SymFpuPass : public Pass {
|| op.compare("sub") == 0
|| op.compare("mul") == 0
|| op.compare("altdiv") == 0 // currently undocumented
|| op.compare("alt2div") == 0 // currently undocumented
|| op.compare("div") == 0)
inputs = 2;
else if (op.compare("muladd") == 0)
@ -530,7 +531,9 @@ struct SymFpuPass : public Pass {
else if (op.compare("muladd") == 0)
return symfpu::fma_flagged(format, rounding_mode, a, b, c);
else if (op.compare("altdiv") == 0)
return symfpu::falseDivide_flagged(format, rounding_mode, a, b);
return symfpu::falseDivide_flagged(format, rounding_mode, a, b, prop(true));
else if (op.compare("alt2div") == 0)
return symfpu::falseDivide_flagged(format, rounding_mode, a, b, prop(false));
else
log_abort();
};