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

Side by Side Diff: include/llvm/IR/NaCl.h

Issue 17777004: Concurrency support for PNaCl ABI (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Created 7 years, 6 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
OLDNEW
(Empty)
1 //===-- llvm/IR/NaCl.h - NaCl Intrinsic Function Handling -------*- C++ -*-===//
eliben 2013/06/26 16:20:57 If this is just intrinsics, then perhaps NaclIntri
JF 2013/06/26 22:23:12 Done.
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines a set of enums which allow processing of intrinsic
11 // functions that are specific to NaCl. The order of these enums should
eliben 2013/06/26 16:20:57 Not sure what "the order of these enums" means ?
JF 2013/06/26 22:23:12 Moved to the actual enums below.
12 // not change: they offer forward compatibility of bitcode targeted to
13 // NaCl.
14 //
15 //===----------------------------------------------------------------------===//
16
17 #ifndef LLVM_IR_NACL_H
18 #define LLVM_IR_NACL_H
19
20 #include "llvm/IR/Intrinsics.h"
21
22 namespace llvm {
23
24 namespace NaCl {
25
26 const struct {
27 Intrinsic::ID ID;
28 unsigned BitSize;
29 } AtomicIntrinsics[] = {
30 { Intrinsic::nacl_atomic_8, 8 },
31 { Intrinsic::nacl_atomic_16, 16 },
32 { Intrinsic::nacl_atomic_32, 32 },
33 { Intrinsic::nacl_atomic_64, 64 }
34 };
35
36 enum {
eliben 2013/06/26 16:20:57 Why not a const size_t ?
JF 2013/06/26 22:23:12 Done. My C shows.
37 NumAtomicIntrinsics = sizeof(AtomicIntrinsics) / sizeof(AtomicIntrinsics[0])
38 };
39
40 // Operations that can be represented by the nacl.atomic.<size> intrinsics.
41 enum AtomicOperation {
42 AtomicInvalid = 0, // Invalid, keep first.
43 AtomicLoad,
44 AtomicStore,
45 AtomicAdd,
46 AtomicSub,
47 AtomicOr,
48 AtomicAnd,
49 AtomicXor,
50 AtomicXchg,
51 AtomicCmpXchg,
52 AtomicFence,
53 AtomicNum // Invalid, keep last.
54 };
55
56 // Memory orderings supported by C11/C++11.
57 enum MemoryOrder {
58 MemoryOrderInvalid = 0, // Invalid, keep first.
59 MemoryOrderRelaxed,
60 MemoryOrderConsume,
61 MemoryOrderAcquire,
62 MemoryOrderRelease,
63 MemoryOrderAcquireRelease,
64 MemoryOrderSequentiallyConsistent,
65 MemoryOrderNum // Invalid, keep last.
66 };
67
68 } // End NaCl namespace
69
70 } // End llvm namespace
71
72 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698