[PATCH] D145844: [Docs] Added llvm-mc documentation

Chris Lattner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 12 12:34:11 PDT 2023


lattner accepted this revision.
lattner added a comment.
This revision is now accepted and ready to land.

Amazing, thank you for tackling this!



================
Comment at: llvm/docs/CommandGuide/llvm-mc.rst:15
+The :program:`llvm-mc` command take input as the assembly code for a specified 
+architecture and generate object file or executable as a output for a specified. 
+`llvm-mc` provide powerful set of the tool for working with the machine code such 
----------------
`for a specified.` is missing a word at the end of the sentence


================
Comment at: llvm/docs/CommandGuide/llvm-mc.rst:55
+
+ Lex Token from input assembly file.
+
----------------
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.


================
Comment at: llvm/docs/CommandGuide/llvm-mc.rst:59
+
+ Assemble assembly file (default).
+
----------------
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.


================
Comment at: llvm/docs/CommandGuide/llvm-mc.rst:63
+
+ Marked up disassembly of string to hex bytes.   
+
----------------
Parse a series of hex bytes, and print the result out as assembly syntax.


================
Comment at: llvm/docs/CommandGuide/llvm-mc.rst:132
+
+ Syntax variant to use for output printing.
+
----------------
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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145844/new/

https://reviews.llvm.org/D145844



More information about the llvm-commits mailing list