Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: README.rst

Issue 920953002: Subzero: Use -filetype instead of -ias and -elf-writer. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Explicitly set the output file type for unit tests Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pydir/szbuild.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Subzero - Fast code generator for PNaCl bitcode 1 Subzero - Fast code generator for PNaCl bitcode
2 =============================================== 2 ===============================================
3 3
4 Building 4 Building
5 -------- 5 --------
6 6
7 Subzero is set up to be built within the Native Client tree. Follow the 7 Subzero is set up to be built within the Native Client tree. Follow the
8 `Developing PNaCl 8 `Developing PNaCl
9 <https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/developing-pnacl >`_ 9 <https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/developing-pnacl >`_
10 instructions, in particular the section on building PNaCl sources. This will 10 instructions, in particular the section on building PNaCl sources. This will
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 ``-help`` -- Show available arguments and possible values. (Note: this 54 ``-help`` -- Show available arguments and possible values. (Note: this
55 unfortunately also pulls in some LLVM-specific options that are reported but 55 unfortunately also pulls in some LLVM-specific options that are reported but
56 that Subzero doesn't use.) 56 that Subzero doesn't use.)
57 57
58 ``-notranslate`` -- Suppress the ICE translation phase, which is useful if 58 ``-notranslate`` -- Suppress the ICE translation phase, which is useful if
59 ICE is missing some support. 59 ICE is missing some support.
60 60
61 ``-target=<TARGET>`` -- Set the target architecture. The default is x8632. 61 ``-target=<TARGET>`` -- Set the target architecture. The default is x8632.
62 Future targets include x8664, arm32, and arm64. 62 Future targets include x8664, arm32, and arm64.
63 63
64 ``-integrated-as=0|1`` -- Disable/enable the integrated assembler. 64 ``-filetype=obj|asm|iasm`` -- Select the output file type. ``obj`` is a
65 native ELF file, ``asm`` is a textual assembly file, and ``iasm`` is a
66 low-level textual assembly file demonstrating the integrated assembler.
65 67
66 ``-O<LEVEL>`` -- Set the optimization level. Valid levels are ``2``, ``1``, 68 ``-O<LEVEL>`` -- Set the optimization level. Valid levels are ``2``, ``1``,
67 ``0``, ``-1``, and ``m1``. Levels ``-1`` and ``m1`` are synonyms, and 69 ``0``, ``-1``, and ``m1``. Levels ``-1`` and ``m1`` are synonyms, and
68 represent the minimum optimization and worst code quality, but fastest code 70 represent the minimum optimization and worst code quality, but fastest code
69 generation. 71 generation.
70 72
71 ``-verbose=<list>`` -- Set verbosity flags. This argument allows a 73 ``-verbose=<list>`` -- Set verbosity flags. This argument allows a
72 comma-separated list of values. The default is ``none``, and the value 74 comma-separated list of values. The default is ``none``, and the value
73 ``inst,pred`` will roughly match the .ll bitcode file. Of particular use 75 ``inst,pred`` will roughly match the .ll bitcode file. Of particular use
74 are ``all`` and ``none``. 76 are ``all`` and ``none``.
(...skipping 21 matching lines...) Expand all
96 The Subzero-translated symbols are specially mangled to avoid multiple 98 The Subzero-translated symbols are specially mangled to avoid multiple
97 definition errors from the linker. Both translated versions are linked together 99 definition errors from the linker. Both translated versions are linked together
98 with a driver program that calls each version of each unit test with a variety 100 with a driver program that calls each version of each unit test with a variety
99 of interesting inputs and compares the results for equality. The cross tests 101 of interesting inputs and compares the results for equality. The cross tests
100 are currently invoked by running the ``runtests.sh`` script. 102 are currently invoked by running the ``runtests.sh`` script.
101 103
102 A convenient way to run both the lit tests and the cross tests is:: 104 A convenient way to run both the lit tests and the cross tests is::
103 105
104 make -f Makefile.standalone check 106 make -f Makefile.standalone check
105 107
106 Assembling ``llvm2ice`` output 108 Assembling ``llvm2ice`` output as needed
107 ------------------------------ 109 ----------------------------------------
108 110
109 Currently ``llvm2ice`` produces textual assembly code in a structure suitable 111 ``llvm2ice`` can now produce a native ELF binary using ``-filetype=obj``.
110 for input to ``llvm-mc``. An object file can be produced using the command:: 112
113 ``llvm2ice`` can also produce textual assembly code in a structure suitable for
114 input to ``llvm-mc``, using ``-filetype=asm`` or ``-filetype=iasm``. An object
115 file can then be produced using the command::
111 116
112 llvm-mc -arch=x86 -filetype=obj -o=MyObj.o 117 llvm-mc -arch=x86 -filetype=obj -o=MyObj.o
113 118
114 In the future, the integrated assembler will directly produce ELF object files.
115
116 Building a translated binary 119 Building a translated binary
117 ---------------------------- 120 ----------------------------
118 121
119 There is a helper script, ``pydir/szbuild.py``, that translates a finalized pexe 122 There is a helper script, ``pydir/szbuild.py``, that translates a finalized pexe
120 into a fully linked executable. Run it with ``-help`` for extensive 123 into a fully linked executable. Run it with ``-help`` for extensive
121 documentation. 124 documentation.
122 125
123 By default, ``szbuild.py`` builds an executable using only Subzero translation, 126 By default, ``szbuild.py`` builds an executable using only Subzero translation,
124 but it can also be used to produce hybrid Subzero/``llc`` binaries (``llc`` is 127 but it can also be used to produce hybrid Subzero/``llc`` binaries (``llc`` is
125 the name of the LLVM translator) for bisection-based debugging. In bisection 128 the name of the LLVM translator) for bisection-based debugging. In bisection
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 165
163 * Global, linear-scan register allocation. 166 * Global, linear-scan register allocation.
164 167
165 * Advanced phi lowering after target lowering and global register allocation, 168 * Advanced phi lowering after target lowering and global register allocation,
166 via edge splitting, topological sorting of the parallel moves, and final local 169 via edge splitting, topological sorting of the parallel moves, and final local
167 register allocation. 170 register allocation.
168 171
169 * Stack slot coalescing to reduce frame size. 172 * Stack slot coalescing to reduce frame size.
170 173
171 * Branch optimization to reduce the number of branches to the following block. 174 * Branch optimization to reduce the number of branches to the following block.
OLDNEW
« no previous file with comments | « no previous file | pydir/szbuild.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698