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

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

Issue 1538443003: Add mls instruction to the ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nit. Created 5 years 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 | « src/DartARM32/assembler_arm.h ('k') | src/IceAssemblerARM32.h » ('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 // 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 } 383 }
384 384
385 #if 0 385 #if 0
386 // Moved to ARM32::AssemblerARM32::mla() 386 // Moved to ARM32::AssemblerARM32::mla()
387 void Assembler::mla(Register rd, Register rn, 387 void Assembler::mla(Register rd, Register rn,
388 Register rm, Register ra, Condition cond) { 388 Register rm, Register ra, Condition cond) {
389 // rd <- ra + rn * rm. 389 // rd <- ra + rn * rm.
390 // Assembler registers rd, rn, rm, ra are encoded as rn, rm, rs, rd. 390 // Assembler registers rd, rn, rm, ra are encoded as rn, rm, rs, rd.
391 EmitMulOp(cond, B21, ra, rd, rn, rm); 391 EmitMulOp(cond, B21, ra, rd, rn, rm);
392 } 392 }
393 #endif
394 393
395 394 // Moved to ARM32::AssemblerARM32::mla()
396 void Assembler::mls(Register rd, Register rn, 395 void Assembler::mls(Register rd, Register rn,
397 Register rm, Register ra, Condition cond) { 396 Register rm, Register ra, Condition cond) {
398 // rd <- ra - rn * rm. 397 // rd <- ra - rn * rm.
399 if (TargetCPUFeatures::arm_version() == ARMv7) { 398 if (TargetCPUFeatures::arm_version() == ARMv7) {
400 // 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.
401 EmitMulOp(cond, B22 | B21, ra, rd, rn, rm); 400 EmitMulOp(cond, B22 | B21, ra, rd, rn, rm);
402 } else { 401 } else {
403 mul(IP, rn, rm, cond); 402 mul(IP, rn, rm, cond);
404 sub(rd, ra, Operand(IP), cond); 403 sub(rd, ra, Operand(IP), cond);
405 } 404 }
406 } 405 }
407 406 #endif
408 407
409 void Assembler::smull(Register rd_lo, Register rd_hi, 408 void Assembler::smull(Register rd_lo, Register rd_hi,
410 Register rn, Register rm, Condition cond) { 409 Register rn, Register rm, Condition cond) {
411 // Assembler registers rd_lo, rd_hi, rn, rm are encoded as rd, rn, rm, rs. 410 // Assembler registers rd_lo, rd_hi, rn, rm are encoded as rd, rn, rm, rs.
412 EmitMulOp(cond, B23 | B22, rd_lo, rd_hi, rn, rm); 411 EmitMulOp(cond, B23 | B22, rd_lo, rd_hi, rn, rm);
413 } 412 }
414 413
415 #if 0 414 #if 0
416 // Moved to ARM32::AssemblerARM32::umull() 415 // Moved to ARM32::AssemblerARM32::umull()
417 void Assembler::umull(Register rd_lo, Register rd_hi, 416 void Assembler::umull(Register rd_lo, Register rd_hi,
(...skipping 3266 matching lines...) Expand 10 before | Expand all | Expand 10 after
3684 3683
3685 3684
3686 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3685 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3687 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 3686 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
3688 return fpu_reg_names[reg]; 3687 return fpu_reg_names[reg];
3689 } 3688 }
3690 3689
3691 } // namespace dart 3690 } // namespace dart
3692 3691
3693 #endif // defined TARGET_ARCH_ARM 3692 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/DartARM32/assembler_arm.h ('k') | src/IceAssemblerARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698