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

Side by Side Diff: native_client_sdk/src/doc/reference/pnacl-bitcode-abi.rst

Issue 265163004: NaCl documentation: update vector 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 Bitcode Reference Manual 2 PNaCl Bitcode Reference Manual
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 Introduction 10 Introduction
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 Scalar types 191 Scalar types
192 ------------ 192 ------------
193 193
194 * The only scalar types allowed are integer, float (32-bit floating point), 194 * The only scalar types allowed are integer, float (32-bit floating point),
195 double (64-bit floating point) and void. 195 double (64-bit floating point) and void.
196 196
197 * The only integer sizes allowed are i1, i8, i16, i32 and i64. 197 * The only integer sizes allowed are i1, i8, i16, i32 and i64.
198 * The only integer sizes allowed for function arguments and function return 198 * The only integer sizes allowed for function arguments and function return
199 values are i32 and i64. 199 values are i32 and i64.
200 200
201 Vector types
202 ------------
203
204 The only vector types allowed are 128-bit vectors integers of elements
205 size i8, i16, i32, and float. Vectors of i1 type are allowed with
206 element counts corresponding to the allowed element counts listed
207 previously (their width is therefore not 128-bits).
Karl 2014/05/05 19:49:40 Isn't this last sentence a contraction of the firs
JF 2014/05/05 23:12:49 Updated to be clearer.
208
201 Array and struct types 209 Array and struct types
202 ---------------------- 210 ----------------------
203 211
204 Array and struct types are only allowed in 212 Array and struct types are only allowed in
205 :ref:`global variable initializers <bitcode_globalvariables>`. 213 :ref:`global variable initializers <bitcode_globalvariables>`.
206 214
207 .. _bitcode_pointertypes: 215 .. _bitcode_pointertypes:
208 216
209 Pointer types 217 Pointer types
210 ------------- 218 -------------
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 370
363 The pointer argument of a ``bitcast`` instruction must be a *inherent* pointer 371 The pointer argument of a ``bitcast`` instruction must be a *inherent* pointer
364 (see :ref:`pointer types <bitcode_pointertypes>`). 372 (see :ref:`pointer types <bitcode_pointertypes>`).
365 373
366 * ``icmp`` 374 * ``icmp``
367 * ``fcmp`` 375 * ``fcmp``
368 * ``phi`` 376 * ``phi``
369 * ``select`` 377 * ``select``
370 * ``call`` 378 * ``call``
371 * ``unreachable`` 379 * ``unreachable``
380 * ``insertelement``
381 * ``extractelement``
372 382
373 .. _bitcode_allocainst: 383 .. _bitcode_allocainst:
374 384
375 ``alloca`` 385 ``alloca``
376 ---------- 386 ----------
377 387
378 The only allowed type for ``alloca`` instructions in PNaCl bitcode is i8. The 388 The only allowed type for ``alloca`` instructions in PNaCl bitcode is i8. The
379 size argument must be an i32. For example: 389 size argument must be an i32. For example:
380 390
381 .. naclcode:: 391 .. naclcode::
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 556
547 declare i1 @llvm.nacl.atomic.is.lock.free(i32 <byte_size>, i8* <address>) 557 declare i1 @llvm.nacl.atomic.is.lock.free(i32 <byte_size>, i8* <address>)
548 558
549 The ``llvm.nacl.atomic.is.lock.free`` intrinsic is designed to 559 The ``llvm.nacl.atomic.is.lock.free`` intrinsic is designed to
550 determine at translation time whether atomic operations of a certain 560 determine at translation time whether atomic operations of a certain
551 ``byte_size`` (a compile-time constant), at a particular ``address``, 561 ``byte_size`` (a compile-time constant), at a particular ``address``,
552 are lock-free or not. This reflects the C11 ``atomic_is_lock_free`` 562 are lock-free or not. This reflects the C11 ``atomic_is_lock_free``
553 function from header ``<stdatomic.h>`` and the C++11 ``is_lock_free`` 563 function from header ``<stdatomic.h>`` and the C++11 ``is_lock_free``
554 member function in header ``<atomic>``. It can be used through the 564 member function in header ``<atomic>``. It can be used through the
555 ``__nacl_atomic_is_lock_free`` builtin. 565 ``__nacl_atomic_is_lock_free`` builtin.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698