Skip to content

Fix float-mode build break: add MUL5A_SS / MUL6A_SS fallbacks#764

Merged
dpwe merged 1 commit into
shorepine:mainfrom
rt-rtos:fix-float-mode-fixedpoint
Jun 25, 2026
Merged

Fix float-mode build break: add MUL5A_SS / MUL6A_SS fallbacks#764
dpwe merged 1 commit into
shorepine:mainfrom
rt-rtos:fix-float-mode-fixedpoint

Conversation

@rt-rtos

@rt-rtos rt-rtos commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

What

Adds float-mode fallbacks for MUL5A_SS and MUL6A_SS in src/amy_fixedpoint.h.

Why

Since 98ea6bc ("Change multiply resolution to help Xanadu"), oscillators.c:18
references MUL5A_SS unconditionally:

#define MULA_SS(a, b) MUL5A_SS(a, b)

But MUL5A_SS and MUL6A_SS are defined only inside the fixed-point block of
amy_fixedpoint.h. Building with AMY_USE_FIXEDPOINT undefined (the float path
used on FPU targets — desktop, wasm/Emscripten, ESP32-S3, MicroPython) fails:

oscillators.c:18:23: error: implicit declaration of function 'MUL5A_SS'

Fix

Add the same (a) * (b) fallback that every other MUL*_SS macro already has
in the float block:

#define MUL5A_SS(a, b) ((a) * (b))
#define MUL6A_SS(a, b) ((a) * (b))

Notes

  • The change is entirely inside #ifndef AMY_USE_FIXEDPOINT, so the default
    fixed-point build is untouched.
  • Verified: the float translation unit reproduces the implicit-declaration error
    without these lines and compiles cleanly with them.

@dpwe dpwe merged commit f5cbe02 into shorepine:main Jun 25, 2026
9 checks passed
@dpwe

dpwe commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants