The X86 asm parser currently has custom parsing logic for .word. Rather than use this custom logic, we can just use addAliasForDirective to enable the reuse of AsmParser::parseDirectiveValue.
Details
Details
- Reviewers
craig.topper RKSimon - Commits
- rGc48908781d54: [X86] Use addAliasForDirective to support the .word directive (reland)
rG42485ec9ca06: [X86] Use addAliasForDirective to support the .word directive
rL336104: [X86] Use addAliasForDirective to support the .word directive (reland)
rL336100: [X86] Use addAliasForDirective to support the .word directive
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I'm not very familiar with this code but it looks OK and the same approach is used in AARCH64, Sparc and Hexagon.
X86AsmParser::ParseDirectiveWord is approximately the same as AsmParser::parseDirectiveValue although AsmParser has extra checks (is asm in valid section, error checks for parseMany call).
@craig.topper Any comments?