Page MenuHomePhabricator

[MCParser] Refactory ParseDirective to add parameter OperandVector &Operands
AbandonedPublic

Authored by xiangzhai on Sep 26 2017, 8:19 PM.

Details

Summary

Hi LLVM developers,

Currently ParseDirective is able to parse .byte foo, but not able to parse .byte lo8(foo), so I override ParseDirective to parse such Identifier Token, and getKindByName for lo8 Modifier, then create MCExpr for this ModifierKind, but I can not able to CreateImm nor insert into Operands.

As suggested in D38029 , May I Refactory ParseDirective to add parameter OperandVector &Operands? please reivew my patch, and give me some suggestion, thanks a lot!

Regards,
Leslie Zhai

Diff Detail

Repository
rL LLVM

Event Timeline

xiangzhai created this revision.Sep 26 2017, 8:19 PM
rnk edited edge metadata.Sep 27 2017, 11:04 AM

I don't see why we need to pass the operands to ParseDirective. It seems like the expression parser should recognize lo8() and build an MCExpr that feeds to the .byte directive.

Dear Deid,

I am not available until October 10th https://mail.kde.org/pipermail/k3b/2017-September/001783.html Happy Chinese National Day!

Regards,
Leslie Zhai

atanasyan resigned from this revision.Nov 16 2017, 1:20 PM
xiangzhai abandoned this revision.Dec 31 2017, 8:22 PM