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

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

Issue 10071004: MIPS: Skip canonicalization check in LStoreKeyedFastDoubleElement when it is not needed (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased on r11356 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 | « no previous file | src/mips/lithium-mips.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 3528 matching lines...) Expand 10 before | Expand all | Expand 10 after
3539 if (key_is_constant) { 3539 if (key_is_constant) {
3540 __ Addu(scratch, elements, Operand(constant_key * (1 << shift_size) + 3540 __ Addu(scratch, elements, Operand(constant_key * (1 << shift_size) +
3541 FixedDoubleArray::kHeaderSize - kHeapObjectTag)); 3541 FixedDoubleArray::kHeaderSize - kHeapObjectTag));
3542 } else { 3542 } else {
3543 __ sll(scratch, key, shift_size); 3543 __ sll(scratch, key, shift_size);
3544 __ Addu(scratch, elements, Operand(scratch)); 3544 __ Addu(scratch, elements, Operand(scratch));
3545 __ Addu(scratch, scratch, 3545 __ Addu(scratch, scratch,
3546 Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag)); 3546 Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag));
3547 } 3547 }
3548 3548
3549 Label is_nan; 3549 if (instr->NeedsCanonicalization()) {
3550 // Check for NaN. All NaNs must be canonicalized. 3550 Label is_nan;
3551 __ BranchF(NULL, &is_nan, eq, value, value); 3551 // Check for NaN. All NaNs must be canonicalized.
3552 __ Branch(&not_nan); 3552 __ BranchF(NULL, &is_nan, eq, value, value);
3553 __ Branch(&not_nan);
3553 3554
3554 // Only load canonical NaN if the comparison above set the overflow. 3555 // Only load canonical NaN if the comparison above set the overflow.
3555 __ bind(&is_nan); 3556 __ bind(&is_nan);
3556 __ Move(value, FixedDoubleArray::canonical_not_the_hole_nan_as_double()); 3557 __ Move(value, FixedDoubleArray::canonical_not_the_hole_nan_as_double());
3558 }
3557 3559
3558 __ bind(&not_nan); 3560 __ bind(&not_nan);
3559 __ sdc1(value, MemOperand(scratch)); 3561 __ sdc1(value, MemOperand(scratch));
3560 } 3562 }
3561 3563
3562 3564
3563 void LCodeGen::DoStoreKeyedSpecializedArrayElement( 3565 void LCodeGen::DoStoreKeyedSpecializedArrayElement(
3564 LStoreKeyedSpecializedArrayElement* instr) { 3566 LStoreKeyedSpecializedArrayElement* instr) {
3565 3567
3566 Register external_pointer = ToRegister(instr->external_pointer()); 3568 Register external_pointer = ToRegister(instr->external_pointer());
(...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after
5089 __ Subu(scratch, result, scratch); 5091 __ Subu(scratch, result, scratch);
5090 __ lw(result, FieldMemOperand(scratch, 5092 __ lw(result, FieldMemOperand(scratch,
5091 FixedArray::kHeaderSize - kPointerSize)); 5093 FixedArray::kHeaderSize - kPointerSize));
5092 __ bind(&done); 5094 __ bind(&done);
5093 } 5095 }
5094 5096
5095 5097
5096 #undef __ 5098 #undef __
5097 5099
5098 } } // namespace v8::internal 5100 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698