File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ # llvm-mc
2
+
3
+ > LLVM Machine Code Playground. It provides a set of tools for working with LLVM machine code.
4
+ > Part of LLVM.
5
+ > More information: < https://llvm.org/docs/CommandGuide/llvm-mc.html > .
6
+
7
+ - Assemble assembly code file into object file with machine code:
8
+
9
+ ` llvm-mc --filetype=obj -o {{path/to/output.o}} {{path/to/input.s}} `
10
+
11
+ - Disassemble object file with machine code into assembly code file:
12
+
13
+ ` llvm-mc --disassemble -o {{path/to/output.s}} {{path/to/input.o}} `
14
+
15
+ - Compile LLVM bit code file into assembly code:
16
+
17
+ ` llvm-mc -o {{path/to/output.s}} {{path/to/input.bc}} `
18
+
19
+ - Assemble assembly code from standard input stream and show encoding to standard output stream:
20
+
21
+ ` echo "{{addl %eax, %ebx}}" | llvm-mc -show-encoding -show-inst `
22
+
23
+ - Disassemble machine code from standard input stream for specified triple:
24
+
25
+ ` echo "{{0xCD 0x21}}" | llvm-mc --disassemble -triple={{target_name}} `
You can’t perform that action at this time.
0 commit comments