Hi, all,
I've a project which have assembly code for ARM cpu, which is written under GNU as' syntax. I find my code can't be compiled by Xcode, neither llvm-gcc or clang. I've searched, find only few information about llvm-gcc and clang's assembler's syntax. I only find a doc about OS X assembler(
https://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/Assembler/000-Introduction/introduction.html), but it's a little old(2009), and seems only work for i386 and powerPC's assembly. I know llvm-gcc would call extern assembler and clang has an integrated assembler. But find no doc about external as, however, recently clang's release note(
http://llvm.org/releases/3.2/docs/ReleaseNotes.html) says its integrated-as supports UAL assembly. So I wrote a test which follows UAL(I refereed ARM Compiler toolchain's doc, which is UAL syntax), and can be compiled by armasm(ARM complier toolchain's assembler), but clang failed to compile it.
here is my code in UAL:
1 ; this code follows's armasm's syntax
2 ; comment test
3
4 area armasm_test, code, readonly
5 export add_gas ; GLOBAL is a synonym for EXPORT.
6 align 4
7 ; MESSAGE DCB "Hello World!",0 ;comments test
8 ; COUNT EQU 4
9
10add_gas
11 ; add src1 and src2, result is return to dst
12 ; r0: *dst
13 ; r1: *src1
14 ; r2: *src2
15
16 push {r4, r5}
17 ldr r3, [r1]
18 ldr r4, [r2]
19 add r5, r3, r4
20 str r5, [r0]
21 pop {r4, r5}
22 bx lr
Thanks for any help!
ashi
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden