OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/ia32/codegen-ia32.h" | 5 #include "src/ia32/codegen-ia32.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/heap/heap.h" | 10 #include "src/heap/heap.h" |
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
984 __ mulsd(result, input); | 984 __ mulsd(result, input); |
985 __ bind(&done); | 985 __ bind(&done); |
986 } | 986 } |
987 | 987 |
988 #undef __ | 988 #undef __ |
989 | 989 |
990 | 990 |
991 CodeAgingHelper::CodeAgingHelper(Isolate* isolate) { | 991 CodeAgingHelper::CodeAgingHelper(Isolate* isolate) { |
992 USE(isolate); | 992 USE(isolate); |
993 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); | 993 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); |
994 CodePatcher patcher(young_sequence_.start(), young_sequence_.length()); | 994 CodePatcher patcher(isolate, young_sequence_.start(), |
| 995 young_sequence_.length()); |
995 patcher.masm()->push(ebp); | 996 patcher.masm()->push(ebp); |
996 patcher.masm()->mov(ebp, esp); | 997 patcher.masm()->mov(ebp, esp); |
997 patcher.masm()->push(esi); | 998 patcher.masm()->push(esi); |
998 patcher.masm()->push(edi); | 999 patcher.masm()->push(edi); |
999 } | 1000 } |
1000 | 1001 |
1001 | 1002 |
1002 #ifdef DEBUG | 1003 #ifdef DEBUG |
1003 bool CodeAgingHelper::IsOld(byte* candidate) const { | 1004 bool CodeAgingHelper::IsOld(byte* candidate) const { |
1004 return *candidate == kCallOpcode; | 1005 return *candidate == kCallOpcode; |
(...skipping 26 matching lines...) Expand all Loading... |
1031 void Code::PatchPlatformCodeAge(Isolate* isolate, | 1032 void Code::PatchPlatformCodeAge(Isolate* isolate, |
1032 byte* sequence, | 1033 byte* sequence, |
1033 Code::Age age, | 1034 Code::Age age, |
1034 MarkingParity parity) { | 1035 MarkingParity parity) { |
1035 uint32_t young_length = isolate->code_aging_helper()->young_sequence_length(); | 1036 uint32_t young_length = isolate->code_aging_helper()->young_sequence_length(); |
1036 if (age == kNoAgeCodeAge) { | 1037 if (age == kNoAgeCodeAge) { |
1037 isolate->code_aging_helper()->CopyYoungSequenceTo(sequence); | 1038 isolate->code_aging_helper()->CopyYoungSequenceTo(sequence); |
1038 Assembler::FlushICache(isolate, sequence, young_length); | 1039 Assembler::FlushICache(isolate, sequence, young_length); |
1039 } else { | 1040 } else { |
1040 Code* stub = GetCodeAgeStub(isolate, age, parity); | 1041 Code* stub = GetCodeAgeStub(isolate, age, parity); |
1041 CodePatcher patcher(sequence, young_length); | 1042 CodePatcher patcher(isolate, sequence, young_length); |
1042 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); | 1043 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); |
1043 } | 1044 } |
1044 } | 1045 } |
1045 | 1046 |
1046 | 1047 |
1047 } // namespace internal | 1048 } // namespace internal |
1048 } // namespace v8 | 1049 } // namespace v8 |
1049 | 1050 |
1050 #endif // V8_TARGET_ARCH_IA32 | 1051 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |