This instruction is used for libffi's ARM assembly files. Apparently everybody and their dog knows about this problem but instead of reporting a bug they used -no-integrated-as. Reproducer: > cat libffi-3.1/sysv.S stmeqia r2, {r0, r1} > arm-linux-gnueabihf-gcc -c sysv.S > echo $? 0 > clang -v clang version 3.6.0 (trunk 214951) Target: armv7a-unknown-linux-gnueabihf [...] > arm-clang -c sysv.S sysv.S:1:1: error: invalid instruction stmeqia r2, {r0, r1} ^
Just to prevent confusion arm-clang is just a wrapper setting --sysroot etc.
Hi Ismail, This is pre-UAL syntax as an alias to STMEQ with a write back. It should be simple to add them all (STM/LDM), I'll have a look.
Hi Ismail, It won't be trivial to add the aliases, since we have to parse them in two ways (stmeqia and stmiaeq) and keep the info until later in the process. How often is this used in Chromium? If at all possible, it would be good to have them changed in the source (one source at a time), as the solution I'll come up with might not be acceptable. :( cheers, --renato
> It won't be trivial to add the aliases, since we have to parse them in two > ways (stmeqia and stmiaeq) and keep the info until later in the process. Uh :/ >How often is this used in Chromium? I have no idea. I got this problem because I was trying to compile libffi for ARM using clang (to enable FFI support in llvm actually). > If at all possible, it would be good to have them changed in the source (one > source at a time), as the solution I'll come up with might not be > acceptable. :( Upstream might accept a patch. Could you tell me what is the replacement assembly for this?
It's really simple, actually. The unified assembly syntax has moved every conditional to the end of the instructions, so instead of: stmeqia r0, {r2, r3} you use: stmiaeq r0, {r2, r3} This is in line with every other instructions, and makes reading assembly a lot easier, for both humans and parsers alike. If you want to go the extra mile, you can read the instructions' descriptions in the ARM ARM and see that most of those variants are now aliases to a small set of instructions, but you don't have to, as every assembler I know will know that and do that for you. cheers, --renato
Already fixed upstream it seems: https://github.com/atgreen/libffi/blob/master/src/arm/sysv.S#L216 Closing as wontfix, thanks a lot!
Thanks!
(we don't use this in chromium, removing unrelated 'blocks' entry)