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

Side by Side Diff: src/DartARM32/assembler_arm.cc

Issue 1429073005: Add MLA instruction to ARM integerated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove tabs. Created 5 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
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 // This is forked from Dart revision df52deea9f25690eb8b66c5995da92b70f7ac1fe 5 // This is forked from Dart revision df52deea9f25690eb8b66c5995da92b70f7ac1fe
6 // Please update the (git) revision if we merge changes from Dart. 6 // Please update the (git) revision if we merge changes from Dart.
7 // https://code.google.com/p/dart/wiki/GettingTheSource 7 // https://code.google.com/p/dart/wiki/GettingTheSource
8 8
9 #include "vm/globals.h" // NOLINT 9 #include "vm/globals.h" // NOLINT
10 #if defined(TARGET_ARCH_ARM) 10 #if defined(TARGET_ARCH_ARM)
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 // Assembler registers rd, rn, rm are encoded as rn, rm, rs. 384 // Assembler registers rd, rn, rm are encoded as rn, rm, rs.
385 EmitMulOp(cond, 0, R0, rd, rn, rm); 385 EmitMulOp(cond, 0, R0, rd, rn, rm);
386 } 386 }
387 #endif 387 #endif
388 388
389 // Like mul, but sets condition flags. 389 // Like mul, but sets condition flags.
390 void Assembler::muls(Register rd, Register rn, Register rm, Condition cond) { 390 void Assembler::muls(Register rd, Register rn, Register rm, Condition cond) {
391 EmitMulOp(cond, B20, R0, rd, rn, rm); 391 EmitMulOp(cond, B20, R0, rd, rn, rm);
392 } 392 }
393 393
394 394 #if 0
395 // Moved to ARM32::AssemblerARM32::mla
395 void Assembler::mla(Register rd, Register rn, 396 void Assembler::mla(Register rd, Register rn,
396 Register rm, Register ra, Condition cond) { 397 Register rm, Register ra, Condition cond) {
397 // rd <- ra + rn * rm. 398 // rd <- ra + rn * rm.
398 // Assembler registers rd, rn, rm, ra are encoded as rn, rm, rs, rd. 399 // Assembler registers rd, rn, rm, ra are encoded as rn, rm, rs, rd.
399 EmitMulOp(cond, B21, ra, rd, rn, rm); 400 EmitMulOp(cond, B21, ra, rd, rn, rm);
400 } 401 }
402 #endif
401 403
402 404
403 void Assembler::mls(Register rd, Register rn, 405 void Assembler::mls(Register rd, Register rn,
404 Register rm, Register ra, Condition cond) { 406 Register rm, Register ra, Condition cond) {
405 // rd <- ra - rn * rm. 407 // rd <- ra - rn * rm.
406 if (TargetCPUFeatures::arm_version() == ARMv7) { 408 if (TargetCPUFeatures::arm_version() == ARMv7) {
407 // Assembler registers rd, rn, rm, ra are encoded as rn, rm, rs, rd. 409 // Assembler registers rd, rn, rm, ra are encoded as rn, rm, rs, rd.
408 EmitMulOp(cond, B22 | B21, ra, rd, rn, rm); 410 EmitMulOp(cond, B22 | B21, ra, rd, rn, rm);
409 } else { 411 } else {
410 mul(IP, rn, rm, cond); 412 mul(IP, rn, rm, cond);
(...skipping 3270 matching lines...) Expand 10 before | Expand all | Expand 10 after
3681 3683
3682 3684
3683 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3685 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3684 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 3686 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
3685 return fpu_reg_names[reg]; 3687 return fpu_reg_names[reg];
3686 } 3688 }
3687 3689
3688 } // namespace dart 3690 } // namespace dart
3689 3691
3690 #endif // defined TARGET_ARCH_ARM 3692 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698