Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-9949

ARM assembler rejects instruction: sub sp, #<constant>

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Medium Medium
    • Code Generation Tools
    • CODEGEN-7992
    • Hide
      ARM_20.2.2.LTS
      ARM_16.9.11.LTS
      ARM_18.12.6.LTS
      Show
      ARM_20.2.2.LTS ARM_16.9.11.LTS ARM_18.12.6.LTS
    • default
    • The proper syntax is SUB SP, SP, #4.
    • User error, not a correct assembly instruction

      The attached assembly code file has these instructions in it ... 

              sub     sp,#12  ; error
              add     sp,#-12 ; works

      Build it ...

      % armcl --code_state=16 -mv5e tibug.asm
      "tibug.asm", ERROR!   at line 5: [E0004] Register Rd cannot be a hi register
                      sub     sp,#12  ; error
      
      1 Assembly Error, No Assembly Warnings
      
      Errors in Source - Assembler Aborted
      
      >> Compilation failure

      But the ARM documentation shows an example of a sub sp, #<constant> instruction.

       

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: