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

ARMv7 SIMD: Fix clang compatibility part 2 #76

Closed
wants to merge 2 commits into from
Closed

ARMv7 SIMD: Fix clang compatibility part 2 #76

wants to merge 2 commits into from

Conversation

mattsarett
Copy link
Contributor

Sorry to do this to you. I think there is a better fix to this issue.

It turns out that GCC does support UAL syntax (strbeq) if we provide the proper directive.

Clang only supports Unified Assembler Language (and not pre-UAL syntax).  This is intentional.
https://llvm.org/bugs/show_bug.cgi?id=23507
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0473c/BABJIHGJ.html

This means clang expects "strbeq" here.  Unfortunately, it seems that my version of gcc only supports "streqb".  So I think we need both variations here.
It turns out that GCC does support the UAL syntax (strbeq)  if we supply the correct directive.  I think this is a better fix.
@dcommander
Copy link
Member

Yeah, except that I already spent some time testing the previous fix to make sure that it didn't break anything. We are in beta, so I am loathe to introduce fixes that might cause a regression, which is why I preferred the #ifdef approach. With this new approach, I will need some assurances that the .syntax directive is supported in all ARM-compatible versions of GCC. Can you provide such assurances or at least research which versions of GCC support that directive?

@rengolin
Copy link

rengolin commented May 3, 2016

The .syntax directive is supported in all versions of GCC and Clang since probably 2003, so you should be safe with all 3.x and 4.x GCCs as well as all 3.x Clangs.

While I cannot guarantee that adding ".syntax unified" to the assembly files will not bring additional syntax issues (ie. force you to change a few more pre-UAL instructions to the new style), it should not bring anything more than that, as UAL is just a new syntax.

In a nutshell, once it compiles, it should work in the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants