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

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: Fix whitespace. 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/NaCl.h - NaCl Intrinsic Function Handling -------*- 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. The order of these enums should
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 {
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