This is an archive of the discontinued LLVM Phabricator instance.

[MC] Skip lower-case integer suffixes
ClosedPublic

Authored by ksaunders on Jun 29 2022, 7:38 PM.

Details

Summary

In the GNU assemblers, lower-cased integer suffices are permitted. However, in LLVM, it causes an error.

This is especially important when using the C pre-processor with the assembler: some shared code between C and assembler may use lower-cased suffices.

For example,

.global main
main:
	mov x0, 1024u
	ret

Is permitted in AArch64 binutils 2.35.1. However with Clang it produces the following error:

<source>:3:14: error: unexpected token in argument list
        mov x0, 1024u
                    ^

This patch addresses this issue.

Diff Detail

Event Timeline

ksaunders created this revision.Jun 29 2022, 7:38 PM
ksaunders requested review of this revision.Jun 29 2022, 7:38 PM
MaskRay accepted this revision.Jun 29 2022, 7:58 PM
MaskRay retitled this revision from [MC] Skip lower-cased integer suffices to [MC] Skip lower-case integer suffixes.

Thanks. I changed the subject of this patch. You may call arc amend to amend your local commit message or change it manually.

This revision is now accepted and ready to land.Jun 29 2022, 7:59 PM

If you provide name <email>, I can push this for you if you don't have push permission.

I do not have push permissions, so please push it on my behalf as Keegan Saunders <keegan@undefinedbehaviour.org>. Thank you.

This revision was landed with ongoing or failed builds.Jun 29 2022, 8:55 PM
This revision was automatically updated to reflect the committed changes.