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

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

Issue 150663009: MIPS: Avoid embedding x86 NaN constant in code when snapshot is created. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 | 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 2012 the V8 project authors. All rights reserved.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 4204 matching lines...) Expand 10 before | Expand all | Expand 10 after
4215 } 4215 }
4216 4216
4217 if (instr->NeedsCanonicalization()) { 4217 if (instr->NeedsCanonicalization()) {
4218 Label is_nan; 4218 Label is_nan;
4219 // Check for NaN. All NaNs must be canonicalized. 4219 // Check for NaN. All NaNs must be canonicalized.
4220 __ BranchF(NULL, &is_nan, eq, value, value); 4220 __ BranchF(NULL, &is_nan, eq, value, value);
4221 __ Branch(&not_nan); 4221 __ Branch(&not_nan);
4222 4222
4223 // Only load canonical NaN if the comparison above set the overflow. 4223 // Only load canonical NaN if the comparison above set the overflow.
4224 __ bind(&is_nan); 4224 __ bind(&is_nan);
4225 __ Move(double_scratch, 4225 __ LoadRoot(at, Heap::kNanValueRootIndex);
4226 FixedDoubleArray::canonical_not_the_hole_nan_as_double()); 4226 __ ldc1(double_scratch, FieldMemOperand(at, HeapNumber::kValueOffset));
4227 __ sdc1(double_scratch, MemOperand(scratch, instr->additional_index() << 4227 __ sdc1(double_scratch, MemOperand(scratch, instr->additional_index() <<
4228 element_size_shift)); 4228 element_size_shift));
4229 __ Branch(&done); 4229 __ Branch(&done);
4230 } 4230 }
4231 4231
4232 __ bind(&not_nan); 4232 __ bind(&not_nan);
4233 __ sdc1(value, MemOperand(scratch, instr->additional_index() << 4233 __ sdc1(value, MemOperand(scratch, instr->additional_index() <<
4234 element_size_shift)); 4234 element_size_shift));
4235 __ bind(&done); 4235 __ bind(&done);
4236 } 4236 }
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after
5730 __ Subu(scratch, result, scratch); 5730 __ Subu(scratch, result, scratch);
5731 __ lw(result, FieldMemOperand(scratch, 5731 __ lw(result, FieldMemOperand(scratch,
5732 FixedArray::kHeaderSize - kPointerSize)); 5732 FixedArray::kHeaderSize - kPointerSize));
5733 __ bind(&done); 5733 __ bind(&done);
5734 } 5734 }
5735 5735
5736 5736
5737 #undef __ 5737 #undef __
5738 5738
5739 } } // namespace v8::internal 5739 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698