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

Side by Side Diff: src/ia32/deoptimizer-ia32.cc

Issue 11962015: Check that FPU TOP register is zero and clear all exceptions instead of using fninit, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | 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. 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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 if (CpuFeatures::IsSupported(SSE2)) { 1141 if (CpuFeatures::IsSupported(SSE2)) {
1142 CpuFeatures::Scope scope(SSE2); 1142 CpuFeatures::Scope scope(SSE2);
1143 // Fill in the double input registers. 1143 // Fill in the double input registers.
1144 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; ++i) { 1144 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; ++i) {
1145 int dst_offset = i * kDoubleSize + double_regs_offset; 1145 int dst_offset = i * kDoubleSize + double_regs_offset;
1146 int src_offset = i * kDoubleSize; 1146 int src_offset = i * kDoubleSize;
1147 __ movdbl(xmm0, Operand(esp, src_offset)); 1147 __ movdbl(xmm0, Operand(esp, src_offset));
1148 __ movdbl(Operand(ebx, dst_offset), xmm0); 1148 __ movdbl(Operand(ebx, dst_offset), xmm0);
1149 } 1149 }
1150 } 1150 }
1151 __ fninit(); 1151
1152 // Check that the TOP register is zero and clear all exceptions.
1153 const int kTopMask = 0x3800;
1154 __ push(eax);
1155 __ fwait();
1156 __ fnstsw_ax();
1157 __ test(eax, Immediate(kTopMask));
1158 __ Check(zero, "FPU TOP is not zero in deoptimizer.");
1159 __ fnclex();
1160 __ pop(eax);
1152 1161
1153 // Remove the bailout id and the double registers from the stack. 1162 // Remove the bailout id and the double registers from the stack.
1154 if (type() == EAGER) { 1163 if (type() == EAGER) {
1155 __ add(esp, Immediate(kDoubleRegsSize + kPointerSize)); 1164 __ add(esp, Immediate(kDoubleRegsSize + kPointerSize));
1156 } else { 1165 } else {
1157 __ add(esp, Immediate(kDoubleRegsSize + 2 * kPointerSize)); 1166 __ add(esp, Immediate(kDoubleRegsSize + 2 * kPointerSize));
1158 } 1167 }
1159 1168
1160 // Compute a pointer to the unwinding limit in register ecx; that is 1169 // Compute a pointer to the unwinding limit in register ecx; that is
1161 // the first stack slot not part of the input frame. 1170 // the first stack slot not part of the input frame.
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 } 1289 }
1281 __ bind(&done); 1290 __ bind(&done);
1282 } 1291 }
1283 1292
1284 #undef __ 1293 #undef __
1285 1294
1286 1295
1287 } } // namespace v8::internal 1296 } } // namespace v8::internal
1288 1297
1289 #endif // V8_TARGET_ARCH_IA32 1298 #endif // V8_TARGET_ARCH_IA32
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