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

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

Issue 17777004: Concurrency support for PNaCl ABI (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Update PNaClLangRef to reflect the implementation work I will now go forward with. Created 7 years, 5 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/NaClIntrinsics.h - NaCl Intrinsics --------------*- C++ -*-===//
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.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_IR_NACL_H
16 #define LLVM_IR_NACL_H
17
18 #include "llvm/IR/Intrinsics.h"
19 #include <cstddef>
20
21 namespace llvm {
22
23 namespace NaCl {
24
25 static const struct {
26 Intrinsic::ID ID;
27 unsigned BitSize;
28 } AtomicIntrinsics[] = { { Intrinsic::nacl_atomic_8, 8 },
29 { Intrinsic::nacl_atomic_16, 16 },
30 { Intrinsic::nacl_atomic_32, 32 },
31 { Intrinsic::nacl_atomic_64, 64 } };
32
33 static const size_t NumAtomicIntrinsics =
34 sizeof(AtomicIntrinsics) / sizeof(AtomicIntrinsics[0]);
35
36 // Operations that can be represented by the @llvm.nacl.atomic.<size>
37 // intrinsics.
38 //
39 // Do not reorder these values: their order offers forward compatibility
40 // of bitcode targeted to NaCl.
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 //
58 // Do not reorder these values: their order offers forward compatibility
59 // of bitcode targeted to NaCl.
60 enum MemoryOrder {
61 MemoryOrderInvalid = 0, // Invalid, keep first.
62 MemoryOrderRelaxed,
63 MemoryOrderConsume,
64 MemoryOrderAcquire,
65 MemoryOrderRelease,
66 MemoryOrderAcquireRelease,
67 MemoryOrderSequentiallyConsistent,
68 MemoryOrderNum // Invalid, keep last.
69 };
70
71 } // End NaCl namespace
72
73 } // End llvm namespace
74
75 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698