[PATCH] D91460: [AsmParser] make .ascii support spaces as separators
Jessica Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 17 14:50:08 PST 2020
jrtc27 added inline comments.
================
Comment at: llvm/test/MC/AsmParser/directive_ascii.s:52-56
+# CHECK: TEST8:
+# CHECK: .byte 65
+# CHECK: .byte 66
+# CHECK: .byte 67
+# CHECK: .byte 68
----------------
jcai19 wrote:
> jrtc27 wrote:
> > I don't think I understand why these get printed with `.byte` but others with `.ascii`. I think it'd be important to make these use CHECK-NEXT (and CHECK-LABEL) though to assert that there aren't 0s sneaking in (which this test is poor at, the existing cases are not well-written).
> < I don't think I understand why these get printed with .byte but others with .ascii
>
> It seems llvm-mc prints ascii code for single bytes, as shown in other test cases. Or perhaps your question is about the implementation of llvm-mc?
>
> < I think it'd be important to make these use CHECK-NEXT (and CHECK-LABEL) though to assert that there aren't 0s sneaking in (which this test is poor at, the existing cases are not well-written).
>
> Updated. Thanks.
Ok that makes sense. In an ideal world this would be `.byte 65 ; .ascii "BC" ; .byte 68` then but that's purely cosmetic and not worth wasting time implementing (you'd have to concatenate to Data in the new parse loop and then emit it all at once at the end of the loop).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91460/new/
https://reviews.llvm.org/D91460
More information about the llvm-commits
mailing list