| OLD | NEW |
| 1 //===- subzero/src/IceAssemblerARM32.h - Assembler for ARM32 ----*- C++ -*-===// | 1 //===- subzero/src/IceAssemblerARM32.h - 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 | 306 |
| 307 void udiv(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1, | 307 void udiv(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1, |
| 308 CondARM32::Cond Cond); | 308 CondARM32::Cond Cond); |
| 309 | 309 |
| 310 void umull(const Operand *OpRdLo, const Operand *OpRdHi, const Operand *OpRn, | 310 void umull(const Operand *OpRdLo, const Operand *OpRdHi, const Operand *OpRn, |
| 311 const Operand *OpRm, CondARM32::Cond Cond); | 311 const Operand *OpRm, CondARM32::Cond Cond); |
| 312 | 312 |
| 313 // Implements uxtb/uxth depending on type of OpSrc0. | 313 // Implements uxtb/uxth depending on type of OpSrc0. |
| 314 void uxt(const Operand *OpRd, const Operand *OpSrc0, CondARM32::Cond Cond); | 314 void uxt(const Operand *OpRd, const Operand *OpSrc0, CondARM32::Cond Cond); |
| 315 | 315 |
| 316 void vpop(const Variable *OpBaseReg, SizeT NumConsecRegs, |
| 317 CondARM32::Cond Cond); |
| 318 |
| 319 void vpush(const Variable *OpBaseReg, SizeT NumConsecRegs, |
| 320 CondARM32::Cond Cond); |
| 321 |
| 316 static bool classof(const Assembler *Asm) { | 322 static bool classof(const Assembler *Asm) { |
| 317 return Asm->getKind() == Asm_ARM32; | 323 return Asm->getKind() == Asm_ARM32; |
| 318 } | 324 } |
| 319 | 325 |
| 320 void emitTextInst(const std::string &Text, SizeT InstSize); | 326 void emitTextInst(const std::string &Text, SizeT InstSize); |
| 321 | 327 |
| 322 private: | 328 private: |
| 323 // A vector of pool-allocated x86 labels for CFG nodes. | 329 // A vector of pool-allocated x86 labels for CFG nodes. |
| 324 using LabelVector = std::vector<Label *>; | 330 using LabelVector = std::vector<Label *>; |
| 325 LabelVector CfgNodeLabels; | 331 LabelVector CfgNodeLabels; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 IValueT Rt, const Operand *OpAddress, | 403 IValueT Rt, const Operand *OpAddress, |
| 398 const TargetInfo &TInfo, const char *InstName); | 404 const TargetInfo &TInfo, const char *InstName); |
| 399 | 405 |
| 400 // Pattern cccc100aaaalnnnnrrrrrrrrrrrrrrrr where cccc=Cond, | 406 // Pattern cccc100aaaalnnnnrrrrrrrrrrrrrrrr where cccc=Cond, |
| 401 // aaaa<<21=AddressMode, l=IsLoad, nnnn=BaseReg, and | 407 // aaaa<<21=AddressMode, l=IsLoad, nnnn=BaseReg, and |
| 402 // rrrrrrrrrrrrrrrr is bitset of Registers. | 408 // rrrrrrrrrrrrrrrr is bitset of Registers. |
| 403 void emitMultiMemOp(CondARM32::Cond Cond, BlockAddressMode AddressMode, | 409 void emitMultiMemOp(CondARM32::Cond Cond, BlockAddressMode AddressMode, |
| 404 bool IsLoad, IValueT BaseReg, IValueT Registers, | 410 bool IsLoad, IValueT BaseReg, IValueT Registers, |
| 405 const char *InstName); | 411 const char *InstName); |
| 406 | 412 |
| 413 // Pattern ccccxxxxxDxxxxxxddddxxxxiiiiiiii where cccc=Cond, ddddD=BaseReg, |
| 414 // iiiiiiii=NumConsecRegs, and xxxxx0xxxxxx0000xxxx00000000=Opcode. |
| 415 void emitVStackOp(CondARM32::Cond Cond, IValueT Opcode, |
| 416 const Variable *OpBaseReg, SizeT NumConsecRegs, |
| 417 const char *InstName); |
| 418 |
| 407 // Pattern cccc011100x1dddd1111mmmm0001nnn where cccc=Cond, | 419 // Pattern cccc011100x1dddd1111mmmm0001nnn where cccc=Cond, |
| 408 // x=Opcode, dddd=Rd, nnnn=Rn, mmmm=Rm. | 420 // x=Opcode, dddd=Rd, nnnn=Rn, mmmm=Rm. |
| 409 void emitDivOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, | 421 void emitDivOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, |
| 410 IValueT Rm, const char *InstName); | 422 IValueT Rm, const char *InstName); |
| 411 | 423 |
| 412 // Pattern ccccxxxxxxxfnnnnddddssss1001mmmm where cccc=Cond, dddd=Rd, nnnn=Rn, | 424 // Pattern ccccxxxxxxxfnnnnddddssss1001mmmm where cccc=Cond, dddd=Rd, nnnn=Rn, |
| 413 // mmmm=Rm, ssss=Rs, f=SetFlags and xxxxxxx=Opcode. | 425 // mmmm=Rm, ssss=Rs, f=SetFlags and xxxxxxx=Opcode. |
| 414 void emitMulOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, | 426 void emitMulOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, |
| 415 IValueT Rm, IValueT Rs, bool SetFlags, const char *InstName); | 427 IValueT Rm, IValueT Rs, bool SetFlags, const char *InstName); |
| 416 | 428 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 446 // where cccc=Cond, xxxxxxx<<21=Opcode, dddd=Rd, s=SetFlags, and | 458 // where cccc=Cond, xxxxxxx<<21=Opcode, dddd=Rd, s=SetFlags, and |
| 447 // iiiiiiiiiiiiiiii=Imm16. | 459 // iiiiiiiiiiiiiiii=Imm16. |
| 448 void emitMovwt(CondARM32::Cond Cond, bool IsMovw, const Operand *OpRd, | 460 void emitMovwt(CondARM32::Cond Cond, bool IsMovw, const Operand *OpRd, |
| 449 const Operand *OpSrc, const char *MovName); | 461 const Operand *OpSrc, const char *MovName); |
| 450 }; | 462 }; |
| 451 | 463 |
| 452 } // end of namespace ARM32 | 464 } // end of namespace ARM32 |
| 453 } // end of namespace Ice | 465 } // end of namespace Ice |
| 454 | 466 |
| 455 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H | 467 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H |
| OLD | NEW |