EmbDev.net

Forum: ARM programming with GCC/GNU tools armv7 to armv6


Author: St0rm (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi all

I have a problem: I want to compile an iPhone app! Now may problem. When 
I want to compile it I get the error, what the following code isn't for 
an armv6. That's right because it's written for armv7. Now could I all 
port to armv6 except this code. Please can someone make it for me?

.thumb
.globl _rgba_bgra_copy
.thumb_func
_rgba_bgra_copy:
    pld [r1, #32]

    vld4.u8 {d0[0], d1[0], d2[0], d3[0]}, [r1]!
    vld4.u8 {d0[1], d1[1], d2[1], d3[1]}, [r1]!
    vld4.u8 {d0[2], d1[2], d2[2], d3[2]}, [r1]!
    vld4.u8 {d0[3], d1[3], d2[3], d3[3]}, [r1]!
    vld4.u8 {d0[4], d1[4], d2[4], d3[4]}, [r1]!
    vld4.u8 {d0[5], d1[5], d2[5], d3[5]}, [r1]!
    vld4.u8 {d0[6], d1[6], d2[6], d3[6]}, [r1]!
    vld4.u8 {d0[7], d1[7], d2[7], d3[7]}, [r1]!

    vswp d0, d2

    vst4.u8 {d0[0], d1[0], d2[0], d3[0]}, [r0]!
    vst4.u8 {d0[1], d1[1], d2[1], d3[1]}, [r0]!
    vst4.u8 {d0[2], d1[2], d2[2], d3[2]}, [r0]!
    vst4.u8 {d0[3], d1[3], d2[3], d3[3]}, [r0]!
    vst4.u8 {d0[4], d1[4], d2[4], d3[4]}, [r0]!
    vst4.u8 {d0[5], d1[5], d2[5], d3[5]}, [r0]!
    vst4.u8 {d0[6], d1[6], d2[6], d3[6]}, [r0]!
    vst4.u8 {d0[7], d1[7], d2[7], d3[7]}, [r0]!

    cmp r1, r2
    blt _rgba_bgra_copy
    bx lr

Thanks a lot!!!

Author: Marcus Harnisch (mharnisch)
Posted on:

Rate this post
0 useful
not useful
> Now could I all port to armv6 except this code. Please can someone
> make it for me?

Does this help?
_rgba_bgra_copy
  LDR    r3, [r1], #4
  UXTB16 r12, r3, ROR #8
  UXTB16 r3, r3
  ORR    r3, r12, ROR #8
  STR    r3, [r0], #4
  CMP    r1, r2
  BLT    _rgba_bgra_copy
  BX     lr

--
Marcus

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.