3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-03-02 03:36:56 +00:00

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-02-20 15:49:38 +13:00
parent f39427f40a
commit 48cb1d10b1
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();
};