Chromium Code Reviews| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 57 #include "src/token.h" | 57 #include "src/token.h" |
| 58 | 58 |
| 59 #if V8_TARGET_ARCH_IA32 | 59 #if V8_TARGET_ARCH_IA32 |
| 60 #include "src/ia32/assembler-ia32-inl.h" // NOLINT | 60 #include "src/ia32/assembler-ia32-inl.h" // NOLINT |
| 61 #elif V8_TARGET_ARCH_X64 | 61 #elif V8_TARGET_ARCH_X64 |
| 62 #include "src/x64/assembler-x64-inl.h" // NOLINT | 62 #include "src/x64/assembler-x64-inl.h" // NOLINT |
| 63 #elif V8_TARGET_ARCH_ARM64 | 63 #elif V8_TARGET_ARCH_ARM64 |
| 64 #include "src/arm64/assembler-arm64-inl.h" // NOLINT | 64 #include "src/arm64/assembler-arm64-inl.h" // NOLINT |
| 65 #elif V8_TARGET_ARCH_ARM | 65 #elif V8_TARGET_ARCH_ARM |
| 66 #include "src/arm/assembler-arm-inl.h" // NOLINT | 66 #include "src/arm/assembler-arm-inl.h" // NOLINT |
| 67 #elif V8_TARGET_ARCH_PPC | |
| 68 #include "src/ppc/assembler-ppc-inl.h" // NOLINT | |
| 67 #elif V8_TARGET_ARCH_MIPS | 69 #elif V8_TARGET_ARCH_MIPS |
| 68 #include "src/mips/assembler-mips-inl.h" // NOLINT | 70 #include "src/mips/assembler-mips-inl.h" // NOLINT |
| 69 #elif V8_TARGET_ARCH_MIPS64 | 71 #elif V8_TARGET_ARCH_MIPS64 |
| 70 #include "src/mips64/assembler-mips64-inl.h" // NOLINT | 72 #include "src/mips64/assembler-mips64-inl.h" // NOLINT |
| 71 #elif V8_TARGET_ARCH_X87 | 73 #elif V8_TARGET_ARCH_X87 |
| 72 #include "src/x87/assembler-x87-inl.h" // NOLINT | 74 #include "src/x87/assembler-x87-inl.h" // NOLINT |
| 73 #else | 75 #else |
| 74 #error "Unknown architecture." | 76 #error "Unknown architecture." |
| 75 #endif | 77 #endif |
| 76 | 78 |
| 77 // Include native regexp-macro-assembler. | 79 // Include native regexp-macro-assembler. |
| 78 #ifndef V8_INTERPRETED_REGEXP | 80 #ifndef V8_INTERPRETED_REGEXP |
| 79 #if V8_TARGET_ARCH_IA32 | 81 #if V8_TARGET_ARCH_IA32 |
| 80 #include "src/ia32/regexp-macro-assembler-ia32.h" // NOLINT | 82 #include "src/ia32/regexp-macro-assembler-ia32.h" // NOLINT |
| 81 #elif V8_TARGET_ARCH_X64 | 83 #elif V8_TARGET_ARCH_X64 |
| 82 #include "src/x64/regexp-macro-assembler-x64.h" // NOLINT | 84 #include "src/x64/regexp-macro-assembler-x64.h" // NOLINT |
| 83 #elif V8_TARGET_ARCH_ARM64 | 85 #elif V8_TARGET_ARCH_ARM64 |
| 84 #include "src/arm64/regexp-macro-assembler-arm64.h" // NOLINT | 86 #include "src/arm64/regexp-macro-assembler-arm64.h" // NOLINT |
| 85 #elif V8_TARGET_ARCH_ARM | 87 #elif V8_TARGET_ARCH_ARM |
| 86 #include "src/arm/regexp-macro-assembler-arm.h" // NOLINT | 88 #include "src/arm/regexp-macro-assembler-arm.h" // NOLINT |
| 89 #elif V8_TARGET_ARCH_PPC | |
| 90 #include "src/ppc/regexp-macro-assembler-ppc.h" // NOLINT | |
| 87 #elif V8_TARGET_ARCH_MIPS | 91 #elif V8_TARGET_ARCH_MIPS |
| 88 #include "src/mips/regexp-macro-assembler-mips.h" // NOLINT | 92 #include "src/mips/regexp-macro-assembler-mips.h" // NOLINT |
| 89 #elif V8_TARGET_ARCH_MIPS64 | 93 #elif V8_TARGET_ARCH_MIPS64 |
| 90 #include "src/mips64/regexp-macro-assembler-mips64.h" // NOLINT | 94 #include "src/mips64/regexp-macro-assembler-mips64.h" // NOLINT |
| 91 #elif V8_TARGET_ARCH_X87 | 95 #elif V8_TARGET_ARCH_X87 |
| 92 #include "src/x87/regexp-macro-assembler-x87.h" // NOLINT | 96 #include "src/x87/regexp-macro-assembler-x87.h" // NOLINT |
| 93 #else // Unknown architecture. | 97 #else // Unknown architecture. |
| 94 #error "Unknown architecture." | 98 #error "Unknown architecture." |
| 95 #endif // Target architecture. | 99 #endif // Target architecture. |
| 96 #endif // V8_INTERPRETED_REGEXP | 100 #endif // V8_INTERPRETED_REGEXP |
| (...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 978 Isolate* isolate = NULL) | 982 Isolate* isolate = NULL) |
| 979 : address_(Redirect(isolate, fun->address(), type)) {} | 983 : address_(Redirect(isolate, fun->address(), type)) {} |
| 980 | 984 |
| 981 | 985 |
| 982 ExternalReference::ExternalReference(Builtins::Name name, Isolate* isolate) | 986 ExternalReference::ExternalReference(Builtins::Name name, Isolate* isolate) |
| 983 : address_(isolate->builtins()->builtin_address(name)) {} | 987 : address_(isolate->builtins()->builtin_address(name)) {} |
| 984 | 988 |
| 985 | 989 |
| 986 ExternalReference::ExternalReference(Runtime::FunctionId id, | 990 ExternalReference::ExternalReference(Runtime::FunctionId id, |
| 987 Isolate* isolate) | 991 Isolate* isolate) |
| 992 #if V8_TARGET_ARCH_PPC64 | |
|
danno
2014/07/29 13:24:07
Again, why the #ifdef? It seems like on most platf
andrew_low
2014/07/30 13:27:04
This is related to running the simulator version o
| |
| 993 : address_(Redirect(isolate, Runtime::FunctionForId(id)->entry, | |
| 994 (Runtime::FunctionForId(id)->result_size == 2) ? | |
| 995 BUILTIN_OBJECTPAIR_CALL : BUILTIN_CALL)) {} | |
| 996 #else | |
| 988 : address_(Redirect(isolate, Runtime::FunctionForId(id)->entry)) {} | 997 : address_(Redirect(isolate, Runtime::FunctionForId(id)->entry)) {} |
| 998 #endif | |
| 989 | 999 |
| 990 | 1000 |
| 991 ExternalReference::ExternalReference(const Runtime::Function* f, | 1001 ExternalReference::ExternalReference(const Runtime::Function* f, |
| 992 Isolate* isolate) | 1002 Isolate* isolate) |
| 1003 #if V8_TARGET_ARCH_PPC64 | |
| 1004 : address_(Redirect(isolate, f->entry, | |
| 1005 ((f->result_size == 2) ? | |
| 1006 BUILTIN_OBJECTPAIR_CALL : BUILTIN_CALL))) {} | |
| 1007 #else | |
| 993 : address_(Redirect(isolate, f->entry)) {} | 1008 : address_(Redirect(isolate, f->entry)) {} |
| 1009 #endif | |
| 994 | 1010 |
| 995 | 1011 |
| 996 ExternalReference ExternalReference::isolate_address(Isolate* isolate) { | 1012 ExternalReference ExternalReference::isolate_address(Isolate* isolate) { |
| 997 return ExternalReference(isolate); | 1013 return ExternalReference(isolate); |
| 998 } | 1014 } |
| 999 | 1015 |
| 1000 | 1016 |
| 1001 ExternalReference::ExternalReference(const IC_Utility& ic_utility, | 1017 ExternalReference::ExternalReference(const IC_Utility& ic_utility, |
| 1002 Isolate* isolate) | 1018 Isolate* isolate) |
| 1003 : address_(Redirect(isolate, ic_utility.address())) {} | 1019 : address_(Redirect(isolate, ic_utility.address())) {} |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1335 Isolate* isolate) { | 1351 Isolate* isolate) { |
| 1336 Address function; | 1352 Address function; |
| 1337 #if V8_TARGET_ARCH_X64 | 1353 #if V8_TARGET_ARCH_X64 |
| 1338 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); | 1354 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); |
| 1339 #elif V8_TARGET_ARCH_IA32 | 1355 #elif V8_TARGET_ARCH_IA32 |
| 1340 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); | 1356 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); |
| 1341 #elif V8_TARGET_ARCH_ARM64 | 1357 #elif V8_TARGET_ARCH_ARM64 |
| 1342 function = FUNCTION_ADDR(RegExpMacroAssemblerARM64::CheckStackGuardState); | 1358 function = FUNCTION_ADDR(RegExpMacroAssemblerARM64::CheckStackGuardState); |
| 1343 #elif V8_TARGET_ARCH_ARM | 1359 #elif V8_TARGET_ARCH_ARM |
| 1344 function = FUNCTION_ADDR(RegExpMacroAssemblerARM::CheckStackGuardState); | 1360 function = FUNCTION_ADDR(RegExpMacroAssemblerARM::CheckStackGuardState); |
| 1361 #elif V8_TARGET_ARCH_PPC | |
| 1362 function = FUNCTION_ADDR(RegExpMacroAssemblerPPC::CheckStackGuardState); | |
| 1345 #elif V8_TARGET_ARCH_MIPS | 1363 #elif V8_TARGET_ARCH_MIPS |
| 1346 function = FUNCTION_ADDR(RegExpMacroAssemblerMIPS::CheckStackGuardState); | 1364 function = FUNCTION_ADDR(RegExpMacroAssemblerMIPS::CheckStackGuardState); |
| 1347 #elif V8_TARGET_ARCH_MIPS64 | 1365 #elif V8_TARGET_ARCH_MIPS64 |
| 1348 function = FUNCTION_ADDR(RegExpMacroAssemblerMIPS::CheckStackGuardState); | 1366 function = FUNCTION_ADDR(RegExpMacroAssemblerMIPS::CheckStackGuardState); |
| 1349 #elif V8_TARGET_ARCH_X87 | 1367 #elif V8_TARGET_ARCH_X87 |
| 1350 function = FUNCTION_ADDR(RegExpMacroAssemblerX87::CheckStackGuardState); | 1368 function = FUNCTION_ADDR(RegExpMacroAssemblerX87::CheckStackGuardState); |
| 1351 #else | 1369 #else |
| 1352 UNREACHABLE(); | 1370 UNREACHABLE(); |
| 1353 #endif | 1371 #endif |
| 1354 return ExternalReference(Redirect(isolate, function)); | 1372 return ExternalReference(Redirect(isolate, function)); |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1646 r2 = r2 - ad; | 1664 r2 = r2 - ad; |
| 1647 } | 1665 } |
| 1648 delta = ad - r2; | 1666 delta = ad - r2; |
| 1649 } while (q1 < delta || (q1 == delta && r1 == 0)); | 1667 } while (q1 < delta || (q1 == delta && r1 == 0)); |
| 1650 int32_t mul = static_cast<int32_t>(q2 + 1); | 1668 int32_t mul = static_cast<int32_t>(q2 + 1); |
| 1651 multiplier_ = (d < 0) ? -mul : mul; | 1669 multiplier_ = (d < 0) ? -mul : mul; |
| 1652 shift_ = p - 32; | 1670 shift_ = p - 32; |
| 1653 } | 1671 } |
| 1654 | 1672 |
| 1655 } } // namespace v8::internal | 1673 } } // namespace v8::internal |
| OLD | NEW |