This is an archive of the discontinued LLVM Phabricator instance.

[MC] Support skip and count for .incbin directive
ClosedPublic

Authored by phosek on Sep 18 2016, 6:05 PM.

Details

Diff Detail

Repository
rL LLVM

Event Timeline

phosek updated this revision to Diff 71764.Sep 18 2016, 6:05 PM
phosek retitled this revision from to [MC] Support skip and count for .incbin directive.
phosek updated this object.
phosek set the repository for this revision to rL LLVM.
phosek added subscribers: llvm-commits, phosek.
davide added a subscriber: davide.Sep 18 2016, 9:27 PM

Do you mind to add one or two tests for the error condition unexpected token in ?

davide added inline comments.Sep 18 2016, 9:30 PM
lib/MC/MCParser/AsmParser.cpp
4407–4411 ↗(On Diff #71764)

this and the lines at 4413-4417 are identical. Can you factor out in a common helper?

phosek updated this revision to Diff 72003.Sep 20 2016, 6:53 PM
phosek marked an inline comment as done.

I did some more testing against GNU as and found out that it also allows skip to be empty, this behavior is now supported as well. I've also expanded error checking for negative skip and count values.

Cool. LGTM. Do you want me to review also the other two patches you have in queue?

davide accepted this revision.Sep 20 2016, 7:42 PM
davide added a reviewer: davide.
This revision is now accepted and ready to land.Sep 20 2016, 7:42 PM

That would be awesome, they're not really related to this one but I'd like to land them as well.

lib/MC/MCParser/AsmParser.cpp
4407–4411 ↗(On Diff #71764)

This no longer relevant as these blocks are now different.

This revision was automatically updated to reflect the committed changes.