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 |
11 ============ | 11 ============ |
12 | 12 |
13 This document is a reference manual for the PNaCl bitcode format. It describes | 13 This document is a reference manual for the PNaCl bitcode format. It describes |
14 the bitcode on a *semantic* level; the physical encoding level will be described | 14 the bitcode on a *semantic* level; the physical encoding level will be described |
15 elsewhere. For the purpose of this document, the textual form of LLVM IR is | 15 elsewhere. For the purpose of this document, the textual form of LLVM IR is |
16 used to describe instructions and other bitcode constructs. | 16 used to describe instructions and other bitcode constructs. |
17 | 17 |
18 Since the PNaCl bitcode is based to a large extent on LLVM IR, many sections | 18 Since the PNaCl bitcode is based to a large extent on LLVM IR as of |
19 in this document point to a relevant section of the LLVM language reference | 19 version 3.3, many sections in this document point to a relevant section |
20 manual. Only the changes, restrictions and variations specific to PNaCl are | 20 of the LLVM language reference manual. Only the changes, restrictions |
21 described---full semantic descriptions are not duplicated from the LLVM | 21 and variations specific to PNaCl are described---full semantic |
22 reference manual. | 22 descriptions are not duplicated from the LLVM reference manual. |
23 | 23 |
24 High Level Structure | 24 High Level Structure |
25 ==================== | 25 ==================== |
26 | 26 |
27 A PNaCl portable executable (**pexe** in short) is a single LLVM IR module. | 27 A PNaCl portable executable (**pexe** in short) is a single LLVM IR module. |
28 | 28 |
29 Data Model | 29 Data Model |
30 ---------- | 30 ---------- |
31 | 31 |
32 The data model for PNaCl bitcode is fixed at little-endian ILP32: pointers are | 32 The data model for PNaCl bitcode is fixed at little-endian ILP32: pointers are |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 | 545 |
546 declare i1 @llvm.nacl.atomic.is.lock.free(i32 <byte_size>, i8* <address>) | 546 declare i1 @llvm.nacl.atomic.is.lock.free(i32 <byte_size>, i8* <address>) |
547 | 547 |
548 The ``llvm.nacl.atomic.is.lock.free`` intrinsic is designed to | 548 The ``llvm.nacl.atomic.is.lock.free`` intrinsic is designed to |
549 determine at translation time whether atomic operations of a certain | 549 determine at translation time whether atomic operations of a certain |
550 ``byte_size`` (a compile-time constant), at a particular ``address``, | 550 ``byte_size`` (a compile-time constant), at a particular ``address``, |
551 are lock-free or not. This reflects the C11 ``atomic_is_lock_free`` | 551 are lock-free or not. This reflects the C11 ``atomic_is_lock_free`` |
552 function from header ``<stdatomic.h>`` and the C++11 ``is_lock_free`` | 552 function from header ``<stdatomic.h>`` and the C++11 ``is_lock_free`` |
553 member function in header ``<atomic>``. It can be used through the | 553 member function in header ``<atomic>``. It can be used through the |
554 ``__nacl_atomic_is_lock_free`` builtin. | 554 ``__nacl_atomic_is_lock_free`` builtin. |
OLD | NEW |