llvm.org GIT mirror llvm / a0a0a03
Renaming `as' -> `llvm-as' and `dis' -> `llvm-dis'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8195 91177308-0d34-0410-b5e6-96231b3b80d8 Misha Brukman 16 years ago
1 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
814814 following is a brief introduction to the most important tools.

815815
816816
817
as
The assembler transforms the human readable
817
llvm-as
The assembler transforms the human readable
818818 LLVM assembly to LLVM bytecode.

819819
820
dis
The disassembler transforms the LLVM bytecode
821 to human readable LLVM assembly. Additionally it can convert LLVM
822 bytecode to C, which is enabled with the -c option.

820
llvm-dis
The disassembler transforms the LLVM
821 bytecode to human readable LLVM assembly. Additionally it can convert
822 LLVM bytecode to C, which is enabled with the -c option.

823823
824824
lli
lli is the LLVM interpreter, which
825825 can directly execute LLVM bytecode (although very slowly...). In addition
850850 x.o file (which is an LLVM bytecode file that can be
851851 disassembled or manipulated just like any other bytecode file). The
852852 command line interface to gccas is designed to be as close as
853 possible to the system 'as' utility so that the gcc
853 possible to the system `as' utility so that the gcc
854854 frontend itself did not have to be modified to interface to a "weird"
855855 assembler.

856856
10341034
10351035 % lli hello.bc

10361036
1037
  • Use the dis utility to take a look at the LLVM assembly
  • 1037
  • Use the llvm-dis utility to take a look at the LLVM assembly
  • 10381038 code:

    10391039
    1040 % dis < hello.bc | less

    1040 % llvm-dis < hello.bc | less

    10411041
    10421042
  • Compile the program to native Sparc assembly using the code
  • 10431043 generator (assuming you are currently on a Sparc system):