Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Side by Side Diff: src/IceAssemblerARM32.h

Issue 1501073002: Implement LSR instructions for the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nit. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/DartARM32/assembler_arm.cc ('k') | src/IceAssemblerARM32.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 // Pattern cccc011100x1dddd1111mmmm0001nnn where cccc=Cond, 372 // Pattern cccc011100x1dddd1111mmmm0001nnn where cccc=Cond,
370 // x=Opcode, dddd=Rd, nnnn=Rn, mmmm=Rm. 373 // x=Opcode, dddd=Rd, nnnn=Rn, mmmm=Rm.
371 void emitDivOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, 374 void emitDivOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn,
372 IValueT Rm, const char *InstName); 375 IValueT Rm, const char *InstName);
373 376
374 // Pattern ccccxxxxxxxfnnnnddddssss1001mmmm where cccc=Cond, dddd=Rd, nnnn=Rn, 377 // Pattern ccccxxxxxxxfnnnnddddssss1001mmmm where cccc=Cond, dddd=Rd, nnnn=Rn,
375 // mmmm=Rm, ssss=Rs, f=SetFlags and xxxxxxx=Opcode. 378 // mmmm=Rm, ssss=Rs, f=SetFlags and xxxxxxx=Opcode.
376 void emitMulOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, 379 void emitMulOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn,
377 IValueT Rm, IValueT Rs, bool SetFlags, const char *InstName); 380 IValueT Rm, IValueT Rs, bool SetFlags, const char *InstName);
378 381
382 // Pattern cccc0001101s0000ddddxxxxxtt0mmmm where cccc=Cond, s=SetFlags,
383 // dddd=Rd, mmmm=Rm, tt=Shift, and xxxxx is defined by OpSrc1. OpSrc1 defines
384 // either xxxxx=Imm5, or xxxxx=ssss0 where ssss=Rs.
385 void emitShift(const CondARM32::Cond Cond,
386 const OperandARM32::ShiftKind Shift, const Operand *OpRd,
387 const Operand *OpRm, const Operand *OpSrc1,
388 const bool SetFlags, const char *InstName);
389
379 // Implements various forms of Unsigned extend value, using pattern 390 // Implements various forms of Unsigned extend value, using pattern
380 // ccccxxxxxxxxnnnnddddrr000111mmmm where cccc=Cond, xxxxxxxx<<20=Opcode, 391 // ccccxxxxxxxxnnnnddddrr000111mmmm where cccc=Cond, xxxxxxxx<<20=Opcode,
381 // nnnn=Rn, dddd=Rd, rr=Rotation, and mmmm=Rm. 392 // nnnn=Rn, dddd=Rd, rr=Rotation, and mmmm=Rm.
382 void emitUxt(CondARM32::Cond, IValueT Opcode, IValueT Rd, IValueT Rn, 393 void emitUxt(CondARM32::Cond, IValueT Opcode, IValueT Rd, IValueT Rn,
383 IValueT Rm, RotationValue Rotation, const char *InstName); 394 IValueT Rm, RotationValue Rotation, const char *InstName);
384 395
385 // Pattern cccctttxxxxnnnn0000iiiiiiiiiiii where cccc=Cond, nnnn=Rn, 396 // Pattern cccctttxxxxnnnn0000iiiiiiiiiiii where cccc=Cond, nnnn=Rn,
386 // ttt=Instruction type (derived from OpSrc1), iiiiiiiiiiii is derived from 397 // ttt=Instruction type (derived from OpSrc1), iiiiiiiiiiii is derived from
387 // OpSrc1, and xxxx=Opcode. 398 // OpSrc1, and xxxx=Opcode.
388 void emitCompareOp(CondARM32::Cond Cond, IValueT Opcode, const Operand *OpRn, 399 void emitCompareOp(CondARM32::Cond Cond, IValueT Opcode, const Operand *OpRn,
(...skipping 11 matching lines...) Expand all
400 // where cccc=Cond, xxxxxxx<<21=Opcode, dddd=Rd, s=SetFlags, and 411 // where cccc=Cond, xxxxxxx<<21=Opcode, dddd=Rd, s=SetFlags, and
401 // iiiiiiiiiiiiiiii=Imm16. 412 // iiiiiiiiiiiiiiii=Imm16.
402 void emitMovwt(CondARM32::Cond Cond, bool IsMovw, const Operand *OpRd, 413 void emitMovwt(CondARM32::Cond Cond, bool IsMovw, const Operand *OpRd,
403 const Operand *OpSrc, const char *MovName); 414 const Operand *OpSrc, const char *MovName);
404 }; 415 };
405 416
406 } // end of namespace ARM32 417 } // end of namespace ARM32
407 } // end of namespace Ice 418 } // end of namespace Ice
408 419
409 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H 420 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H
OLDNEW
« no previous file with comments | « src/DartARM32/assembler_arm.cc ('k') | src/IceAssemblerARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698