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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_mips.h
===================================================================
--- runtime/vm/assembler_mips.h (revision 29815)
+++ runtime/vm/assembler_mips.h (working copy)
@@ -859,6 +859,20 @@
AddImmediate(rd, rd, value);
}
+ void AndImmediate(Register rd, Register rs, int32_t imm) {
+ if (imm == 0) {
+ mov(rd, ZR);
+ return;
+ }
+
+ if (Utils::IsUint(kImmBits, imm)) {
+ andi(rd, rs, Immediate(imm));
+ } else {
+ LoadImmediate(TMP, imm);
+ and_(rd, rs, TMP);
+ }
+ }
+
void BranchEqual(Register rd, int32_t value, Label* l) {
if (value == 0) {
beq(rd, ZR, l);
« 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