title: arm aarch64 assembly: how to compile by gcc
body: <p>For example, the assembly code from : <a href="https://blog.csdn.net/novawl/article/details/5606777" rel="nofollow noreferrer">https://blog.csdn.net/novawl/article/details/5606777</a></p>
  
  <p>but cannot compile it on OrangePI(allwinner H5 core, aarch64), my usage:</p>
  
  <p><code>as convert.s -o convert.o</code> or <code>gcc -o convert.o convert.s</code></p>
  
  <p>the output is:</p>
  
  <pre><code>convert.s: Assembler messages:
  convert.s:28: Error: junk at end of line, first unrecognized character is `@'
  convert.s:28: Error: junk at end of line, first unrecognized character is `,'
  convert.s:30: Error: unknown mnemonic `stmdb' -- `stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}'
  convert.s:32: Error: operand 1 should be an integer register -- `mov r5,#0@r5=row counter'
  convert.s:34: Error: operand 1 should be an integer register -- `ldr r6,[r1],#0x04@load 2-pixel i.e. 4-bytes'
  convert.s:35: Error: operand 1 should be an integer register -- `ldr r9,[r1],#0x04@load 2-pixel i.e. 4-bytes'
  convert.s:37: Error: operand 1 should be an integer register -- `mov r7,r6,lsr#8'
  convert.s:38: Error: operand 1 should be an integer or stack pointer register -- `and r10,r9,#0xFF00FF00'
  convert.s:39: Error: operand 1 should be an integer or stack pointer register -- `and r7,r7,#0x00FF00FF'
  convert.s:41: Error: operand 1 should be a SIMD vector register -- `orr r7,r10,r7@r7=vvuu'
  convert.s:42: Error: operand 1 should be an integer register -- `mov r8,r7,lsr#16@r8=vv'
  convert.s:44: Error: operand 1 should be an integer or stack pointer register -- `and r6,r6,#0x00FF00FF'
  convert.s:45: Error: operand 1 should be an integer or stack pointer register -- `and r9,r9,#0x00FF00FF'
  convert.s:46: Error: operand 1 should be an integer register -- `mov r10,r6,lsr#16@the second byte for y'
  convert.s:47: Error: operand 1 should be an integer register -- `mov r11,r9,lsr#16@the four byte for y'
  convert.s:49: Error: operand 1 should be an integer or stack pointer register -- `and r6,r6,#0x000000FF@the first byte for y'
  convert.s:50: Error: operand 1 should be an integer or stack pointer register -- `and r9,r9,#0xFF@the third byte for y'
  .....................
  </code></pre>
  
  <p>it seems the code fully wrong ...</p>