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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 2826021: Fix bug in CheckBothPositiveSmi macro. (Closed)
Patch Set: Created 10 years, 6 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 | « src/ia32/codegen-ia32.cc ('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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 testb(kScratchRegister, Immediate(kSmiTagMask)); 645 testb(kScratchRegister, Immediate(kSmiTagMask));
646 return zero; 646 return zero;
647 } 647 }
648 648
649 649
650 Condition MacroAssembler::CheckBothPositiveSmi(Register first, 650 Condition MacroAssembler::CheckBothPositiveSmi(Register first,
651 Register second) { 651 Register second) {
652 if (first.is(second)) { 652 if (first.is(second)) {
653 return CheckPositiveSmi(first); 653 return CheckPositiveSmi(first);
654 } 654 }
655 movl(kScratchRegister, first); 655 movq(kScratchRegister, first);
656 orl(kScratchRegister, second); 656 or_(kScratchRegister, second);
657 rol(kScratchRegister, Immediate(1)); 657 rol(kScratchRegister, Immediate(1));
658 testl(kScratchRegister, Immediate(0x03)); 658 testl(kScratchRegister, Immediate(0x03));
659 return zero; 659 return zero;
660 } 660 }
661 661
662 662
663 663
664 Condition MacroAssembler::CheckEitherSmi(Register first, Register second) { 664 Condition MacroAssembler::CheckEitherSmi(Register first, Register second) {
665 if (first.is(second)) { 665 if (first.is(second)) {
666 return CheckSmi(first); 666 return CheckSmi(first);
(...skipping 2088 matching lines...) Expand 10 before | Expand all | Expand 10 after
2755 CPU::FlushICache(address_, size_); 2755 CPU::FlushICache(address_, size_);
2756 2756
2757 // Check that the code was patched as expected. 2757 // Check that the code was patched as expected.
2758 ASSERT(masm_.pc_ == address_ + size_); 2758 ASSERT(masm_.pc_ == address_ + size_);
2759 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2759 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2760 } 2760 }
2761 2761
2762 } } // namespace v8::internal 2762 } } // namespace v8::internal
2763 2763
2764 #endif // V8_TARGET_ARCH_X64 2764 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698