* [gas][cortex-m23] why does this beq.w results in hard fault?
@ 2021-03-08 17:37 Francesco Prosperi
2021-03-26 15:25 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Francesco Prosperi @ 2021-03-08 17:37 UTC (permalink / raw)
To: binutils
Hi,
compiling some cortex-m23 code I stumbled across an issue.
I defined an assembly function with the following directives:
.arch armv8-m.base
.syntax unified
.code 16
.thumb_func
.text
Compilation and linking were fine: no error / warning (for this module).
Assembler invocation is at the end.
Debugging, a hard fault occurs executing the wide conditional branch in
the following line of code:
|00001240: 0x01f0ef80 beq.w 0x2422 <cmp_r0__r1_failed> |
The wide contidional branch is supported only for the Armv7-M.
The Armv8-M architectural reference manual states that:
/ Armv7-M compatibility requires the Main Extension/
Cortex-M23 implements the ARMv8-M baseline instruction set (so no Main
Extension).
For these reasons, could there be a problem with the assembler that is
not giving out any error?
Regards,
FP
Compilation command:||arm-none-eabi-gcc -mcpu=cortex-m23 -mthumb
-mthumb-interwork -O3 -fmessage-length=0 -fsigned-char
-ffunction-sections -fdata-sections -Wunused -Wuninitialized -Wall
-Wextra -Wmissing-declarations -Wpointer-arith -Wshadow -Wlogical-op
-Waggregate-return -Wfloat-equal -g -x assembler-with-cpp
-D_RENESAS_RA_
-I"C:\SSG\ARISTON\development\whb\CCS\CCS_ARI_trunk\Code\Script"
-Wa,-adhlns="Src/outgen.o.lst" -MMD -MP -MF"Src/outgen.d"
-MT"Src/outgen.o" -c -o "Src/outgen.o"
"C:/SSG/ARISTON/development/whb/CCS/CCS_ARI_trunk/Code/Src/outgen.asm"
||
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gas][cortex-m23] why does this beq.w results in hard fault?
2021-03-08 17:37 [gas][cortex-m23] why does this beq.w results in hard fault? Francesco Prosperi
@ 2021-03-26 15:25 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2021-03-26 15:25 UTC (permalink / raw)
To: Francesco Prosperi, binutils
Hi Francesco,
> .arch armv8-m.base
> The wide contidional branch is supported only for the Armv7-M.
> The Armv8-M architectural reference manual states that:
> / Armv7-M compatibility requires the Main Extension/
> Cortex-M23 implements the ARMv8-M baseline instruction set (so no Main Extension).
>
>
> For these reasons, could there be a problem with the assembler that is not giving out any error?
This does indeed sound like a bug in the assembler. Please could you
file a bug report here:
https://sourceware.org/bugzilla/enter_bug.cgi?product=binutils
If you can include a small piece of assembler that demonstrates the problem
that would help a lot.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-26 15:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-08 17:37 [gas][cortex-m23] why does this beq.w results in hard fault? Francesco Prosperi
2021-03-26 15:25 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).