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

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

Issue 5967002: Fix smi-comparison to use correct macros in X64-SwapElements. (Closed)
Patch Set: Created 10 years 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 | 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 6766 matching lines...) Expand 10 before | Expand all | Expand 10 after
6777 __ CompareRoot(FieldOperand(tmp1.reg(), HeapObject::kMapOffset), 6777 __ CompareRoot(FieldOperand(tmp1.reg(), HeapObject::kMapOffset),
6778 Heap::kFixedArrayMapRootIndex); 6778 Heap::kFixedArrayMapRootIndex);
6779 deferred->Branch(not_equal); 6779 deferred->Branch(not_equal);
6780 6780
6781 // Check that both indices are smis. 6781 // Check that both indices are smis.
6782 Condition both_smi = masm()->CheckBothSmi(index1.reg(), index2.reg()); 6782 Condition both_smi = masm()->CheckBothSmi(index1.reg(), index2.reg());
6783 deferred->Branch(NegateCondition(both_smi)); 6783 deferred->Branch(NegateCondition(both_smi));
6784 6784
6785 // Check that both indices are valid. 6785 // Check that both indices are valid.
6786 __ movq(tmp2.reg(), FieldOperand(object.reg(), JSArray::kLengthOffset)); 6786 __ movq(tmp2.reg(), FieldOperand(object.reg(), JSArray::kLengthOffset));
6787 __ cmpl(tmp2.reg(), index1.reg()); 6787 __ SmiCompare(tmp2.reg(), index1.reg());
6788 deferred->Branch(below_equal); 6788 deferred->Branch(below_equal);
6789 __ cmpl(tmp2.reg(), index2.reg()); 6789 __ SmiCompare(tmp2.reg(), index2.reg());
6790 deferred->Branch(below_equal); 6790 deferred->Branch(below_equal);
6791 6791
6792 // Bring addresses into index1 and index2. 6792 // Bring addresses into index1 and index2.
6793 __ SmiToInteger32(index1.reg(), index1.reg()); 6793 __ SmiToInteger32(index1.reg(), index1.reg());
6794 __ lea(index1.reg(), FieldOperand(tmp1.reg(), 6794 __ lea(index1.reg(), FieldOperand(tmp1.reg(),
6795 index1.reg(), 6795 index1.reg(),
6796 times_pointer_size, 6796 times_pointer_size,
6797 FixedArray::kHeaderSize)); 6797 FixedArray::kHeaderSize));
6798 __ SmiToInteger32(index2.reg(), index2.reg()); 6798 __ SmiToInteger32(index2.reg(), index2.reg());
6799 __ lea(index2.reg(), FieldOperand(tmp1.reg(), 6799 __ lea(index2.reg(), FieldOperand(tmp1.reg(),
(...skipping 2013 matching lines...) Expand 10 before | Expand all | Expand 10 after
8813 #undef __ 8813 #undef __
8814 8814
8815 void RecordWriteStub::Generate(MacroAssembler* masm) { 8815 void RecordWriteStub::Generate(MacroAssembler* masm) {
8816 masm->RecordWriteHelper(object_, addr_, scratch_); 8816 masm->RecordWriteHelper(object_, addr_, scratch_);
8817 masm->ret(0); 8817 masm->ret(0);
8818 } 8818 }
8819 8819
8820 } } // namespace v8::internal 8820 } } // namespace v8::internal
8821 8821
8822 #endif // V8_TARGET_ARCH_X64 8822 #endif // V8_TARGET_ARCH_X64
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