Building pixman with LLVM's integrated assembler
While trying to build pixman with LLVM's integrated assembler on Chrome OS, I had to rewrite subpls into subspl in ARM assembly, as IAS only supported unified syntax. This caused GNU assembler to fail unless ".syntax unified" is used (http://crbug.com/1184997). However, with that specified, GAS failed to assemble some assembly files due to missing leading backslash in macro argument evaluation (https://sourceware.org/binutils/docs/as/Macro.html#Macro). For example, GAS cannot assemble the assembling code.
$ cat bar.s .syntax divided .macro bar arg1 mov r2, #arg1 .endm bar 88 $ arm-linux-gnueabihf-as -march=armv7-a bar.s -o gas.o bar.s: Assembler messages: bar.s:5: Error: undefined symbol arg1 used as an immediate value
This can be fixed by rewriting bar.s into
$ cat bar.s .syntax divided .macro bar arg1 mov r2, #\arg1 .endm bar 88 $ arm-linux-gnueabihf-as -march=armv7-a bar.s -o gas.o $ arm-linux-gnueabihf-objdump -march=armv7-a -d gas.o gas.o: file format elf32-littlearm Disassembly of section .text: 00000000 <.text>: 0: e3a02058 mov r2, #88 ; 0x58
To rewrite ARM assembly in pixman with unified syntax would require a large patch as this issue is prevailing in the code. I explored it a little bit, and so far I've made a patch with hundreds of lines, with unknown number of instances left to fix. Before I invest more time and try to fix remaining build failures, I would like to know if such a patch would be acceptable, or if there is a better way to fix this issue? Thanks.