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

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

Issue 149002: X64: Count operations (increment, decrement) (Closed)
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
« no previous file with comments | « no previous file | src/x64/codegen-x64.cc » ('j') | src/x64/codegen-x64.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // and best performance in optimized code. 75 // and best performance in optimized code.
76 // 76 //
77 77
78 struct Register { 78 struct Register {
79 static Register toRegister(int code) { 79 static Register toRegister(int code) {
80 Register r = { code }; 80 Register r = { code };
81 return r; 81 return r;
82 } 82 }
83 bool is_valid() const { return 0 <= code_ && code_ < 16; } 83 bool is_valid() const { return 0 <= code_ && code_ < 16; }
84 bool is(Register reg) const { return code_ == reg.code_; } 84 bool is(Register reg) const { return code_ == reg.code_; }
85 // The byte-register distinction of ai32 has dissapeared.
William Hesse 2009/06/25 10:46:05 ia32
86 bool is_byte_register() const { return false; }
87 int code() const { 85 int code() const {
88 ASSERT(is_valid()); 86 ASSERT(is_valid());
89 return code_; 87 return code_;
90 } 88 }
91 int bit() const { 89 int bit() const {
92 return 1 << code_; 90 return 1 << code_;
93 } 91 }
94 92
95 // Return the high bit of the register code as a 0 or 1. Used often 93 // Return the high bit of the register code as a 0 or 1. Used often
96 // when constructing the REX prefix byte. 94 // when constructing the REX prefix byte.
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 private: 1153 private:
1156 Assembler* assembler_; 1154 Assembler* assembler_;
1157 #ifdef DEBUG 1155 #ifdef DEBUG
1158 int space_before_; 1156 int space_before_;
1159 #endif 1157 #endif
1160 }; 1158 };
1161 1159
1162 } } // namespace v8::internal 1160 } } // namespace v8::internal
1163 1161
1164 #endif // V8_X64_ASSEMBLER_X64_H_ 1162 #endif // V8_X64_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « no previous file | src/x64/codegen-x64.cc » ('j') | src/x64/codegen-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698