Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: src/mips/stub-cache-mips.cc

Issue 7027023: MIPS: port Prevent deopt on double value assignment to typed arrays (Closed)
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3916 matching lines...) Expand 10 before | Expand all | Expand 10 after
3927 if (array_type == kExternalFloatArray) { 3927 if (array_type == kExternalFloatArray) {
3928 __ cvt_s_d(f0, f0); 3928 __ cvt_s_d(f0, f0);
3929 __ sll(t8, t0, 2); 3929 __ sll(t8, t0, 2);
3930 __ addu(t8, a3, t8); 3930 __ addu(t8, a3, t8);
3931 __ swc1(f0, MemOperand(t8, 0)); 3931 __ swc1(f0, MemOperand(t8, 0));
3932 } else if (array_type == kExternalDoubleArray) { 3932 } else if (array_type == kExternalDoubleArray) {
3933 __ sll(t8, t0, 3); 3933 __ sll(t8, t0, 3);
3934 __ addu(t8, a3, t8); 3934 __ addu(t8, a3, t8);
3935 __ sdc1(f0, MemOperand(t8, 0)); 3935 __ sdc1(f0, MemOperand(t8, 0));
3936 } else { 3936 } else {
3937 Label done; 3937 __ EmitECMATruncate(t3, f0, f2, t2, t1, t5);
3938 3938
3939 // Need to perform float-to-int conversion.
3940 // Test whether exponent equal to 0x7FF (infinity or NaN).
3941
3942 __ mfc1(t3, f1); // Move exponent word of double to t3 (as raw bits).
3943 __ li(t1, Operand(0x7FF00000));
3944 __ And(t3, t3, Operand(t1));
3945 __ Branch(USE_DELAY_SLOT, &done, eq, t3, Operand(t1));
3946 __ mov(t3, zero_reg); // In delay slot.
3947
3948 // Not infinity or NaN simply convert to int.
3949 if (IsElementTypeSigned(array_type)) {
3950 __ trunc_w_d(f0, f0);
3951 __ mfc1(t3, f0);
3952 } else {
3953 __ Trunc_uw_d(f0, t3);
3954 }
3955
3956 // t3: HeapNumber converted to integer
3957 __ bind(&done);
3958 switch (array_type) { 3939 switch (array_type) {
3959 case kExternalByteArray: 3940 case kExternalByteArray:
3960 case kExternalUnsignedByteArray: 3941 case kExternalUnsignedByteArray:
3961 __ addu(t8, a3, t0); 3942 __ addu(t8, a3, t0);
3962 __ sb(t3, MemOperand(t8, 0)); 3943 __ sb(t3, MemOperand(t8, 0));
3963 break; 3944 break;
3964 case kExternalShortArray: 3945 case kExternalShortArray:
3965 case kExternalUnsignedShortArray: 3946 case kExternalUnsignedShortArray:
3966 __ sll(t8, t0, 1); 3947 __ sll(t8, t0, 1);
3967 __ addu(t8, a3, t8); 3948 __ addu(t8, a3, t8);
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
4276 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); 4257 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric();
4277 __ Jump(ic, RelocInfo::CODE_TARGET); 4258 __ Jump(ic, RelocInfo::CODE_TARGET);
4278 } 4259 }
4279 4260
4280 4261
4281 #undef __ 4262 #undef __
4282 4263
4283 } } // namespace v8::internal 4264 } } // namespace v8::internal
4284 4265
4285 #endif // V8_TARGET_ARCH_MIPS 4266 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698