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

Side by Side Diff: src/IceAPInt.h

Issue 1216963007: Doxygenize the documentation comments (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase to master Created 5 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
« no previous file with comments | « Doxyfile ('k') | src/IceAssembler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===-- subzero/src/IceAPInt.h - Constant integer conversions --*- C++ -*--===// 1 //===-- subzero/src/IceAPInt.h - Constant integer conversions --*- C++ -*--===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
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 29 matching lines...) Expand all
40 uint32_t getBitWidth() const { return BitWidth; } 40 uint32_t getBitWidth() const { return BitWidth; }
41 41
42 int64_t getSExtValue() const { 42 int64_t getSExtValue() const {
43 return static_cast<int64_t>(Val << (APINT_BITS_PER_WORD - BitWidth)) >> 43 return static_cast<int64_t>(Val << (APINT_BITS_PER_WORD - BitWidth)) >>
44 (APINT_BITS_PER_WORD - BitWidth); 44 (APINT_BITS_PER_WORD - BitWidth);
45 } 45 }
46 46
47 uint64_t getRawData() const { return Val; } 47 uint64_t getRawData() const { return Val; }
48 48
49 private: 49 private:
50 uint32_t BitWidth; // The number of bits in this APInt. 50 uint32_t BitWidth; /// The number of bits in this APInt.
51 uint64_t Val; // The (64-bit) equivalent integer value. 51 uint64_t Val; /// The (64-bit) equivalent integer value.
52 52
53 /// Clear unused high order bits. 53 /// Clear unused high order bits.
54 void clearUnusedBits() { 54 void clearUnusedBits() {
55 // If all bits are used, we want to leave the value alone. 55 // If all bits are used, we want to leave the value alone.
56 if (BitWidth == APINT_BITS_PER_WORD) 56 if (BitWidth == APINT_BITS_PER_WORD)
57 return; 57 return;
58 58
59 // Mask out the high bits. 59 // Mask out the high bits.
60 Val &= ~static_cast<uint64_t>(0) >> (APINT_BITS_PER_WORD - BitWidth); 60 Val &= ~static_cast<uint64_t>(0) >> (APINT_BITS_PER_WORD - BitWidth);
61 } 61 }
62 }; 62 };
63 63
64 } // end of namespace Ice 64 } // end of namespace Ice
65 65
66 #endif // SUBZERO_SRC_ICEAPINT_H 66 #endif // SUBZERO_SRC_ICEAPINT_H
OLDNEW
« no previous file with comments | « Doxyfile ('k') | src/IceAssembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698