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

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 12:59:07 PDT 2020


thakis added inline comments.


================
Comment at: llvm/lib/MC/MCParser/AsmLexer.cpp:397
+    CurPtr = findLastDigit(CurPtr, DefaultRadix);
+    if (*CurPtr == '.' || *CurPtr == 'e' || *CurPtr == 'E') {
+      if (*CurPtr == '.')
----------------
epastor wrote:
> thakis wrote:
> > Can't hex literals contain 'e' in non-float literals as well? how is that handled?
> ... that was a really good question, thank you! Apparently in MASM, float literals are **always** distinguished by containing a `.` character; it's invalid to write (e.g.) 13E1 unless the default radix is >= 15, and it will then be interpreted as an integer.
> 
> I've corrected the code.
Thanks! Can you add a test that would've failed with the old code but that passes with the new code?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87400/new/

https://reviews.llvm.org/D87400



More information about the llvm-commits mailing list