This is an archive of the discontinued LLVM Phabricator instance.

[llvm-objdump] support "-M att" and "-M intel" flags
AbandonedPublic

Authored by thakis on May 3 2021, 8:32 AM.

Details

Summary

Increases compatibility with GNU objdump.

Diff Detail

Event Timeline

thakis created this revision.May 3 2021, 8:32 AM
thakis requested review of this revision.May 3 2021, 8:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 3 2021, 8:32 AM
thakis updated this revision to Diff 342403.May 3 2021, 8:34 AM

tweak comment

thakis updated this revision to Diff 342405.May 3 2021, 8:35 AM

clang-format

thakis added a comment.EditedMay 3 2021, 10:36 AM

Oh, cool. Your patch doesn't get interleaving both kinds of options right though afaict.

Oh, cool. Your patch doesn't get interleaving both kinds of options right though afaict.

I don't think that is necessary. Users shouldn't use --x86-asm-syntax. Actually we probably should remove it afterwards.

Oh, cool. Your patch doesn't get interleaving both kinds of options right though afaict.

I don't think that is necessary. Users shouldn't use --x86-asm-syntax. Actually we probably should remove it afterwards.

Works for me!

But since that's the only way to get this atm, it's mentioned in a bunch of places: https://stackoverflow.com/questions/10362630/how-can-objdump-emit-intel-syntax#comment97536406_10362655

So maybe support both for a release or so?

Oh, cool. Your patch doesn't get interleaving both kinds of options right though afaict.

I don't think that is necessary. Users shouldn't use --x86-asm-syntax. Actually we probably should remove it afterwards.

Works for me!

But since that's the only way to get this atm, it's mentioned in a bunch of places: https://stackoverflow.com/questions/10362630/how-can-objdump-emit-intel-syntax#comment97536406_10362655

So maybe support both for a release or so?

Deleting --x86-asm-syntax before 14.0.0 branches LGTM.

thakis abandoned this revision.May 3 2021, 12:51 PM

Conceptually, it seems a bit nicer to me to not add the options to DisassemblerOptions in the first place instead of adding and then removing them again. But I mostly want the feature and don't care too much :) So abandoning this in favor of your CL.

Consider stealing the code bits in this CL for your CL?