This is an archive of the discontinued LLVM Phabricator instance.

[Docs] Added llvm-mc documentation
ClosedPublic

Authored by aabhinavg on Mar 11 2023, 5:32 AM.

Diff Detail

Event Timeline

aabhinavg created this revision.Mar 11 2023, 5:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2023, 5:32 AM
aabhinavg requested review of this revision.Mar 11 2023, 5:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2023, 5:32 AM
aabhinavg updated this revision to Diff 504356.Mar 11 2023, 6:14 AM

Fix Sphnix build

lattner accepted this revision.Mar 12 2023, 12:34 PM

Amazing, thank you for tackling this!

llvm/docs/CommandGuide/llvm-mc.rst
16

for a specified. is missing a word at the end of the sentence

56

Suggested:

Apply the assemblers "lexer" to break the input into tokens and print each of them out. This is intended to help develop and test an assembler implementation.

60

Suggested:

Assemble assembly file (default), and print the result to assembly. This is useful to design and test instruction parsers, and can be a useful tool when combined with other llvm-mc flags. For example, this option may be useful to transcode assembly from different dialects, e.g. on Intel where you can use -output-asm-variant=1 to translate from AT&T to Intel assembly syntax. It can also be combined with --show-encoding to understand how instructions are encoded.

64

Parse a series of hex bytes, and print the result out as assembly syntax.

133

add: For example, on x86 targets --output-asm-variant=0 prints in AT&T syntax, and --output-asm-variant=1 prints in Intel/MASM syntax.

This revision is now accepted and ready to land.Mar 12 2023, 12:34 PM
aabhinavg updated this revision to Diff 504502.Mar 12 2023, 8:43 PM

Make the changes as per suggestion

Updated -print-imm-hex usage

lattner accepted this revision.Mar 13 2023, 9:20 AM

Super awesome, thank you again for driving this!

This revision was automatically updated to reflect the committed changes.
aabhinavg marked 5 inline comments as done.