This is an archive of the discontinued LLVM Phabricator instance.

[ms] [llvm-ml] Add support for .radix directive, and accept all radix specifiers
ClosedPublic

Authored by epastor on Sep 25 2020, 1:16 PM.

Details

Summary

Add support for .radix directive, and radix specifiers [yY] (binary), [oOqQ] (octal), and [tT] (decimal).

Also, when lexing MASM integers, require radix specifier; MASM requires that all literals without a radix specifier be treated as in the default radix. (e.g., 0100 = 100)

Relanding D87400, now with fewer ms-inline-asm tests broken!

Diff Detail

Event Timeline

epastor created this revision.Sep 25 2020, 1:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 25 2020, 1:16 PM
epastor requested review of this revision.Sep 25 2020, 1:16 PM
epastor added a reviewer: rnk.Sep 28 2020, 2:11 PM
rnk accepted this revision.Sep 28 2020, 4:52 PM

lgtm

llvm/test/tools/llvm-ml/radix_errors.test
1

Maybe add --implicit-check-not=error: to catch other errors between the expected errors.

13

You could use the [[@LINE+1]] filecheck feature to tighten these up, but I think it's fine as is.

This revision is now accepted and ready to land.Sep 28 2020, 4:52 PM
epastor updated this revision to Diff 295080.Sep 29 2020, 12:07 PM

Improved strictness of testing (per rnk's suggestions)

epastor updated this revision to Diff 295096.Sep 29 2020, 1:14 PM

Rebase on HEAD