Reputation: 382
I try to compile NEON assembly code with LLVM clang integrated macro assembler (the LLVM compiler shipped with XCode 4.3) and get the following error:
vld1.8 {D0}, [R0] - invalid operand for instruction
What can be the reason? Why this instruction is successfuly compiled by GAS for Android and can't be compiled by 'clang -integrated-as ...' for iOS? Thanks.
Upvotes: 1
Views: 1402
Reputation: 382
After a day of experimenting I've found a solution. I've just compiled LLVM from the SVN source base (version 3.2). The integrated macro assembler in LLVM 3.2svn supports ARM NEON ISA much better compared to LLVM 3.0svn shipped with XCode 4.3.1. The problem with VLD NEON instruction have been automatically resolved.
Those, who use gas-preprocessor.pl Perl script, may try to switch from GAS 1.38 (it's external GNU assembler used by LLVM on Mac OS X 10.7.X) to LLVM integrated macro assembler and stop using unnecessary preprocessing.
Upvotes: 2
Reputation: 5891
I've not used clang for assembly but the following site might help: ARM Assembly
In addition, this may help as it solved someone else's issue with ARM assembly (selecting the correct device, lower case instructions etc...): Useful Stackoverflow answer
Upvotes: 0