@@ -11,13 +11,13 @@ SYNOPSIS
11
11
DESCRIPTION
12
12
-----------
13
13
14
- The :program: `llvm-mc ` command take input as the assembly code for a
15
- specified architecture and generate object file or executable as a output
16
- for a specified architecture.
14
+ The :program: `llvm-mc ` command take input as the assembly code for a specified
15
+ architecture and generate object file or executable as a output for a specified
16
+ architecture.
17
17
18
- :program: `llvm-mc ` provide powerful set of the tool for working with the machine code such
19
- as encoding of their instruction and their internal representation, disassemble
20
- string to bytes etc.
18
+ :program: `llvm-mc ` provide powerful set of the tool for working with the
19
+ machine code such as encoding of their instruction and their internal
20
+ representation, disassemble string to bytes etc.
21
21
22
22
The choice of architecture for the output assembly code is automatically
23
23
determined from the input file, unless the :option: `--arch ` option is used to
@@ -26,13 +26,15 @@ override the default.
26
26
OPTIONS
27
27
-------
28
28
29
- If the :option: `-o ` option is omitted, then :program: `llvm-mc ` will send its output
30
- to standard output if the input is from standard input. If the :option: `-o `
31
- option specifies "``- ``", then the output will also be sent to standard output.
29
+ If the :option: `-o ` option is omitted, then :program: `llvm-mc ` will send its
30
+ output to standard output if the input is from standard input. If the
31
+ :option: `-o ` option specifies "``- ``", then the output will also be sent to
32
+ standard output.
32
33
33
34
If no :option: `-o ` option is specified and an input file other than "``- ``" is
34
- specified, then :program: `llvm-mc ` creates the output filename by taking the input
35
- filename, removing any existing ``.s `` extension, and adding a ``.o `` suffix.
35
+ specified, then :program: `llvm-mc ` creates the output filename by taking the
36
+ input filename, removing any existing ``.s `` extension, and adding a ``.o ``
37
+ suffix.
36
38
37
39
Other :program: `llvm-mc ` options are described below.
38
40
@@ -50,27 +52,28 @@ End-user Options
50
52
51
53
.. option :: --arch= <string >
52
54
53
- Target arch to assemble for, see -version for available targets.
55
+ Target arch to assemble for, see -version for available targets.
54
56
55
57
.. option :: --as-lex
56
58
57
- Apply the assemblers "lexer" to break the input into tokens and print each of them out.
58
- This is intended to help develop and test an assembler implementation.
59
+ Apply the assemblers "lexer" to break the input into tokens and print each of
60
+ them out. This is intended to help develop and test an assembler
61
+ implementation.
59
62
60
63
.. option :: --assemble
61
64
62
- Assemble assembly file (default), and print the result to assembly.
63
- This is useful to design and test instruction parsers, and can be a useful tool when combined with other llvm-mc flags.
64
- For example, this option may be useful to transcode assembly from different dialects, e.g. on Intel where you can use
65
- -output-asm-variant=1 to translate from AT&T to Intel assembly syntax.
66
- It can also be combined with --show-encoding to understand how instructions are encoded.
65
+ Assemble assembly file (default), and print the result to assembly. This is
66
+ useful to design and test instruction parsers, and can be a useful tool when
67
+ combined with other llvm-mc flags. For example, this option may be useful to
68
+ transcode assembly from different dialects, e.g. on Intel where you can use
69
+ -output-asm-variant=1 to translate from AT&T to Intel assembly syntax. It can
70
+ also be combined with --show-encoding to understand how instructions are
71
+ encoded.
67
72
68
73
.. option :: --disassemble
69
74
70
75
Parse a series of hex bytes, and print the result out as assembly syntax.
71
76
72
-
73
-
74
77
.. option :: --mdis
75
78
76
79
Marked up disassembly of string of hex bytes.
@@ -81,10 +84,10 @@ End-user Options
81
84
82
85
.. option :: --filetype=[asm ,null ,obj]
83
86
84
- Sets the output filetype. Setting this flag to `asm ` will make the tool
85
- output text assembly. Setting this flag to `obj ` will make the tool output
86
- an object file. Setting it to `null ` causes no output to be created and can be
87
- used for timing purposes. The default value is `asm `.
87
+ Sets the output filetype. Setting this flag to `asm ` will make the tool output
88
+ text assembly. Setting this flag to `obj ` will make the tool output an object
89
+ file. Setting it to `null ` causes no output to be created and can be used for
90
+ timing purposes. The default value is `asm `.
88
91
89
92
.. option :: -g
90
93
@@ -94,64 +97,64 @@ End-user Options
94
97
95
98
Create CFI directives that assume the code might be more than 2 GB.
96
99
97
- .. option :: --main-file-name= <string >
98
-
100
+ .. option :: --main-file-name= <string >
101
+
99
102
Specify the name we should consider the input file.
100
103
101
-
104
+
102
105
.. option :: --masm-hexfloats
103
-
106
+
104
107
Enable MASM-style hex float initializers (3F800000r).
105
108
106
109
107
110
.. option :: -mattr=a1 ,+a2 ,-a3 ,...
108
111
Target specific attributes (-mattr=help for details).
109
112
110
- .. option :: --mcpu= <cpu-name >
113
+ .. option :: --mcpu= <cpu-name >
111
114
112
115
Target a specific cpu type (-mcpu=help for details).
113
116
114
- .. option :: --triple= <string >
117
+ .. option :: --triple= <string >
115
118
116
119
Target triple to assemble for, see -version for available targets.
117
120
118
- .. option :: --split-dwarf-file= <filename >
121
+ .. option :: --split-dwarf-file= <filename >
119
122
120
123
DWO output filename.
121
124
122
- .. option :: --show-inst-operands
125
+ .. option :: --show-inst-operands
123
126
124
127
Show instructions operands as parsed.
125
128
126
129
.. option :: --show-inst
127
130
128
131
Show internal instruction representation.
129
132
130
- .. option :: --show-encoding
133
+ .. option :: --show-encoding
131
134
132
135
Show instruction encodings.
133
136
134
- .. option :: --save-temp-labels
137
+ .. option :: --save-temp-labels
135
138
136
139
Don't discard temporary labels.
137
140
138
- .. option :: --relax-relocations
141
+ .. option :: --relax-relocations
139
142
140
143
Emit R_X86_64_GOTPCRELX instead of R_X86_64_GOTPCREL.
141
144
142
- .. option :: --print-imm-hex
145
+ .. option :: --print-imm-hex
143
146
144
147
Prefer hex format for immediate values.
145
148
146
- .. option :: --preserve-comments
149
+ .. option :: --preserve-comments
147
150
148
151
Preserve Comments in outputted assembly.
149
152
150
153
.. option :: --output-asm-variant= <uint >
151
154
152
155
Syntax variant to use for output printing. For example, on x86 targets
153
- --output-asm-variant=0 prints in AT&T syntax, and --output-asm-variant=1 prints
154
- in Intel/MASM syntax.
156
+ --output-asm-variant=0 prints in AT&T syntax, and --output-asm-variant=1
157
+ prints in Intel/MASM syntax.
155
158
156
159
.. option :: --compress-debug-sections=[none|zlib|zstd]
157
160
0 commit comments