https://sourceware.org/bugzilla/show_bug.cgi?id=23126
Bug ID: 23126 Summary: SVC instruction is rejected for ARM Cortex-M0 Product: binutils Version: 2.30 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: freddie_chopin at op dot pl Target Milestone: --- Target: arm-none-eabi New binutils 2.30 rejects `svc 0` (as part of `asm volatile(...)` in C++ source file): -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- arm-none-eabi-g++ -Wall -Wextra -Wshadow -std=gnu++11 -mcpu=cortex-m0 -mthumb -g -ggdb3 -O2 -fno-use-cxa-atexit -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -Ioutput/include -Iinclude -Isource/architecture/ARM/ARMv6-M-ARMv7-M/include -Isource/architecture/ARM/ARMv6-M-ARMv7-M/external/CMSIS -Isource/chip/STM32/include -Isource/chip/STM32/STM32F0/include -Isource/chip/STM32/peripherals/GPIOv2/include -Isource/chip/STM32/peripherals/SPIv2/include -Isource/chip/STM32/peripherals/USARTv2/include -Isource/chip/STM32/STM32F0/external/CMSIS-STM32F0 -MD -MP -c source/architecture/ARM/ARMv6-M-ARMv7-M/ARMv6-M-ARMv7-M-supervisorCall.cpp -o output/source/architecture/ARM/ARMv6-M-ARMv7-M/ARMv6-M-ARMv7-M-supervisorCall.o /tmp/cchwMvG1.s: Assembler messages: /tmp/cchwMvG1.s:41: Error: SVC is not permitted on this architecture make: *** [Makefile:261: output/source/architecture/ARM/ARMv6-M-ARMv7-M/ARMv6-M-ARMv7-M-supervisorCall.o] Error 1 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- This code was accepted in previous binutils (for years). SVC is listed with no notes about any special conditions in: - Thumb ® 16-bit Instruction Set Quick Reference Card - ARMv6-M Architecture Reference Manual Additionally "ARMv6-M Architecture Reference Manual" says ("A4.9 Exception-generating instructions"): -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- In an ARMv6-M implementation that does not include the Unprivileged/Privileged Extension, execution is always privileged. However in such an implementation, application code might use supervisor calls to maintain a software hierarchy with a system kernel. -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- Adding `-march=armv6s-m` to the compilation flags makes the error go away, but I don't think that requiring it is a good solution. Related problems: https://sourceware.org/bugzilla/show_bug.cgi?id=12296 https://bugs.launchpad.net/gcc-arm-embedded/+bug/1449610 -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils