-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
MCA fails to parse Intel syntax movsx instructions #122616
Comments
llvm-mca probably expects AT&T syntax by default. I'm on my phone so I cant really look at the godbolt link. |
Confirmed working with AT&T. Still, this appears to be a movsx specific parsing bug, as so far in general Intel syntax has been working fine with MCA. |
I wonder if it appears to work with Intel because the registers are usually the same size, but source and dest are swapped. Movsx is special because the source and dest are different sizes. |
I'm pretty sure Craig is right. It looks like there might be a subtle incompatibility between how gfortran emits intel style assembly and how the LLVM MC layer parses it. Taking the following assembly snippet:
And running through llvm-mc --assemble /test.s --show-encoding Produces the following:
Writing it in ATT Syntax and then assembling in llvm-mc produces the encoding as
With the following invocation:
produces normal output. I'm not exactly sure who is in the right here. Either LLVM should be accepting of Interestingly enough, it also seems like we only have APX test coverage for the MC layer for |
Wait, so both |
Scratch that, based on https://www.felixcloutier.com/x86/movsx:movsxd the |
llvm-mc doesn't accept |
See: https://gcc.godbolt.org/z/z4nWWTj6E
Trying to analyze some assembly from gfortran results in errors when MCA sees some movsx instructions:
The text was updated successfully, but these errors were encountered: