0

I have a Visual Studio 2008 C++03 project for Windows Mobile 6 where I would like to implement an ARM-NEON version of memcpy.

The ARM Info Center kindly provides an implementation:

; NEON memory copy with preload
NEONCopyPLD
      PLD [r1, #0xC0]
      VLDM r1!,{d0-d7}
      VSTM r0!,{d0-d7}
      SUBS r2,r2,#0x40
      BGE NEONCopyPLD

Unfortunately, the VS2008 ARM assembler doesn't support the NEON instruction set (though my processor is ARM Cortex-A8 based).

Is there any way I can supply the bytecode for those instructions so that the ARM Assembler will take it? Could I DCB or DCD the right values in?

Thanks

PaulH
  • 7,759
  • 8
  • 66
  • 143

1 Answers1

1

You can use DCI directive for "hex instructions":

http://msdn.microsoft.com/en-us/library/ms863606.aspx

Igor Skochinsky
  • 24,629
  • 2
  • 72
  • 109
  • Maybe I'm using it wrong, but when I replace the VLDM command with `DCI 0xE1A00000 ; mov r0, r0` (a placeholder until I can get the VLDM op-code) I get "error A0051: unknown opcode: DCI" – PaulH Dec 07 '12 at 20:08
  • 1
    The [RVCT assembler guide](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0204j/index.html) lists a few. In ARM mode, `DCD` is equivalent to `DCI`; alternatively `DCB` should also work. – tc. Dec 07 '12 at 20:36
  • Thank you. I'm having a time finding the ARM op codes for LVDM and VSTM (NEON instructions). Can you suggest a resource for those? The ARM ARM is "restricted access" http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0406b/index.html – PaulH Dec 07 '12 at 22:38
  • Nevermind I found it. registration on the ARM website is free – PaulH Dec 07 '12 at 22:43
  • 1
    Compile the code with gcc then use objdump to get machine code. – auselen Dec 08 '12 at 00:04