Revision f230a1cf deps/v8/src/ia32/codegen-ia32.cc
deps/v8/src/ia32/codegen-ia32.cc | ||
---|---|---|
117 | 117 |
CpuFeatureScope use_sse2(&masm, SSE2); |
118 | 118 |
XMMRegister input = xmm1; |
119 | 119 |
XMMRegister result = xmm2; |
120 |
__ movdbl(input, Operand(esp, 1 * kPointerSize));
|
|
120 |
__ movsd(input, Operand(esp, 1 * kPointerSize));
|
|
121 | 121 |
__ push(eax); |
122 | 122 |
__ push(ebx); |
123 | 123 |
|
... | ... | |
125 | 125 |
|
126 | 126 |
__ pop(ebx); |
127 | 127 |
__ pop(eax); |
128 |
__ movdbl(Operand(esp, 1 * kPointerSize), result);
|
|
128 |
__ movsd(Operand(esp, 1 * kPointerSize), result);
|
|
129 | 129 |
__ fld_d(Operand(esp, 1 * kPointerSize)); |
130 | 130 |
__ Ret(); |
131 | 131 |
} |
... | ... | |
155 | 155 |
// Move double input into registers. |
156 | 156 |
{ |
157 | 157 |
CpuFeatureScope use_sse2(&masm, SSE2); |
158 |
__ movdbl(xmm0, Operand(esp, 1 * kPointerSize));
|
|
158 |
__ movsd(xmm0, Operand(esp, 1 * kPointerSize));
|
|
159 | 159 |
__ sqrtsd(xmm0, xmm0); |
160 |
__ movdbl(Operand(esp, 1 * kPointerSize), xmm0);
|
|
160 |
__ movsd(Operand(esp, 1 * kPointerSize), xmm0);
|
|
161 | 161 |
// Load result into floating point register as return value. |
162 | 162 |
__ fld_d(Operand(esp, 1 * kPointerSize)); |
163 | 163 |
__ Ret(); |
... | ... | |
462 | 462 |
Label medium_handlers, f9_16, f17_32, f33_48, f49_63; |
463 | 463 |
|
464 | 464 |
__ bind(&f9_16); |
465 |
__ movdbl(xmm0, Operand(src, 0));
|
|
466 |
__ movdbl(xmm1, Operand(src, count, times_1, -8));
|
|
467 |
__ movdbl(Operand(dst, 0), xmm0);
|
|
468 |
__ movdbl(Operand(dst, count, times_1, -8), xmm1);
|
|
465 |
__ movsd(xmm0, Operand(src, 0));
|
|
466 |
__ movsd(xmm1, Operand(src, count, times_1, -8));
|
|
467 |
__ movsd(Operand(dst, 0), xmm0);
|
|
468 |
__ movsd(Operand(dst, count, times_1, -8), xmm1);
|
|
469 | 469 |
MemMoveEmitPopAndReturn(&masm); |
470 | 470 |
|
471 | 471 |
__ bind(&f17_32); |
... | ... | |
666 | 666 |
// ----------------------------------- |
667 | 667 |
if (mode == TRACK_ALLOCATION_SITE) { |
668 | 668 |
ASSERT(allocation_memento_found != NULL); |
669 |
__ TestJSArrayForAllocationMemento(edx, edi); |
|
670 |
__ j(equal, allocation_memento_found); |
|
669 |
__ JumpIfJSArrayHasAllocationMemento(edx, edi, allocation_memento_found); |
|
671 | 670 |
} |
672 | 671 |
|
673 | 672 |
// Set transitioned map. |
... | ... | |
694 | 693 |
Label loop, entry, convert_hole, gc_required, only_change_map; |
695 | 694 |
|
696 | 695 |
if (mode == TRACK_ALLOCATION_SITE) { |
697 |
__ TestJSArrayForAllocationMemento(edx, edi); |
|
698 |
__ j(equal, fail); |
|
696 |
__ JumpIfJSArrayHasAllocationMemento(edx, edi, fail); |
|
699 | 697 |
} |
700 | 698 |
|
701 | 699 |
// Check for empty arrays, which only require a map transition and no changes |
... | ... | |
743 | 741 |
XMMRegister the_hole_nan = xmm1; |
744 | 742 |
if (CpuFeatures::IsSupported(SSE2)) { |
745 | 743 |
CpuFeatureScope use_sse2(masm, SSE2); |
746 |
__ movdbl(the_hole_nan,
|
|
744 |
__ movsd(the_hole_nan,
|
|
747 | 745 |
Operand::StaticVariable(canonical_the_hole_nan_reference)); |
748 | 746 |
} |
749 | 747 |
__ jmp(&entry); |
... | ... | |
768 | 766 |
__ SmiUntag(ebx); |
769 | 767 |
if (CpuFeatures::IsSupported(SSE2)) { |
770 | 768 |
CpuFeatureScope fscope(masm, SSE2); |
771 |
__ cvtsi2sd(xmm0, ebx);
|
|
772 |
__ movdbl(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize),
|
|
769 |
__ Cvtsi2sd(xmm0, ebx);
|
|
770 |
__ movsd(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize),
|
|
773 | 771 |
xmm0); |
774 | 772 |
} else { |
775 | 773 |
__ push(ebx); |
... | ... | |
789 | 787 |
|
790 | 788 |
if (CpuFeatures::IsSupported(SSE2)) { |
791 | 789 |
CpuFeatureScope use_sse2(masm, SSE2); |
792 |
__ movdbl(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize),
|
|
790 |
__ movsd(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize),
|
|
793 | 791 |
the_hole_nan); |
794 | 792 |
} else { |
795 | 793 |
__ fld_d(Operand::StaticVariable(canonical_the_hole_nan_reference)); |
... | ... | |
833 | 831 |
Label loop, entry, convert_hole, gc_required, only_change_map, success; |
834 | 832 |
|
835 | 833 |
if (mode == TRACK_ALLOCATION_SITE) { |
836 |
__ TestJSArrayForAllocationMemento(edx, edi); |
|
837 |
__ j(equal, fail); |
|
834 |
__ JumpIfJSArrayHasAllocationMemento(edx, edi, fail); |
|
838 | 835 |
} |
839 | 836 |
|
840 | 837 |
// Check for empty arrays, which only require a map transition and no changes |
... | ... | |
899 | 896 |
// edx: new heap number |
900 | 897 |
if (CpuFeatures::IsSupported(SSE2)) { |
901 | 898 |
CpuFeatureScope fscope(masm, SSE2); |
902 |
__ movdbl(xmm0,
|
|
899 |
__ movsd(xmm0,
|
|
903 | 900 |
FieldOperand(edi, ebx, times_4, FixedDoubleArray::kHeaderSize)); |
904 |
__ movdbl(FieldOperand(edx, HeapNumber::kValueOffset), xmm0);
|
|
901 |
__ movsd(FieldOperand(edx, HeapNumber::kValueOffset), xmm0);
|
|
905 | 902 |
} else { |
906 | 903 |
__ mov(esi, FieldOperand(edi, ebx, times_4, FixedDoubleArray::kHeaderSize)); |
907 | 904 |
__ mov(FieldOperand(edx, HeapNumber::kValueOffset), esi); |
... | ... | |
1081 | 1078 |
|
1082 | 1079 |
Label done; |
1083 | 1080 |
|
1084 |
__ movdbl(double_scratch, ExpConstant(0));
|
|
1081 |
__ movsd(double_scratch, ExpConstant(0));
|
|
1085 | 1082 |
__ xorpd(result, result); |
1086 | 1083 |
__ ucomisd(double_scratch, input); |
1087 | 1084 |
__ j(above_equal, &done); |
1088 | 1085 |
__ ucomisd(input, ExpConstant(1)); |
1089 |
__ movdbl(result, ExpConstant(2));
|
|
1086 |
__ movsd(result, ExpConstant(2));
|
|
1090 | 1087 |
__ j(above_equal, &done); |
1091 |
__ movdbl(double_scratch, ExpConstant(3));
|
|
1092 |
__ movdbl(result, ExpConstant(4));
|
|
1088 |
__ movsd(double_scratch, ExpConstant(3));
|
|
1089 |
__ movsd(result, ExpConstant(4));
|
|
1093 | 1090 |
__ mulsd(double_scratch, input); |
1094 | 1091 |
__ addsd(double_scratch, result); |
1095 | 1092 |
__ movd(temp2, double_scratch); |
1096 | 1093 |
__ subsd(double_scratch, result); |
1097 |
__ movdbl(result, ExpConstant(6));
|
|
1094 |
__ movsd(result, ExpConstant(6));
|
|
1098 | 1095 |
__ mulsd(double_scratch, ExpConstant(5)); |
1099 | 1096 |
__ subsd(double_scratch, input); |
1100 | 1097 |
__ subsd(result, double_scratch); |
... | ... | |
1111 | 1108 |
__ shl(temp1, 20); |
1112 | 1109 |
__ movd(input, temp1); |
1113 | 1110 |
__ pshufd(input, input, static_cast<uint8_t>(0xe1)); // Order: 11 10 00 01 |
1114 |
__ movdbl(double_scratch, Operand::StaticArray(
|
|
1111 |
__ movsd(double_scratch, Operand::StaticArray(
|
|
1115 | 1112 |
temp2, times_8, ExternalReference::math_exp_log_table())); |
1116 | 1113 |
__ por(input, double_scratch); |
1117 | 1114 |
__ mulsd(result, input); |
... | ... | |
1120 | 1117 |
|
1121 | 1118 |
#undef __ |
1122 | 1119 |
|
1123 |
static const int kNoCodeAgeSequenceLength = 5; |
|
1124 | 1120 |
|
1125 | 1121 |
static byte* GetNoCodeAgeSequence(uint32_t* length) { |
1126 | 1122 |
static bool initialized = false; |
... | ... | |
1153 | 1149 |
void Code::GetCodeAgeAndParity(byte* sequence, Age* age, |
1154 | 1150 |
MarkingParity* parity) { |
1155 | 1151 |
if (IsYoungSequence(sequence)) { |
1156 |
*age = kNoAge; |
|
1152 |
*age = kNoAgeCodeAge;
|
|
1157 | 1153 |
*parity = NO_MARKING_PARITY; |
1158 | 1154 |
} else { |
1159 | 1155 |
sequence++; // Skip the kCallOpcode byte |
... | ... | |
1165 | 1161 |
} |
1166 | 1162 |
|
1167 | 1163 |
|
1168 |
void Code::PatchPlatformCodeAge(byte* sequence, |
|
1164 |
void Code::PatchPlatformCodeAge(Isolate* isolate, |
|
1165 |
byte* sequence, |
|
1169 | 1166 |
Code::Age age, |
1170 | 1167 |
MarkingParity parity) { |
1171 | 1168 |
uint32_t young_length; |
1172 | 1169 |
byte* young_sequence = GetNoCodeAgeSequence(&young_length); |
1173 |
if (age == kNoAge) { |
|
1170 |
if (age == kNoAgeCodeAge) {
|
|
1174 | 1171 |
CopyBytes(sequence, young_sequence, young_length); |
1175 | 1172 |
CPU::FlushICache(sequence, young_length); |
1176 | 1173 |
} else { |
1177 |
Code* stub = GetCodeAgeStub(age, parity); |
|
1174 |
Code* stub = GetCodeAgeStub(isolate, age, parity);
|
|
1178 | 1175 |
CodePatcher patcher(sequence, young_length); |
1179 | 1176 |
patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); |
1180 | 1177 |
} |
Also available in: Unified diff