This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Allow using ';' as asm statement separator in MSVC mode
ClosedPublic

Authored by mstorsjo on Aug 2 2021, 1:26 AM.

Details

Summary

This does the same as D96259, but for ARM, just like AArch64,
using the same comment char as for ELF and MinGW mode.

(I never heard back about any downstream problems from that
change, so I presume it didn't break anything.)

As the assembly input/output of LLVM is GAS style, trying to
match what MS armasm.exe does isn't needed (because the comment
char used is the least concern when it comes to that; all
directives differ too). If a separate armasm compatible mode
is implemented, it can use its own comment style (just like
llvm-ml implements MS ml.exe compatible assembly parsing).

This fixes building compiler-rt assembly files for ARM in MSVC
mode.

The updated testcase literals-comments.s was only intended to
make sure that '#' isn't interpreted as a comment char.

Diff Detail

Event Timeline

mstorsjo created this revision.Aug 2 2021, 1:26 AM
mstorsjo requested review of this revision.Aug 2 2021, 1:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2021, 1:26 AM

Ping @rnk - we did something similar for aarch64 before.

mstorsjo updated this revision to Diff 367845.Aug 20 2021, 11:37 AM

Improved the testcases a little.

tambre accepted this revision.Aug 20 2021, 12:19 PM

LGTM. Maybe add a changelog entry?

This revision is now accepted and ready to land.Aug 20 2021, 12:19 PM

LGTM. Maybe add a changelog entry?

I guess it could be good, but as this goes to the main branch (I don't think it's worth requesting a backport of this) and the main branch's release notes generally are empty until after the branch, there's a risk of someone wiping them before the next release, so I think I'll leave it until then... I normally fill in the changelogs after a new release branch is created with things I've done anyway.

rnk accepted this revision.Aug 23 2021, 4:00 PM

lgtm