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

Side by Side Diff: src/IceAssemblerARM32.h

Issue 1486263002: More coverage of load/stores in ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Format and fix nits. 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
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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 EmitChecks RuleChecks); 330 EmitChecks RuleChecks);
331 331
332 // Same as above, but the value for Rd and Rn have already been converted 332 // Same as above, but the value for Rd and Rn have already been converted
333 // into instruction values. 333 // into instruction values.
334 void emitType01(IValueT Opcode, IValueT OpRd, IValueT OpRn, 334 void emitType01(IValueT Opcode, IValueT OpRd, IValueT OpRn,
335 const Operand *OpSrc1, bool SetFlags, CondARM32::Cond Cond, 335 const Operand *OpSrc1, bool SetFlags, CondARM32::Cond Cond,
336 EmitChecks RuleChecks); 336 EmitChecks RuleChecks);
337 337
338 void emitType05(CondARM32::Cond COnd, int32_t Offset, bool Link); 338 void emitType05(CondARM32::Cond COnd, int32_t Offset, bool Link);
339 339
340 // Pattern ccccoooaabalnnnnttttaaaaaaaaaaaa where cccc=Cond, ooo=InstType, 340 // Emit ccccoooaabalnnnnttttaaaaaaaaaaaa where cccc=Cond,
341 // l=isLoad, b=isByte, and aaa0a0aaaa0000aaaaaaaaaaaa=Address. Note that 341 // ooo=InstType, l=isLoad, b=isByte, and
342 // Address is assumed to be defined by decodeAddress() in 342 // aaa0a0aaaa0000aaaaaaaaaaaa=Address. Note that Address is assumed to be
343 // IceAssemblerARM32.cpp. 343 // defined by decodeAddress() in IceAssemblerARM32.cpp.
344 void emitMemOp(CondARM32::Cond Cond, IValueT InstType, bool IsLoad, 344 void emitMemOp(CondARM32::Cond Cond, IValueT InstType, bool IsLoad,
345 bool IsByte, uint32_t Rt, uint32_t Address); 345 bool IsByte, IValueT Rt, IValueT Address);
346
347 // Emit ldr/ldrb/str/strb instruction with given address.
348 void emitMemOp(CondARM32::Cond Cond, bool IsLoad, bool IsByte, IValueT Rt,
349 const Operand *OpAddress, const TargetInfo &TInfo);
350
351 // Emit ldrh/ldrd/strh/strd instruction with given address using encoding 3.
352 void emitMemOpEnc3(CondARM32::Cond Cond, IValueT Opcode, IValueT Rt,
353 const Operand *OpAddress, const TargetInfo &TInfo);
346 354
347 // Pattern cccc100aaaalnnnnrrrrrrrrrrrrrrrr where cccc=Cond, 355 // Pattern cccc100aaaalnnnnrrrrrrrrrrrrrrrr where cccc=Cond,
348 // aaaa<<21=AddressMode, l=IsLoad, nnnn=BaseReg, and 356 // aaaa<<21=AddressMode, l=IsLoad, nnnn=BaseReg, and
349 // rrrrrrrrrrrrrrrr is bitset of Registers. 357 // rrrrrrrrrrrrrrrr is bitset of Registers.
350 void emitMultiMemOp(CondARM32::Cond Cond, BlockAddressMode AddressMode, 358 void emitMultiMemOp(CondARM32::Cond Cond, BlockAddressMode AddressMode,
351 bool IsLoad, IValueT BaseReg, IValueT Registers); 359 bool IsLoad, IValueT BaseReg, IValueT Registers);
352 360
353 // Pattern cccc011100x1dddd1111mmmm0001nnn where cccc=Cond, 361 // Pattern cccc011100x1dddd1111mmmm0001nnn where cccc=Cond,
354 // x=Opcode, dddd=Rd, nnnn=Rn, mmmm=Rm. 362 // x=Opcode, dddd=Rd, nnnn=Rn, mmmm=Rm.
355 void emitDivOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn, 363 void emitDivOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn,
(...skipping 28 matching lines...) Expand all
384 // cccc=Cond, xxxxxxx<<21=Opcode, dddd=Rd, s=SetFlags, and 392 // cccc=Cond, xxxxxxx<<21=Opcode, dddd=Rd, s=SetFlags, and
385 // iiiiiiiiiiiiiiii=Imm16. 393 // iiiiiiiiiiiiiiii=Imm16.
386 void emitMovw(IValueT Opcode, IValueT Rd, IValueT Imm16, bool SetFlags, 394 void emitMovw(IValueT Opcode, IValueT Rd, IValueT Imm16, bool SetFlags,
387 CondARM32::Cond Cond); 395 CondARM32::Cond Cond);
388 }; 396 };
389 397
390 } // end of namespace ARM32 398 } // end of namespace ARM32
391 } // end of namespace Ice 399 } // end of namespace Ice
392 400
393 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H 401 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698