| 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 2395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2406 constexpr const char *Vmovd = "vmovd"; | 2406 constexpr const char *Vmovd = "vmovd"; |
| 2407 IValueT Dd = encodeSRegister(OpDd, "Dd", Vmovd); | 2407 IValueT Dd = encodeSRegister(OpDd, "Dd", Vmovd); |
| 2408 IValueT Imm8 = OpFpImm->getModifiedImm(); | 2408 IValueT Imm8 = OpFpImm->getModifiedImm(); |
| 2409 assert(Imm8 < (1 << 8)); | 2409 assert(Imm8 < (1 << 8)); |
| 2410 constexpr IValueT VmovsOpcode = B23 | B21 | B20 | B8; | 2410 constexpr IValueT VmovsOpcode = B23 | B21 | B20 | B8; |
| 2411 IValueT OpcodePlusImm8 = VmovsOpcode | ((Imm8 >> 4) << 16) | (Imm8 & 0xf); | 2411 IValueT OpcodePlusImm8 = VmovsOpcode | ((Imm8 >> 4) << 16) | (Imm8 & 0xf); |
| 2412 constexpr IValueT D0 = 0; | 2412 constexpr IValueT D0 = 0; |
| 2413 emitVFPddd(Cond, OpcodePlusImm8, Dd, D0, D0); | 2413 emitVFPddd(Cond, OpcodePlusImm8, Dd, D0, D0); |
| 2414 } | 2414 } |
| 2415 | 2415 |
| 2416 void AssemblerARM32::vmovdd(const Operand *OpDd, const Operand *OpDm, | 2416 void AssemblerARM32::vmovdd(const Operand *OpDd, const Variable *OpDm, |
| 2417 CondARM32::Cond Cond) { | 2417 CondARM32::Cond Cond) { |
| 2418 // VMOV (register) - ARM section A8.8.340, encoding A2: | 2418 // VMOV (register) - ARM section A8.8.340, encoding A2: |
| 2419 // vmov<c>.f64 <Dd>, <Sm> | 2419 // vmov<c>.f64 <Dd>, <Sm> |
| 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; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2437 constexpr const char *Vmovs = "vmovs"; | 2437 constexpr const char *Vmovs = "vmovs"; |
| 2438 IValueT Sd = encodeSRegister(OpSd, "Sd", Vmovs); | 2438 IValueT Sd = encodeSRegister(OpSd, "Sd", Vmovs); |
| 2439 IValueT Imm8 = OpFpImm->getModifiedImm(); | 2439 IValueT Imm8 = OpFpImm->getModifiedImm(); |
| 2440 assert(Imm8 < (1 << 8)); | 2440 assert(Imm8 < (1 << 8)); |
| 2441 constexpr IValueT VmovsOpcode = B23 | B21 | B20; | 2441 constexpr IValueT VmovsOpcode = B23 | B21 | B20; |
| 2442 IValueT OpcodePlusImm8 = VmovsOpcode | ((Imm8 >> 4) << 16) | (Imm8 & 0xf); | 2442 IValueT OpcodePlusImm8 = VmovsOpcode | ((Imm8 >> 4) << 16) | (Imm8 & 0xf); |
| 2443 constexpr IValueT S0 = 0; | 2443 constexpr IValueT S0 = 0; |
| 2444 emitVFPsss(Cond, OpcodePlusImm8, Sd, S0, S0); | 2444 emitVFPsss(Cond, OpcodePlusImm8, Sd, S0, S0); |
| 2445 } | 2445 } |
| 2446 | 2446 |
| 2447 void AssemblerARM32::vmovss(const Operand *OpSd, const Operand *OpSm, | 2447 void AssemblerARM32::vmovss(const Operand *OpSd, const Variable *OpSm, |
| 2448 CondARM32::Cond Cond) { | 2448 CondARM32::Cond Cond) { |
| 2449 // VMOV (register) - ARM section A8.8.340, encoding A2: | 2449 // VMOV (register) - ARM section A8.8.340, encoding A2: |
| 2450 // vmov<c>.f32 <Sd>, <Sm> | 2450 // vmov<c>.f32 <Sd>, <Sm> |
| 2451 // | 2451 // |
| 2452 // cccc11101D110000dddd101001M0mmmm where cccc=Cond, ddddD=Sd, and mmmmM=Sm. | 2452 // cccc11101D110000dddd101001M0mmmm where cccc=Cond, ddddD=Sd, and mmmmM=Sm. |
| 2453 constexpr const char *Vmovss = "Vmovss"; | 2453 constexpr const char *Vmovss = "Vmovss"; |
| 2454 IValueT Sd = encodeSRegister(OpSd, "Sd", Vmovss); | 2454 IValueT Sd = encodeSRegister(OpSd, "Sd", Vmovss); |
| 2455 IValueT Sm = encodeSRegister(OpSm, "Sm", Vmovss); | 2455 IValueT Sm = encodeSRegister(OpSm, "Sm", Vmovss); |
| 2456 constexpr IValueT VmovssOpcode = B23 | B21 | B20 | B6; | 2456 constexpr IValueT VmovssOpcode = B23 | B21 | B20 | B6; |
| 2457 constexpr IValueT S0 = 0; | 2457 constexpr IValueT S0 = 0; |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2647 // | 2647 // |
| 2648 // cccc11010D101101dddd1010iiiiiiii where cccc=Cond, ddddD=BaseReg, and | 2648 // cccc11010D101101dddd1010iiiiiiii where cccc=Cond, ddddD=BaseReg, and |
| 2649 // iiiiiiii=NumConsecRegs. | 2649 // iiiiiiii=NumConsecRegs. |
| 2650 constexpr IValueT VpushOpcode = | 2650 constexpr IValueT VpushOpcode = |
| 2651 B27 | B26 | B24 | B21 | B19 | B18 | B16 | B11 | B9; | 2651 B27 | B26 | B24 | B21 | B19 | B18 | B16 | B11 | B9; |
| 2652 emitVStackOp(Cond, VpushOpcode, OpBaseReg, NumConsecRegs); | 2652 emitVStackOp(Cond, VpushOpcode, OpBaseReg, NumConsecRegs); |
| 2653 } | 2653 } |
| 2654 | 2654 |
| 2655 } // end of namespace ARM32 | 2655 } // end of namespace ARM32 |
| 2656 } // end of namespace Ice | 2656 } // end of namespace Ice |
| OLD | NEW |