This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

armasm push unknown opcode error

Note: This was originally posted on 8th April 2008 at http://forums.arm.com

Hi,
I am trying to compile a .s file using armasm. But i am getting this error

"VectorTransform.s", line 8: Error: A1163E: Unknown opcode
    8 00000000  PUSH {r2-r12,lr}
"VectorTransform.s", line 9: Error: A1163E: Unknown opcode
    9 00000000  LDM r0!,{r2-r5}

Actual Code:-

..AREA TransPoint,CODE,READONLY
..CODE32
..ENTRY

start
..PUSH {r2-r12,lr}
..LDM r0!,{r2-r5}


(Please treat these dots as space)

Please do let know about any possible solution ASAP.
Parents
  • Note: This was originally posted on 8th April 2008 at http://forums.arm.com

    AFAIK, PUSH and POP are only supported under legacy Thumb (CODE16) and newer UAL ARM/Thumb (ARM or THUMB) areas, not legacy ARM (CODE32) areas.

    [url="http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf"]infocenter.arm.com/.../url]
    might be of interest.


    CODE16 and THUMB have a very different syntax, hence you need to rewrite the code - It just isn't possible to differentiate legacy Thumb syntax from unified Thumb syntax.  However, the legacy ARM and unified ARM syntax is very similar, so you may find that CODE32 will accept unified syntax too.

    Back to the original problem: armasm only supports the UAL syntax from RVCT 2.2 onwards.  For earlier versions of armasm you will need to define macros for the missing instructions, or rewrite the code using the legacy syntax.
Reply
  • Note: This was originally posted on 8th April 2008 at http://forums.arm.com

    AFAIK, PUSH and POP are only supported under legacy Thumb (CODE16) and newer UAL ARM/Thumb (ARM or THUMB) areas, not legacy ARM (CODE32) areas.

    [url="http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf"]infocenter.arm.com/.../url]
    might be of interest.


    CODE16 and THUMB have a very different syntax, hence you need to rewrite the code - It just isn't possible to differentiate legacy Thumb syntax from unified Thumb syntax.  However, the legacy ARM and unified ARM syntax is very similar, so you may find that CODE32 will accept unified syntax too.

    Back to the original problem: armasm only supports the UAL syntax from RVCT 2.2 onwards.  For earlier versions of armasm you will need to define macros for the missing instructions, or rewrite the code using the legacy syntax.
Children
No data