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

Side by Side Diff: src/x64/assembler-x64.h

Issue 131099: Clarify precedence of operations involving bitwise and(&) in x64/assembler. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 27 matching lines...) Expand all
38 #define V8_X64_ASSEMBLER_X64_H_ 38 #define V8_X64_ASSEMBLER_X64_H_
39 39
40 namespace v8 { 40 namespace v8 {
41 namespace internal { 41 namespace internal {
42 42
43 // Utility functions 43 // Utility functions
44 44
45 // Test whether a 64-bit value is in a specific range. 45 // Test whether a 64-bit value is in a specific range.
46 static inline bool is_uint32(int64_t x) { 46 static inline bool is_uint32(int64_t x) {
47 const int64_t kUInt32Mask = V8_INT64_C(0xffffffff); 47 const int64_t kUInt32Mask = V8_INT64_C(0xffffffff);
48 return x == x & kUInt32Mask; 48 return x == (x & kUInt32Mask);
49 } 49 }
50 50
51 static inline bool is_int32(int64_t x) { 51 static inline bool is_int32(int64_t x) {
52 const int64_t kMinIntValue = V8_INT64_C(-0x80000000); 52 const int64_t kMinIntValue = V8_INT64_C(-0x80000000);
53 return is_uint32(x - kMinIntValue); 53 return is_uint32(x - kMinIntValue);
54 } 54 }
55 55
56 // CPU Registers. 56 // CPU Registers.
57 // 57 //
58 // 1) We would prefer to use an enum, but enum values are assignment- 58 // 1) We would prefer to use an enum, but enum values are assignment-
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 private: 1092 private:
1093 Assembler* assembler_; 1093 Assembler* assembler_;
1094 #ifdef DEBUG 1094 #ifdef DEBUG
1095 int space_before_; 1095 int space_before_;
1096 #endif 1096 #endif
1097 }; 1097 };
1098 1098
1099 } } // namespace v8::internal 1099 } } // namespace v8::internal
1100 1100
1101 #endif // V8_X64_ASSEMBLER_X64_H_ 1101 #endif // V8_X64_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « AUTHORS ('k') | src/x64/assembler-x64.cc » ('j') | src/x64/assembler-x64-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698