| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 #include "src/regexp/x87/regexp-macro-assembler-x87.h" // NOLINT | 107 #include "src/regexp/x87/regexp-macro-assembler-x87.h" // NOLINT |
| 108 #else // Unknown architecture. | 108 #else // Unknown architecture. |
| 109 #error "Unknown architecture." | 109 #error "Unknown architecture." |
| 110 #endif // Target architecture. | 110 #endif // Target architecture. |
| 111 #endif // V8_INTERPRETED_REGEXP | 111 #endif // V8_INTERPRETED_REGEXP |
| 112 | 112 |
| 113 namespace v8 { | 113 namespace v8 { |
| 114 namespace internal { | 114 namespace internal { |
| 115 | 115 |
| 116 // ----------------------------------------------------------------------------- | 116 // ----------------------------------------------------------------------------- |
| 117 // Common register code. | |
| 118 | |
| 119 const char* Register::ToString() { | |
| 120 // This is the mapping of allocation indices to registers. | |
| 121 DCHECK(reg_code >= 0 && reg_code < kNumRegisters); | |
| 122 return RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT) | |
| 123 ->GetGeneralRegisterName(reg_code); | |
| 124 } | |
| 125 | |
| 126 bool Register::IsAllocatable( | |
| 127 RegisterConfiguration::CompilerSelector compiler) const { | |
| 128 return ((1 << reg_code) & | |
| 129 RegisterConfiguration::ArchDefault(compiler) | |
| 130 ->allocatable_general_codes_mask()) != 0; | |
| 131 } | |
| 132 | |
| 133 const char* DoubleRegister::ToString() { | |
| 134 // This is the mapping of allocation indices to registers. | |
| 135 DCHECK(reg_code >= 0 && reg_code < kMaxNumRegisters); | |
| 136 return RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT) | |
| 137 ->GetDoubleRegisterName(reg_code); | |
| 138 } | |
| 139 | |
| 140 bool DoubleRegister::IsAllocatable( | |
| 141 RegisterConfiguration::CompilerSelector compiler) const { | |
| 142 return ((1 << reg_code) & | |
| 143 RegisterConfiguration::ArchDefault(compiler) | |
| 144 ->allocatable_double_codes_mask()) != 0; | |
| 145 } | |
| 146 | |
| 147 // FloatRegister is only a distinct type on ARM. On all other platforms it's | |
| 148 // typedef'ed to DoubleRegister. | |
| 149 #if V8_TARGET_ARCH_ARM | |
| 150 const char* FloatRegister::ToString() { | |
| 151 // This is the mapping of allocation indices to registers. | |
| 152 DCHECK(reg_code >= 0 && reg_code < kMaxNumRegisters); | |
| 153 return RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT) | |
| 154 ->GetFloatRegisterName(reg_code); | |
| 155 } | |
| 156 | |
| 157 bool FloatRegister::IsAllocatable( | |
| 158 RegisterConfiguration::CompilerSelector compiler) const { | |
| 159 // TODO(bbudge) Update this once RegisterConfigutation handles aliasing. | |
| 160 return ((1 << reg_code) & | |
| 161 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT) | |
| 162 ->allocatable_double_codes_mask()) != 0; | |
| 163 } | |
| 164 #endif // V8_TARGET_ARCH_ARM | |
| 165 | |
| 166 // ----------------------------------------------------------------------------- | |
| 167 // Common double constants. | 117 // Common double constants. |
| 168 | 118 |
| 169 struct DoubleConstant BASE_EMBEDDED { | 119 struct DoubleConstant BASE_EMBEDDED { |
| 170 double min_int; | 120 double min_int; |
| 171 double one_half; | 121 double one_half; |
| 172 double minus_one_half; | 122 double minus_one_half; |
| 173 double negative_infinity; | 123 double negative_infinity; |
| 174 double the_hole_nan; | 124 double the_hole_nan; |
| 175 double uint32_bias; | 125 double uint32_bias; |
| 176 }; | 126 }; |
| (...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2071 | 2021 |
| 2072 | 2022 |
| 2073 void Assembler::DataAlign(int m) { | 2023 void Assembler::DataAlign(int m) { |
| 2074 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 2024 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
| 2075 while ((pc_offset() & (m - 1)) != 0) { | 2025 while ((pc_offset() & (m - 1)) != 0) { |
| 2076 db(0); | 2026 db(0); |
| 2077 } | 2027 } |
| 2078 } | 2028 } |
| 2079 } // namespace internal | 2029 } // namespace internal |
| 2080 } // namespace v8 | 2030 } // namespace v8 |
| OLD | NEW |