Skip to content

Commit

Permalink
arm/thumb: outputs an implicit IT block to avoid build break
Browse files Browse the repository at this point in the history
Fix build break on thumb2 mode:
opus/celt/arm/celt_pitch_xcorr_arm-gnu.S: Assembler messages:
opus/celt/arm/celt_pitch_xcorr_arm-gnu.S:146: Error: thumb conditional instruction should be in IT block -- `movle pc,lr'

Reference:
https://developer.arm.com/documentation/100067/0612/armclang-Command-line-Options/-mimplicit-it

In A32 code, the integrated assembler accepts all conditional instructions
without giving an error or warning. In T32 code, the integrated assembler
outputs an implicit IT block when there is a conditional instruction
without an enclosing IT block. The integrated assembler does not give an
error or warning about this.

Signed-off-by: chao an <anchao@xiaomi.com>
  • Loading branch information
anchao authored and pkarashchenko committed Dec 1, 2022
1 parent 9ab97df commit 77aede7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/arm/src/common/Toolchain.defs
Expand Up @@ -80,6 +80,11 @@ ifeq ($(CONFIG_ARM_THUMB),y)
# -mthumb option directly to the assembler by prefixing it with -Wa.

ARCHOPTIMIZATION += -Wa,-mthumb

# Outputs an implicit IT block when there is a conditional instruction
# without an enclosing IT block.

ARCHOPTIMIZATION += -Wa,-mimplicit-it=always
endif

ifeq ($(CONFIG_UNWINDER_ARM),y)
Expand Down

0 comments on commit 77aede7

Please sign in to comment.