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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 #include "runtime.h" | 52 #include "runtime.h" |
53 #include "serialize.h" | 53 #include "serialize.h" |
54 #include "store-buffer-inl.h" | 54 #include "store-buffer-inl.h" |
55 #include "stub-cache.h" | 55 #include "stub-cache.h" |
56 #include "token.h" | 56 #include "token.h" |
57 | 57 |
58 #if V8_TARGET_ARCH_IA32 | 58 #if V8_TARGET_ARCH_IA32 |
59 #include "ia32/assembler-ia32-inl.h" | 59 #include "ia32/assembler-ia32-inl.h" |
60 #elif V8_TARGET_ARCH_X64 | 60 #elif V8_TARGET_ARCH_X64 |
61 #include "x64/assembler-x64-inl.h" | 61 #include "x64/assembler-x64-inl.h" |
| 62 #elif V8_TARGET_ARCH_A64 |
| 63 #include "a64/assembler-a64-inl.h" |
62 #elif V8_TARGET_ARCH_ARM | 64 #elif V8_TARGET_ARCH_ARM |
63 #include "arm/assembler-arm-inl.h" | 65 #include "arm/assembler-arm-inl.h" |
64 #elif V8_TARGET_ARCH_MIPS | 66 #elif V8_TARGET_ARCH_MIPS |
65 #include "mips/assembler-mips-inl.h" | 67 #include "mips/assembler-mips-inl.h" |
66 #else | 68 #else |
67 #error "Unknown architecture." | 69 #error "Unknown architecture." |
68 #endif | 70 #endif |
69 | 71 |
70 // Include native regexp-macro-assembler. | 72 // Include native regexp-macro-assembler. |
71 #ifndef V8_INTERPRETED_REGEXP | 73 #ifndef V8_INTERPRETED_REGEXP |
72 #if V8_TARGET_ARCH_IA32 | 74 #if V8_TARGET_ARCH_IA32 |
73 #include "ia32/regexp-macro-assembler-ia32.h" | 75 #include "ia32/regexp-macro-assembler-ia32.h" |
74 #elif V8_TARGET_ARCH_X64 | 76 #elif V8_TARGET_ARCH_X64 |
75 #include "x64/regexp-macro-assembler-x64.h" | 77 #include "x64/regexp-macro-assembler-x64.h" |
| 78 #elif V8_TARGET_ARCH_A64 |
| 79 #include "a64/regexp-macro-assembler-a64.h" |
76 #elif V8_TARGET_ARCH_ARM | 80 #elif V8_TARGET_ARCH_ARM |
77 #include "arm/regexp-macro-assembler-arm.h" | 81 #include "arm/regexp-macro-assembler-arm.h" |
78 #elif V8_TARGET_ARCH_MIPS | 82 #elif V8_TARGET_ARCH_MIPS |
79 #include "mips/regexp-macro-assembler-mips.h" | 83 #include "mips/regexp-macro-assembler-mips.h" |
80 #else // Unknown architecture. | 84 #else // Unknown architecture. |
81 #error "Unknown architecture." | 85 #error "Unknown architecture." |
82 #endif // Target architecture. | 86 #endif // Target architecture. |
83 #endif // V8_INTERPRETED_REGEXP | 87 #endif // V8_INTERPRETED_REGEXP |
84 | 88 |
85 namespace v8 { | 89 namespace v8 { |
(...skipping 29 matching lines...) Expand all Loading... |
115 | 119 |
116 AssemblerBase::AssemblerBase(Isolate* isolate, void* buffer, int buffer_size) | 120 AssemblerBase::AssemblerBase(Isolate* isolate, void* buffer, int buffer_size) |
117 : isolate_(isolate), | 121 : isolate_(isolate), |
118 jit_cookie_(0), | 122 jit_cookie_(0), |
119 enabled_cpu_features_(0), | 123 enabled_cpu_features_(0), |
120 emit_debug_code_(FLAG_debug_code), | 124 emit_debug_code_(FLAG_debug_code), |
121 predictable_code_size_(false) { | 125 predictable_code_size_(false) { |
122 if (FLAG_mask_constants_with_cookie && isolate != NULL) { | 126 if (FLAG_mask_constants_with_cookie && isolate != NULL) { |
123 jit_cookie_ = isolate->random_number_generator()->NextInt(); | 127 jit_cookie_ = isolate->random_number_generator()->NextInt(); |
124 } | 128 } |
125 | |
126 if (buffer == NULL) { | 129 if (buffer == NULL) { |
127 // Do our own buffer management. | 130 // Do our own buffer management. |
128 if (buffer_size <= kMinimalBufferSize) { | 131 if (buffer_size <= kMinimalBufferSize) { |
129 buffer_size = kMinimalBufferSize; | 132 buffer_size = kMinimalBufferSize; |
130 if (isolate->assembler_spare_buffer() != NULL) { | 133 if (isolate->assembler_spare_buffer() != NULL) { |
131 buffer = isolate->assembler_spare_buffer(); | 134 buffer = isolate->assembler_spare_buffer(); |
132 isolate->set_assembler_spare_buffer(NULL); | 135 isolate->set_assembler_spare_buffer(NULL); |
133 } | 136 } |
134 } | 137 } |
135 if (buffer == NULL) buffer = NewArray<byte>(buffer_size); | 138 if (buffer == NULL) buffer = NewArray<byte>(buffer_size); |
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1329 | 1332 |
1330 #ifndef V8_INTERPRETED_REGEXP | 1333 #ifndef V8_INTERPRETED_REGEXP |
1331 | 1334 |
1332 ExternalReference ExternalReference::re_check_stack_guard_state( | 1335 ExternalReference ExternalReference::re_check_stack_guard_state( |
1333 Isolate* isolate) { | 1336 Isolate* isolate) { |
1334 Address function; | 1337 Address function; |
1335 #if V8_TARGET_ARCH_X64 | 1338 #if V8_TARGET_ARCH_X64 |
1336 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); | 1339 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); |
1337 #elif V8_TARGET_ARCH_IA32 | 1340 #elif V8_TARGET_ARCH_IA32 |
1338 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); | 1341 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); |
| 1342 #elif V8_TARGET_ARCH_A64 |
| 1343 function = FUNCTION_ADDR(RegExpMacroAssemblerA64::CheckStackGuardState); |
1339 #elif V8_TARGET_ARCH_ARM | 1344 #elif V8_TARGET_ARCH_ARM |
1340 function = FUNCTION_ADDR(RegExpMacroAssemblerARM::CheckStackGuardState); | 1345 function = FUNCTION_ADDR(RegExpMacroAssemblerARM::CheckStackGuardState); |
1341 #elif V8_TARGET_ARCH_MIPS | 1346 #elif V8_TARGET_ARCH_MIPS |
1342 function = FUNCTION_ADDR(RegExpMacroAssemblerMIPS::CheckStackGuardState); | 1347 function = FUNCTION_ADDR(RegExpMacroAssemblerMIPS::CheckStackGuardState); |
1343 #else | 1348 #else |
1344 UNREACHABLE(); | 1349 UNREACHABLE(); |
1345 #endif | 1350 #endif |
1346 return ExternalReference(Redirect(isolate, function)); | 1351 return ExternalReference(Redirect(isolate, function)); |
1347 } | 1352 } |
1348 | 1353 |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1590 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1595 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
1591 state_.written_position = state_.current_position; | 1596 state_.written_position = state_.current_position; |
1592 written = true; | 1597 written = true; |
1593 } | 1598 } |
1594 | 1599 |
1595 // Return whether something was written. | 1600 // Return whether something was written. |
1596 return written; | 1601 return written; |
1597 } | 1602 } |
1598 | 1603 |
1599 } } // namespace v8::internal | 1604 } } // namespace v8::internal |
OLD | NEW |