Error: cannot honor width suffix -- `rsb r0,#0'

Asked by Mallikarjun

Hi,
I get this error when i compile following code:

 .cpu cortex-m0
 .fpu softvfp
 .thumb
 .text
 .align 2
 .global rsb_test
 .thumb
 .thumb_func
 .type rsb_test, %function
rsb_test:
 rsb r0, #0

The command i used is:
./arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb rsb_bug.S

Anything wrong with the options i have used? Or is it known bug?

Thanks for your time.

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Terry Guo
Solved:
Last query:
Last reply:
Revision history for this message
Best Terry Guo (terry.guo) said :
#1

It could be a missing part in assembler to support rsb instruction for non-UAL assembly code. Suggest you to use "neg r0, r0" instead. They use same instruction encoding.

Revision history for this message
Mallikarjun (mallikarjun-gouda) said :
#2

Thanks Terry Guo, that solved my question.