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

Side by Side Diff: src/arm/assembler-arm.cc

Issue 6661022: ARM: Port r7089 to ARM... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 } 760 }
761 #endif // def DEBUG 761 #endif // def DEBUG
762 return Serializer::enabled(); 762 return Serializer::enabled();
763 } else if (rmode_ == RelocInfo::NONE) { 763 } else if (rmode_ == RelocInfo::NONE) {
764 return false; 764 return false;
765 } 765 }
766 return true; 766 return true;
767 } 767 }
768 768
769 769
770 bool Operand::is_single_instruction() const { 770 bool Operand::is_single_instruction(Instr instr) const {
771 if (rm_.is_valid()) return true; 771 if (rm_.is_valid()) return true;
772 if (must_use_constant_pool()) return false;
773 uint32_t dummy1, dummy2; 772 uint32_t dummy1, dummy2;
Lasse Reichstein 2011/03/10 11:58:48 So the change here is that even if must_use_consta
Søren Thygesen Gjesse 2011/03/10 12:47:02 Before this was never used to check a mov instruct
774 return fits_shifter(imm32_, &dummy1, &dummy2, NULL); 773 if (must_use_constant_pool() ||
774 !fits_shifter(imm32_, &dummy1, &dummy2, &instr)) {
775 // The immediate operand cannot be encoded as a shifter operand, or use of
776 // constant pool is required. For a mov instruction not setting the
777 // condition code additional instruction conventions can be used.
778 if ((instr & ~kCondMask) == 13*B21) { // mov, S not set
779 if (must_use_constant_pool() || !CpuFeatures::IsSupported(ARMv7)) {
Lasse Reichstein 2011/03/10 11:58:48 Could you force using the constant pool for some i
Søren Thygesen Gjesse 2011/03/10 12:47:02 The only case where movw and movt will be used is
780 // mov instruction will be an ldr from constant pool (one instruction).
781 return true;
782 } else {
783 // mov instruction will be a mov or movw followed by movt (two
784 // instructions).
785 return false;
786 }
787 } else {
788 // If this is not a mov or mvn instruction there will always an additional
789 // instructions - either mov or ldr. The mov might actually be two
790 // instructions mov or movw followed by movt so including the actual
791 // instruction two or three instructions will be generated.
792 return false;
793 }
794 } else {
795 // No use of constant pool and the immediate operand can be encoded as a
796 // shifter operand.
797 return true;
798 }
775 } 799 }
776 800
777 801
778 void Assembler::addrmod1(Instr instr, 802 void Assembler::addrmod1(Instr instr,
779 Register rn, 803 Register rn,
780 Register rd, 804 Register rd,
781 const Operand& x) { 805 const Operand& x) {
782 CheckBuffer(); 806 CheckBuffer();
783 ASSERT((instr & ~(kCondMask | kOpCodeMask | S)) == 0); 807 ASSERT((instr & ~(kCondMask | kOpCodeMask | S)) == 0);
784 if (!x.rm_.is_valid()) { 808 if (!x.rm_.is_valid()) {
(...skipping 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after
2747 2771
2748 // Since a constant pool was just emitted, move the check offset forward by 2772 // Since a constant pool was just emitted, move the check offset forward by
2749 // the standard interval. 2773 // the standard interval.
2750 next_buffer_check_ = pc_offset() + kCheckConstInterval; 2774 next_buffer_check_ = pc_offset() + kCheckConstInterval;
2751 } 2775 }
2752 2776
2753 2777
2754 } } // namespace v8::internal 2778 } } // namespace v8::internal
2755 2779
2756 #endif // V8_TARGET_ARCH_ARM 2780 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698