We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
bswap
-march=i386
If you compile clang -S -o - ~/foo.c -O3 -target i386-pc-linux -march=i386:
clang -S -o - ~/foo.c -O3 -target i386-pc-linux -march=i386
unsigned bswap(unsigned num) { union { unsigned n; char b[4]; } bytes = {.n = num}, rev = { .b[0] = bytes.b[3], .b[1] = bytes.b[2], .b[2] = bytes.b[1], .b[3] = bytes.b[0] }; return rev.num; }
then clang generates:
bswap: # @bswap .cfi_startproc # %bb.0: movl 4(%esp), %eax bswapl %eax retl .Lfunc_end0: .size bswap, .Lfunc_end0-bswap .cfi_endproc
even though bswapl is only available with -march=i486 or later.
bswapl
-march=i486
The text was updated successfully, but these errors were encountered:
@llvm/issue-subscribers-backend-x86
Sorry, something went wrong.
Duplicate of #58470
No branches or pull requests
If you compile
clang -S -o - ~/foo.c -O3 -target i386-pc-linux -march=i386
:then clang generates:
even though
bswapl
is only available with-march=i486
or later.The text was updated successfully, but these errors were encountered: