| 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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 __ bind(&loop); | 761 __ bind(&loop); |
| 762 __ mov(ebx, FieldOperand(esi, edi, times_2, FixedArray::kHeaderSize)); | 762 __ mov(ebx, FieldOperand(esi, edi, times_2, FixedArray::kHeaderSize)); |
| 763 // ebx: current element from source | 763 // ebx: current element from source |
| 764 // edi: index of current element | 764 // edi: index of current element |
| 765 __ JumpIfNotSmi(ebx, &convert_hole); | 765 __ JumpIfNotSmi(ebx, &convert_hole); |
| 766 | 766 |
| 767 // Normal smi, convert it to double and store. | 767 // Normal smi, convert it to double and store. |
| 768 __ SmiUntag(ebx); | 768 __ SmiUntag(ebx); |
| 769 if (CpuFeatures::IsSupported(SSE2)) { | 769 if (CpuFeatures::IsSupported(SSE2)) { |
| 770 CpuFeatureScope fscope(masm, SSE2); | 770 CpuFeatureScope fscope(masm, SSE2); |
| 771 __ cvtsi2sd(xmm0, ebx); | 771 __ Cvtsi2sd(xmm0, ebx); |
| 772 __ movdbl(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize), | 772 __ movdbl(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize), |
| 773 xmm0); | 773 xmm0); |
| 774 } else { | 774 } else { |
| 775 __ push(ebx); | 775 __ push(ebx); |
| 776 __ fild_s(Operand(esp, 0)); | 776 __ fild_s(Operand(esp, 0)); |
| 777 __ pop(ebx); | 777 __ pop(ebx); |
| 778 __ fstp_d(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize)); | 778 __ fstp_d(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize)); |
| 779 } | 779 } |
| 780 __ jmp(&entry); | 780 __ jmp(&entry); |
| 781 | 781 |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 } else { | 1158 } else { |
| 1159 sequence++; // Skip the kCallOpcode byte | 1159 sequence++; // Skip the kCallOpcode byte |
| 1160 Address target_address = sequence + *reinterpret_cast<int*>(sequence) + | 1160 Address target_address = sequence + *reinterpret_cast<int*>(sequence) + |
| 1161 Assembler::kCallTargetAddressOffset; | 1161 Assembler::kCallTargetAddressOffset; |
| 1162 Code* stub = GetCodeFromTargetAddress(target_address); | 1162 Code* stub = GetCodeFromTargetAddress(target_address); |
| 1163 GetCodeAgeAndParity(stub, age, parity); | 1163 GetCodeAgeAndParity(stub, age, parity); |
| 1164 } | 1164 } |
| 1165 } | 1165 } |
| 1166 | 1166 |
| 1167 | 1167 |
| 1168 void Code::PatchPlatformCodeAge(byte* sequence, | 1168 void Code::PatchPlatformCodeAge(Isolate* isolate, |
| 1169 byte* sequence, |
| 1169 Code::Age age, | 1170 Code::Age age, |
| 1170 MarkingParity parity) { | 1171 MarkingParity parity) { |
| 1171 uint32_t young_length; | 1172 uint32_t young_length; |
| 1172 byte* young_sequence = GetNoCodeAgeSequence(&young_length); | 1173 byte* young_sequence = GetNoCodeAgeSequence(&young_length); |
| 1173 if (age == kNoAge) { | 1174 if (age == kNoAge) { |
| 1174 CopyBytes(sequence, young_sequence, young_length); | 1175 CopyBytes(sequence, young_sequence, young_length); |
| 1175 CPU::FlushICache(sequence, young_length); | 1176 CPU::FlushICache(sequence, young_length); |
| 1176 } else { | 1177 } else { |
| 1177 Code* stub = GetCodeAgeStub(age, parity); | 1178 Code* stub = GetCodeAgeStub(isolate, age, parity); |
| 1178 CodePatcher patcher(sequence, young_length); | 1179 CodePatcher patcher(sequence, young_length); |
| 1179 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); | 1180 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); |
| 1180 } | 1181 } |
| 1181 } | 1182 } |
| 1182 | 1183 |
| 1183 | 1184 |
| 1184 } } // namespace v8::internal | 1185 } } // namespace v8::internal |
| 1185 | 1186 |
| 1186 #endif // V8_TARGET_ARCH_IA32 | 1187 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |