Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ARM] Integrated assembler does not support stmeqia instruction #20969

Closed
ismail opened this issue Aug 8, 2014 · 9 comments
Closed

[ARM] Integrated assembler does not support stmeqia instruction #20969

ismail opened this issue Aug 8, 2014 · 9 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla clang Clang issues not falling into any other category wontfix Issue is real, but we can't or won't fix it. Not invalid

Comments

@ismail
Copy link
Contributor

ismail commented Aug 8, 2014

Bugzilla Link 20595
Resolution WONTFIX
Resolved on Aug 12, 2014 11:37
Version trunk
OS Windows NT
CC @nico,@rengolin

Extended Description

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}
^

@ismail
Copy link
Contributor Author

ismail commented Aug 8, 2014

assigned to @rengolin

@ismail
Copy link
Contributor Author

ismail commented Aug 8, 2014

Just to prevent confusion arm-clang is just a wrapper setting --sysroot etc.

@rengolin
Copy link
Member

rengolin commented Aug 8, 2014

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.

@rengolin
Copy link
Member

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

@ismail
Copy link
Contributor Author

ismail commented Aug 12, 2014

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?

@rengolin
Copy link
Member

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

@ismail
Copy link
Contributor Author

ismail commented Aug 12, 2014

Already fixed upstream it seems: https://github.com/atgreen/libffi/blob/master/src/arm/sysv.S#L216

Closing as wontfix, thanks a lot!

@rengolin
Copy link
Member

Thanks!

@nico
Copy link
Contributor

nico commented Aug 12, 2014

(we don't use this in chromium, removing unrelated 'blocks' entry)

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
@Quuxplusone Quuxplusone added the wontfix Issue is real, but we can't or won't fix it. Not invalid label Jan 20, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang Clang issues not falling into any other category wontfix Issue is real, but we can't or won't fix it. Not invalid
Projects
None yet
Development

No branches or pull requests

4 participants