OLD | NEW |
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 namespace v8 { | 105 namespace v8 { |
106 namespace internal { | 106 namespace internal { |
107 | 107 |
108 // ----------------------------------------------------------------------------- | 108 // ----------------------------------------------------------------------------- |
109 // Common register code. | 109 // Common register code. |
110 | 110 |
111 const char* Register::ToString() { | 111 const char* Register::ToString() { |
112 // This is the mapping of allocation indices to registers. | 112 // This is the mapping of allocation indices to registers. |
113 DCHECK(reg_code >= 0 && reg_code < kNumRegisters); | 113 DCHECK(reg_code >= 0 && reg_code < kNumRegisters); |
114 return RegisterConfiguration::ArchDefault()->GetGeneralRegisterName(reg_code); | 114 return RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT) |
| 115 ->GetGeneralRegisterName(reg_code); |
115 } | 116 } |
116 | 117 |
117 | 118 |
118 bool Register::IsAllocatable() const { | 119 bool Register::IsAllocatable() const { |
119 return ((1 << reg_code) & | 120 return ((1 << reg_code) & |
120 RegisterConfiguration::ArchDefault() | 121 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT) |
121 ->allocatable_general_codes_mask()) != 0; | 122 ->allocatable_general_codes_mask()) != 0; |
122 } | 123 } |
123 | 124 |
124 | 125 |
125 const char* DoubleRegister::ToString() { | 126 const char* DoubleRegister::ToString() { |
126 // This is the mapping of allocation indices to registers. | 127 // This is the mapping of allocation indices to registers. |
127 DCHECK(reg_code >= 0 && reg_code < kMaxNumRegisters); | 128 DCHECK(reg_code >= 0 && reg_code < kMaxNumRegisters); |
128 return RegisterConfiguration::ArchDefault()->GetDoubleRegisterName(reg_code); | 129 return RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT) |
| 130 ->GetDoubleRegisterName(reg_code); |
129 } | 131 } |
130 | 132 |
131 | 133 |
132 bool DoubleRegister::IsAllocatable() const { | 134 bool DoubleRegister::IsAllocatable() const { |
133 return ((1 << reg_code) & | 135 return ((1 << reg_code) & |
134 RegisterConfiguration::ArchDefault() | 136 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT) |
135 ->allocatable_double_codes_mask()) != 0; | 137 ->allocatable_double_codes_mask()) != 0; |
136 } | 138 } |
137 | 139 |
138 | 140 |
139 // ----------------------------------------------------------------------------- | 141 // ----------------------------------------------------------------------------- |
140 // Common double constants. | 142 // Common double constants. |
141 | 143 |
142 struct DoubleConstant BASE_EMBEDDED { | 144 struct DoubleConstant BASE_EMBEDDED { |
143 double min_int; | 145 double min_int; |
144 double one_half; | 146 double one_half; |
(...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1890 | 1892 |
1891 | 1893 |
1892 void Assembler::DataAlign(int m) { | 1894 void Assembler::DataAlign(int m) { |
1893 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 1895 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
1894 while ((pc_offset() & (m - 1)) != 0) { | 1896 while ((pc_offset() & (m - 1)) != 0) { |
1895 db(0); | 1897 db(0); |
1896 } | 1898 } |
1897 } | 1899 } |
1898 } // namespace internal | 1900 } // namespace internal |
1899 } // namespace v8 | 1901 } // namespace v8 |
OLD | NEW |