From 486b04f11e8cc40dc012dd526c180ecc157df6e6 Mon Sep 17 00:00:00 2001 From: crop Date: Fri, 25 Oct 2024 22:10:10 +0200 Subject: [PATCH] implement cm flag --- compiler/generator/instructions_compiler.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/compiler/generator/instructions_compiler.cpp b/compiler/generator/instructions_compiler.cpp index 65a0002070..cd99214fb7 100644 --- a/compiler/generator/instructions_compiler.cpp +++ b/compiler/generator/instructions_compiler.cpp @@ -578,7 +578,15 @@ void InstructionsCompiler::compileMultiSignal(Tree L) string name; if (gGlobal->gOutputLang == "rust") { name = subst("*output$0", T(index)); - pushComputeDSPMethod(IB::genStoreStackVar(name, res)); + if (gGlobal->gComputeMix) { + // take the cpp code and remove the the loop + ValueInst* res1 = IB::genAdd(res, IB::genLoadStackVar(name)); + pushComputeDSPMethod(IB::genStoreStackVar(name, res1)); + } else { + pushComputeDSPMethod(IB::genStoreStackVar(name, res)); + } + + } else if (gGlobal->gOutputLang == "jax") { res = CS(sig); string result_var = "_result" + to_string(index);