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

Side by Side Diff: runtime/vm/intrinsifier_arm.cc

Issue 1913663002: vm: Generate 'and' instruction for Smi values. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: xxx Created 4 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 | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 __ SmiUntag(R0); 771 __ SmiUntag(R0);
772 // XOR with sign bit to complement bits if value is negative. 772 // XOR with sign bit to complement bits if value is negative.
773 __ eor(R0, R0, Operand(R0, ASR, 31)); 773 __ eor(R0, R0, Operand(R0, ASR, 31));
774 __ clz(R0, R0); 774 __ clz(R0, R0);
775 __ rsb(R0, R0, Operand(32)); 775 __ rsb(R0, R0, Operand(32));
776 __ SmiTag(R0); 776 __ SmiTag(R0);
777 __ Ret(); 777 __ Ret();
778 } 778 }
779 779
780 780
781 void Intrinsifier::Smi_bitAndFromSmi(Assembler* assembler) {
782 Integer_bitAndFromInteger(assembler);
783 }
784
785
781 void Intrinsifier::Bigint_lsh(Assembler* assembler) { 786 void Intrinsifier::Bigint_lsh(Assembler* assembler) {
782 // static void _lsh(Uint32List x_digits, int x_used, int n, 787 // static void _lsh(Uint32List x_digits, int x_used, int n,
783 // Uint32List r_digits) 788 // Uint32List r_digits)
784 789
785 // R0 = x_used, R1 = x_digits, x_used > 0, x_used is Smi. 790 // R0 = x_used, R1 = x_digits, x_used > 0, x_used is Smi.
786 __ ldrd(R0, R1, SP, 2 * kWordSize); 791 __ ldrd(R0, R1, SP, 2 * kWordSize);
787 // R2 = r_digits, R3 = n, n is Smi, n % _DIGIT_BITS != 0. 792 // R2 = r_digits, R3 = n, n is Smi, n % _DIGIT_BITS != 0.
788 __ ldrd(R2, R3, SP, 0 * kWordSize); 793 __ ldrd(R2, R3, SP, 0 * kWordSize);
789 __ SmiUntag(R3); 794 __ SmiUntag(R3);
790 // R4 = n ~/ _DIGIT_BITS 795 // R4 = n ~/ _DIGIT_BITS
(...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after
2127 __ ldr(R0, Address(R0, TimelineStream::enabled_offset())); 2132 __ ldr(R0, Address(R0, TimelineStream::enabled_offset()));
2128 __ cmp(R0, Operand(0)); 2133 __ cmp(R0, Operand(0));
2129 __ LoadObject(R0, Bool::True(), NE); 2134 __ LoadObject(R0, Bool::True(), NE);
2130 __ LoadObject(R0, Bool::False(), EQ); 2135 __ LoadObject(R0, Bool::False(), EQ);
2131 __ Ret(); 2136 __ Ret();
2132 } 2137 }
2133 2138
2134 } // namespace dart 2139 } // namespace dart
2135 2140
2136 #endif // defined TARGET_ARCH_ARM 2141 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698