| OLD | NEW |
| 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 Array and struct types are only allowed in | 215 Array and struct types are only allowed in |
| 216 :ref:`global variable initializers <bitcode_globalvariables>`. | 216 :ref:`global variable initializers <bitcode_globalvariables>`. |
| 217 | 217 |
| 218 .. _bitcode_pointertypes: | 218 .. _bitcode_pointertypes: |
| 219 | 219 |
| 220 Pointer types | 220 Pointer types |
| 221 ------------- | 221 ------------- |
| 222 | 222 |
| 223 Only the following pointer types are allowed: | 223 Only the following pointer types are allowed: |
| 224 | 224 |
| 225 * Pointers to valid PNaCl bitcode scalar types, as specified above. | 225 * Pointers to valid PNaCl bitcode scalar types, as specified above, except for |
| 226 ``i1``. |
| 227 * Pointers to valid PNaCl bitcode vector types, as specified above, except for |
| 228 ``<? x i1>``. |
| 226 * Pointers to functions. | 229 * Pointers to functions. |
| 227 | 230 |
| 228 In addition, the address space for all pointers must be 0. | 231 In addition, the address space for all pointers must be 0. |
| 229 | 232 |
| 230 A pointer is *inherent* when it represents the return value of an ``alloca`` | 233 A pointer is *inherent* when it represents the return value of an ``alloca`` |
| 231 instruction, or is an address of a global value. | 234 instruction, or is an address of a global value. |
| 232 | 235 |
| 233 A pointer is *normalized* if it's either: | 236 A pointer is *normalized* if it's either: |
| 234 | 237 |
| 235 * *inherent* | 238 * *inherent* |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 section). | 339 section). |
| 337 | 340 |
| 338 * ``alloca`` | 341 * ``alloca`` |
| 339 | 342 |
| 340 See :ref:`alloca instructions <bitcode_allocainst>`. | 343 See :ref:`alloca instructions <bitcode_allocainst>`. |
| 341 | 344 |
| 342 * ``load``, ``store`` | 345 * ``load``, ``store`` |
| 343 | 346 |
| 344 The pointer argument of these instructions must be a *normalized* pointer (see | 347 The pointer argument of these instructions must be a *normalized* pointer (see |
| 345 :ref:`pointer types <bitcode_pointertypes>`). The ``volatile`` and ``atomic`` | 348 :ref:`pointer types <bitcode_pointertypes>`). The ``volatile`` and ``atomic`` |
| 346 attributes are not supported. Loads and stores of the type ``i1`` are not | 349 attributes are not supported. Loads and stores of the type ``i1`` and ``<? x |
| 347 supported. | 350 i1>`` are not supported. |
| 348 | 351 |
| 349 These instructions must use ``align 1`` on integer memory accesses, ``align 4`
` | 352 These instructions must follow the following alignment restrictions: |
| 350 for ``float`` accesses and ``align 8`` for ``double`` accesses. | 353 |
| 354 * On integer memory accesses: ``align 1``. |
| 355 * On ``float`` memory accesses: ``align 1`` or ``align 4``. |
| 356 * On ``double`` memory accesses: ``align 1`` or ``align 8``. |
| 357 * On vector memory accesses: alignment at the vector's element width, for |
| 358 example ``<4 x i32>`` must be ``align 4``. |
| 351 | 359 |
| 352 * ``trunc`` | 360 * ``trunc`` |
| 353 * ``zext`` | 361 * ``zext`` |
| 354 * ``sext`` | 362 * ``sext`` |
| 355 * ``fptrunc`` | 363 * ``fptrunc`` |
| 356 * ``fpext`` | 364 * ``fpext`` |
| 357 * ``fptoui`` | 365 * ``fptoui`` |
| 358 * ``fptosi`` | 366 * ``fptosi`` |
| 359 * ``uitofp`` | 367 * ``uitofp`` |
| 360 * ``sitofp`` | 368 * ``sitofp`` |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 | 567 |
| 560 declare i1 @llvm.nacl.atomic.is.lock.free(i32 <byte_size>, i8* <address>) | 568 declare i1 @llvm.nacl.atomic.is.lock.free(i32 <byte_size>, i8* <address>) |
| 561 | 569 |
| 562 The ``llvm.nacl.atomic.is.lock.free`` intrinsic is designed to | 570 The ``llvm.nacl.atomic.is.lock.free`` intrinsic is designed to |
| 563 determine at translation time whether atomic operations of a certain | 571 determine at translation time whether atomic operations of a certain |
| 564 ``byte_size`` (a compile-time constant), at a particular ``address``, | 572 ``byte_size`` (a compile-time constant), at a particular ``address``, |
| 565 are lock-free or not. This reflects the C11 ``atomic_is_lock_free`` | 573 are lock-free or not. This reflects the C11 ``atomic_is_lock_free`` |
| 566 function from header ``<stdatomic.h>`` and the C++11 ``is_lock_free`` | 574 function from header ``<stdatomic.h>`` and the C++11 ``is_lock_free`` |
| 567 member function in header ``<atomic>``. It can be used through the | 575 member function in header ``<atomic>``. It can be used through the |
| 568 ``__nacl_atomic_is_lock_free`` builtin. | 576 ``__nacl_atomic_is_lock_free`` builtin. |
| OLD | NEW |