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

Side by Side Diff: native_client_sdk/src/doc/reference/pnacl-c-cpp-language-support.rst

Issue 282933003: PNaCl documentation: improve some of the SIMD documentation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 =============== 187 ===============
188 188
189 Inline assembly isn't supported by PNaCl because it isn't portable. The 189 Inline assembly isn't supported by PNaCl because it isn't portable. The
190 one current exception is the common compiler barrier idiom 190 one current exception is the common compiler barrier idiom
191 ``asm("":::"memory")``, which gets transformed to a sequentially 191 ``asm("":::"memory")``, which gets transformed to a sequentially
192 consistent memory barrier (equivalent to ``__sync_synchronize()``). In 192 consistent memory barrier (equivalent to ``__sync_synchronize()``). In
193 PNaCl this barrier is only guaranteed to order ``volatile`` and atomic 193 PNaCl this barrier is only guaranteed to order ``volatile`` and atomic
194 memory accesses, though in practice the implementation attempts to also 194 memory accesses, though in practice the implementation attempts to also
195 prevent reordering of memory accesses to objects which may escape. 195 prevent reordering of memory accesses to objects which may escape.
196 196
197 PNaCl supports :ref:`Portable SIMD Vectors <portable_simd_vectors>`,
198 which are traditionally expressed through target-specific intrinsics or
199 inline assembly.
200
197 NaCl supports a fairly wide subset of inline assembly through GCC's 201 NaCl supports a fairly wide subset of inline assembly through GCC's
198 inline assembly syntax, with the restriction that the sandboxing model 202 inline assembly syntax, with the restriction that the sandboxing model
199 for the target architecture has to be respected. 203 for the target architecture has to be respected.
200 204
201 .. _portable_simd_vectors: 205 .. _portable_simd_vectors:
202 206
203 Portable SIMD Vectors 207 Portable SIMD Vectors
204 ===================== 208 =====================
205 209
206 SIMD vectors aren't part of the C/C++ standards and are traditionally 210 SIMD vectors aren't part of the C/C++ standards and are traditionally
207 very hardware-specific. Portable Native Client offers a portable version 211 very hardware-specific. Portable Native Client offers a portable version
208 of SIMD vector datatypes and operations which map well to modern 212 of SIMD vector datatypes and operations which map well to modern
209 architectures and offer performance which matches or approaches 213 architectures and offer performance which matches or approaches
210 hardware-specific uses. 214 hardware-specific uses.
211 215
212 SIMD vector support was added to Portable Native Client for version 36 216 SIMD vector support was added to Portable Native Client for version 37
213 of Chrome, and more features are expected to be added in subsequent 217 of Chrome and more features, including performance enhancements, are
214 releases. 218 expected to be added in subsequent releases.
215 219
216 Hand-Coding Vector Extensions 220 Hand-Coding Vector Extensions
217 ----------------------------- 221 -----------------------------
218 222
219 The initial vector support in Portable Native Client adds `LLVM vectors 223 The initial vector support in Portable Native Client adds `LLVM vectors
220 <http://clang.llvm.org/docs/LanguageExtensions.html#vectors-and-extended-vectors >`_ 224 <http://clang.llvm.org/docs/LanguageExtensions.html#vectors-and-extended-vectors >`_
221 and `GCC vectors 225 and `GCC vectors
222 <http://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html>`_ since these 226 <http://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html>`_ since these
223 are well supported by different hardware platforms and don't require any 227 are well supported by different hardware platforms and don't require any
224 new compiler intrinsics. 228 new compiler intrinsics.
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 A similar feature is **thread suspension**: The ability to 442 A similar feature is **thread suspension**: The ability to
439 asynchronously suspend and resume a thread and inspect or modify its 443 asynchronously suspend and resume a thread and inspect or modify its
440 execution state (such as register state). 444 execution state (such as register state).
441 445
442 Neither PNaCl nor NaCl currently support asynchronous interruption 446 Neither PNaCl nor NaCl currently support asynchronous interruption
443 or suspension of threads. 447 or suspension of threads.
444 448
445 If PNaCl were to support either of these, the interaction of 449 If PNaCl were to support either of these, the interaction of
446 ``volatile`` and atomics with same-thread signal handling would need 450 ``volatile`` and atomics with same-thread signal handling would need
447 to be carefully detailed. 451 to be carefully detailed.
OLDNEW
« no previous file with comments | « native_client_sdk/src/doc/nacl-and-pnacl.rst ('k') | native_client_sdk/src/doc/sdk/release-notes.rst » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698