OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 5942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5953 __ ret(2 * kPointerSize); | 5953 __ ret(2 * kPointerSize); |
5954 } | 5954 } |
5955 | 5955 |
5956 | 5956 |
5957 struct AheadOfTimeWriteBarrierStubList { | 5957 struct AheadOfTimeWriteBarrierStubList { |
5958 Register object, value, address; | 5958 Register object, value, address; |
5959 RememberedSetAction action; | 5959 RememberedSetAction action; |
5960 }; | 5960 }; |
5961 | 5961 |
5962 | 5962 |
| 5963 #define REG(Name) { kRegister_ ## Name ## _Code } |
| 5964 |
5963 struct AheadOfTimeWriteBarrierStubList kAheadOfTime[] = { | 5965 struct AheadOfTimeWriteBarrierStubList kAheadOfTime[] = { |
5964 // Used in RegExpExecStub. | 5966 // Used in RegExpExecStub. |
5965 { rbx, rax, rdi, EMIT_REMEMBERED_SET }, | 5967 { REG(rbx), REG(rax), REG(rdi), EMIT_REMEMBERED_SET }, |
5966 // Used in CompileArrayPushCall. | 5968 // Used in CompileArrayPushCall. |
5967 { rbx, rcx, rdx, EMIT_REMEMBERED_SET }, | 5969 { REG(rbx), REG(rcx), REG(rdx), EMIT_REMEMBERED_SET }, |
5968 // Used in CompileStoreGlobal. | 5970 // Used in CompileStoreGlobal. |
5969 { rbx, rcx, rdx, OMIT_REMEMBERED_SET }, | 5971 { REG(rbx), REG(rcx), REG(rdx), OMIT_REMEMBERED_SET }, |
5970 // Used in StoreStubCompiler::CompileStoreField and | 5972 // Used in StoreStubCompiler::CompileStoreField and |
5971 // KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField. | 5973 // KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField. |
5972 { rdx, rcx, rbx, EMIT_REMEMBERED_SET }, | 5974 { REG(rdx), REG(rcx), REG(rbx), EMIT_REMEMBERED_SET }, |
5973 // GenerateStoreField calls the stub with two different permutations of | 5975 // GenerateStoreField calls the stub with two different permutations of |
5974 // registers. This is the second. | 5976 // registers. This is the second. |
5975 { rbx, rcx, rdx, EMIT_REMEMBERED_SET }, | 5977 { REG(rbx), REG(rcx), REG(rdx), EMIT_REMEMBERED_SET }, |
5976 // StoreIC::GenerateNormal via GenerateDictionaryStore. | 5978 // StoreIC::GenerateNormal via GenerateDictionaryStore. |
5977 { rbx, r8, r9, EMIT_REMEMBERED_SET }, | 5979 { REG(rbx), REG(r8), REG(r9), EMIT_REMEMBERED_SET }, |
5978 // KeyedStoreIC::GenerateGeneric. | 5980 // KeyedStoreIC::GenerateGeneric. |
5979 { rbx, rdx, rcx, EMIT_REMEMBERED_SET}, | 5981 { REG(rbx), REG(rdx), REG(rcx), EMIT_REMEMBERED_SET}, |
5980 // KeyedStoreStubCompiler::GenerateStoreFastElement. | 5982 // KeyedStoreStubCompiler::GenerateStoreFastElement. |
5981 { rdi, rbx, rcx, EMIT_REMEMBERED_SET}, | 5983 { REG(rdi), REG(rbx), REG(rcx), EMIT_REMEMBERED_SET}, |
5982 { rdx, rdi, rbx, EMIT_REMEMBERED_SET}, | 5984 { REG(rdx), REG(rdi), REG(rbx), EMIT_REMEMBERED_SET}, |
5983 // ElementsTransitionGenerator::GenerateSmiOnlyToObject | 5985 // ElementsTransitionGenerator::GenerateSmiOnlyToObject |
5984 // and ElementsTransitionGenerator::GenerateSmiOnlyToObject | 5986 // and ElementsTransitionGenerator::GenerateSmiOnlyToObject |
5985 // and ElementsTransitionGenerator::GenerateDoubleToObject | 5987 // and ElementsTransitionGenerator::GenerateDoubleToObject |
5986 { rdx, rbx, rdi, EMIT_REMEMBERED_SET}, | 5988 { REG(rdx), REG(rbx), REG(rdi), EMIT_REMEMBERED_SET}, |
5987 { rdx, rbx, rdi, OMIT_REMEMBERED_SET}, | 5989 { REG(rdx), REG(rbx), REG(rdi), OMIT_REMEMBERED_SET}, |
5988 // ElementsTransitionGenerator::GenerateSmiOnlyToDouble | 5990 // ElementsTransitionGenerator::GenerateSmiOnlyToDouble |
5989 // and ElementsTransitionGenerator::GenerateDoubleToObject | 5991 // and ElementsTransitionGenerator::GenerateDoubleToObject |
5990 { rdx, r11, r15, EMIT_REMEMBERED_SET}, | 5992 { REG(rdx), REG(r11), REG(r15), EMIT_REMEMBERED_SET}, |
5991 // ElementsTransitionGenerator::GenerateDoubleToObject | 5993 // ElementsTransitionGenerator::GenerateDoubleToObject |
5992 { r11, rax, r15, EMIT_REMEMBERED_SET}, | 5994 { REG(r11), REG(rax), REG(r15), EMIT_REMEMBERED_SET}, |
5993 // StoreArrayLiteralElementStub::Generate | 5995 // StoreArrayLiteralElementStub::Generate |
5994 { rbx, rax, rcx, EMIT_REMEMBERED_SET}, | 5996 { REG(rbx), REG(rax), REG(rcx), EMIT_REMEMBERED_SET}, |
5995 // Null termination. | 5997 // Null termination. |
5996 { no_reg, no_reg, no_reg, EMIT_REMEMBERED_SET} | 5998 { REG(no_reg), REG(no_reg), REG(no_reg), EMIT_REMEMBERED_SET} |
5997 }; | 5999 }; |
5998 | 6000 |
| 6001 #undef REG |
5999 | 6002 |
6000 bool RecordWriteStub::IsPregenerated() { | 6003 bool RecordWriteStub::IsPregenerated() { |
6001 for (AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; | 6004 for (AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; |
6002 !entry->object.is(no_reg); | 6005 !entry->object.is(no_reg); |
6003 entry++) { | 6006 entry++) { |
6004 if (object_.is(entry->object) && | 6007 if (object_.is(entry->object) && |
6005 value_.is(entry->value) && | 6008 value_.is(entry->value) && |
6006 address_.is(entry->address) && | 6009 address_.is(entry->address) && |
6007 remembered_set_action_ == entry->action && | 6010 remembered_set_action_ == entry->action && |
6008 save_fp_regs_mode_ == kDontSaveFPRegs) { | 6011 save_fp_regs_mode_ == kDontSaveFPRegs) { |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6312 xmm0, | 6315 xmm0, |
6313 &slow_elements); | 6316 &slow_elements); |
6314 __ ret(0); | 6317 __ ret(0); |
6315 } | 6318 } |
6316 | 6319 |
6317 #undef __ | 6320 #undef __ |
6318 | 6321 |
6319 } } // namespace v8::internal | 6322 } } // namespace v8::internal |
6320 | 6323 |
6321 #endif // V8_TARGET_ARCH_X64 | 6324 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |