This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/AM1808: Assembler bug

Part Number: AM1808

Tool/software: TI C/C++ Compiler

It seems the assembler does not allow to compile a valid instruction in thumb mode:

 sub sp,#40

It issues "Register Rd cannot be a hi register"
But ARM ARM lists:

SUB  SP, #imm * 4
where: 
SP Indicates the stack pointer. The result of the operation is also stored in the SP.
 imm is a 7-bit immediate value that is multiplied by 4 and then subtracted from the value 
of the stack pointer.

I checked 18.12.5-LTS and 16.9.11.