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

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

Issue 190004: Remove special CheckEquals function for intptr_t on X64 platform. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 3 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 | « src/objects.h ('k') | 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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 6558 matching lines...) Expand 10 before | Expand all | Expand 10 after
6569 Label not_smis; 6569 Label not_smis;
6570 ASSERT_EQ(0, kSmiTag); 6570 ASSERT_EQ(0, kSmiTag);
6571 ASSERT_EQ(0, Smi::FromInt(0)); 6571 ASSERT_EQ(0, Smi::FromInt(0));
6572 __ movq(rcx, Immediate(kSmiTagMask)); 6572 __ movq(rcx, Immediate(kSmiTagMask));
6573 __ and_(rcx, rax); 6573 __ and_(rcx, rax);
6574 __ testq(rcx, rdx); 6574 __ testq(rcx, rdx);
6575 __ j(not_zero, &not_smis); 6575 __ j(not_zero, &not_smis);
6576 // One operand is a smi. 6576 // One operand is a smi.
6577 6577
6578 // Check whether the non-smi is a heap number. 6578 // Check whether the non-smi is a heap number.
6579 ASSERT_EQ(static_cast<intptr_t>(1), kSmiTagMask); 6579 ASSERT_EQ(1, static_cast<int>(kSmiTagMask));
6580 // rcx still holds rax & kSmiTag, which is either zero or one. 6580 // rcx still holds rax & kSmiTag, which is either zero or one.
6581 __ decq(rcx); // If rax is a smi, all 1s, else all 0s. 6581 __ decq(rcx); // If rax is a smi, all 1s, else all 0s.
6582 __ movq(rbx, rdx); 6582 __ movq(rbx, rdx);
6583 __ xor_(rbx, rax); 6583 __ xor_(rbx, rax);
6584 __ and_(rbx, rcx); // rbx holds either 0 or rax ^ rdx. 6584 __ and_(rbx, rcx); // rbx holds either 0 or rax ^ rdx.
6585 __ xor_(rbx, rax); 6585 __ xor_(rbx, rax);
6586 // if rax was smi, rbx is now rdx, else rax. 6586 // if rax was smi, rbx is now rdx, else rax.
6587 6587
6588 // Check if the non-smi operand is a heap number. 6588 // Check if the non-smi operand is a heap number.
6589 __ Cmp(FieldOperand(rbx, HeapObject::kMapOffset), 6589 __ Cmp(FieldOperand(rbx, HeapObject::kMapOffset),
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
7904 int CompareStub::MinorKey() { 7904 int CompareStub::MinorKey() {
7905 // Encode the two parameters in a unique 16 bit value. 7905 // Encode the two parameters in a unique 16 bit value.
7906 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); 7906 ASSERT(static_cast<unsigned>(cc_) < (1 << 15));
7907 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); 7907 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0);
7908 } 7908 }
7909 7909
7910 7910
7911 #undef __ 7911 #undef __
7912 7912
7913 } } // namespace v8::internal 7913 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698