OLD | NEW |
---|---|
1 ============================ | 1 ============================ |
2 PNaCl C/C++ Language Support | 2 PNaCl C/C++ Language Support |
3 ============================ | 3 ============================ |
4 | 4 |
5 .. contents:: | 5 .. contents:: |
6 :local: | 6 :local: |
7 :backlinks: none | 7 :backlinks: none |
8 :depth: 3 | 8 :depth: 3 |
9 | 9 |
10 Source language support | 10 Source language support |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
176 ====================== | 176 ====================== |
177 | 177 |
178 PNaCl currently supports C++ exception handling through ``setjmp()`` and | 178 PNaCl currently supports C++ exception handling through ``setjmp()`` and |
179 ``longjmp()``, which can be enabled with the ``--pnacl-exceptions=sjlj`` | 179 ``longjmp()``, which can be enabled with the ``--pnacl-exceptions=sjlj`` |
180 linker flag. Exceptions are disabled by default so that faster and | 180 linker flag. Exceptions are disabled by default so that faster and |
181 smaller code is generated, and ``throw`` statements are replaced with | 181 smaller code is generated, and ``throw`` statements are replaced with |
182 calls to ``abort()``. The usual ``-fno-exceptions`` flag is also | 182 calls to ``abort()``. The usual ``-fno-exceptions`` flag is also |
183 supported. PNaCl will support full zero-cost exception handling in the | 183 supported. PNaCl will support full zero-cost exception handling in the |
184 future. | 184 future. |
185 | 185 |
186 .. note:: When using naclports_ or other prebuilt static libraries, you'll want | |
187 to make sure you rebuild these libraries with exception handling | |
Mark Seaborn
2015/02/18 18:00:08
How does a developer do that?
Isn't -fexceptions
JF
2015/02/18 18:19:14
What do you mean? There are instructions on this a
Mark Seaborn
2015/02/18 18:36:03
Sorry, I didn't look at all of the context.
Sayin
JF
2015/02/18 18:43:28
I clarified a few things, PTAL.
| |
188 enabled. For naclports, you'll want to modify the port's ``build.sh``. | |
189 | |
190 .. _naclports: https://code.google.com/p/naclports | |
191 | |
186 NaCl supports full zero-cost C++ exception handling. | 192 NaCl supports full zero-cost C++ exception handling. |
187 | 193 |
188 Inline Assembly | 194 Inline Assembly |
189 =============== | 195 =============== |
190 | 196 |
191 Inline assembly isn't supported by PNaCl because it isn't portable. The | 197 Inline assembly isn't supported by PNaCl because it isn't portable. The |
192 one current exception is the common compiler barrier idiom | 198 one current exception is the common compiler barrier idiom |
193 ``asm("":::"memory")``, which gets transformed to a sequentially | 199 ``asm("":::"memory")``, which gets transformed to a sequentially |
194 consistent memory barrier (equivalent to ``__sync_synchronize()``). In | 200 consistent memory barrier (equivalent to ``__sync_synchronize()``). In |
195 PNaCl this barrier is only guaranteed to order ``volatile`` and atomic | 201 PNaCl this barrier is only guaranteed to order ``volatile`` and atomic |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
469 A similar feature is **thread suspension**: The ability to | 475 A similar feature is **thread suspension**: The ability to |
470 asynchronously suspend and resume a thread and inspect or modify its | 476 asynchronously suspend and resume a thread and inspect or modify its |
471 execution state (such as register state). | 477 execution state (such as register state). |
472 | 478 |
473 Neither PNaCl nor NaCl currently support asynchronous interruption | 479 Neither PNaCl nor NaCl currently support asynchronous interruption |
474 or suspension of threads. | 480 or suspension of threads. |
475 | 481 |
476 If PNaCl were to support either of these, the interaction of | 482 If PNaCl were to support either of these, the interaction of |
477 ``volatile`` and atomics with same-thread signal handling would need | 483 ``volatile`` and atomics with same-thread signal handling would need |
478 to be carefully detailed. | 484 to be carefully detailed. |
OLD | NEW |