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

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

Issue 2266003: X64: Many small tweaks and more usages of "load smi as int32". (Closed)
Patch Set: Created 10 years, 7 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
« src/x64/codegen-x64.cc ('K') | « src/x64/macro-assembler-x64.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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 566
567 void MacroAssembler::SmiToInteger32(Register dst, Register src) { 567 void MacroAssembler::SmiToInteger32(Register dst, Register src) {
568 ASSERT_EQ(0, kSmiTag); 568 ASSERT_EQ(0, kSmiTag);
569 if (!dst.is(src)) { 569 if (!dst.is(src)) {
570 movq(dst, src); 570 movq(dst, src);
571 } 571 }
572 shr(dst, Immediate(kSmiShift)); 572 shr(dst, Immediate(kSmiShift));
573 } 573 }
574 574
575 575
576 void MacroAssembler::SmiToInteger32(Register dst, const Operand& src) {
577 movl(dst, Operand(src, kIntSize));
William Hesse 2010/05/27 08:36:03 Is kIntSize really better than "4" here? If anyth
578 }
579
580
576 void MacroAssembler::SmiToInteger64(Register dst, Register src) { 581 void MacroAssembler::SmiToInteger64(Register dst, Register src) {
577 ASSERT_EQ(0, kSmiTag); 582 ASSERT_EQ(0, kSmiTag);
578 if (!dst.is(src)) { 583 if (!dst.is(src)) {
579 movq(dst, src); 584 movq(dst, src);
580 } 585 }
581 sar(dst, Immediate(kSmiShift)); 586 sar(dst, Immediate(kSmiShift));
582 } 587 }
583 588
584 589
585 void MacroAssembler::SmiTest(Register src) { 590 void MacroAssembler::SmiTest(Register src) {
(...skipping 2170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2756 CPU::FlushICache(address_, size_); 2761 CPU::FlushICache(address_, size_);
2757 2762
2758 // Check that the code was patched as expected. 2763 // Check that the code was patched as expected.
2759 ASSERT(masm_.pc_ == address_ + size_); 2764 ASSERT(masm_.pc_ == address_ + size_);
2760 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2765 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2761 } 2766 }
2762 2767
2763 } } // namespace v8::internal 2768 } } // namespace v8::internal
2764 2769
2765 #endif // V8_TARGET_ARCH_X64 2770 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/x64/codegen-x64.cc ('K') | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698