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

noob question: ARM equivalents for Thumb opcodes

Note: This was originally posted on 15th September 2011 at http://forums.arm.com

Trying to get Google's VP8 ARM code working under WinCE, but would like to see how much faster things are with it's ARM ASM code. I am using ARMASM to process the .ASM files using the following switches:


ARMASM -32 -ARCH 6 FileName.asm


Most of the files compile fine except for some that involve transforms, namely: iwalsh_v6.asm, walsh_v6.asm, etc. Turns out that these are the most critical for any performances improvements to be gained.


When I compile these modules I seem to be getting the following errors:

Unknown opcode: ASRS ( i.e. asrs r6,r7, #16)

Unknown opcode: LSL ( i.e. lsl r3,r7,#16)

Unknown opcode: ASR (i.e. asr r2, r4, #3)

Unknown opcode: LSLS (i.e. lsls r6, r7, #16)


I really don't know much about ARM assembler yet, but am willing to take a stab at trying to convert these opcodes to regular ARM opcodes if at all possible.

Can the aforementioned opcodes be converted to regular ARM opcodes, or is this a waste of time.



Thanks.
  • Note: This was originally posted on 16th September 2011 at http://forums.arm.com

    Sim, thanks for your reply. I'll be sure to try what you have suggested.

    I am using armasm that comes with Visual Studio 2008 (15.00.20720). Not really sure if this is what I am supposed to be using.

    In theory, I should use the same tool that Google/On2 used to develop VP8, but I'm not sure what that is.

    It would have to be one that spits out COFF file format which is why I opted to use MSVC's armasm.


    Again, thanks.
  • Note: This was originally posted on 16th September 2011 at http://forums.arm.com

    I am down to a single ARM opcode.


    Is there a synonymous was to re-write the following expression:


    ldrd        r4, r5, [r0]        ;       [i1 | i0] [i3 | i2]


    Error emitted:  [size="1"]illegal expression type; expected program relative)
    [/size]



    in terms of ldr? It seems that this can be done: "The LDM, STM, LDRD, and STRD instructions might be replaced by equivalent ARM instructions".


    However, I can't seem to find how to do this due to my aneamic understanding of ARM.

    Thanks.
  • Note: This was originally posted on 15th September 2011 at http://forums.arm.com

    Which version of armasm are you using?


    asrs r6,r7, #16
    lsl r3,r7,#16
    asr r2, r4, #3
    lsls r6, r7, #16

    are the UAL ARM and Thumb equivalents of:


    movs r6,r7,asr #16
    mov r3,r7, lsl #16
    mov r2, r4,asr #3
    movs r6, r7, lsl #16

    See http://infocenter.ar...c/Cjacbgca.html

    hth
    s.