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

Side by Side Diff: runtime/vm/assembler_mips.h

Issue 58003003: Impelments IfThenElse instruction for ARM and MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/flow_graph_optimizer.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 #ifndef VM_ASSEMBLER_MIPS_H_ 5 #ifndef VM_ASSEMBLER_MIPS_H_
6 #define VM_ASSEMBLER_MIPS_H_ 6 #define VM_ASSEMBLER_MIPS_H_
7 7
8 #ifndef VM_ASSEMBLER_H_ 8 #ifndef VM_ASSEMBLER_H_
9 #error Do not include assembler_mips.h directly; use assembler.h instead. 9 #error Do not include assembler_mips.h directly; use assembler.h instead.
10 #endif 10 #endif
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 } else { 852 } else {
853 LoadImmediate(TMP1, value); 853 LoadImmediate(TMP1, value);
854 addu(rd, rs, TMP1); 854 addu(rd, rs, TMP1);
855 } 855 }
856 } 856 }
857 857
858 void AddImmediate(Register rd, int32_t value) { 858 void AddImmediate(Register rd, int32_t value) {
859 AddImmediate(rd, rd, value); 859 AddImmediate(rd, rd, value);
860 } 860 }
861 861
862 void AndImmediate(Register rd, Register rs, int32_t imm) {
863 if (imm == 0) {
864 mov(rd, ZR);
865 return;
866 }
867
868 if (Utils::IsUint(kImmBits, imm)) {
869 andi(rd, rs, Immediate(imm));
870 } else {
871 LoadImmediate(TMP, imm);
872 and_(rd, rs, TMP);
873 }
874 }
875
862 void BranchEqual(Register rd, int32_t value, Label* l) { 876 void BranchEqual(Register rd, int32_t value, Label* l) {
863 if (value == 0) { 877 if (value == 0) {
864 beq(rd, ZR, l); 878 beq(rd, ZR, l);
865 } else { 879 } else {
866 ASSERT(rd != CMPRES2); 880 ASSERT(rd != CMPRES2);
867 LoadImmediate(CMPRES2, value); 881 LoadImmediate(CMPRES2, value);
868 beq(rd, CMPRES2, l); 882 beq(rd, CMPRES2, l);
869 } 883 }
870 } 884 }
871 885
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 Register value, 1275 Register value,
1262 Label* no_update); 1276 Label* no_update);
1263 1277
1264 DISALLOW_ALLOCATION(); 1278 DISALLOW_ALLOCATION();
1265 DISALLOW_COPY_AND_ASSIGN(Assembler); 1279 DISALLOW_COPY_AND_ASSIGN(Assembler);
1266 }; 1280 };
1267 1281
1268 } // namespace dart 1282 } // namespace dart
1269 1283
1270 #endif // VM_ASSEMBLER_MIPS_H_ 1284 #endif // VM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698