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

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

Issue 22152003: Never hchange nan-hole to hole or hole to nan-hole. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add individual test-file Created 7 years, 4 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 4611 matching lines...) Expand 10 before | Expand all | Expand 10 after
4622 XMMRegister input_reg = ToDoubleRegister(instr->value()); 4622 XMMRegister input_reg = ToDoubleRegister(instr->value());
4623 __ ucomisd(input_reg, input_reg); 4623 __ ucomisd(input_reg, input_reg);
4624 __ j(parity_odd, &no_special_nan_handling); 4624 __ j(parity_odd, &no_special_nan_handling);
4625 __ subq(rsp, Immediate(kDoubleSize)); 4625 __ subq(rsp, Immediate(kDoubleSize));
4626 __ movsd(MemOperand(rsp, 0), input_reg); 4626 __ movsd(MemOperand(rsp, 0), input_reg);
4627 __ cmpl(MemOperand(rsp, sizeof(kHoleNanLower32)), 4627 __ cmpl(MemOperand(rsp, sizeof(kHoleNanLower32)),
4628 Immediate(kHoleNanUpper32)); 4628 Immediate(kHoleNanUpper32));
4629 Label canonicalize; 4629 Label canonicalize;
4630 __ j(not_equal, &canonicalize); 4630 __ j(not_equal, &canonicalize);
4631 __ addq(rsp, Immediate(kDoubleSize)); 4631 __ addq(rsp, Immediate(kDoubleSize));
4632 __ Move(reg, factory()->the_hole_value()); 4632 __ Move(reg, factory()->undefined_value());
4633 __ jmp(&done); 4633 __ jmp(&done);
4634 __ bind(&canonicalize); 4634 __ bind(&canonicalize);
4635 __ addq(rsp, Immediate(kDoubleSize)); 4635 __ addq(rsp, Immediate(kDoubleSize));
4636 __ Set(kScratchRegister, BitCast<uint64_t>( 4636 __ Set(kScratchRegister, BitCast<uint64_t>(
4637 FixedDoubleArray::canonical_not_the_hole_nan_as_double())); 4637 FixedDoubleArray::canonical_not_the_hole_nan_as_double()));
4638 __ movq(input_reg, kScratchRegister); 4638 __ movq(input_reg, kScratchRegister);
4639 } 4639 }
4640 4640
4641 __ bind(&no_special_nan_handling); 4641 __ bind(&no_special_nan_handling);
4642 DeferredNumberTagD* deferred = new(zone()) DeferredNumberTagD(this, instr); 4642 DeferredNumberTagD* deferred = new(zone()) DeferredNumberTagD(this, instr);
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
5617 FixedArray::kHeaderSize - kPointerSize)); 5617 FixedArray::kHeaderSize - kPointerSize));
5618 __ bind(&done); 5618 __ bind(&done);
5619 } 5619 }
5620 5620
5621 5621
5622 #undef __ 5622 #undef __
5623 5623
5624 } } // namespace v8::internal 5624 } } // namespace v8::internal
5625 5625
5626 #endif // V8_TARGET_ARCH_X64 5626 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698