Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 2409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2420 // | 2420 // |
| 2421 // cccc11101D110000dddd101101M0mmmm where cccc=Cond, Ddddd=Sd, and Mmmmm=Sm. | 2421 // cccc11101D110000dddd101101M0mmmm where cccc=Cond, Ddddd=Sd, and Mmmmm=Sm. |
| 2422 constexpr const char *Vmovdd = "Vmovdd"; | 2422 constexpr const char *Vmovdd = "Vmovdd"; |
| 2423 IValueT Dd = encodeSRegister(OpDd, "Dd", Vmovdd); | 2423 IValueT Dd = encodeSRegister(OpDd, "Dd", Vmovdd); |
| 2424 IValueT Dm = encodeSRegister(OpDm, "Dm", Vmovdd); | 2424 IValueT Dm = encodeSRegister(OpDm, "Dm", Vmovdd); |
| 2425 constexpr IValueT VmovddOpcode = B23 | B21 | B20 | B6; | 2425 constexpr IValueT VmovddOpcode = B23 | B21 | B20 | B6; |
| 2426 constexpr IValueT D0 = 0; | 2426 constexpr IValueT D0 = 0; |
| 2427 emitVFPddd(Cond, VmovddOpcode, Dd, D0, Dm); | 2427 emitVFPddd(Cond, VmovddOpcode, Dd, D0, Dm); |
| 2428 } | 2428 } |
| 2429 | 2429 |
| 2430 void AssemblerARM32::vmovdrr(const Operand *OpDm, const Operand *OpRt, | |
| 2431 const Operand *OpRt2, CondARM32::Cond Cond) { | |
| 2432 // VMOV (between two ARM core registers and a doubleword extension register). | |
| 2433 // ARM section A8.8.345, encoding A1: | |
| 2434 // vmov<c> <Dm>, <Rt>, <Rt2> | |
| 2435 // | |
| 2436 // cccc11000100xxxxyyyy101100M1mmmm where cccc=Cond, xxxx=Rt, yyyy=Rt2, and | |
| 2437 // Mmmmm=Dm. | |
| 2438 constexpr const char *Vmovdrr = "Vmovdrr"; | |
|
Jim Stichnoth
2016/01/29 00:54:39
Shouldn't this be lowercase? (here and below)
Karl
2016/01/29 15:28:20
Good catch. Fixing.
| |
| 2439 IValueT Dm = encodeDRegister(OpDm, "Dm", Vmovdrr); | |
| 2440 IValueT Rt = encodeGPRegister(OpRt, "Rt", Vmovdrr); | |
| 2441 IValueT Rt2 = encodeGPRegister(OpRt2, "Rt", Vmovdrr); | |
| 2442 assert(Rt != RegARM32::Encoded_Reg_sp); | |
| 2443 assert(Rt != RegARM32::Encoded_Reg_pc); | |
| 2444 assert(Rt2 != RegARM32::Encoded_Reg_sp); | |
| 2445 assert(Rt2 != RegARM32::Encoded_Reg_pc); | |
| 2446 assert(Rt != Rt2); | |
| 2447 assert(CondARM32::isDefined(Cond)); | |
| 2448 IValueT Encoding = B27 | B26 | B22 | B11 | B9 | B8 | B4 | | |
| 2449 (encodeCondition(Cond) << kConditionShift) | (Rt2 << 16) | | |
| 2450 (Rt << 12) | (getYInRegYXXXX(Dm) << 5) | | |
| 2451 getXXXXInRegYXXXX(Dm); | |
| 2452 emitInst(Encoding); | |
| 2453 } | |
| 2454 | |
| 2455 void AssemblerARM32::vmovrrd(const Operand *OpRt, const Operand *OpRt2, | |
| 2456 const Operand *OpDm, CondARM32::Cond Cond) { | |
| 2457 // VMOV (between two ARM core registers and a doubleword extension register). | |
| 2458 // ARM section A8.8.345, encoding A1: | |
| 2459 // vmov<c> <Rt>, <Rt2>, <Dm> | |
| 2460 // | |
| 2461 // cccc11000101xxxxyyyy101100M1mmmm where cccc=Cond, xxxx=Rt, yyyy=Rt2, and | |
| 2462 // Mmmmm=Dm. | |
| 2463 constexpr const char *Vmovrrd = "Vmovrrd"; | |
| 2464 IValueT Rt = encodeGPRegister(OpRt, "Rt", Vmovrrd); | |
| 2465 IValueT Rt2 = encodeGPRegister(OpRt2, "Rt", Vmovrrd); | |
| 2466 IValueT Dm = encodeDRegister(OpDm, "Dm", Vmovrrd); | |
| 2467 assert(Rt != RegARM32::Encoded_Reg_sp); | |
| 2468 assert(Rt != RegARM32::Encoded_Reg_pc); | |
| 2469 assert(Rt2 != RegARM32::Encoded_Reg_sp); | |
| 2470 assert(Rt2 != RegARM32::Encoded_Reg_pc); | |
| 2471 assert(Rt != Rt2); | |
| 2472 assert(CondARM32::isDefined(Cond)); | |
| 2473 IValueT Encoding = B27 | B26 | B22 | B20 | B11 | B9 | B8 | B4 | | |
| 2474 (encodeCondition(Cond) << kConditionShift) | (Rt2 << 16) | | |
| 2475 (Rt << 12) | (getYInRegYXXXX(Dm) << 5) | | |
| 2476 getXXXXInRegYXXXX(Dm); | |
| 2477 emitInst(Encoding); | |
| 2478 } | |
| 2479 | |
| 2430 void AssemblerARM32::vmovrs(const Operand *OpRt, const Operand *OpSn, | 2480 void AssemblerARM32::vmovrs(const Operand *OpRt, const Operand *OpSn, |
| 2431 CondARM32::Cond Cond) { | 2481 CondARM32::Cond Cond) { |
| 2432 // VMOV (between ARM core register and single-precision register) | 2482 // VMOV (between ARM core register and single-precision register) |
| 2433 // ARM section A8.8.343, encoding A1. | 2483 // ARM section A8.8.343, encoding A1. |
| 2434 // | 2484 // |
| 2435 // vmov<c> <Rt>, <Sn> | 2485 // vmov<c> <Rt>, <Sn> |
| 2436 // | 2486 // |
| 2437 // cccc11100001nnnntttt1010N0010000 where cccc=Cond, nnnnN = Sn, and tttt=Rt. | 2487 // cccc11100001nnnntttt1010N0010000 where cccc=Cond, nnnnN = Sn, and tttt=Rt. |
| 2438 constexpr const char *Vmovrs = "vmovrs"; | 2488 constexpr const char *Vmovrs = "vmovrs"; |
| 2439 IValueT Rt = encodeGPRegister(OpRt, "Rt", Vmovrs); | 2489 IValueT Rt = encodeGPRegister(OpRt, "Rt", Vmovrs); |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2665 // | 2715 // |
| 2666 // cccc11010D101101dddd1010iiiiiiii where cccc=Cond, ddddD=BaseReg, and | 2716 // cccc11010D101101dddd1010iiiiiiii where cccc=Cond, ddddD=BaseReg, and |
| 2667 // iiiiiiii=NumConsecRegs. | 2717 // iiiiiiii=NumConsecRegs. |
| 2668 constexpr IValueT VpushOpcode = | 2718 constexpr IValueT VpushOpcode = |
| 2669 B27 | B26 | B24 | B21 | B19 | B18 | B16 | B11 | B9; | 2719 B27 | B26 | B24 | B21 | B19 | B18 | B16 | B11 | B9; |
| 2670 emitVStackOp(Cond, VpushOpcode, OpBaseReg, NumConsecRegs); | 2720 emitVStackOp(Cond, VpushOpcode, OpBaseReg, NumConsecRegs); |
| 2671 } | 2721 } |
| 2672 | 2722 |
| 2673 } // end of namespace ARM32 | 2723 } // end of namespace ARM32 |
| 2674 } // end of namespace Ice | 2724 } // end of namespace Ice |
| OLD | NEW |