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

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

Issue 1824023002: VM: Fix a couple of issues in the AOT optimizer, add fast path smi multiply. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 2922 matching lines...) Expand 10 before | Expand all | Expand 10 after
2933 __ bne(CMPRES1, ZR, slow_path->entry_label()); 2933 __ bne(CMPRES1, ZR, slow_path->entry_label());
2934 switch (op_kind()) { 2934 switch (op_kind()) {
2935 case Token::kADD: 2935 case Token::kADD:
2936 __ AdduDetectOverflow(result, left, right, CMPRES1); 2936 __ AdduDetectOverflow(result, left, right, CMPRES1);
2937 __ bltz(CMPRES1, slow_path->entry_label()); 2937 __ bltz(CMPRES1, slow_path->entry_label());
2938 break; 2938 break;
2939 case Token::kSUB: 2939 case Token::kSUB:
2940 __ SubuDetectOverflow(result, left, right, CMPRES1); 2940 __ SubuDetectOverflow(result, left, right, CMPRES1);
2941 __ bltz(CMPRES1, slow_path->entry_label()); 2941 __ bltz(CMPRES1, slow_path->entry_label());
2942 break; 2942 break;
2943 case Token::kMUL:
2944 __ sra(TMP, left, kSmiTagSize);
2945 __ mult(TMP, right);
2946 __ mflo(result);
2947 __ mfhi(CMPRES2);
2948 __ sra(CMPRES1, result, 31);
2949 __ bne(CMPRES1, CMPRES2, slow_path->entry_label());
2950 break;
2943 case Token::kBIT_OR: 2951 case Token::kBIT_OR:
2944 // Operation part of combined smi check. 2952 // Operation part of combined smi check.
2945 break; 2953 break;
2946 case Token::kBIT_AND: 2954 case Token::kBIT_AND:
2947 __ and_(result, left, right); 2955 __ and_(result, left, right);
2948 break; 2956 break;
2949 case Token::kBIT_XOR: 2957 case Token::kBIT_XOR:
2950 __ xor_(result, left, right); 2958 __ xor_(result, left, right);
2951 break; 2959 break;
2952 case Token::kEQ: 2960 case Token::kEQ:
(...skipping 2734 matching lines...) Expand 10 before | Expand all | Expand 10 after
5687 1, 5695 1,
5688 locs()); 5696 locs());
5689 __ lw(result, Address(SP, 1 * kWordSize)); 5697 __ lw(result, Address(SP, 1 * kWordSize));
5690 __ addiu(SP, SP, Immediate(2 * kWordSize)); 5698 __ addiu(SP, SP, Immediate(2 * kWordSize));
5691 } 5699 }
5692 5700
5693 5701
5694 } // namespace dart 5702 } // namespace dart
5695 5703
5696 #endif // defined TARGET_ARCH_MIPS 5704 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698