This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Make MTE inline asm compatible with GNU assembler
ClosedPublic

Authored by mcgrathr on Apr 13 2021, 3:06 PM.

Details

Summary

The GNU assembler can't parse .arch_extension ... before a ;.
So instead uniformly use raw string syntax with separate lines
instead of ; separators in the assembly code.

Diff Detail

Event Timeline

mcgrathr requested review of this revision.Apr 13 2021, 3:06 PM
mcgrathr created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2021, 3:06 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
mcgrathr edited the summary of this revision. (Show Details)Apr 13 2021, 3:08 PM
cryptoad added a subscriber: pcc.Apr 13 2021, 3:48 PM

Adding @pcc for review.

pcc accepted this revision.Apr 13 2021, 4:59 PM

LGTM

It seems that even with the LLVM assembler the ; character isn't understood everywhere. For example at one point I noticed that ; is treated as a comment character on Mach-O targets, which caused the following instructions to silently disappear. I think we can reasonably count on newline being understood as a delimiter everywhere.

This revision is now accepted and ready to land.Apr 13 2021, 4:59 PM
This revision was landed with ongoing or failed builds.Apr 13 2021, 6:11 PM
This revision was automatically updated to reflect the committed changes.