| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 | 311 |
| 312 void udiv(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1, | 312 void udiv(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1, |
| 313 CondARM32::Cond Cond); | 313 CondARM32::Cond Cond); |
| 314 | 314 |
| 315 void umull(const Operand *OpRdLo, const Operand *OpRdHi, const Operand *OpRn, | 315 void umull(const Operand *OpRdLo, const Operand *OpRdHi, const Operand *OpRn, |
| 316 const Operand *OpRm, CondARM32::Cond Cond); | 316 const Operand *OpRm, CondARM32::Cond Cond); |
| 317 | 317 |
| 318 // Implements uxtb/uxth depending on type of OpSrc0. | 318 // Implements uxtb/uxth depending on type of OpSrc0. |
| 319 void uxt(const Operand *OpRd, const Operand *OpSrc0, CondARM32::Cond Cond); | 319 void uxt(const Operand *OpRd, const Operand *OpSrc0, CondARM32::Cond Cond); |
| 320 | 320 |
| 321 void vpop(const Variable *OpBaseReg, SizeT NumConsecRegs, |
| 322 CondARM32::Cond Cond); |
| 323 |
| 324 void vpush(const Variable *OpBaseReg, SizeT NumConsecRegs, |
| 325 CondARM32::Cond Cond); |
| 326 |
| 321 static bool classof(const Assembler *Asm) { | 327 static bool classof(const Assembler *Asm) { |
| 322 return Asm->getKind() == Asm_ARM32; | 328 return Asm->getKind() == Asm_ARM32; |
| 323 } | 329 } |
| 324 | 330 |
| 325 void emitTextInst(const std::string &Text, SizeT InstSize); | 331 void emitTextInst(const std::string &Text, SizeT InstSize); |
| 326 | 332 |
| 327 private: | 333 private: |
| 328 // A vector of pool-allocated x86 labels for CFG nodes. | 334 // A vector of pool-allocated x86 labels for CFG nodes. |
| 329 using LabelVector = std::vector<Label *>; | 335 using LabelVector = std::vector<Label *>; |
| 330 LabelVector CfgNodeLabels; | 336 LabelVector CfgNodeLabels; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 IValueT Rt, const Operand *OpAddress, | 413 IValueT Rt, const Operand *OpAddress, |
| 408 const TargetInfo &TInfo, const char *InstName); | 414 const TargetInfo &TInfo, const char *InstName); |
| 409 | 415 |
| 410 // Pattern cccc100aaaalnnnnrrrrrrrrrrrrrrrr where cccc=Cond, | 416 // Pattern cccc100aaaalnnnnrrrrrrrrrrrrrrrr where cccc=Cond, |
| 411 // aaaa<<21=AddressMode, l=IsLoad, nnnn=BaseReg, and | 417 // aaaa<<21=AddressMode, l=IsLoad, nnnn=BaseReg, and |
| 412 // rrrrrrrrrrrrrrrr is bitset of Registers. | 418 // rrrrrrrrrrrrrrrr is bitset of Registers. |
| 413 void emitMultiMemOp(CondARM32::Cond Cond, BlockAddressMode AddressMode, | 419 void emitMultiMemOp(CondARM32::Cond Cond, BlockAddressMode AddressMode, |
| 414 bool IsLoad, IValueT BaseReg, IValueT Registers, | 420 bool IsLoad, IValueT BaseReg, IValueT Registers, |
| 415 const char *InstName); | 421 const char *InstName); |
| 416 | 422 |
| 423 // Pattern ccccxxxxxDxxxxxxddddxxxxiiiiiiii where cccc=Cond, ddddD=BaseReg, |
| 424 // iiiiiiii=NumConsecRegs, and xxxxx0xxxxxx0000xxxx00000000=Opcode. |
| 425 void emitVStackOp(CondARM32::Cond Cond, IValueT Opcode, |
| 426 const Variable *OpBaseReg, SizeT NumConsecRegs, |
| 427 const char *InstName); |
| 428 |
| 417 // Pattern cccc011100x1dddd1111mmmm0001nnn where cccc=Cond, | 429 // Pattern cccc011100x1dddd1111mmmm0001nnn where cccc=Cond, |
| 418 // x=Opcode, dddd=Rd, nnnn=Rn, mmmm=Rm. | 430 // x=Opcode, dddd=Rd, nnnn=Rn, mmmm=Rm. |
| 419 void emitDivOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, | 431 void emitDivOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, |
| 420 IValueT Rm, const char *InstName); | 432 IValueT Rm, const char *InstName); |
| 421 | 433 |
| 422 // Pattern ccccxxxxxxxfnnnnddddssss1001mmmm where cccc=Cond, dddd=Rd, nnnn=Rn, | 434 // Pattern ccccxxxxxxxfnnnnddddssss1001mmmm where cccc=Cond, dddd=Rd, nnnn=Rn, |
| 423 // mmmm=Rm, ssss=Rs, f=SetFlags and xxxxxxx=Opcode. | 435 // mmmm=Rm, ssss=Rs, f=SetFlags and xxxxxxx=Opcode. |
| 424 void emitMulOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, | 436 void emitMulOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, |
| 425 IValueT Rm, IValueT Rs, bool SetFlags, const char *InstName); | 437 IValueT Rm, IValueT Rs, bool SetFlags, const char *InstName); |
| 426 | 438 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 456 // where cccc=Cond, xxxxxxx<<21=Opcode, dddd=Rd, s=SetFlags, and | 468 // where cccc=Cond, xxxxxxx<<21=Opcode, dddd=Rd, s=SetFlags, and |
| 457 // iiiiiiiiiiiiiiii=Imm16. | 469 // iiiiiiiiiiiiiiii=Imm16. |
| 458 void emitMovwt(CondARM32::Cond Cond, bool IsMovw, const Operand *OpRd, | 470 void emitMovwt(CondARM32::Cond Cond, bool IsMovw, const Operand *OpRd, |
| 459 const Operand *OpSrc, const char *MovName); | 471 const Operand *OpSrc, const char *MovName); |
| 460 }; | 472 }; |
| 461 | 473 |
| 462 } // end of namespace ARM32 | 474 } // end of namespace ARM32 |
| 463 } // end of namespace Ice | 475 } // end of namespace Ice |
| 464 | 476 |
| 465 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H | 477 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H |
| OLD | NEW |