From 48cb1d10b13dd3d19fd90f142ab2ad7929c4c474 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Fri, 20 Feb 2026 15:49:38 +1300 Subject: [PATCH] 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. --- libs/symfpu | 2 +- passes/cmds/symfpu.cc | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/symfpu b/libs/symfpu index 04da5d228..95b27d8f2 160000 --- a/libs/symfpu +++ b/libs/symfpu @@ -1 +1 @@ -Subproject commit 04da5d2283989b51fe0ab44472cc598c9c50c83f +Subproject commit 95b27d8f2f7cd965e13ca5ff33fd7b47c410b561 diff --git a/passes/cmds/symfpu.cc b/passes/cmds/symfpu.cc index 90b83ca25..b35270bd4 100644 --- a/passes/cmds/symfpu.cc +++ b/passes/cmds/symfpu.cc @@ -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(); };