| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   227     CHECK_EQ(expected_size_, assembler_->pc_offset() - start_offset_); |   227     CHECK_EQ(expected_size_, assembler_->pc_offset() - start_offset_); | 
|   228   } |   228   } | 
|   229   assembler_->set_predictable_code_size(old_value_); |   229   assembler_->set_predictable_code_size(old_value_); | 
|   230 } |   230 } | 
|   231  |   231  | 
|   232  |   232  | 
|   233 // ----------------------------------------------------------------------------- |   233 // ----------------------------------------------------------------------------- | 
|   234 // Implementation of CpuFeatureScope |   234 // Implementation of CpuFeatureScope | 
|   235  |   235  | 
|   236 #ifdef DEBUG |   236 #ifdef DEBUG | 
|   237 CpuFeatureScope::CpuFeatureScope(AssemblerBase* assembler, CpuFeature f) |   237 CpuFeatureScope::CpuFeatureScope(AssemblerBase* assembler, CpuFeature f, | 
 |   238                                  CheckPolicy check) | 
|   238     : assembler_(assembler) { |   239     : assembler_(assembler) { | 
|   239   DCHECK(CpuFeatures::IsSupported(f)); |   240   DCHECK_IMPLIES(check == kCheckSupported, CpuFeatures::IsSupported(f)); | 
|   240   old_enabled_ = assembler_->enabled_cpu_features(); |   241   old_enabled_ = assembler_->enabled_cpu_features(); | 
|   241   uint64_t mask = static_cast<uint64_t>(1) << f; |   242   assembler_->EnableCpuFeature(f); | 
|   242   // TODO(svenpanne) This special case below doesn't belong here! |  | 
|   243 #if V8_TARGET_ARCH_ARM |  | 
|   244   // ARMv7 is implied by VFP3. |  | 
|   245   if (f == VFP3) { |  | 
|   246     mask |= static_cast<uint64_t>(1) << ARMv7; |  | 
|   247   } |  | 
|   248 #endif |  | 
|   249   assembler_->set_enabled_cpu_features(old_enabled_ | mask); |  | 
|   250 } |   243 } | 
|   251  |   244  | 
|   252  |  | 
|   253 CpuFeatureScope::~CpuFeatureScope() { |   245 CpuFeatureScope::~CpuFeatureScope() { | 
|   254   assembler_->set_enabled_cpu_features(old_enabled_); |   246   assembler_->set_enabled_cpu_features(old_enabled_); | 
|   255 } |   247 } | 
|   256 #endif |   248 #endif | 
|   257  |   249  | 
|   258  |   250  | 
|   259 bool CpuFeatures::initialized_ = false; |   251 bool CpuFeatures::initialized_ = false; | 
|   260 unsigned CpuFeatures::supported_ = 0; |   252 unsigned CpuFeatures::supported_ = 0; | 
|   261 unsigned CpuFeatures::icache_line_size_ = 0; |   253 unsigned CpuFeatures::icache_line_size_ = 0; | 
|   262 unsigned CpuFeatures::dcache_line_size_ = 0; |   254 unsigned CpuFeatures::dcache_line_size_ = 0; | 
| (...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1958  |  1950  | 
|  1959  |  1951  | 
|  1960 void Assembler::DataAlign(int m) { |  1952 void Assembler::DataAlign(int m) { | 
|  1961   DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |  1953   DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 
|  1962   while ((pc_offset() & (m - 1)) != 0) { |  1954   while ((pc_offset() & (m - 1)) != 0) { | 
|  1963     db(0); |  1955     db(0); | 
|  1964   } |  1956   } | 
|  1965 } |  1957 } | 
|  1966 }  // namespace internal |  1958 }  // namespace internal | 
|  1967 }  // namespace v8 |  1959 }  // namespace v8 | 
| OLD | NEW |