EmbDev.net

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


von St0rm (Guest)


Rate this post
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!!!

von Marcus H. (mharnisch)


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

Does this help?
1
_rgba_bgra_copy
2
  LDR    r3, [r1], #4
3
  UXTB16 r12, r3, ROR #8
4
  UXTB16 r3, r3
5
  ORR    r3, r12, ROR #8
6
  STR    r3, [r0], #4
7
  CMP    r1, r2
8
  BLT    _rgba_bgra_copy
9
  BX     lr

--
Marcus

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.