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

Side by Side Diff: src/IceGlobalContext.h

Issue 1651163002: Subzero. Enables moar complex relocation offsets. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fixes Absolute Relocation Type for x86-64. Created 4 years, 10 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
1 //===- subzero/src/IceGlobalContext.h - Global context defs -----*- C++ -*-===// 1 //===- subzero/src/IceGlobalContext.h - Global context defs -----*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 21 matching lines...) Expand all
32 #include <thread> 32 #include <thread>
33 #include <type_traits> 33 #include <type_traits>
34 #include <vector> 34 #include <vector>
35 35
36 namespace Ice { 36 namespace Ice {
37 37
38 class ClFlags; 38 class ClFlags;
39 class ConstantPool; 39 class ConstantPool;
40 class EmitterWorkItem; 40 class EmitterWorkItem;
41 class FuncSigType; 41 class FuncSigType;
42 class RelocOffset;
42 43
43 /// LockedPtr is a way to provide automatically locked access to some object. 44 /// LockedPtr is a way to provide automatically locked access to some object.
44 template <typename T> class LockedPtr { 45 template <typename T> class LockedPtr {
45 LockedPtr() = delete; 46 LockedPtr() = delete;
46 LockedPtr(const LockedPtr &) = delete; 47 LockedPtr(const LockedPtr &) = delete;
47 LockedPtr &operator=(const LockedPtr &) = delete; 48 LockedPtr &operator=(const LockedPtr &) = delete;
48 49
49 public: 50 public:
50 LockedPtr(T *Value, GlobalLockType *Lock) : Value(Value), Lock(Lock) { 51 LockedPtr(T *Value, GlobalLockType *Lock) : Value(Value), Lock(Lock) {
51 Lock->lock(); 52 Lock->lock();
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // the constant pool. 194 // the constant pool.
194 Constant *getConstantInt(Type Ty, int64_t Value); 195 Constant *getConstantInt(Type Ty, int64_t Value);
195 Constant *getConstantInt1(int8_t ConstantInt1); 196 Constant *getConstantInt1(int8_t ConstantInt1);
196 Constant *getConstantInt8(int8_t ConstantInt8); 197 Constant *getConstantInt8(int8_t ConstantInt8);
197 Constant *getConstantInt16(int16_t ConstantInt16); 198 Constant *getConstantInt16(int16_t ConstantInt16);
198 Constant *getConstantInt32(int32_t ConstantInt32); 199 Constant *getConstantInt32(int32_t ConstantInt32);
199 Constant *getConstantInt64(int64_t ConstantInt64); 200 Constant *getConstantInt64(int64_t ConstantInt64);
200 Constant *getConstantFloat(float Value); 201 Constant *getConstantFloat(float Value);
201 Constant *getConstantDouble(double Value); 202 Constant *getConstantDouble(double Value);
202 /// Returns a symbolic constant. 203 /// Returns a symbolic constant.
204 Constant *getConstantSym(std::vector<RelocOffset *> Offset,
Jim Stichnoth 2016/02/02 17:13:44 My radar goes off when I see the lack of const ref
John 2016/02/02 19:36:39 Acknowledged.
205 const IceString &Name, bool SuppressMangling);
203 Constant *getConstantSym(RelocOffsetT Offset, const IceString &Name, 206 Constant *getConstantSym(RelocOffsetT Offset, const IceString &Name,
204 bool SuppressMangling); 207 bool SuppressMangling);
205 Constant *getConstantExternSym(const IceString &Name); 208 Constant *getConstantExternSym(const IceString &Name);
206 /// Returns an undef. 209 /// Returns an undef.
207 Constant *getConstantUndef(Type Ty); 210 Constant *getConstantUndef(Type Ty);
208 /// Returns a zero value. 211 /// Returns a zero value.
209 Constant *getConstantZero(Type Ty); 212 Constant *getConstantZero(Type Ty);
210 /// getConstantPool() returns a copy of the constant pool for constants of a 213 /// getConstantPool() returns a copy of the constant pool for constants of a
211 /// given type. 214 /// given type.
212 ConstantList getConstantPool(Type Ty); 215 ConstantList getConstantPool(Type Ty);
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); } 601 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); }
599 ~OstreamLocker() { Ctx->unlockStr(); } 602 ~OstreamLocker() { Ctx->unlockStr(); }
600 603
601 private: 604 private:
602 GlobalContext *const Ctx; 605 GlobalContext *const Ctx;
603 }; 606 };
604 607
605 } // end of namespace Ice 608 } // end of namespace Ice
606 609
607 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H 610 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H
OLDNEW
« no previous file with comments | « src/IceELFObjectWriter.cpp ('k') | src/IceGlobalContext.cpp » ('j') | src/IceGlobalContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698