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

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 10054009: Skip canonicalization check in LStoreKeyedFastDoubleElement when it is not needed: (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3442 matching lines...) Expand 10 before | Expand all | Expand 10 after
3453 kSaveFPRegs, 3453 kSaveFPRegs,
3454 EMIT_REMEMBERED_SET, 3454 EMIT_REMEMBERED_SET,
3455 check_needed); 3455 check_needed);
3456 } 3456 }
3457 } 3457 }
3458 3458
3459 3459
3460 void LCodeGen::DoStoreKeyedFastDoubleElement( 3460 void LCodeGen::DoStoreKeyedFastDoubleElement(
3461 LStoreKeyedFastDoubleElement* instr) { 3461 LStoreKeyedFastDoubleElement* instr) {
3462 XMMRegister value = ToDoubleRegister(instr->value()); 3462 XMMRegister value = ToDoubleRegister(instr->value());
3463 Label have_value;
3464 3463
3465 __ ucomisd(value, value); 3464 if (instr->NeedsCanonicalization()) {
3466 __ j(parity_odd, &have_value); // NaN. 3465 Label have_value;
3467 3466
3468 ExternalReference canonical_nan_reference = 3467 __ ucomisd(value, value);
3469 ExternalReference::address_of_canonical_non_hole_nan(); 3468 __ j(parity_odd, &have_value); // NaN.
3470 __ movdbl(value, Operand::StaticVariable(canonical_nan_reference)); 3469
3471 __ bind(&have_value); 3470 ExternalReference canonical_nan_reference =
3471 ExternalReference::address_of_canonical_non_hole_nan();
3472 __ movdbl(value, Operand::StaticVariable(canonical_nan_reference));
3473 __ bind(&have_value);
3474 }
3472 3475
3473 Operand double_store_operand = BuildFastArrayOperand( 3476 Operand double_store_operand = BuildFastArrayOperand(
3474 instr->elements(), instr->key(), FAST_DOUBLE_ELEMENTS, 3477 instr->elements(), instr->key(), FAST_DOUBLE_ELEMENTS,
3475 FixedDoubleArray::kHeaderSize - kHeapObjectTag); 3478 FixedDoubleArray::kHeaderSize - kHeapObjectTag);
3476 __ movdbl(double_store_operand, value); 3479 __ movdbl(double_store_operand, value);
3477 } 3480 }
3478 3481
3479 3482
3480 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 3483 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
3481 ASSERT(ToRegister(instr->context()).is(esi)); 3484 ASSERT(ToRegister(instr->context()).is(esi));
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after
4995 FixedArray::kHeaderSize - kPointerSize)); 4998 FixedArray::kHeaderSize - kPointerSize));
4996 __ bind(&done); 4999 __ bind(&done);
4997 } 5000 }
4998 5001
4999 5002
5000 #undef __ 5003 #undef __
5001 5004
5002 } } // namespace v8::internal 5005 } } // namespace v8::internal
5003 5006
5004 #endif // V8_TARGET_ARCH_IA32 5007 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698