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

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

Issue 867453002: MIPS: Use signaling NaN for holes in fixed double arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: port Benedikt's fix for x87 sNaN corruption in simulator. Created 5 years, 11 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/codegen-mips.cc ('k') | 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.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 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after
1737 1737
1738 1738
1739 void LCodeGen::DoConstantS(LConstantS* instr) { 1739 void LCodeGen::DoConstantS(LConstantS* instr) {
1740 __ li(ToRegister(instr->result()), Operand(instr->value())); 1740 __ li(ToRegister(instr->result()), Operand(instr->value()));
1741 } 1741 }
1742 1742
1743 1743
1744 void LCodeGen::DoConstantD(LConstantD* instr) { 1744 void LCodeGen::DoConstantD(LConstantD* instr) {
1745 DCHECK(instr->result()->IsDoubleRegister()); 1745 DCHECK(instr->result()->IsDoubleRegister());
1746 DoubleRegister result = ToDoubleRegister(instr->result()); 1746 DoubleRegister result = ToDoubleRegister(instr->result());
1747 #if V8_HOST_ARCH_IA32
1748 // Need some crappy work-around for x87 sNaN -> qNaN breakage in simulator
1749 // builds.
1750 uint64_t bits = instr->bits();
1751 if ((bits & V8_UINT64_C(0x7FF8000000000000)) ==
1752 V8_UINT64_C(0x7FF0000000000000)) {
1753 uint32_t lo = static_cast<uint32_t>(bits);
1754 uint32_t hi = static_cast<uint32_t>(bits >> 32);
1755 __ li(at, Operand(lo));
1756 __ li(scratch0(), Operand(hi));
1757 __ Move(result, at, scratch0());
1758 return;
1759 }
1760 #endif
1747 double v = instr->value(); 1761 double v = instr->value();
1748 __ Move(result, v); 1762 __ Move(result, v);
1749 } 1763 }
1750 1764
1751 1765
1752 void LCodeGen::DoConstantE(LConstantE* instr) { 1766 void LCodeGen::DoConstantE(LConstantE* instr) {
1753 __ li(ToRegister(instr->result()), Operand(instr->value())); 1767 __ li(ToRegister(instr->result()), Operand(instr->value()));
1754 } 1768 }
1755 1769
1756 1770
(...skipping 4197 matching lines...) Expand 10 before | Expand all | Expand 10 after
5954 __ li(at, scope_info); 5968 __ li(at, scope_info);
5955 __ Push(at, ToRegister(instr->function())); 5969 __ Push(at, ToRegister(instr->function()));
5956 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5970 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5957 RecordSafepoint(Safepoint::kNoLazyDeopt); 5971 RecordSafepoint(Safepoint::kNoLazyDeopt);
5958 } 5972 }
5959 5973
5960 5974
5961 #undef __ 5975 #undef __
5962 5976
5963 } } // namespace v8::internal 5977 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/codegen-mips.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698