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

Side by Side Diff: src/IceAssemblerARM32.cpp

Issue 1642303002: Add the VMLS instruction to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix comment in test. Created 4 years, 10 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
« no previous file with comments | « src/IceAssemblerARM32.h ('k') | src/IceInstARM32.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceAssemblerARM32.cpp - Assembler for ARM32 --*- C++ -*-===// 1 //===- subzero/src/IceAssemblerARM32.cpp - Assembler for ARM32 --*- C++ -*-===//
2 // 2 //
3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
4 // for details. All rights reserved. Use of this source code is governed by a 4 // for details. All rights reserved. Use of this source code is governed by a
5 // BSD-style license that can be found in the LICENSE file. 5 // BSD-style license that can be found in the LICENSE file.
6 // 6 //
7 // Modified by the Subzero authors. 7 // Modified by the Subzero authors.
8 // 8 //
9 //===----------------------------------------------------------------------===// 9 //===----------------------------------------------------------------------===//
10 // 10 //
(...skipping 2502 matching lines...) Expand 10 before | Expand all | Expand 10 after
2513 // VMLA, VMLS (floating-point), ARM section A8.8.337, encoding A2: 2513 // VMLA, VMLS (floating-point), ARM section A8.8.337, encoding A2:
2514 // vmla<c>.f32 <Sd>, <Sn>, <Sm> 2514 // vmla<c>.f32 <Sd>, <Sn>, <Sm>
2515 // 2515 //
2516 // cccc11100d00nnnndddd1010n0M0mmmm where cccc=Cond, ddddD=Sd, nnnnN=Sn, and 2516 // cccc11100d00nnnndddd1010n0M0mmmm where cccc=Cond, ddddD=Sd, nnnnN=Sn, and
2517 // mmmmM=Sm 2517 // mmmmM=Sm
2518 constexpr const char *Vmlas = "vmlas"; 2518 constexpr const char *Vmlas = "vmlas";
2519 constexpr IValueT VmlasOpcode = 0; 2519 constexpr IValueT VmlasOpcode = 0;
2520 emitVFPsss(Cond, VmlasOpcode, OpSd, OpSn, OpSm, Vmlas); 2520 emitVFPsss(Cond, VmlasOpcode, OpSd, OpSn, OpSm, Vmlas);
2521 } 2521 }
2522 2522
2523 void AssemblerARM32::vmlsd(const Operand *OpDd, const Operand *OpDn,
2524 const Operand *OpDm, CondARM32::Cond Cond) {
2525 // VMLA, VMLS (floating-point), ARM section A8.8.337, encoding A2:
2526 // vmls<c>.f64 <Dd>, <Dn>, <Dm>
2527 //
2528 // cccc11100d00nnnndddd1011n1M0mmmm where cccc=Cond, Ddddd=Dd, Nnnnn=Dn, and
2529 // Mmmmm=Dm
2530 constexpr const char *Vmlad = "vmlad";
2531 constexpr IValueT VmladOpcode = B6;
2532 emitVFPddd(Cond, VmladOpcode, OpDd, OpDn, OpDm, Vmlad);
2533 }
2534
2535 void AssemblerARM32::vmlss(const Operand *OpSd, const Operand *OpSn,
2536 const Operand *OpSm, CondARM32::Cond Cond) {
2537 // VMLA, VMLS (floating-point), ARM section A8.8.337, encoding A2:
2538 // vmls<c>.f32 <Sd>, <Sn>, <Sm>
2539 //
2540 // cccc11100d00nnnndddd1010n1M0mmmm where cccc=Cond, ddddD=Sd, nnnnN=Sn, and
2541 // mmmmM=Sm
2542 constexpr const char *Vmlas = "vmlas";
2543 constexpr IValueT VmlasOpcode = B6;
2544 emitVFPsss(Cond, VmlasOpcode, OpSd, OpSn, OpSm, Vmlas);
2545 }
2546
2523 void AssemblerARM32::vmrsAPSR_nzcv(CondARM32::Cond Cond) { 2547 void AssemblerARM32::vmrsAPSR_nzcv(CondARM32::Cond Cond) {
2524 // MVRS - ARM section A*.8.348, encoding A1: 2548 // MVRS - ARM section A*.8.348, encoding A1:
2525 // vmrs<c> APSR_nzcv, FPSCR 2549 // vmrs<c> APSR_nzcv, FPSCR
2526 // 2550 //
2527 // cccc111011110001tttt101000010000 where tttt=0x15 (i.e. when Rt=pc, use 2551 // cccc111011110001tttt101000010000 where tttt=0x15 (i.e. when Rt=pc, use
2528 // APSR_nzcv instead). 2552 // APSR_nzcv instead).
2529 assert(CondARM32::isDefined(Cond)); 2553 assert(CondARM32::isDefined(Cond));
2530 IValueT Encoding = B27 | B26 | B25 | B23 | B22 | B21 | B20 | B16 | B15 | B14 | 2554 IValueT Encoding = B27 | B26 | B25 | B23 | B22 | B21 | B20 | B16 | B15 | B14 |
2531 B13 | B12 | B11 | B9 | B4 | 2555 B13 | B12 | B11 | B9 | B4 |
2532 (encodeCondition(Cond) << kConditionShift); 2556 (encodeCondition(Cond) << kConditionShift);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
2665 // 2689 //
2666 // cccc11010D101101dddd1010iiiiiiii where cccc=Cond, ddddD=BaseReg, and 2690 // cccc11010D101101dddd1010iiiiiiii where cccc=Cond, ddddD=BaseReg, and
2667 // iiiiiiii=NumConsecRegs. 2691 // iiiiiiii=NumConsecRegs.
2668 constexpr IValueT VpushOpcode = 2692 constexpr IValueT VpushOpcode =
2669 B27 | B26 | B24 | B21 | B19 | B18 | B16 | B11 | B9; 2693 B27 | B26 | B24 | B21 | B19 | B18 | B16 | B11 | B9;
2670 emitVStackOp(Cond, VpushOpcode, OpBaseReg, NumConsecRegs); 2694 emitVStackOp(Cond, VpushOpcode, OpBaseReg, NumConsecRegs);
2671 } 2695 }
2672 2696
2673 } // end of namespace ARM32 2697 } // end of namespace ARM32
2674 } // end of namespace Ice 2698 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceAssemblerARM32.h ('k') | src/IceInstARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698