cxt / webp

Automatically exported from code.google.com/p/webp
0 stars 0 forks source link

Cannot build for iOS arm64 #182

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Edit iosbuild.sh, adding arm64 arch
2. Edit iosbuild.sh, change host to aarch64-apple-darwin

What is the expected output? 
Successful build

What do you see instead?
dec_neon.c:110:17: error: unknown register name 'q0' in asm
    : "memory", QRegs
                ^
dec_neon.c:21:15: note: expanded from macro 'QRegs'
#define QRegs "q0", "q1", "q2", "q3",                                          \
              ^
dec_neon.c:136:17: error: unknown register name 'r4' in asm
    : "memory", "r4", "r5", "r6", QRegs
                ^
dec_neon.c:304:17: error: unknown register name 'q0' in asm
    : "memory", "q0", "q1", "q2", "q8", "q9", "q10", "q11"  /* clobbered */
                ^
dec_neon.c:342:17: error: unknown register name 'q0' in asm
    : "memory", "q0", "q1", "q2", "q3"  /* clobbered */
                ^
dec_neon.c:408:17: error: unknown register name 'q0' in asm
    : "memory", "q0", "q1", "q2", "q3",
                ^
5 errors generated.

What version of the product are you using? On what operating system?
libwebp 0.4.0
XCode 5.0.2
Mac OS 10.8.5

Please provide any additional information below.
Perhaps the code needs to be changed to support arm64 registers?

Original issue reported on code.google.com by versae...@gmail.com on 2 Jan 2014 at 5:57

GoogleCodeExporter commented 9 years ago
arm64 has a totally different instruction set.

See: http://people.linaro.org/~rikuvoipio/aarch64-talk/

The NEON assembly code needs a rewrite.

Meanwhile, this patch should be ok for disabling the faulty assembly code in 
libwebp:

https://gerrit.chromium.org/gerrit/68498

Original comment by pascal.m...@gmail.com on 23 Jan 2014 at 1:05

GoogleCodeExporter commented 9 years ago
Yes, adding that if statement to not use the NEON assembly code did the trick.  
I was able to build for iOS arm64 that way.  Thanks!

Original comment by versae...@gmail.com on 24 Jan 2014 at 3:46

GoogleCodeExporter commented 9 years ago
patch has been submitted. closing the bug.

going forward, the mid-term plan is to switch NEON code to intrinsics and have 
automagic support for arm64 this way (instead of re-writing the ASM).

Original comment by pascal.m...@gmail.com on 24 Jan 2014 at 7:49