blob: 5cb575cd1fcc623b5013a932344fb89afcbcb627 [file] [log] [blame]
John Criswellecf32e52003-09-11 19:58:03 +00001<html>
2<title>
Chris Lattneree43b692003-09-25 19:50:05 +00003LLVM: llvm-as tool
John Criswellecf32e52003-09-11 19:58:03 +00004</title>
5
Chris Lattner08a04fd2003-10-07 20:12:05 +00006<body bgcolor=white>
John Criswellecf32e52003-09-11 19:58:03 +00007
Chris Lattner26814d02003-10-07 20:17:24 +00008<center><h1>LLVM: <tt>llvm-as</tt> tool</h1></center>
John Criswellecf32e52003-09-11 19:58:03 +00009<HR>
10
Chris Lattner26814d02003-10-07 20:17:24 +000011<h3>NAME</h3>
12<tt>llvm-as</tt>
John Criswellecf32e52003-09-11 19:58:03 +000013
Chris Lattner26814d02003-10-07 20:17:24 +000014<h3>SYNOPSIS</h3>
15<tt>llvm-as [options] [filename]</tt>
John Criswellecf32e52003-09-11 19:58:03 +000016
Chris Lattner26814d02003-10-07 20:17:24 +000017<h3>DESCRIPTION</h3>
John Criswellecf32e52003-09-11 19:58:03 +000018
Chris Lattner26814d02003-10-07 20:17:24 +000019The <tt>llvm-as</tt> command is the LLVM assembler. It reads a file containing
20human readable LLVM assembly language, translates it to LLVM bytecode, and
21writes the result into a file or to standard output.
John Criswell67753922003-09-26 02:59:00 +000022<p>
John Criswellecf32e52003-09-11 19:58:03 +000023
Chris Lattner26814d02003-10-07 20:17:24 +000024If filename is omitted or is -, then <tt>llvm-as</tt> reads its input from
25standard input.
John Criswell67753922003-09-26 02:59:00 +000026<p>
27
Chris Lattner26814d02003-10-07 20:17:24 +000028If an output file is not specified with the <tt>-o</tt> option, then
29<tt>llvm-as</tt> sends its output to a file or standard output by the following
30logic:
John Criswell67753922003-09-26 02:59:00 +000031
32<ul>
33 <li>
34 If the input is standard input, then the output is standard output.
35 <p>
36
37 <li>
38 If the input is a file that ends with .ll, then the output file is of
39 the same name, except that the suffix is changed to .bc.
40 <p>
41
42 <li>
43 If the input is a file that does not end with the .ll suffix, then the
Chris Lattner26814d02003-10-07 20:17:24 +000044 output file has the same name as the input file, except that the .bc
45 suffix is appended.
John Criswell67753922003-09-26 02:59:00 +000046 <p>
47</ul>
John Criswellecf32e52003-09-11 19:58:03 +000048
Chris Lattner26814d02003-10-07 20:17:24 +000049<h3>OPTIONS</h3>
John Criswellecf32e52003-09-11 19:58:03 +000050
51<ul>
52 <li> -f
53 <br>
Chris Lattner26814d02003-10-07 20:17:24 +000054 Force overwrite. Normally, <tt>llvm-as</tt> will refuse to overwrite an
55 output file that already exists. With this option, <tt>llvm-as</tt>
56 will overwrite the output file and replace it with new bytecode.
John Criswellecf32e52003-09-11 19:58:03 +000057 <p>
58
59 <li> -help
60 <br>
61 Print a summary of command line options.
62 <p>
63
64 <li> -o &lt;filename&gt;
65 <br>
Chris Lattner26814d02003-10-07 20:17:24 +000066 Specify the output filename. If filename is -, then <tt>llvm-as</tt>
67 sends its output to standard output.
John Criswellecf32e52003-09-11 19:58:03 +000068 <p>
69
70 <li> -stats
71 <br>
72 Print statistics.
73 <p>
74
75 <li> -time-passes
76 <br>
77 Record the amount of time needed for each pass and print it to standard
78 error.
79 <p>
80</ul>
81
Chris Lattner26814d02003-10-07 20:17:24 +000082<h3>EXIT STATUS</h3>
John Criswellecf32e52003-09-11 19:58:03 +000083
Chris Lattner26814d02003-10-07 20:17:24 +000084If <tt>llvm-as</tt> succeeds, it will exit with 0. Otherwise, if an error
85occurs, it will exit with a non-zero value.
John Criswellecf32e52003-09-11 19:58:03 +000086
Chris Lattner26814d02003-10-07 20:17:24 +000087<h3>SEE ALSO</h3>
88
89<a href="llvm-dis.html"><tt>llvm-dis</tt></a>
90<a href="gccas.html"><tt>gccas</tt></a>
91
John Criswellecf32e52003-09-11 19:58:03 +000092
93<HR>
Chris Lattner08a04fd2003-10-07 20:12:05 +000094Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
John Criswellecf32e52003-09-11 19:58:03 +000095</body>
96</html>
97