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

Side by Side Diff: src/compiler/x87/code-generator-x87.cc

Issue 2099143002: X87: [turbofan] Prevent storing signalling NaNs into holey double arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | src/compiler/x87/instruction-codes-x87.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 __ X87SetRC(0x0000); 1580 __ X87SetRC(0x0000);
1581 break; 1581 break;
1582 } 1582 }
1583 case kX87Float64Cmp: { 1583 case kX87Float64Cmp: {
1584 __ fld_d(MemOperand(esp, kDoubleSize)); 1584 __ fld_d(MemOperand(esp, kDoubleSize));
1585 __ fld_d(MemOperand(esp, 0)); 1585 __ fld_d(MemOperand(esp, 0));
1586 __ FCmp(); 1586 __ FCmp();
1587 __ lea(esp, Operand(esp, 2 * kDoubleSize)); 1587 __ lea(esp, Operand(esp, 2 * kDoubleSize));
1588 break; 1588 break;
1589 } 1589 }
1590 case kX87Float64SilenceNaN: {
1591 Label end, return_qnan;
1592 __ fstp(0);
1593 __ push(ebx);
1594 // Load Half word of HoleNan(SNaN) into ebx
1595 __ mov(ebx, MemOperand(esp, 2 * kInt32Size));
1596 __ cmp(ebx, Immediate(kHoleNanUpper32));
1597 // Check input is HoleNaN(SNaN)?
1598 __ j(equal, &return_qnan, Label::kNear);
1599 // If input isn't HoleNaN(SNaN), just load it and return
1600 __ fld_d(MemOperand(esp, 1 * kInt32Size));
1601 __ jmp(&end);
1602 __ bind(&return_qnan);
1603 // If input is HoleNaN(SNaN), Return QNaN
1604 __ push(Immediate(0xffffffff));
1605 __ push(Immediate(0xfff7ffff));
1606 __ fld_d(MemOperand(esp, 0));
1607 __ lea(esp, Operand(esp, kDoubleSize));
1608 __ bind(&end);
1609 __ pop(ebx);
1610 // Clear stack.
1611 __ lea(esp, Operand(esp, 1 * kDoubleSize));
1612 break;
1613 }
1590 case kX87Movsxbl: 1614 case kX87Movsxbl:
1591 __ movsx_b(i.OutputRegister(), i.MemoryOperand()); 1615 __ movsx_b(i.OutputRegister(), i.MemoryOperand());
1592 break; 1616 break;
1593 case kX87Movzxbl: 1617 case kX87Movzxbl:
1594 __ movzx_b(i.OutputRegister(), i.MemoryOperand()); 1618 __ movzx_b(i.OutputRegister(), i.MemoryOperand());
1595 break; 1619 break;
1596 case kX87Movb: { 1620 case kX87Movb: {
1597 size_t index = 0; 1621 size_t index = 0;
1598 Operand operand = i.MemoryOperand(&index); 1622 Operand operand = i.MemoryOperand(&index);
1599 if (HasImmediateInput(instr, index)) { 1623 if (HasImmediateInput(instr, index)) {
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
2556 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2580 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2557 __ Nop(padding_size); 2581 __ Nop(padding_size);
2558 } 2582 }
2559 } 2583 }
2560 2584
2561 #undef __ 2585 #undef __
2562 2586
2563 } // namespace compiler 2587 } // namespace compiler
2564 } // namespace internal 2588 } // namespace internal
2565 } // namespace v8 2589 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/x87/instruction-codes-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698