armv7 to armv6

Guest #1848790
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!!!
> 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

Reply

A question of your own? This thread is over 16 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.