You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dspinst.h contains inline assembly specific to ARM_ARCH_7EM, most of which is wrapped in an #ifdef, but there are two inline assembly calls at the bottom of the file that aren't wrapped: get_q_psr() and clr_q_psr(). This causes lots of warnings when compiling for a different architecture (e.g. unit tests, or in our case: porting to virtual synthesizer platform that runs on a different hardware platform).
The warnings can be silenced with -Wno-asm-operand-widths with the downside of possibly missing an actually important warning in the future. Or we could just fork and change the source, but it'd be nice to keep in sync with upstream (this repo).
Was there a reason to expose these two functions and their inline assembly to all archtectures, or was that just an oversight? If the latter, I'm happy to submit a PR wrapping those functions with the same macro test as the rest of the functions in the file.
Example warning:
In file included from /Users/dann/4ms/stm32/meta-module/firmware/vcv_ports/Befaco/src/noise-plethora/teensy/synth_pinknoise.cpp:39:
In file included from /Users/dann/4ms/stm32/meta-module/firmware/vcv_ports/Befaco/src/noise-plethora/teensy/synth_pinknoise.hpp:29:
In file included from /Users/dann/4ms/stm32/meta-module/firmware/vcv_ports/Befaco/src/noise-plethora/teensy/audio_core.hpp:4:
/Users/dann/4ms/stm32/meta-module/firmware/vcv_ports/Befaco/src/noise-plethora/teensy/dspinst.h:343:28: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
asm("mrs %0, APSR" : "=r"(out));
^
/Users/dann/4ms/stm32/meta-module/firmware/vcv_ports/Befaco/src/noise-plethora/teensy/dspinst.h:343:11: note: use constraint modifier "w"
asm("mrs %0, APSR" : "=r"(out));
^~
%w0
/Users/dann/4ms/stm32/meta-module/firmware/vcv_ports/Befaco/src/noise-plethora/teensy/dspinst.h:352:40: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
"msr APSR_nzcvq,%0\n" : [t] "=&r"(t)::"cc");
^
/Users/dann/4ms/stm32/meta-module/firmware/vcv_ports/Befaco/src/noise-plethora/teensy/dspinst.h:351:11: note: use constraint modifier "w"
asm("mov %[t],#0\n"
^~~~
%w[t]
/Users/dann/4ms/stm32/meta-module/firmware/vcv_ports/Befaco/src/noise-plethora/teensy/dspinst.h:352:40: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
"msr APSR_nzcvq,%0\n" : [t] "=&r"(t)::"cc");
^
/Users/dann/4ms/stm32/meta-module/firmware/vcv_ports/Befaco/src/noise-plethora/teensy/dspinst.h:352:22: note: use constraint modifier "w"
"msr APSR_nzcvq,%0\n" : [t] "=&r"(t)::"cc");
^~
%w0
The text was updated successfully, but these errors were encountered:
Description
Describe your problem.
dspinst.h contains inline assembly specific to ARM_ARCH_7EM, most of which is wrapped in an #ifdef, but there are two inline assembly calls at the bottom of the file that aren't wrapped:
get_q_psr()
andclr_q_psr()
. This causes lots of warnings when compiling for a different architecture (e.g. unit tests, or in our case: porting to virtual synthesizer platform that runs on a different hardware platform).The warnings can be silenced with
-Wno-asm-operand-widths
with the downside of possibly missing an actually important warning in the future. Or we could just fork and change the source, but it'd be nice to keep in sync with upstream (this repo).Was there a reason to expose these two functions and their inline assembly to all archtectures, or was that just an oversight? If the latter, I'm happy to submit a PR wrapping those functions with the same macro test as the rest of the functions in the file.
Example warning:
The text was updated successfully, but these errors were encountered: