| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "src/counters.h" | 46 #include "src/counters.h" |
| 47 #include "src/cpu-profiler.h" | 47 #include "src/cpu-profiler.h" |
| 48 #include "src/debug/debug.h" | 48 #include "src/debug/debug.h" |
| 49 #include "src/deoptimizer.h" | 49 #include "src/deoptimizer.h" |
| 50 #include "src/execution.h" | 50 #include "src/execution.h" |
| 51 #include "src/ic/ic.h" | 51 #include "src/ic/ic.h" |
| 52 #include "src/ic/stub-cache.h" | 52 #include "src/ic/stub-cache.h" |
| 53 #include "src/regexp/jsregexp.h" | 53 #include "src/regexp/jsregexp.h" |
| 54 #include "src/regexp/regexp-macro-assembler.h" | 54 #include "src/regexp/regexp-macro-assembler.h" |
| 55 #include "src/regexp/regexp-stack.h" | 55 #include "src/regexp/regexp-stack.h" |
| 56 #include "src/register-configuration.h" | |
| 57 #include "src/runtime/runtime.h" | 56 #include "src/runtime/runtime.h" |
| 58 #include "src/simulator.h" // For flushing instruction cache. | 57 #include "src/simulator.h" // For flushing instruction cache. |
| 59 #include "src/snapshot/serialize.h" | 58 #include "src/snapshot/serialize.h" |
| 60 #include "src/token.h" | 59 #include "src/token.h" |
| 61 | 60 |
| 62 #if V8_TARGET_ARCH_IA32 | 61 #if V8_TARGET_ARCH_IA32 |
| 63 #include "src/ia32/assembler-ia32-inl.h" // NOLINT | 62 #include "src/ia32/assembler-ia32-inl.h" // NOLINT |
| 64 #elif V8_TARGET_ARCH_X64 | 63 #elif V8_TARGET_ARCH_X64 |
| 65 #include "src/x64/assembler-x64-inl.h" // NOLINT | 64 #include "src/x64/assembler-x64-inl.h" // NOLINT |
| 66 #elif V8_TARGET_ARCH_ARM64 | 65 #elif V8_TARGET_ARCH_ARM64 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 #include "src/regexp/x87/regexp-macro-assembler-x87.h" // NOLINT | 98 #include "src/regexp/x87/regexp-macro-assembler-x87.h" // NOLINT |
| 100 #else // Unknown architecture. | 99 #else // Unknown architecture. |
| 101 #error "Unknown architecture." | 100 #error "Unknown architecture." |
| 102 #endif // Target architecture. | 101 #endif // Target architecture. |
| 103 #endif // V8_INTERPRETED_REGEXP | 102 #endif // V8_INTERPRETED_REGEXP |
| 104 | 103 |
| 105 namespace v8 { | 104 namespace v8 { |
| 106 namespace internal { | 105 namespace internal { |
| 107 | 106 |
| 108 // ----------------------------------------------------------------------------- | 107 // ----------------------------------------------------------------------------- |
| 109 // Common register code. | |
| 110 | |
| 111 const char* Register::ToString() { | |
| 112 // This is the mapping of allocation indices to registers. | |
| 113 DCHECK(reg_code >= 0 && reg_code < kNumRegisters); | |
| 114 return RegisterConfiguration::ArchDefault()->GetGeneralRegisterName(reg_code); | |
| 115 } | |
| 116 | |
| 117 | |
| 118 bool Register::IsAllocatable() const { | |
| 119 return ((1 << reg_code) & | |
| 120 RegisterConfiguration::ArchDefault() | |
| 121 ->allocatable_general_codes_mask()) != 0; | |
| 122 } | |
| 123 | |
| 124 | |
| 125 const char* DoubleRegister::ToString() { | |
| 126 // This is the mapping of allocation indices to registers. | |
| 127 DCHECK(reg_code >= 0 && reg_code < kMaxNumRegisters); | |
| 128 return RegisterConfiguration::ArchDefault()->GetDoubleRegisterName(reg_code); | |
| 129 } | |
| 130 | |
| 131 | |
| 132 bool DoubleRegister::IsAllocatable() const { | |
| 133 return ((1 << reg_code) & | |
| 134 RegisterConfiguration::ArchDefault() | |
| 135 ->allocatable_double_codes_mask()) != 0; | |
| 136 } | |
| 137 | |
| 138 | |
| 139 // ----------------------------------------------------------------------------- | |
| 140 // Common double constants. | 108 // Common double constants. |
| 141 | 109 |
| 142 struct DoubleConstant BASE_EMBEDDED { | 110 struct DoubleConstant BASE_EMBEDDED { |
| 143 double min_int; | 111 double min_int; |
| 144 double one_half; | 112 double one_half; |
| 145 double minus_one_half; | 113 double minus_one_half; |
| 146 double negative_infinity; | 114 double negative_infinity; |
| 147 double the_hole_nan; | 115 double the_hole_nan; |
| 148 double uint32_bias; | 116 double uint32_bias; |
| 149 }; | 117 }; |
| (...skipping 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1878 | 1846 |
| 1879 | 1847 |
| 1880 void Assembler::DataAlign(int m) { | 1848 void Assembler::DataAlign(int m) { |
| 1881 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 1849 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
| 1882 while ((pc_offset() & (m - 1)) != 0) { | 1850 while ((pc_offset() & (m - 1)) != 0) { |
| 1883 db(0); | 1851 db(0); |
| 1884 } | 1852 } |
| 1885 } | 1853 } |
| 1886 } // namespace internal | 1854 } // namespace internal |
| 1887 } // namespace v8 | 1855 } // namespace v8 |
| OLD | NEW |