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

Side by Side Diff: src/IceAssemblerX8632.h

Issue 1197863003: Subzero: Reduce the amount of #ifdef'd code. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Use constexpr inline functions instead of macros Created 5 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
1 //===- subzero/src/assembler_ia32.h - Assembler for x86-32 ------*- C++ -*-===// 1 //===- subzero/src/assembler_ia32.h - Assembler for x86-32 ------*- C++ -*-===//
2 // 2 //
3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
4 // for details. All rights reserved. Use of this source code is governed by a 4 // for details. All rights reserved. Use of this source code is governed by a
5 // BSD-style license that can be found in the LICENSE file. 5 // BSD-style license that can be found in the LICENSE file.
6 // 6 //
7 // Modified by the Subzero authors. 7 // Modified by the Subzero authors.
8 // 8 //
9 //===----------------------------------------------------------------------===// 9 //===----------------------------------------------------------------------===//
10 // 10 //
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 private: 245 private:
246 Address() = default; // Needed by Address::Absolute. 246 Address() = default; // Needed by Address::Absolute.
247 }; 247 };
248 248
249 class Label { 249 class Label {
250 Label(const Label &) = delete; 250 Label(const Label &) = delete;
251 Label &operator=(const Label &) = delete; 251 Label &operator=(const Label &) = delete;
252 252
253 public: 253 public:
254 Label() { 254 Label() {
255 #ifndef NDEBUG 255 if (buildAllowsAsserts()) {
256 for (int i = 0; i < kMaxUnresolvedBranches; i++) { 256 for (int i = 0; i < kMaxUnresolvedBranches; i++) {
John 2015/06/23 22:28:30 optional: s/i/I/
Jim Stichnoth 2015/06/24 21:27:27 Even LLVM violates its own written rules in cases
257 unresolved_near_positions_[i] = -1; 257 unresolved_near_positions_[i] = -1;
258 }
258 } 259 }
259 #endif // !NDEBUG
260 } 260 }
261 261
262 ~Label() = default; 262 ~Label() = default;
263 263
264 void FinalCheck() const { 264 void FinalCheck() const {
265 // Assert if label is being destroyed with unresolved branches pending. 265 // Assert if label is being destroyed with unresolved branches pending.
266 assert(!IsLinked()); 266 assert(!IsLinked());
267 assert(!HasNear()); 267 assert(!HasNear());
268 } 268 }
269 269
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 inline void AssemblerX8632::emitFixup(AssemblerFixup *fixup) { 915 inline void AssemblerX8632::emitFixup(AssemblerFixup *fixup) {
916 Buffer.emitFixup(fixup); 916 Buffer.emitFixup(fixup);
917 } 917 }
918 918
919 inline void AssemblerX8632::emitOperandSizeOverride() { emitUint8(0x66); } 919 inline void AssemblerX8632::emitOperandSizeOverride() { emitUint8(0x66); }
920 920
921 } // end of namespace X8632 921 } // end of namespace X8632
922 } // end of namespace Ice 922 } // end of namespace Ice
923 923
924 #endif // SUBZERO_SRC_ICEASSEMBLERX8632_H 924 #endif // SUBZERO_SRC_ICEASSEMBLERX8632_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698