Question

I'm using libmpeg2 for showing video in my pocket pc project. Last release of this lib has acceleration for ARM processor, some of the functions are rewritten in arm assembly (in separate file motion_comp_arm_s.S). The problem is armasm from Visual Studio 9 cant compile it, producing a lot of errors. My question is, which arm assembly compiler is suitable for such code?


    .text

@ ---------------------------------------------------------------- .align .global MC_put_o_16_arm MC_put_o_16_arm: @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) pld [r1] stmfd sp!, {r4-r11, lr} @ R14 is also called LR and r4, r1, #3 adr r5, MC_put_o_16_arm_align_jt add r5, r5, r4, lsl #2 ldr pc, [r5]

...

Thank you for any help

Was it helpful?

Solution

That's the syntax used by the GNU assembler. The code itself should be (more or less) the same for any assembler; to make this build with the microsoft assembler, the main changes will be:

  • Change the @ characters (which denote comments) to ;
  • Change the directives (the words beginning with .) documented here to their Microsoft equivalents, documented here. For example .text becomes CODE.

This should fix most of the errors.

OTHER TIPS

Use ARM RVDS compiler
Syntax of a sample code goes like this

      AREA     ARMex, CODE, READONLY
      ENTRY
START
      MOV R0,#1
      MOV R1,#2
      ADD R0,R0,R1
      END

Save the code as test.s
command to compile and generate object file is

armasm --arm test -o test.s
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top