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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 215 |
216 void ldr(const Operand *OpRt, const Operand *OpAddress, CondARM32::Cond Cond, | 216 void ldr(const Operand *OpRt, const Operand *OpAddress, CondARM32::Cond Cond, |
217 const TargetLowering *Lowering) { | 217 const TargetLowering *Lowering) { |
218 const TargetInfo TInfo(Lowering); | 218 const TargetInfo TInfo(Lowering); |
219 ldr(OpRt, OpAddress, Cond, TInfo); | 219 ldr(OpRt, OpAddress, Cond, TInfo); |
220 } | 220 } |
221 | 221 |
222 void lsl(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1, | 222 void lsl(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1, |
223 bool SetFlags, CondARM32::Cond Cond); | 223 bool SetFlags, CondARM32::Cond Cond); |
224 | 224 |
| 225 void lsr(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1, |
| 226 bool SetFlags, CondARM32::Cond Cond); |
| 227 |
225 void mov(const Operand *OpRd, const Operand *OpSrc, CondARM32::Cond Cond); | 228 void mov(const Operand *OpRd, const Operand *OpSrc, CondARM32::Cond Cond); |
226 | 229 |
227 void movw(const Operand *OpRd, const Operand *OpSrc, CondARM32::Cond Cond); | 230 void movw(const Operand *OpRd, const Operand *OpSrc, CondARM32::Cond Cond); |
228 | 231 |
229 void movt(const Operand *OpRd, const Operand *OpSrc, CondARM32::Cond Cond); | 232 void movt(const Operand *OpRd, const Operand *OpSrc, CondARM32::Cond Cond); |
230 | 233 |
231 void mla(const Operand *OpRd, const Operand *OpRn, const Operand *OpRm, | 234 void mla(const Operand *OpRd, const Operand *OpRn, const Operand *OpRm, |
232 const Operand *OpRa, CondARM32::Cond Cond); | 235 const Operand *OpRa, CondARM32::Cond Cond); |
233 | 236 |
234 void mul(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1, | 237 void mul(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1, |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 // Pattern cccc011100x1dddd1111mmmm0001nnn where cccc=Cond, | 369 // Pattern cccc011100x1dddd1111mmmm0001nnn where cccc=Cond, |
367 // x=Opcode, dddd=Rd, nnnn=Rn, mmmm=Rm. | 370 // x=Opcode, dddd=Rd, nnnn=Rn, mmmm=Rm. |
368 void emitDivOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, | 371 void emitDivOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, |
369 IValueT Rm, const char *InstName); | 372 IValueT Rm, const char *InstName); |
370 | 373 |
371 // Pattern ccccxxxxxxxfnnnnddddssss1001mmmm where cccc=Cond, dddd=Rd, nnnn=Rn, | 374 // Pattern ccccxxxxxxxfnnnnddddssss1001mmmm where cccc=Cond, dddd=Rd, nnnn=Rn, |
372 // mmmm=Rm, ssss=Rs, f=SetFlags and xxxxxxx=Opcode. | 375 // mmmm=Rm, ssss=Rs, f=SetFlags and xxxxxxx=Opcode. |
373 void emitMulOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, | 376 void emitMulOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, |
374 IValueT Rm, IValueT Rs, bool SetFlags, const char *InstName); | 377 IValueT Rm, IValueT Rs, bool SetFlags, const char *InstName); |
375 | 378 |
| 379 // Pattern cccc0001101s0000ddddxxxxxtt0mmmm where cccc=Cond, s=SetFlags, |
| 380 // dddd=Rd, mmmm=Rm, tt=Shift, and xxxxx is defined by OpSrc1. OpSrc1 defines |
| 381 // either xxxxx=Imm5, or xxxxx=ssss0 where ssss=Rs. |
| 382 void emitShift(const CondARM32::Cond Cond, |
| 383 const OperandARM32::ShiftKind Shift, const Operand *OpRd, |
| 384 const Operand *OpRm, const Operand *OpSrc1, |
| 385 const bool SetFlags, const char *InstName); |
| 386 |
376 // Implements various forms of Unsigned extend value, using pattern | 387 // Implements various forms of Unsigned extend value, using pattern |
377 // ccccxxxxxxxxnnnnddddrr000111mmmm where cccc=Cond, xxxxxxxx<<20=Opcode, | 388 // ccccxxxxxxxxnnnnddddrr000111mmmm where cccc=Cond, xxxxxxxx<<20=Opcode, |
378 // nnnn=Rn, dddd=Rd, rr=Rotation, and mmmm=Rm. | 389 // nnnn=Rn, dddd=Rd, rr=Rotation, and mmmm=Rm. |
379 void emitUxt(CondARM32::Cond, IValueT Opcode, IValueT Rd, IValueT Rn, | 390 void emitUxt(CondARM32::Cond, IValueT Opcode, IValueT Rd, IValueT Rn, |
380 IValueT Rm, RotationValue Rotation, const char *InstName); | 391 IValueT Rm, RotationValue Rotation, const char *InstName); |
381 | 392 |
382 // Pattern cccctttxxxxnnnn0000iiiiiiiiiiii where cccc=Cond, nnnn=Rn, | 393 // Pattern cccctttxxxxnnnn0000iiiiiiiiiiii where cccc=Cond, nnnn=Rn, |
383 // ttt=Instruction type (derived from OpSrc1), iiiiiiiiiiii is derived from | 394 // ttt=Instruction type (derived from OpSrc1), iiiiiiiiiiii is derived from |
384 // OpSrc1, and xxxx=Opcode. | 395 // OpSrc1, and xxxx=Opcode. |
385 void emitCompareOp(CondARM32::Cond Cond, IValueT Opcode, const Operand *OpRn, | 396 void emitCompareOp(CondARM32::Cond Cond, IValueT Opcode, const Operand *OpRn, |
(...skipping 11 matching lines...) Expand all Loading... |
397 // cccc=Cond, xxxxxxx<<21=Opcode, dddd=Rd, s=SetFlags, and | 408 // cccc=Cond, xxxxxxx<<21=Opcode, dddd=Rd, s=SetFlags, and |
398 // iiiiiiiiiiiiiiii=Imm16. | 409 // iiiiiiiiiiiiiiii=Imm16. |
399 void emitMovw(IValueT Opcode, IValueT Rd, IValueT Imm16, bool SetFlags, | 410 void emitMovw(IValueT Opcode, IValueT Rd, IValueT Imm16, bool SetFlags, |
400 CondARM32::Cond Cond); | 411 CondARM32::Cond Cond); |
401 }; | 412 }; |
402 | 413 |
403 } // end of namespace ARM32 | 414 } // end of namespace ARM32 |
404 } // end of namespace Ice | 415 } // end of namespace Ice |
405 | 416 |
406 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H | 417 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H |
OLD | NEW |