blob: 8abb79510743e102c217ddc9d35dead209853dc1 [file] [log] [blame]
Alexandre Ramesd3832962016-07-04 15:03:43 +01001// Copyright 2015, VIXL authors
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are met:
6//
7// * Redistributions of source code must retain the above copyright notice,
8// this list of conditions and the following disclaimer.
9// * Redistributions in binary form must reproduce the above copyright
10// notice, this list of conditions and the following disclaimer in the
11// documentation and/or other materials provided with the distribution.
12// * Neither the name of ARM Limited nor the names of its contributors may
13// be used to endorse or promote products derived from this software
14// without specific prior written permission.
15//
16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND
17// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26// POSSIBILITY OF SUCH DAMAGE.
27
28#ifndef VIXL_AARCH32_MACRO_ASSEMBLER_AARCH32_H_
29#define VIXL_AARCH32_MACRO_ASSEMBLER_AARCH32_H_
30
31#include "utils-vixl.h"
32#include "aarch32/instructions-aarch32.h"
33#include "aarch32/assembler-aarch32.h"
34#include "aarch32/operand-aarch32.h"
35
36namespace vixl {
37namespace aarch32 {
38
39class JumpTableBase;
40
Vincent Belliard934696d2016-08-18 11:03:56 -070041enum FlagsUpdate { LeaveFlags = 0, SetFlags = 1, DontCare = 2 };
42
Alexandre Ramesd3832962016-07-04 15:03:43 +010043// LiteralPool class, defined as a container for literals
44class LiteralPool {
45 public:
46 typedef std::list<RawLiteral*>::iterator RawLiteralListIterator;
47
48 public:
49 LiteralPool() : size_(0) {}
50 ~LiteralPool() {
51 VIXL_ASSERT(literals_.empty() && (size_ == 0));
52 for (RawLiteralListIterator literal_it = keep_until_delete_.begin();
53 literal_it != keep_until_delete_.end();
54 literal_it++) {
55 delete *literal_it;
56 }
57 keep_until_delete_.clear();
58 }
59
60 unsigned GetSize() const { return size_; }
61
62 // Add a literal to the literal container.
Vincent Belliard51d1ccc2016-09-22 10:17:11 -070063 void AddLiteral(RawLiteral* literal) {
64 if (literal->GetPositionInPool() == Label::kMaxOffset) {
65 uint32_t position = GetSize();
66 literal->SetPositionInPool(position);
67 literals_.push_back(literal);
68 size_ += literal->GetAlignedSize();
69 }
Alexandre Ramesd3832962016-07-04 15:03:43 +010070 }
71
72 // First literal to be emitted.
73 RawLiteralListIterator GetFirst() { return literals_.begin(); }
74
75 // Mark the end of the literal container.
76 RawLiteralListIterator GetEnd() { return literals_.end(); }
77
78 // Remove all the literals from the container.
79 // If the literal's memory management has been delegated to the container
80 // it will be delete'd.
81 void Clear() {
82 for (RawLiteralListIterator literal_it = GetFirst(); literal_it != GetEnd();
83 literal_it++) {
84 RawLiteral* literal = *literal_it;
85 switch (literal->GetDeletionPolicy()) {
86 case RawLiteral::kDeletedOnPlacementByPool:
87 delete literal;
88 break;
89 case RawLiteral::kDeletedOnPoolDestruction:
90 keep_until_delete_.push_back(literal);
91 break;
92 case RawLiteral::kManuallyDeleted:
93 break;
94 }
95 }
96 literals_.clear();
97 size_ = 0;
98 }
99
100 private:
101 // Size (in bytes and including alignments) of the literal pool.
102 unsigned size_;
103
104 // Literal container.
105 std::list<RawLiteral*> literals_;
106 // Already bound Literal container the app requested this pool to keep.
107 std::list<RawLiteral*> keep_until_delete_;
108};
109
110// Macro assembler for aarch32 instruction set.
111class MacroAssembler : public Assembler {
112 public:
113 enum EmitOption { kBranchRequired, kNoBranchRequired };
114
115 private:
Vincent Belliard8885c172016-08-24 11:33:19 -0700116 class AllowAssemblerEmissionScope {
117 MacroAssembler* masm_;
118
119 public:
120 AllowAssemblerEmissionScope(MacroAssembler* masm, uint32_t size)
121 : masm_(masm) {
122 VIXL_ASSERT(!masm->AllowAssembler());
123 masm->EnsureEmitFor(size);
124#ifdef VIXL_DEBUG
125 masm->SetAllowAssembler(true);
126#else
127 USE(masm_);
128#endif
129 }
130 ~AllowAssemblerEmissionScope() {
131#ifdef VIXL_DEBUG
132 VIXL_ASSERT(masm_->AllowAssembler());
133 masm_->SetAllowAssembler(false);
134#endif
135 }
136 };
137
Alexandre Ramesd3832962016-07-04 15:03:43 +0100138 class MacroAssemblerContext {
139 public:
140 MacroAssemblerContext() : count_(0) {}
141 ~MacroAssemblerContext() {}
142 unsigned GetRecursiveCount() const { return count_; }
143 void Up() {
144 count_++;
145 VIXL_CHECK(count_ < kMaxRecursion);
146 }
147 void Down() {
148 VIXL_ASSERT((count_ > 0) && (count_ < kMaxRecursion));
149 count_--;
150 }
151
152 private:
153 unsigned count_;
154 static const uint32_t kMaxRecursion = 5;
155 };
156
157 class ContextScope {
158 public:
159 explicit ContextScope(MacroAssembler* const masm) : masm_(masm) {
160 VIXL_ASSERT(masm_->AllowMacroInstructions());
161 masm_->GetContext()->Up();
162 }
163 ~ContextScope() { masm_->GetContext()->Down(); }
164
165 private:
166 MacroAssembler* const masm_;
167 };
168
169 MacroAssemblerContext* GetContext() { return &context_; }
170
171 class ITScope {
172 public:
173 ITScope(MacroAssembler* masm, Condition* cond, bool can_use_it = false)
174 : masm_(masm), cond_(*cond), can_use_it_(can_use_it) {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100175 if (!cond_.Is(al) && masm->IsUsingT32()) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100176 if (can_use_it_) {
177 // IT is not deprecated (that implies a 16 bit T32 instruction).
178 // We generate an IT instruction and a conditional instruction.
179 masm->it(cond_);
180 } else {
181 // The usage of IT is deprecated for the instruction.
182 // We generate a conditional branch and an unconditional instruction.
183 masm_->EnsureEmitFor(k16BitT32InstructionSizeInBytes +
184 kMaxT32MacroInstructionSizeInBytes);
185 // Generate the branch.
186 masm_->b(cond_.Negate(), Narrow, &label_);
187 // Tell the macro-assembler to generate unconditional instructions.
188 *cond = al;
189 }
190 }
191#ifdef VIXL_DEBUG
192 initial_cursor_offset_ = masm->GetCursorOffset();
Alexandre Ramesfd098172016-08-09 10:29:53 +0100193#else
194 USE(initial_cursor_offset_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100195#endif
196 }
197 ~ITScope() {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100198 if (!cond_.Is(al) && masm_->IsUsingT32() && !can_use_it_) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100199 VIXL_ASSERT(masm_->GetCursorOffset() - initial_cursor_offset_ <=
200 kMaxT32MacroInstructionSizeInBytes);
201 masm_->bind(&label_);
202 }
203 }
204
205 private:
206 MacroAssembler* masm_;
207 Condition cond_;
208 Label label_;
209 bool can_use_it_;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100210 uint32_t initial_cursor_offset_;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100211 };
212
213 template <Assembler::InstructionCondDtDL asmfn>
214 class EmitLiteralCondDtDL {
215 public:
216 EmitLiteralCondDtDL(Condition cond, DataType dt, DRegister rt)
217 : cond_(cond), dt_(dt), rt_(rt) {}
218 void emit(MacroAssembler* const masm, RawLiteral* const literal) {
219 (masm->*asmfn)(cond_, dt_, rt_, literal);
220 }
221
222 private:
223 Condition cond_;
224 DataType dt_;
225 DRegister rt_;
226 };
227
228 template <Assembler::InstructionCondDtSL asmfn>
229 class EmitLiteralCondDtSL {
230 public:
231 EmitLiteralCondDtSL(Condition cond, DataType dt, SRegister rt)
232 : cond_(cond), dt_(dt), rt_(rt) {}
233 void emit(MacroAssembler* const masm, RawLiteral* const literal) {
234 (masm->*asmfn)(cond_, dt_, rt_, literal);
235 }
236
237 private:
238 Condition cond_;
239 DataType dt_;
240 SRegister rt_;
241 };
242
243 template <Assembler::InstructionCondRL asmfn>
244 class EmitLiteralCondRL {
245 public:
246 EmitLiteralCondRL(Condition cond, Register rt) : cond_(cond), rt_(rt) {}
247 void emit(MacroAssembler* const masm, RawLiteral* const literal) {
248 (masm->*asmfn)(cond_, rt_, literal);
249 }
250
251 private:
252 Condition cond_;
253 Register rt_;
254 };
255
256 template <Assembler::InstructionCondRRL asmfn>
257 class EmitLiteralCondRRL {
258 public:
259 EmitLiteralCondRRL(Condition cond, Register rt, Register rt2)
260 : cond_(cond), rt_(rt), rt2_(rt2) {}
261 void emit(MacroAssembler* const masm, RawLiteral* const literal) {
262 (masm->*asmfn)(cond_, rt_, rt2_, literal);
263 }
264
265 private:
266 Condition cond_;
267 Register rt_, rt2_;
268 };
269
270 class LiteralPoolManager {
271 public:
272 explicit LiteralPoolManager(MacroAssembler* const masm) : masm_(masm) {
273 ResetCheckpoint();
274 }
275
276 void ResetCheckpoint() { checkpoint_ = Label::kMaxOffset; }
277
278 LiteralPool* GetLiteralPool() { return &literal_pool_; }
279 Label::Offset GetCheckpoint() const {
280 // Make room for a branch over the pools.
281 return checkpoint_ - kMaxInstructionSizeInBytes;
282 }
283 size_t GetLiteralPoolSize() const { return literal_pool_.GetSize(); }
284
285 // Checks if the insertion of the literal will put the forward reference
286 // too far in the literal pool.
287 bool IsInsertTooFar(RawLiteral* literal, uint32_t from) const {
288 uint32_t checkpoint = from + literal->GetLastInsertForwardDistance();
289 checkpoint =
290 std::min(checkpoint, static_cast<uint32_t>(literal->GetCheckpoint()));
291 bool too_far = AlignDown(checkpoint, 4) < from + literal_pool_.GetSize() +
292 kMaxInstructionSizeInBytes;
293 return too_far;
294 }
295
296 // Set the different checkpoints where the literal pool has to be emited.
297 void UpdateCheckpoint(RawLiteral* literal) {
298 // The literal should have been placed somewhere in the literal pool
299 VIXL_ASSERT(literal->GetPositionInPool() != Label::kMaxOffset);
300 // TODO(all): Consider AddForwardRef as a virtual so the checkpoint is
301 // updated when inserted. Or move checkpoint_ into Label,
302 literal->UpdateCheckpoint();
303 Label::Offset tmp =
304 literal->GetAlignedCheckpoint(4) - literal->GetPositionInPool();
305 if (checkpoint_ > tmp) {
306 checkpoint_ = tmp;
307 masm_->ComputeCheckpoint();
308 }
309 }
310
Alexandre Ramesd3832962016-07-04 15:03:43 +0100311 private:
312 MacroAssembler* const masm_;
313 LiteralPool literal_pool_;
314
315 // Max offset in the code buffer where the literal needs to be
316 // emitted. A default value of Label::kMaxOffset means that the checkpoint
317 // is invalid.
318 Label::Offset checkpoint_;
319 };
320
321 class VeneerPoolManager {
322 public:
323 explicit VeneerPoolManager(MacroAssembler* masm)
324 : masm_(masm), checkpoint_(Label::kMaxOffset) {}
325 Label::Offset GetCheckpoint() const {
326 // Make room for a branch over the pools.
327 return checkpoint_ - kMaxInstructionSizeInBytes;
328 }
329 size_t GetMaxSize() const {
330 return labels_.size() * kMaxInstructionSizeInBytes;
331 }
332 void AddLabel(Label* label) {
333 if (!label->IsInVeneerPool()) {
334 label->SetInVeneerPool();
335 labels_.push_back(label);
336 }
337 Label::ForwardReference& back = label->GetBackForwardRef();
338 back.SetIsBranch();
339 label->UpdateCheckpoint();
340 Label::Offset tmp = label->GetCheckpoint();
341 if (checkpoint_ > tmp) {
342 checkpoint_ = tmp;
343 masm_->ComputeCheckpoint();
344 }
345 }
346 void RemoveLabel(Label* label);
347 void Emit(Label::Offset target);
348
349 private:
350 MacroAssembler* masm_;
351 // List of all unbound labels which are used by a branch instruction.
352 std::list<Label*> labels_;
353 // Max offset in the code buffer where the veneer needs to be emitted.
354 // A default value of Label::kMaxOffset means that the checkpoint is
355 // invalid.
356 Label::Offset checkpoint_;
357 };
358
359 void PerformEnsureEmit(Label::Offset target, uint32_t extra_size);
360
361 protected:
362 void HandleOutOfBoundsImmediate(Condition cond, Register tmp, uint32_t imm);
363
364 // Generate the instruction and if it's not possible revert the whole thing.
365 // emit the literal pool and regenerate the instruction.
366 // Note: The instruction is generated via
367 // void T::emit(MacroAssembler* const, RawLiteral* const)
368 template <typename T>
369 void GenerateInstruction(T instr_callback, RawLiteral* const literal) {
Pierre Langloisf5348ce2016-09-22 11:15:35 +0100370 int32_t cursor = GetCursorOffset();
Alexandre Ramesd3832962016-07-04 15:03:43 +0100371 uint32_t where = cursor + GetArchitectureStatePCOffset();
372 // Emit the instruction, via the assembler
Vincent Belliard8885c172016-08-24 11:33:19 -0700373 {
374 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
375 instr_callback.emit(this, literal);
376 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700377 if (!literal->IsManuallyPlaced()) {
378 if (IsInsertTooFar(literal, where)) {
379 // The instruction's data is too far: revert the emission
Alexandre Rames919e3fe2016-10-14 09:07:54 +0100380 GetBuffer()->Rewind(cursor);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700381 literal->InvalidateLastForwardReference(RawLiteral::kNoUpdateNecessary);
382 EmitLiteralPool(kBranchRequired);
383 AllowAssemblerEmissionScope allow_scope(this,
384 kMaxInstructionSizeInBytes);
385 instr_callback.emit(this, literal);
386 }
387 literal_pool_manager_.GetLiteralPool()->AddLiteral(literal);
388 literal_pool_manager_.UpdateCheckpoint(literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100389 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100390 }
391
392 public:
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100393 explicit MacroAssembler(InstructionSet isa = A32)
394 : Assembler(isa),
Alexandre Ramesd3832962016-07-04 15:03:43 +0100395 available_(r12),
396 checkpoint_(Label::kMaxOffset),
397 literal_pool_manager_(this),
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100398 veneer_pool_manager_(this),
399 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE) {
Vincent Belliard8885c172016-08-24 11:33:19 -0700400 SetAllowAssembler(false);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100401#ifdef VIXL_DEBUG
402 SetAllowMacroInstructions(true);
Alexandre Ramesfd098172016-08-09 10:29:53 +0100403#else
404 USE(literal_pool_manager_);
405 USE(allow_macro_instructions_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100406#endif
407 ComputeCheckpoint();
408 }
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100409 explicit MacroAssembler(size_t size, InstructionSet isa = A32)
410 : Assembler(size, isa),
411 available_(r12),
412 checkpoint_(Label::kMaxOffset),
413 literal_pool_manager_(this),
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100414 veneer_pool_manager_(this),
415 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE) {
Vincent Belliard8885c172016-08-24 11:33:19 -0700416 SetAllowAssembler(false);
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100417#ifdef VIXL_DEBUG
418 SetAllowMacroInstructions(true);
419#endif
420 ComputeCheckpoint();
421 }
Alexandre Rames919e3fe2016-10-14 09:07:54 +0100422 MacroAssembler(byte* buffer, size_t size, InstructionSet isa = A32)
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100423 : Assembler(buffer, size, isa),
Alexandre Ramesd3832962016-07-04 15:03:43 +0100424 available_(r12),
425 checkpoint_(Label::kMaxOffset),
426 literal_pool_manager_(this),
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100427 veneer_pool_manager_(this),
428 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE) {
Vincent Belliard8885c172016-08-24 11:33:19 -0700429 SetAllowAssembler(false);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100430#ifdef VIXL_DEBUG
431 SetAllowMacroInstructions(true);
432#endif
433 ComputeCheckpoint();
434 }
435
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100436 bool GenerateSimulatorCode() const { return generate_simulator_code_; }
437
Alexandre Ramesd3832962016-07-04 15:03:43 +0100438#ifdef VIXL_DEBUG
439 // Tell whether any of the macro instruction can be used. When false the
440 // MacroAssembler will assert if a method which can emit a variable number
441 // of instructions is called.
442 void SetAllowMacroInstructions(bool value) {
443 allow_macro_instructions_ = value;
444 }
445 bool AllowMacroInstructions() const { return allow_macro_instructions_; }
446#endif
447
448 void FinalizeCode() {
449 EmitLiteralPool(kNoBranchRequired);
450 Assembler::FinalizeCode();
451 }
452
453 RegisterList* GetScratchRegisterList() { return &available_; }
454 VRegisterList* GetScratchVRegisterList() { return &available_vfp_; }
455
456 // State and type helpers.
457 bool IsModifiedImmediate(uint32_t imm) {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100458 return (IsUsingT32() && ImmediateT32(imm).IsValid()) ||
Alexandre Ramesd3832962016-07-04 15:03:43 +0100459 ImmediateA32(imm).IsValid();
460 }
461
462 void Bind(Label* label) {
463 VIXL_ASSERT(allow_macro_instructions_);
464 bind(label);
465 if (label->IsInVeneerPool()) veneer_pool_manager_.RemoveLabel(label);
466 }
467
468 void AddBranchLabel(Label* label) {
469 if (label->IsBound()) return;
470 veneer_pool_manager_.AddLabel(label);
471 }
472
473 void Place(RawLiteral* literal) {
474 VIXL_ASSERT(allow_macro_instructions_);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700475 VIXL_ASSERT(literal->IsManuallyPlaced());
Pierre Langloisf5348ce2016-09-22 11:15:35 +0100476 size_t literal_size = literal->GetSize();
477 VIXL_ASSERT(IsUint32(literal_size));
478 EnsureEmitFor(static_cast<uint32_t>(literal_size));
Alexandre Ramesd3832962016-07-04 15:03:43 +0100479 place(literal);
480 }
481
482 void ComputeCheckpoint();
483
484 void EnsureEmitFor(uint32_t size) {
485 Label::Offset target = AlignUp(GetCursorOffset() + size, 4);
486 if (target < checkpoint_) return;
487 PerformEnsureEmit(target, size);
488 }
489
490 bool IsInsertTooFar(RawLiteral* literal, uint32_t where) {
491 return literal_pool_manager_.IsInsertTooFar(literal, where);
492 }
493
494 // Emit the literal pool in the code buffer.
495 // Every literal is placed on a 32bit boundary
496 // All the literals in the pool will be removed from the pool and potentially
497 // delete'd.
498 void EmitLiteralPool(LiteralPool* const literal_pool, EmitOption option) {
499 if (literal_pool->GetSize() > 0) {
500#ifdef VIXL_DEBUG
501 for (LiteralPool::RawLiteralListIterator literal_it =
502 literal_pool->GetFirst();
503 literal_it != literal_pool->GetEnd();
504 literal_it++) {
505 RawLiteral* literal = *literal_it;
Pierre Langloisf5348ce2016-09-22 11:15:35 +0100506 VIXL_ASSERT(GetCursorOffset() < literal->GetCheckpoint());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100507 }
508#endif
509 Label after_literal;
510 if (option == kBranchRequired) {
Alexandre Rames919e3fe2016-10-14 09:07:54 +0100511 GetBuffer()->EnsureSpaceFor(kMaxInstructionSizeInBytes);
Vincent Belliard8885c172016-08-24 11:33:19 -0700512 VIXL_ASSERT(!AllowAssembler());
513#ifdef VIXL_DEBUG
514 SetAllowAssembler(true);
515#endif
Alexandre Ramesd3832962016-07-04 15:03:43 +0100516 b(&after_literal);
Vincent Belliard8885c172016-08-24 11:33:19 -0700517 VIXL_ASSERT(AllowAssembler());
518#ifdef VIXL_DEBUG
519 SetAllowAssembler(false);
520#endif
Alexandre Ramesd3832962016-07-04 15:03:43 +0100521 }
Alexandre Rames919e3fe2016-10-14 09:07:54 +0100522 GetBuffer()->Align();
523 GetBuffer()->EnsureSpaceFor(literal_pool->GetSize());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100524 for (LiteralPool::RawLiteralListIterator it = literal_pool->GetFirst();
525 it != literal_pool->GetEnd();
526 it++) {
527 place(*it);
528 }
529 if (option == kBranchRequired) bind(&after_literal);
530 literal_pool->Clear();
531 }
532 }
533 void EmitLiteralPool(EmitOption option = kBranchRequired) {
534 EmitLiteralPool(literal_pool_manager_.GetLiteralPool(), option);
535 literal_pool_manager_.ResetCheckpoint();
536 ComputeCheckpoint();
537 }
538
Pierre Langloisf5348ce2016-09-22 11:15:35 +0100539 size_t GetLiteralPoolSize() const {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100540 return literal_pool_manager_.GetLiteralPoolSize();
541 }
542
Pierre Langlois25e39872016-10-20 17:14:21 +0100543 // Adr with a literal already constructed. Add the literal to the pool if it
544 // is not already done.
545 void Adr(Condition cond, Register rd, RawLiteral* literal) {
546 EmitLiteralCondRL<&Assembler::adr> emit_helper(cond, rd);
547 GenerateInstruction(emit_helper, literal);
548 }
549 void Adr(Register rd, RawLiteral* literal) { Adr(al, rd, literal); }
550
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700551 // Loads with literals already constructed. Add the literal to the pool
552 // if it is not already done.
553 void Ldr(Condition cond, Register rt, RawLiteral* literal) {
554 EmitLiteralCondRL<&Assembler::ldr> emit_helper(cond, rt);
555 GenerateInstruction(emit_helper, literal);
556 }
557 void Ldr(Register rt, RawLiteral* literal) { Ldr(al, rt, literal); }
558
559 void Ldrb(Condition cond, Register rt, RawLiteral* literal) {
560 EmitLiteralCondRL<&Assembler::ldrb> emit_helper(cond, rt);
561 GenerateInstruction(emit_helper, literal);
562 }
563 void Ldrb(Register rt, RawLiteral* literal) { Ldrb(al, rt, literal); }
564
565 void Ldrd(Condition cond, Register rt, Register rt2, RawLiteral* literal) {
566 EmitLiteralCondRRL<&Assembler::ldrd> emit_helper(cond, rt, rt2);
567 GenerateInstruction(emit_helper, literal);
568 }
569 void Ldrd(Register rt, Register rt2, RawLiteral* literal) {
570 Ldrd(al, rt, rt2, literal);
571 }
572
573 void Ldrh(Condition cond, Register rt, RawLiteral* literal) {
574 EmitLiteralCondRL<&Assembler::ldrh> emit_helper(cond, rt);
575 GenerateInstruction(emit_helper, literal);
576 }
577 void Ldrh(Register rt, RawLiteral* literal) { Ldrh(al, rt, literal); }
578
579 void Ldrsb(Condition cond, Register rt, RawLiteral* literal) {
580 EmitLiteralCondRL<&Assembler::ldrsb> emit_helper(cond, rt);
581 GenerateInstruction(emit_helper, literal);
582 }
583 void Ldrsb(Register rt, RawLiteral* literal) { Ldrsb(al, rt, literal); }
584
585 void Ldrsh(Condition cond, Register rt, RawLiteral* literal) {
586 EmitLiteralCondRL<&Assembler::ldrsh> emit_helper(cond, rt);
587 GenerateInstruction(emit_helper, literal);
588 }
589 void Ldrsh(Register rt, RawLiteral* literal) { Ldrsh(al, rt, literal); }
590
591 void Vldr(Condition cond, DataType dt, DRegister rd, RawLiteral* literal) {
592 EmitLiteralCondDtDL<&Assembler::vldr> emit_helper(cond, dt, rd);
593 GenerateInstruction(emit_helper, literal);
594 }
595 void Vldr(DataType dt, DRegister rd, RawLiteral* literal) {
596 Vldr(al, dt, rd, literal);
597 }
598 void Vldr(Condition cond, DRegister rd, RawLiteral* literal) {
599 Vldr(cond, Untyped64, rd, literal);
600 }
601 void Vldr(DRegister rd, RawLiteral* literal) {
602 Vldr(al, Untyped64, rd, literal);
603 }
604
605 void Vldr(Condition cond, DataType dt, SRegister rd, RawLiteral* literal) {
606 EmitLiteralCondDtSL<&Assembler::vldr> emit_helper(cond, dt, rd);
607 GenerateInstruction(emit_helper, literal);
608 }
609 void Vldr(DataType dt, SRegister rd, RawLiteral* literal) {
610 Vldr(al, dt, rd, literal);
611 }
612 void Vldr(Condition cond, SRegister rd, RawLiteral* literal) {
613 Vldr(cond, Untyped32, rd, literal);
614 }
615 void Vldr(SRegister rd, RawLiteral* literal) {
616 Vldr(al, Untyped32, rd, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100617 }
618
619 // Generic Ldr(register, data)
620 void Ldr(Condition cond, Register rt, uint32_t v) {
621 RawLiteral* literal =
622 new Literal<uint32_t>(v, RawLiteral::kDeletedOnPlacementByPool);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100623 EmitLiteralCondRL<&Assembler::ldr> emit_helper(cond, rt);
624 GenerateInstruction(emit_helper, literal);
625 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100626 template <typename T>
627 void Ldr(Register rt, T v) {
628 Ldr(al, rt, v);
629 }
630
631 // Generic Ldrd(rt, rt2, data)
632 void Ldrd(Condition cond, Register rt, Register rt2, uint64_t v) {
633 RawLiteral* literal =
634 new Literal<uint64_t>(v, RawLiteral::kDeletedOnPlacementByPool);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100635 EmitLiteralCondRRL<&Assembler::ldrd> emit_helper(cond, rt, rt2);
636 GenerateInstruction(emit_helper, literal);
637 }
638 template <typename T>
639 void Ldrd(Register rt, Register rt2, T v) {
640 Ldrd(al, rt, rt2, v);
641 }
642
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700643 void Vldr(Condition cond, SRegister rd, float v) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100644 RawLiteral* literal =
645 new Literal<float>(v, RawLiteral::kDeletedOnPlacementByPool);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700646 EmitLiteralCondDtSL<&Assembler::vldr> emit_helper(cond, Untyped32, rd);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100647 GenerateInstruction(emit_helper, literal);
648 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700649 void Vldr(SRegister rd, float v) { Vldr(al, rd, v); }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100650
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700651 void Vldr(Condition cond, DRegister rd, double v) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100652 RawLiteral* literal =
653 new Literal<double>(v, RawLiteral::kDeletedOnPlacementByPool);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700654 EmitLiteralCondDtDL<&Assembler::vldr> emit_helper(cond, Untyped64, rd);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100655 GenerateInstruction(emit_helper, literal);
656 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700657 void Vldr(DRegister rd, double v) { Vldr(al, rd, v); }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100658
659 void Vmov(Condition cond, DRegister rt, double v) { Vmov(cond, F64, rt, v); }
660 void Vmov(DRegister rt, double v) { Vmov(al, F64, rt, v); }
661 void Vmov(Condition cond, SRegister rt, float v) { Vmov(cond, F32, rt, v); }
662 void Vmov(SRegister rt, float v) { Vmov(al, F32, rt, v); }
663
664 void Switch(Register reg, JumpTableBase* table);
Vincent Belliard8885c172016-08-24 11:33:19 -0700665 void GenerateSwitchTable(JumpTableBase* table, int table_size);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100666 void Case(JumpTableBase* table, int case_index);
667 void Break(JumpTableBase* table);
668 void Default(JumpTableBase* table);
669 void EndSwitch(JumpTableBase* table);
670
Alexandre Ramesad91cee2016-07-26 09:31:34 +0100671 // Claim memory on the stack.
672 // Note that the Claim, Drop, and Peek helpers below ensure that offsets used
673 // are multiples of 32 bits to help maintain 32-bit SP alignment.
674 // We could `Align{Up,Down}(size, 4)`, but that's potentially problematic:
Alexandre Ramesd3832962016-07-04 15:03:43 +0100675 // Claim(3)
676 // Claim(1)
677 // Drop(4)
678 // would seem correct, when in fact:
679 // Claim(3) -> sp = sp - 4
Alexandre Ramesad91cee2016-07-26 09:31:34 +0100680 // Claim(1) -> sp = sp - 4
Alexandre Ramesd3832962016-07-04 15:03:43 +0100681 // Drop(4) -> sp = sp + 4
682 //
683 void Claim(int32_t size) {
684 if (size == 0) return;
685 // The stack must be kept 32bit aligned.
686 VIXL_ASSERT((size > 0) && ((size % 4) == 0));
687 Sub(sp, sp, size);
688 }
689 // Release memory on the stack
690 void Drop(int32_t size) {
691 if (size == 0) return;
692 // The stack must be kept 32bit aligned.
693 VIXL_ASSERT((size > 0) && ((size % 4) == 0));
694 Add(sp, sp, size);
695 }
696 void Peek(Register dst, int32_t offset) {
697 VIXL_ASSERT((offset >= 0) && ((offset % 4) == 0));
698 Ldr(dst, MemOperand(sp, offset));
699 }
700 void Poke(Register src, int32_t offset) {
701 VIXL_ASSERT((offset >= 0) && ((offset % 4) == 0));
702 Str(src, MemOperand(sp, offset));
703 }
704 void Printf(const char* format,
705 CPURegister reg1 = NoReg,
706 CPURegister reg2 = NoReg,
707 CPURegister reg3 = NoReg,
708 CPURegister reg4 = NoReg);
709 // Functions used by Printf for generation.
710 void PushRegister(CPURegister reg);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100711 void PreparePrintfArgument(CPURegister reg,
712 int* core_count,
713 int* vfp_count,
714 uint32_t* printf_type);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100715 // Handlers for cases not handled by the assembler.
716 virtual void Delegate(InstructionType type,
717 InstructionCondROp instruction,
718 Condition cond,
719 Register rn,
720 const Operand& operand);
721 virtual void Delegate(InstructionType type,
722 InstructionCondSizeROp instruction,
723 Condition cond,
724 EncodingSize size,
725 Register rn,
726 const Operand& operand);
727 virtual void Delegate(InstructionType type,
728 InstructionCondRROp instruction,
729 Condition cond,
730 Register rd,
731 Register rn,
732 const Operand& operand);
733 virtual void Delegate(InstructionType type,
734 InstructionCondSizeRROp instruction,
735 Condition cond,
736 EncodingSize size,
737 Register rd,
738 Register rn,
739 const Operand& operand);
740 virtual void Delegate(InstructionType type,
741 InstructionRL instruction,
742 Register rn,
743 Label* label);
744 virtual void Delegate(InstructionType type,
745 InstructionCondDtSSop instruction,
746 Condition cond,
747 DataType dt,
748 SRegister rd,
749 const SOperand& operand);
750 virtual void Delegate(InstructionType type,
751 InstructionCondDtDDop instruction,
752 Condition cond,
753 DataType dt,
754 DRegister rd,
755 const DOperand& operand);
756 virtual void Delegate(InstructionType type,
757 InstructionCondDtQQop instruction,
758 Condition cond,
759 DataType dt,
760 QRegister rd,
761 const QOperand& operand);
762 virtual void Delegate(InstructionType type,
763 InstructionCondMop instruction,
764 Condition cond,
765 const MemOperand& operand);
766 virtual void Delegate(InstructionType type,
767 InstructionCondRMop instruction,
768 Condition cond,
769 Register rd,
770 const MemOperand& operand);
771 virtual void Delegate(InstructionType type,
772 InstructionCondSizeRMop instruction,
773 Condition cond,
774 EncodingSize size,
775 Register rd,
776 const MemOperand& operand);
777 virtual void Delegate(InstructionType type,
778 InstructionCondRRMop instruction,
779 Condition cond,
780 Register rt,
781 Register rt2,
782 const MemOperand& operand);
783 virtual void Delegate(InstructionType type,
784 InstructionCondRRRMop instruction,
785 Condition cond,
786 Register rd,
787 Register rt,
788 Register rt2,
789 const MemOperand& operand);
790 virtual void Delegate(InstructionType type,
791 InstructionCondDtSMop instruction,
792 Condition cond,
793 DataType dt,
794 SRegister rd,
795 const MemOperand& operand);
796 virtual void Delegate(InstructionType type,
797 InstructionCondDtDMop instruction,
798 Condition cond,
799 DataType dt,
800 DRegister rd,
801 const MemOperand& operand);
802 virtual void Delegate(InstructionType type,
803 InstructionCondDtNrlMop instruction,
804 Condition cond,
805 DataType dt,
806 const NeonRegisterList& reglist,
807 const MemOperand& operand);
808 virtual void Delegate(InstructionType type,
809 InstructionCondMsrOp instruction,
810 Condition cond,
811 MaskedSpecialRegister spec_reg,
812 const Operand& operand);
813
814 // Start of generated code.
815
816 void Adc(Condition cond, Register rd, Register rn, const Operand& operand) {
817 VIXL_ASSERT(allow_macro_instructions_);
818 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -0700819 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100820 bool can_use_it =
821 // ADC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
822 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) &&
823 operand.GetBaseRegister().IsLow();
824 ITScope it_scope(this, &cond, can_use_it);
825 adc(cond, rd, rn, operand);
826 }
827 void Adc(Register rd, Register rn, const Operand& operand) {
828 Adc(al, rd, rn, operand);
829 }
Vincent Belliard934696d2016-08-18 11:03:56 -0700830 void Adc(FlagsUpdate flags,
831 Condition cond,
832 Register rd,
833 Register rn,
834 const Operand& operand) {
835 switch (flags) {
836 case LeaveFlags:
837 Adc(cond, rd, rn, operand);
838 break;
839 case SetFlags:
840 Adcs(cond, rd, rn, operand);
841 break;
842 case DontCare:
843 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
844 rn.Is(rd) && operand.IsPlainRegister() &&
845 operand.GetBaseRegister().IsLow();
846 if (can_be_16bit_encoded) {
847 Adcs(cond, rd, rn, operand);
848 } else {
849 Adc(cond, rd, rn, operand);
850 }
851 break;
852 }
853 }
854 void Adc(FlagsUpdate flags,
855 Register rd,
856 Register rn,
857 const Operand& operand) {
858 Adc(flags, al, rd, rn, operand);
859 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100860
861 void Adcs(Condition cond, Register rd, Register rn, const Operand& operand) {
862 VIXL_ASSERT(allow_macro_instructions_);
863 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -0700864 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100865 ITScope it_scope(this, &cond);
866 adcs(cond, rd, rn, operand);
867 }
868 void Adcs(Register rd, Register rn, const Operand& operand) {
869 Adcs(al, rd, rn, operand);
870 }
871
872 void Add(Condition cond, Register rd, Register rn, const Operand& operand) {
873 VIXL_ASSERT(allow_macro_instructions_);
874 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -0700875 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Rames628c5262016-09-21 11:52:30 +0100876 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
877 uint32_t immediate = operand.GetImmediate();
878 if (immediate == 0) {
879 return;
880 }
881 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100882 bool can_use_it =
883 // ADD<c>{<q>} <Rd>, <Rn>, #<imm3> ; T1
884 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() &&
885 rd.IsLow()) ||
886 // ADD<c>{<q>} {<Rdn>,} <Rdn>, #<imm8> ; T2
887 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
888 rd.IsLow() && rn.Is(rd)) ||
889 // ADD{<c>}{<q>} <Rd>, SP, #<imm8> ; T1
890 (operand.IsImmediate() && (operand.GetImmediate() <= 508) &&
891 ((operand.GetImmediate() & 0x3) == 0) && rd.IsLow() && rn.IsSP()) ||
892 // ADD<c>{<q>} <Rd>, <Rn>, <Rm>
893 (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
894 operand.GetBaseRegister().IsLow()) ||
895 // ADD<c>{<q>} <Rdn>, <Rm> ; T2
896 (operand.IsPlainRegister() && !rd.IsPC() && rn.Is(rd) &&
897 !operand.GetBaseRegister().IsSP() &&
898 !operand.GetBaseRegister().IsPC()) ||
899 // ADD{<c>}{<q>} {<Rdm>,} SP, <Rdm> ; T1
900 (operand.IsPlainRegister() && !rd.IsPC() && rn.IsSP() &&
901 operand.GetBaseRegister().Is(rd));
902 ITScope it_scope(this, &cond, can_use_it);
903 add(cond, rd, rn, operand);
904 }
905 void Add(Register rd, Register rn, const Operand& operand) {
906 Add(al, rd, rn, operand);
907 }
Vincent Belliard934696d2016-08-18 11:03:56 -0700908 void Add(FlagsUpdate flags,
909 Condition cond,
910 Register rd,
911 Register rn,
912 const Operand& operand) {
913 switch (flags) {
914 case LeaveFlags:
915 Add(cond, rd, rn, operand);
916 break;
917 case SetFlags:
918 Adds(cond, rd, rn, operand);
919 break;
920 case DontCare:
921 bool can_be_16bit_encoded =
922 IsUsingT32() && cond.Is(al) &&
923 ((operand.IsPlainRegister() &&
924 ((rd.IsLow() && rn.IsLow() &&
925 operand.GetBaseRegister().IsLow()) ||
926 rd.Is(rn))) ||
927 (operand.IsImmediate() &&
928 ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) ||
929 (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256)))));
930 if (can_be_16bit_encoded) {
931 Adds(cond, rd, rn, operand);
932 } else {
933 Add(cond, rd, rn, operand);
934 }
935 break;
936 }
937 }
938 void Add(FlagsUpdate flags,
939 Register rd,
940 Register rn,
941 const Operand& operand) {
942 Add(flags, al, rd, rn, operand);
943 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100944
945 void Adds(Condition cond, Register rd, Register rn, const Operand& operand) {
946 VIXL_ASSERT(allow_macro_instructions_);
947 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -0700948 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100949 ITScope it_scope(this, &cond);
950 adds(cond, rd, rn, operand);
951 }
952 void Adds(Register rd, Register rn, const Operand& operand) {
953 Adds(al, rd, rn, operand);
954 }
955
956 void Addw(Condition cond, Register rd, Register rn, const Operand& operand) {
957 VIXL_ASSERT(allow_macro_instructions_);
958 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -0700959 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100960 ITScope it_scope(this, &cond);
961 addw(cond, rd, rn, operand);
962 }
963 void Addw(Register rd, Register rn, const Operand& operand) {
964 Addw(al, rd, rn, operand);
965 }
966
967 void Adr(Condition cond, Register rd, Label* label) {
968 VIXL_ASSERT(allow_macro_instructions_);
969 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -0700970 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100971 ITScope it_scope(this, &cond);
972 adr(cond, rd, label);
973 }
974 void Adr(Register rd, Label* label) { Adr(al, rd, label); }
975
976 void And(Condition cond, Register rd, Register rn, const Operand& operand) {
977 VIXL_ASSERT(allow_macro_instructions_);
978 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -0700979 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Vincent Belliarde2aa8942016-10-12 15:30:17 -0700980 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +0100981 uint32_t immediate = operand.GetImmediate();
982 if (immediate == 0) {
983 mov(rd, 0);
984 return;
985 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -0700986 if ((immediate == 0xffffffff) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +0100987 return;
988 }
989 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100990 bool can_use_it =
991 // AND<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
992 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
993 operand.GetBaseRegister().IsLow();
994 ITScope it_scope(this, &cond, can_use_it);
995 and_(cond, rd, rn, operand);
996 }
997 void And(Register rd, Register rn, const Operand& operand) {
998 And(al, rd, rn, operand);
999 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001000 void And(FlagsUpdate flags,
1001 Condition cond,
1002 Register rd,
1003 Register rn,
1004 const Operand& operand) {
1005 switch (flags) {
1006 case LeaveFlags:
1007 And(cond, rd, rn, operand);
1008 break;
1009 case SetFlags:
1010 Ands(cond, rd, rn, operand);
1011 break;
1012 case DontCare:
1013 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1014 rn.Is(rd) && operand.IsPlainRegister() &&
1015 operand.GetBaseRegister().IsLow();
1016 if (can_be_16bit_encoded) {
1017 Ands(cond, rd, rn, operand);
1018 } else {
1019 And(cond, rd, rn, operand);
1020 }
1021 break;
1022 }
1023 }
1024 void And(FlagsUpdate flags,
1025 Register rd,
1026 Register rn,
1027 const Operand& operand) {
1028 And(flags, al, rd, rn, operand);
1029 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001030
1031 void Ands(Condition cond, Register rd, Register rn, const Operand& operand) {
1032 VIXL_ASSERT(allow_macro_instructions_);
1033 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001034 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001035 ITScope it_scope(this, &cond);
1036 ands(cond, rd, rn, operand);
1037 }
1038 void Ands(Register rd, Register rn, const Operand& operand) {
1039 Ands(al, rd, rn, operand);
1040 }
1041
1042 void Asr(Condition cond, Register rd, Register rm, const Operand& operand) {
1043 VIXL_ASSERT(allow_macro_instructions_);
1044 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001045 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001046 bool can_use_it =
1047 // ASR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
1048 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
1049 (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) ||
1050 // ASR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
1051 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
1052 operand.GetBaseRegister().IsLow());
1053 ITScope it_scope(this, &cond, can_use_it);
1054 asr(cond, rd, rm, operand);
1055 }
1056 void Asr(Register rd, Register rm, const Operand& operand) {
1057 Asr(al, rd, rm, operand);
1058 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001059 void Asr(FlagsUpdate flags,
1060 Condition cond,
1061 Register rd,
1062 Register rm,
1063 const Operand& operand) {
1064 switch (flags) {
1065 case LeaveFlags:
1066 Asr(cond, rd, rm, operand);
1067 break;
1068 case SetFlags:
1069 Asrs(cond, rd, rm, operand);
1070 break;
1071 case DontCare:
1072 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1073 rm.IsLow() && operand.IsImmediate() &&
1074 (operand.GetImmediate() < 32);
1075 if (can_be_16bit_encoded) {
1076 Asrs(cond, rd, rm, operand);
1077 } else {
1078 Asr(cond, rd, rm, operand);
1079 }
1080 break;
1081 }
1082 }
1083 void Asr(FlagsUpdate flags,
1084 Register rd,
1085 Register rm,
1086 const Operand& operand) {
1087 Asr(flags, al, rd, rm, operand);
1088 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001089
1090 void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) {
1091 VIXL_ASSERT(allow_macro_instructions_);
1092 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001093 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001094 ITScope it_scope(this, &cond);
1095 asrs(cond, rd, rm, operand);
1096 }
1097 void Asrs(Register rd, Register rm, const Operand& operand) {
1098 Asrs(al, rd, rm, operand);
1099 }
1100
1101 void B(Condition cond, Label* label) {
1102 VIXL_ASSERT(allow_macro_instructions_);
1103 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001104 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001105 b(cond, label);
1106 AddBranchLabel(label);
1107 }
1108 void B(Label* label) { B(al, label); }
1109
1110 void Bfc(Condition cond, Register rd, uint32_t lsb, const Operand& operand) {
1111 VIXL_ASSERT(allow_macro_instructions_);
1112 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001113 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001114 ITScope it_scope(this, &cond);
1115 bfc(cond, rd, lsb, operand);
1116 }
1117 void Bfc(Register rd, uint32_t lsb, const Operand& operand) {
1118 Bfc(al, rd, lsb, operand);
1119 }
1120
1121 void Bfi(Condition cond,
1122 Register rd,
1123 Register rn,
1124 uint32_t lsb,
1125 const Operand& operand) {
1126 VIXL_ASSERT(allow_macro_instructions_);
1127 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001128 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001129 ITScope it_scope(this, &cond);
1130 bfi(cond, rd, rn, lsb, operand);
1131 }
1132 void Bfi(Register rd, Register rn, uint32_t lsb, const Operand& operand) {
1133 Bfi(al, rd, rn, lsb, operand);
1134 }
1135
1136 void Bic(Condition cond, Register rd, Register rn, const Operand& operand) {
1137 VIXL_ASSERT(allow_macro_instructions_);
1138 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001139 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001140 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001141 uint32_t immediate = operand.GetImmediate();
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001142 if ((immediate == 0) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001143 return;
1144 }
1145 if (immediate == 0xffffffff) {
1146 mov(rd, 0);
1147 return;
1148 }
1149 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001150 bool can_use_it =
1151 // BIC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1152 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1153 operand.GetBaseRegister().IsLow();
1154 ITScope it_scope(this, &cond, can_use_it);
1155 bic(cond, rd, rn, operand);
1156 }
1157 void Bic(Register rd, Register rn, const Operand& operand) {
1158 Bic(al, rd, rn, operand);
1159 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001160 void Bic(FlagsUpdate flags,
1161 Condition cond,
1162 Register rd,
1163 Register rn,
1164 const Operand& operand) {
1165 switch (flags) {
1166 case LeaveFlags:
1167 Bic(cond, rd, rn, operand);
1168 break;
1169 case SetFlags:
1170 Bics(cond, rd, rn, operand);
1171 break;
1172 case DontCare:
1173 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1174 rn.Is(rd) && operand.IsPlainRegister() &&
1175 operand.GetBaseRegister().IsLow();
1176 if (can_be_16bit_encoded) {
1177 Bics(cond, rd, rn, operand);
1178 } else {
1179 Bic(cond, rd, rn, operand);
1180 }
1181 break;
1182 }
1183 }
1184 void Bic(FlagsUpdate flags,
1185 Register rd,
1186 Register rn,
1187 const Operand& operand) {
1188 Bic(flags, al, rd, rn, operand);
1189 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001190
1191 void Bics(Condition cond, Register rd, Register rn, const Operand& operand) {
1192 VIXL_ASSERT(allow_macro_instructions_);
1193 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001194 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001195 ITScope it_scope(this, &cond);
1196 bics(cond, rd, rn, operand);
1197 }
1198 void Bics(Register rd, Register rn, const Operand& operand) {
1199 Bics(al, rd, rn, operand);
1200 }
1201
1202 void Bkpt(Condition cond, uint32_t imm) {
1203 VIXL_ASSERT(allow_macro_instructions_);
1204 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001205 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001206 ITScope it_scope(this, &cond);
1207 bkpt(cond, imm);
1208 }
1209 void Bkpt(uint32_t imm) { Bkpt(al, imm); }
1210
1211 void Bl(Condition cond, Label* label) {
1212 VIXL_ASSERT(allow_macro_instructions_);
1213 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001214 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001215 ITScope it_scope(this, &cond);
1216 bl(cond, label);
1217 AddBranchLabel(label);
1218 }
1219 void Bl(Label* label) { Bl(al, label); }
1220
1221 void Blx(Condition cond, Label* label) {
1222 VIXL_ASSERT(allow_macro_instructions_);
1223 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001224 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001225 ITScope it_scope(this, &cond);
1226 blx(cond, label);
1227 AddBranchLabel(label);
1228 }
1229 void Blx(Label* label) { Blx(al, label); }
1230
1231 void Blx(Condition cond, Register rm) {
1232 VIXL_ASSERT(allow_macro_instructions_);
1233 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001234 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001235 bool can_use_it =
1236 // BLX{<c>}{<q>} <Rm> ; T1
1237 !rm.IsPC();
1238 ITScope it_scope(this, &cond, can_use_it);
1239 blx(cond, rm);
1240 }
1241 void Blx(Register rm) { Blx(al, rm); }
1242
1243 void Bx(Condition cond, Register rm) {
1244 VIXL_ASSERT(allow_macro_instructions_);
1245 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001246 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001247 bool can_use_it =
1248 // BX{<c>}{<q>} <Rm> ; T1
1249 !rm.IsPC();
1250 ITScope it_scope(this, &cond, can_use_it);
1251 bx(cond, rm);
1252 }
1253 void Bx(Register rm) { Bx(al, rm); }
1254
1255 void Bxj(Condition cond, Register rm) {
1256 VIXL_ASSERT(allow_macro_instructions_);
1257 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001258 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001259 ITScope it_scope(this, &cond);
1260 bxj(cond, rm);
1261 }
1262 void Bxj(Register rm) { Bxj(al, rm); }
1263
1264 void Cbnz(Register rn, Label* label) {
1265 VIXL_ASSERT(allow_macro_instructions_);
1266 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001267 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001268 cbnz(rn, label);
1269 AddBranchLabel(label);
1270 }
1271
1272 void Cbz(Register rn, Label* label) {
1273 VIXL_ASSERT(allow_macro_instructions_);
1274 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001275 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001276 cbz(rn, label);
1277 AddBranchLabel(label);
1278 }
1279
1280 void Clrex(Condition cond) {
1281 VIXL_ASSERT(allow_macro_instructions_);
1282 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001283 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001284 ITScope it_scope(this, &cond);
1285 clrex(cond);
1286 }
1287 void Clrex() { Clrex(al); }
1288
1289 void Clz(Condition cond, Register rd, Register rm) {
1290 VIXL_ASSERT(allow_macro_instructions_);
1291 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001292 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001293 ITScope it_scope(this, &cond);
1294 clz(cond, rd, rm);
1295 }
1296 void Clz(Register rd, Register rm) { Clz(al, rd, rm); }
1297
1298 void Cmn(Condition cond, Register rn, const Operand& operand) {
1299 VIXL_ASSERT(allow_macro_instructions_);
1300 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001301 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001302 bool can_use_it =
1303 // CMN{<c>}{<q>} <Rn>, <Rm> ; T1
1304 operand.IsPlainRegister() && rn.IsLow() &&
1305 operand.GetBaseRegister().IsLow();
1306 ITScope it_scope(this, &cond, can_use_it);
1307 cmn(cond, rn, operand);
1308 }
1309 void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); }
1310
1311 void Cmp(Condition cond, Register rn, const Operand& operand) {
1312 VIXL_ASSERT(allow_macro_instructions_);
1313 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001314 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001315 bool can_use_it =
1316 // CMP{<c>}{<q>} <Rn>, #<imm8> ; T1
1317 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
1318 rn.IsLow()) ||
1319 // CMP{<c>}{<q>} <Rn>, <Rm> ; T1 T2
1320 (operand.IsPlainRegister() && !rn.IsPC() &&
1321 !operand.GetBaseRegister().IsPC());
1322 ITScope it_scope(this, &cond, can_use_it);
1323 cmp(cond, rn, operand);
1324 }
1325 void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); }
1326
1327 void Crc32b(Condition cond, Register rd, Register rn, Register rm) {
1328 VIXL_ASSERT(allow_macro_instructions_);
1329 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001330 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001331 ITScope it_scope(this, &cond);
1332 crc32b(cond, rd, rn, rm);
1333 }
1334 void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); }
1335
1336 void Crc32cb(Condition cond, Register rd, Register rn, Register rm) {
1337 VIXL_ASSERT(allow_macro_instructions_);
1338 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001339 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001340 ITScope it_scope(this, &cond);
1341 crc32cb(cond, rd, rn, rm);
1342 }
1343 void Crc32cb(Register rd, Register rn, Register rm) {
1344 Crc32cb(al, rd, rn, rm);
1345 }
1346
1347 void Crc32ch(Condition cond, Register rd, Register rn, Register rm) {
1348 VIXL_ASSERT(allow_macro_instructions_);
1349 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001350 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001351 ITScope it_scope(this, &cond);
1352 crc32ch(cond, rd, rn, rm);
1353 }
1354 void Crc32ch(Register rd, Register rn, Register rm) {
1355 Crc32ch(al, rd, rn, rm);
1356 }
1357
1358 void Crc32cw(Condition cond, Register rd, Register rn, Register rm) {
1359 VIXL_ASSERT(allow_macro_instructions_);
1360 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001361 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001362 ITScope it_scope(this, &cond);
1363 crc32cw(cond, rd, rn, rm);
1364 }
1365 void Crc32cw(Register rd, Register rn, Register rm) {
1366 Crc32cw(al, rd, rn, rm);
1367 }
1368
1369 void Crc32h(Condition cond, Register rd, Register rn, Register rm) {
1370 VIXL_ASSERT(allow_macro_instructions_);
1371 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001372 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001373 ITScope it_scope(this, &cond);
1374 crc32h(cond, rd, rn, rm);
1375 }
1376 void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); }
1377
1378 void Crc32w(Condition cond, Register rd, Register rn, Register rm) {
1379 VIXL_ASSERT(allow_macro_instructions_);
1380 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001381 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001382 ITScope it_scope(this, &cond);
1383 crc32w(cond, rd, rn, rm);
1384 }
1385 void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); }
1386
1387 void Dmb(Condition cond, MemoryBarrier option) {
1388 VIXL_ASSERT(allow_macro_instructions_);
1389 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001390 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001391 ITScope it_scope(this, &cond);
1392 dmb(cond, option);
1393 }
1394 void Dmb(MemoryBarrier option) { Dmb(al, option); }
1395
1396 void Dsb(Condition cond, MemoryBarrier option) {
1397 VIXL_ASSERT(allow_macro_instructions_);
1398 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001399 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001400 ITScope it_scope(this, &cond);
1401 dsb(cond, option);
1402 }
1403 void Dsb(MemoryBarrier option) { Dsb(al, option); }
1404
1405 void Eor(Condition cond, Register rd, Register rn, const Operand& operand) {
1406 VIXL_ASSERT(allow_macro_instructions_);
1407 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001408 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Rames628c5262016-09-21 11:52:30 +01001409 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
1410 uint32_t immediate = operand.GetImmediate();
1411 if (immediate == 0) {
1412 return;
1413 }
1414 if (immediate == 0xffffffff) {
1415 mvn(rd, rn);
1416 return;
1417 }
1418 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001419 bool can_use_it =
1420 // EOR<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1421 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1422 operand.GetBaseRegister().IsLow();
1423 ITScope it_scope(this, &cond, can_use_it);
1424 eor(cond, rd, rn, operand);
1425 }
1426 void Eor(Register rd, Register rn, const Operand& operand) {
1427 Eor(al, rd, rn, operand);
1428 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001429 void Eor(FlagsUpdate flags,
1430 Condition cond,
1431 Register rd,
1432 Register rn,
1433 const Operand& operand) {
1434 switch (flags) {
1435 case LeaveFlags:
1436 Eor(cond, rd, rn, operand);
1437 break;
1438 case SetFlags:
1439 Eors(cond, rd, rn, operand);
1440 break;
1441 case DontCare:
1442 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1443 rn.Is(rd) && operand.IsPlainRegister() &&
1444 operand.GetBaseRegister().IsLow();
1445 if (can_be_16bit_encoded) {
1446 Eors(cond, rd, rn, operand);
1447 } else {
1448 Eor(cond, rd, rn, operand);
1449 }
1450 break;
1451 }
1452 }
1453 void Eor(FlagsUpdate flags,
1454 Register rd,
1455 Register rn,
1456 const Operand& operand) {
1457 Eor(flags, al, rd, rn, operand);
1458 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001459
1460 void Eors(Condition cond, Register rd, Register rn, const Operand& operand) {
1461 VIXL_ASSERT(allow_macro_instructions_);
1462 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001463 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001464 ITScope it_scope(this, &cond);
1465 eors(cond, rd, rn, operand);
1466 }
1467 void Eors(Register rd, Register rn, const Operand& operand) {
1468 Eors(al, rd, rn, operand);
1469 }
1470
1471 void Fldmdbx(Condition cond,
1472 Register rn,
1473 WriteBack write_back,
1474 DRegisterList dreglist) {
1475 VIXL_ASSERT(allow_macro_instructions_);
1476 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001477 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001478 ITScope it_scope(this, &cond);
1479 fldmdbx(cond, rn, write_back, dreglist);
1480 }
1481 void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) {
1482 Fldmdbx(al, rn, write_back, dreglist);
1483 }
1484
1485 void Fldmiax(Condition cond,
1486 Register rn,
1487 WriteBack write_back,
1488 DRegisterList dreglist) {
1489 VIXL_ASSERT(allow_macro_instructions_);
1490 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001491 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001492 ITScope it_scope(this, &cond);
1493 fldmiax(cond, rn, write_back, dreglist);
1494 }
1495 void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) {
1496 Fldmiax(al, rn, write_back, dreglist);
1497 }
1498
1499 void Fstmdbx(Condition cond,
1500 Register rn,
1501 WriteBack write_back,
1502 DRegisterList dreglist) {
1503 VIXL_ASSERT(allow_macro_instructions_);
1504 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001505 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001506 ITScope it_scope(this, &cond);
1507 fstmdbx(cond, rn, write_back, dreglist);
1508 }
1509 void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) {
1510 Fstmdbx(al, rn, write_back, dreglist);
1511 }
1512
1513 void Fstmiax(Condition cond,
1514 Register rn,
1515 WriteBack write_back,
1516 DRegisterList dreglist) {
1517 VIXL_ASSERT(allow_macro_instructions_);
1518 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001519 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001520 ITScope it_scope(this, &cond);
1521 fstmiax(cond, rn, write_back, dreglist);
1522 }
1523 void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) {
1524 Fstmiax(al, rn, write_back, dreglist);
1525 }
1526
1527 void Hlt(Condition cond, uint32_t imm) {
1528 VIXL_ASSERT(allow_macro_instructions_);
1529 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001530 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001531 ITScope it_scope(this, &cond);
1532 hlt(cond, imm);
1533 }
1534 void Hlt(uint32_t imm) { Hlt(al, imm); }
1535
1536 void Hvc(Condition cond, uint32_t imm) {
1537 VIXL_ASSERT(allow_macro_instructions_);
1538 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001539 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001540 ITScope it_scope(this, &cond);
1541 hvc(cond, imm);
1542 }
1543 void Hvc(uint32_t imm) { Hvc(al, imm); }
1544
1545 void Isb(Condition cond, MemoryBarrier option) {
1546 VIXL_ASSERT(allow_macro_instructions_);
1547 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001548 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001549 ITScope it_scope(this, &cond);
1550 isb(cond, option);
1551 }
1552 void Isb(MemoryBarrier option) { Isb(al, option); }
1553
Alexandre Rames628c5262016-09-21 11:52:30 +01001554
Alexandre Ramesd3832962016-07-04 15:03:43 +01001555 void Lda(Condition cond, Register rt, const MemOperand& operand) {
1556 VIXL_ASSERT(allow_macro_instructions_);
1557 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001558 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001559 ITScope it_scope(this, &cond);
1560 lda(cond, rt, operand);
1561 }
1562 void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); }
1563
1564 void Ldab(Condition cond, Register rt, const MemOperand& operand) {
1565 VIXL_ASSERT(allow_macro_instructions_);
1566 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001567 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001568 ITScope it_scope(this, &cond);
1569 ldab(cond, rt, operand);
1570 }
1571 void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); }
1572
1573 void Ldaex(Condition cond, Register rt, const MemOperand& operand) {
1574 VIXL_ASSERT(allow_macro_instructions_);
1575 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001576 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001577 ITScope it_scope(this, &cond);
1578 ldaex(cond, rt, operand);
1579 }
1580 void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); }
1581
1582 void Ldaexb(Condition cond, Register rt, const MemOperand& operand) {
1583 VIXL_ASSERT(allow_macro_instructions_);
1584 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001585 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001586 ITScope it_scope(this, &cond);
1587 ldaexb(cond, rt, operand);
1588 }
1589 void Ldaexb(Register rt, const MemOperand& operand) {
1590 Ldaexb(al, rt, operand);
1591 }
1592
1593 void Ldaexd(Condition cond,
1594 Register rt,
1595 Register rt2,
1596 const MemOperand& operand) {
1597 VIXL_ASSERT(allow_macro_instructions_);
1598 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001599 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001600 ITScope it_scope(this, &cond);
1601 ldaexd(cond, rt, rt2, operand);
1602 }
1603 void Ldaexd(Register rt, Register rt2, const MemOperand& operand) {
1604 Ldaexd(al, rt, rt2, operand);
1605 }
1606
1607 void Ldaexh(Condition cond, Register rt, const MemOperand& operand) {
1608 VIXL_ASSERT(allow_macro_instructions_);
1609 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001610 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001611 ITScope it_scope(this, &cond);
1612 ldaexh(cond, rt, operand);
1613 }
1614 void Ldaexh(Register rt, const MemOperand& operand) {
1615 Ldaexh(al, rt, operand);
1616 }
1617
1618 void Ldah(Condition cond, Register rt, const MemOperand& operand) {
1619 VIXL_ASSERT(allow_macro_instructions_);
1620 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001621 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001622 ITScope it_scope(this, &cond);
1623 ldah(cond, rt, operand);
1624 }
1625 void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); }
1626
1627 void Ldm(Condition cond,
1628 Register rn,
1629 WriteBack write_back,
1630 RegisterList registers) {
1631 VIXL_ASSERT(allow_macro_instructions_);
1632 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001633 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001634 ITScope it_scope(this, &cond);
1635 ldm(cond, rn, write_back, registers);
1636 }
1637 void Ldm(Register rn, WriteBack write_back, RegisterList registers) {
1638 Ldm(al, rn, write_back, registers);
1639 }
1640
1641 void Ldmda(Condition cond,
1642 Register rn,
1643 WriteBack write_back,
1644 RegisterList registers) {
1645 VIXL_ASSERT(allow_macro_instructions_);
1646 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001647 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001648 ITScope it_scope(this, &cond);
1649 ldmda(cond, rn, write_back, registers);
1650 }
1651 void Ldmda(Register rn, WriteBack write_back, RegisterList registers) {
1652 Ldmda(al, rn, write_back, registers);
1653 }
1654
1655 void Ldmdb(Condition cond,
1656 Register rn,
1657 WriteBack write_back,
1658 RegisterList registers) {
1659 VIXL_ASSERT(allow_macro_instructions_);
1660 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001661 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001662 ITScope it_scope(this, &cond);
1663 ldmdb(cond, rn, write_back, registers);
1664 }
1665 void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) {
1666 Ldmdb(al, rn, write_back, registers);
1667 }
1668
1669 void Ldmea(Condition cond,
1670 Register rn,
1671 WriteBack write_back,
1672 RegisterList registers) {
1673 VIXL_ASSERT(allow_macro_instructions_);
1674 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001675 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001676 ITScope it_scope(this, &cond);
1677 ldmea(cond, rn, write_back, registers);
1678 }
1679 void Ldmea(Register rn, WriteBack write_back, RegisterList registers) {
1680 Ldmea(al, rn, write_back, registers);
1681 }
1682
1683 void Ldmed(Condition cond,
1684 Register rn,
1685 WriteBack write_back,
1686 RegisterList registers) {
1687 VIXL_ASSERT(allow_macro_instructions_);
1688 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001689 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001690 ITScope it_scope(this, &cond);
1691 ldmed(cond, rn, write_back, registers);
1692 }
1693 void Ldmed(Register rn, WriteBack write_back, RegisterList registers) {
1694 Ldmed(al, rn, write_back, registers);
1695 }
1696
1697 void Ldmfa(Condition cond,
1698 Register rn,
1699 WriteBack write_back,
1700 RegisterList registers) {
1701 VIXL_ASSERT(allow_macro_instructions_);
1702 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001703 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001704 ITScope it_scope(this, &cond);
1705 ldmfa(cond, rn, write_back, registers);
1706 }
1707 void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) {
1708 Ldmfa(al, rn, write_back, registers);
1709 }
1710
1711 void Ldmfd(Condition cond,
1712 Register rn,
1713 WriteBack write_back,
1714 RegisterList registers) {
1715 VIXL_ASSERT(allow_macro_instructions_);
1716 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001717 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001718 ITScope it_scope(this, &cond);
1719 ldmfd(cond, rn, write_back, registers);
1720 }
1721 void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) {
1722 Ldmfd(al, rn, write_back, registers);
1723 }
1724
1725 void Ldmib(Condition cond,
1726 Register rn,
1727 WriteBack write_back,
1728 RegisterList registers) {
1729 VIXL_ASSERT(allow_macro_instructions_);
1730 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001731 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001732 ITScope it_scope(this, &cond);
1733 ldmib(cond, rn, write_back, registers);
1734 }
1735 void Ldmib(Register rn, WriteBack write_back, RegisterList registers) {
1736 Ldmib(al, rn, write_back, registers);
1737 }
1738
1739 void Ldr(Condition cond, Register rt, const MemOperand& operand) {
1740 VIXL_ASSERT(allow_macro_instructions_);
1741 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001742 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001743 bool can_use_it =
1744 // LDR{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
1745 (operand.IsImmediate() && rt.IsLow() &&
1746 operand.GetBaseRegister().IsLow() &&
1747 operand.IsOffsetImmediateWithinRange(0, 124, 4) &&
1748 (operand.GetAddrMode() == Offset)) ||
1749 // LDR{<c>}{<q>} <Rt>, [SP{, #{+}<imm>}] ; T2
1750 (operand.IsImmediate() && rt.IsLow() &&
1751 operand.GetBaseRegister().IsSP() &&
1752 operand.IsOffsetImmediateWithinRange(0, 1020, 4) &&
1753 (operand.GetAddrMode() == Offset)) ||
1754 // LDR{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
1755 (operand.IsPlainRegister() && rt.IsLow() &&
1756 operand.GetBaseRegister().IsLow() &&
1757 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
1758 (operand.GetAddrMode() == Offset));
1759 ITScope it_scope(this, &cond, can_use_it);
1760 ldr(cond, rt, operand);
1761 }
1762 void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); }
1763
1764 void Ldr(Condition cond, Register rt, Label* label) {
1765 VIXL_ASSERT(allow_macro_instructions_);
1766 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001767 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001768 ITScope it_scope(this, &cond);
1769 ldr(cond, rt, label);
1770 }
1771 void Ldr(Register rt, Label* label) { Ldr(al, rt, label); }
1772
1773 void Ldrb(Condition cond, Register rt, const MemOperand& operand) {
1774 VIXL_ASSERT(allow_macro_instructions_);
1775 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001776 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001777 bool can_use_it =
1778 // LDRB{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
1779 (operand.IsImmediate() && rt.IsLow() &&
1780 operand.GetBaseRegister().IsLow() &&
1781 operand.IsOffsetImmediateWithinRange(0, 31) &&
1782 (operand.GetAddrMode() == Offset)) ||
1783 // LDRB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
1784 (operand.IsPlainRegister() && rt.IsLow() &&
1785 operand.GetBaseRegister().IsLow() &&
1786 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
1787 (operand.GetAddrMode() == Offset));
1788 ITScope it_scope(this, &cond, can_use_it);
1789 ldrb(cond, rt, operand);
1790 }
1791 void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); }
1792
1793 void Ldrb(Condition cond, Register rt, Label* label) {
1794 VIXL_ASSERT(allow_macro_instructions_);
1795 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001796 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001797 ITScope it_scope(this, &cond);
1798 ldrb(cond, rt, label);
1799 }
1800 void Ldrb(Register rt, Label* label) { Ldrb(al, rt, label); }
1801
1802 void Ldrd(Condition cond,
1803 Register rt,
1804 Register rt2,
1805 const MemOperand& operand) {
1806 VIXL_ASSERT(allow_macro_instructions_);
1807 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001808 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001809 ITScope it_scope(this, &cond);
1810 ldrd(cond, rt, rt2, operand);
1811 }
1812 void Ldrd(Register rt, Register rt2, const MemOperand& operand) {
1813 Ldrd(al, rt, rt2, operand);
1814 }
1815
1816 void Ldrd(Condition cond, Register rt, Register rt2, Label* label) {
1817 VIXL_ASSERT(allow_macro_instructions_);
1818 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001819 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001820 ITScope it_scope(this, &cond);
1821 ldrd(cond, rt, rt2, label);
1822 }
1823 void Ldrd(Register rt, Register rt2, Label* label) {
1824 Ldrd(al, rt, rt2, label);
1825 }
1826
1827 void Ldrex(Condition cond, Register rt, const MemOperand& operand) {
1828 VIXL_ASSERT(allow_macro_instructions_);
1829 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001830 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001831 ITScope it_scope(this, &cond);
1832 ldrex(cond, rt, operand);
1833 }
1834 void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); }
1835
1836 void Ldrexb(Condition cond, Register rt, const MemOperand& operand) {
1837 VIXL_ASSERT(allow_macro_instructions_);
1838 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001839 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001840 ITScope it_scope(this, &cond);
1841 ldrexb(cond, rt, operand);
1842 }
1843 void Ldrexb(Register rt, const MemOperand& operand) {
1844 Ldrexb(al, rt, operand);
1845 }
1846
1847 void Ldrexd(Condition cond,
1848 Register rt,
1849 Register rt2,
1850 const MemOperand& operand) {
1851 VIXL_ASSERT(allow_macro_instructions_);
1852 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001853 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001854 ITScope it_scope(this, &cond);
1855 ldrexd(cond, rt, rt2, operand);
1856 }
1857 void Ldrexd(Register rt, Register rt2, const MemOperand& operand) {
1858 Ldrexd(al, rt, rt2, operand);
1859 }
1860
1861 void Ldrexh(Condition cond, Register rt, const MemOperand& operand) {
1862 VIXL_ASSERT(allow_macro_instructions_);
1863 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001864 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001865 ITScope it_scope(this, &cond);
1866 ldrexh(cond, rt, operand);
1867 }
1868 void Ldrexh(Register rt, const MemOperand& operand) {
1869 Ldrexh(al, rt, operand);
1870 }
1871
1872 void Ldrh(Condition cond, Register rt, const MemOperand& operand) {
1873 VIXL_ASSERT(allow_macro_instructions_);
1874 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001875 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001876 bool can_use_it =
1877 // LDRH{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
1878 (operand.IsImmediate() && rt.IsLow() &&
1879 operand.GetBaseRegister().IsLow() &&
1880 operand.IsOffsetImmediateWithinRange(0, 62, 2) &&
1881 (operand.GetAddrMode() == Offset)) ||
1882 // LDRH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
1883 (operand.IsPlainRegister() && rt.IsLow() &&
1884 operand.GetBaseRegister().IsLow() &&
1885 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
1886 (operand.GetAddrMode() == Offset));
1887 ITScope it_scope(this, &cond, can_use_it);
1888 ldrh(cond, rt, operand);
1889 }
1890 void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); }
1891
1892 void Ldrh(Condition cond, Register rt, Label* label) {
1893 VIXL_ASSERT(allow_macro_instructions_);
1894 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001895 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001896 ITScope it_scope(this, &cond);
1897 ldrh(cond, rt, label);
1898 }
1899 void Ldrh(Register rt, Label* label) { Ldrh(al, rt, label); }
1900
1901 void Ldrsb(Condition cond, Register rt, const MemOperand& operand) {
1902 VIXL_ASSERT(allow_macro_instructions_);
1903 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001904 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001905 bool can_use_it =
1906 // LDRSB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
1907 operand.IsPlainRegister() && rt.IsLow() &&
1908 operand.GetBaseRegister().IsLow() &&
1909 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
1910 (operand.GetAddrMode() == Offset);
1911 ITScope it_scope(this, &cond, can_use_it);
1912 ldrsb(cond, rt, operand);
1913 }
1914 void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); }
1915
1916 void Ldrsb(Condition cond, Register rt, Label* label) {
1917 VIXL_ASSERT(allow_macro_instructions_);
1918 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001919 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001920 ITScope it_scope(this, &cond);
1921 ldrsb(cond, rt, label);
1922 }
1923 void Ldrsb(Register rt, Label* label) { Ldrsb(al, rt, label); }
1924
1925 void Ldrsh(Condition cond, Register rt, const MemOperand& operand) {
1926 VIXL_ASSERT(allow_macro_instructions_);
1927 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001928 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001929 bool can_use_it =
1930 // LDRSH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
1931 operand.IsPlainRegister() && rt.IsLow() &&
1932 operand.GetBaseRegister().IsLow() &&
1933 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
1934 (operand.GetAddrMode() == Offset);
1935 ITScope it_scope(this, &cond, can_use_it);
1936 ldrsh(cond, rt, operand);
1937 }
1938 void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); }
1939
1940 void Ldrsh(Condition cond, Register rt, Label* label) {
1941 VIXL_ASSERT(allow_macro_instructions_);
1942 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001943 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001944 ITScope it_scope(this, &cond);
1945 ldrsh(cond, rt, label);
1946 }
1947 void Ldrsh(Register rt, Label* label) { Ldrsh(al, rt, label); }
1948
1949 void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) {
1950 VIXL_ASSERT(allow_macro_instructions_);
1951 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001952 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001953 bool can_use_it =
1954 // LSL<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
1955 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
1956 (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) ||
1957 // LSL<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
1958 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
1959 operand.GetBaseRegister().IsLow());
1960 ITScope it_scope(this, &cond, can_use_it);
1961 lsl(cond, rd, rm, operand);
1962 }
1963 void Lsl(Register rd, Register rm, const Operand& operand) {
1964 Lsl(al, rd, rm, operand);
1965 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001966 void Lsl(FlagsUpdate flags,
1967 Condition cond,
1968 Register rd,
1969 Register rm,
1970 const Operand& operand) {
1971 switch (flags) {
1972 case LeaveFlags:
1973 Lsl(cond, rd, rm, operand);
1974 break;
1975 case SetFlags:
1976 Lsls(cond, rd, rm, operand);
1977 break;
1978 case DontCare:
1979 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1980 rm.IsLow() && operand.IsImmediate() &&
1981 (operand.GetImmediate() < 32) &&
1982 (operand.GetImmediate() != 0);
1983 if (can_be_16bit_encoded) {
1984 Lsls(cond, rd, rm, operand);
1985 } else {
1986 Lsl(cond, rd, rm, operand);
1987 }
1988 break;
1989 }
1990 }
1991 void Lsl(FlagsUpdate flags,
1992 Register rd,
1993 Register rm,
1994 const Operand& operand) {
1995 Lsl(flags, al, rd, rm, operand);
1996 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001997
1998 void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) {
1999 VIXL_ASSERT(allow_macro_instructions_);
2000 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002001 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002002 ITScope it_scope(this, &cond);
2003 lsls(cond, rd, rm, operand);
2004 }
2005 void Lsls(Register rd, Register rm, const Operand& operand) {
2006 Lsls(al, rd, rm, operand);
2007 }
2008
2009 void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) {
2010 VIXL_ASSERT(allow_macro_instructions_);
2011 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002012 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002013 bool can_use_it =
2014 // LSR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
2015 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2016 (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) ||
2017 // LSR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
2018 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
2019 operand.GetBaseRegister().IsLow());
2020 ITScope it_scope(this, &cond, can_use_it);
2021 lsr(cond, rd, rm, operand);
2022 }
2023 void Lsr(Register rd, Register rm, const Operand& operand) {
2024 Lsr(al, rd, rm, operand);
2025 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002026 void Lsr(FlagsUpdate flags,
2027 Condition cond,
2028 Register rd,
2029 Register rm,
2030 const Operand& operand) {
2031 switch (flags) {
2032 case LeaveFlags:
2033 Lsr(cond, rd, rm, operand);
2034 break;
2035 case SetFlags:
2036 Lsrs(cond, rd, rm, operand);
2037 break;
2038 case DontCare:
2039 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2040 rm.IsLow() && operand.IsImmediate() &&
2041 (operand.GetImmediate() < 32);
2042 if (can_be_16bit_encoded) {
2043 Lsrs(cond, rd, rm, operand);
2044 } else {
2045 Lsr(cond, rd, rm, operand);
2046 }
2047 break;
2048 }
2049 }
2050 void Lsr(FlagsUpdate flags,
2051 Register rd,
2052 Register rm,
2053 const Operand& operand) {
2054 Lsr(flags, al, rd, rm, operand);
2055 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002056
2057 void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) {
2058 VIXL_ASSERT(allow_macro_instructions_);
2059 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002060 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002061 ITScope it_scope(this, &cond);
2062 lsrs(cond, rd, rm, operand);
2063 }
2064 void Lsrs(Register rd, Register rm, const Operand& operand) {
2065 Lsrs(al, rd, rm, operand);
2066 }
2067
2068 void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) {
2069 VIXL_ASSERT(allow_macro_instructions_);
2070 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002071 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002072 ITScope it_scope(this, &cond);
2073 mla(cond, rd, rn, rm, ra);
2074 }
2075 void Mla(Register rd, Register rn, Register rm, Register ra) {
2076 Mla(al, rd, rn, rm, ra);
2077 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002078 void Mla(FlagsUpdate flags,
2079 Condition cond,
2080 Register rd,
2081 Register rn,
2082 Register rm,
2083 Register ra) {
2084 switch (flags) {
2085 case LeaveFlags:
2086 Mla(cond, rd, rn, rm, ra);
2087 break;
2088 case SetFlags:
2089 Mlas(cond, rd, rn, rm, ra);
2090 break;
2091 case DontCare:
2092 Mla(cond, rd, rn, rm, ra);
2093 break;
2094 }
2095 }
2096 void Mla(
2097 FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) {
2098 Mla(flags, al, rd, rn, rm, ra);
2099 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002100
2101 void Mlas(
2102 Condition cond, Register rd, Register rn, Register rm, Register ra) {
2103 VIXL_ASSERT(allow_macro_instructions_);
2104 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002105 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002106 ITScope it_scope(this, &cond);
2107 mlas(cond, rd, rn, rm, ra);
2108 }
2109 void Mlas(Register rd, Register rn, Register rm, Register ra) {
2110 Mlas(al, rd, rn, rm, ra);
2111 }
2112
2113 void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) {
2114 VIXL_ASSERT(allow_macro_instructions_);
2115 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002116 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002117 ITScope it_scope(this, &cond);
2118 mls(cond, rd, rn, rm, ra);
2119 }
2120 void Mls(Register rd, Register rn, Register rm, Register ra) {
2121 Mls(al, rd, rn, rm, ra);
2122 }
2123
2124 void Mov(Condition cond, Register rd, const Operand& operand) {
2125 VIXL_ASSERT(allow_macro_instructions_);
2126 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002127 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002128 bool can_use_it =
2129 // MOV<c>{<q>} <Rd>, #<imm8> ; T1
2130 (operand.IsImmediate() && rd.IsLow() &&
2131 (operand.GetImmediate() <= 255)) ||
2132 // MOV{<c>}{<q>} <Rd>, <Rm> ; T1
2133 (operand.IsPlainRegister() && !rd.IsPC() &&
2134 !operand.GetBaseRegister().IsPC()) ||
2135 // MOV<c>{<q>} <Rd>, <Rm> {, <shift> #<amount>} ; T2
2136 (operand.IsImmediateShiftedRegister() && rd.IsLow() &&
2137 operand.GetBaseRegister().IsLow() &&
2138 (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) ||
2139 operand.GetShift().Is(ASR))) ||
2140 // MOV<c>{<q>} <Rdm>, <Rdm>, LSL <Rs> ; T1
2141 // MOV<c>{<q>} <Rdm>, <Rdm>, LSR <Rs> ; T1
2142 // MOV<c>{<q>} <Rdm>, <Rdm>, ASR <Rs> ; T1
2143 // MOV<c>{<q>} <Rdm>, <Rdm>, ROR <Rs> ; T1
2144 (operand.IsRegisterShiftedRegister() &&
2145 rd.Is(operand.GetBaseRegister()) && rd.IsLow() &&
2146 (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) ||
2147 operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) &&
2148 operand.GetShiftRegister().IsLow());
2149 ITScope it_scope(this, &cond, can_use_it);
2150 mov(cond, rd, operand);
2151 }
2152 void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002153 void Mov(FlagsUpdate flags,
2154 Condition cond,
2155 Register rd,
2156 const Operand& operand) {
2157 switch (flags) {
2158 case LeaveFlags:
2159 Mov(cond, rd, operand);
2160 break;
2161 case SetFlags:
2162 Movs(cond, rd, operand);
2163 break;
2164 case DontCare:
2165 bool can_be_16bit_encoded =
2166 IsUsingT32() && cond.Is(al) &&
2167 ((operand.IsImmediateShiftedRegister() && rd.IsLow() &&
2168 operand.GetBaseRegister().IsLow() &&
2169 (operand.GetShiftAmount() < 32) &&
2170 (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() ||
2171 operand.GetShift().IsASR())) ||
2172 (operand.IsRegisterShiftedRegister() && rd.IsLow() &&
2173 operand.GetBaseRegister().Is(rd) &&
2174 operand.GetShiftRegister().IsLow() &&
2175 (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() ||
2176 operand.GetShift().IsASR() || operand.GetShift().IsROR())) ||
2177 (operand.IsImmediate() && rd.IsLow() &&
2178 (operand.GetImmediate() < 256)));
2179 if (can_be_16bit_encoded) {
2180 Movs(cond, rd, operand);
2181 } else {
2182 Mov(cond, rd, operand);
2183 }
2184 break;
2185 }
2186 }
2187 void Mov(FlagsUpdate flags, Register rd, const Operand& operand) {
2188 Mov(flags, al, rd, operand);
2189 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002190
2191 void Movs(Condition cond, Register rd, const Operand& operand) {
2192 VIXL_ASSERT(allow_macro_instructions_);
2193 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002194 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002195 ITScope it_scope(this, &cond);
2196 movs(cond, rd, operand);
2197 }
2198 void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); }
2199
2200 void Movt(Condition cond, Register rd, const Operand& operand) {
2201 VIXL_ASSERT(allow_macro_instructions_);
2202 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002203 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002204 ITScope it_scope(this, &cond);
2205 movt(cond, rd, operand);
2206 }
2207 void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); }
2208
2209 void Movw(Condition cond, Register rd, const Operand& operand) {
2210 VIXL_ASSERT(allow_macro_instructions_);
2211 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002212 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002213 ITScope it_scope(this, &cond);
2214 movw(cond, rd, operand);
2215 }
2216 void Movw(Register rd, const Operand& operand) { Movw(al, rd, operand); }
2217
2218 void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) {
2219 VIXL_ASSERT(allow_macro_instructions_);
2220 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002221 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002222 ITScope it_scope(this, &cond);
2223 mrs(cond, rd, spec_reg);
2224 }
2225 void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); }
2226
2227 void Msr(Condition cond,
2228 MaskedSpecialRegister spec_reg,
2229 const Operand& operand) {
2230 VIXL_ASSERT(allow_macro_instructions_);
2231 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002232 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002233 ITScope it_scope(this, &cond);
2234 msr(cond, spec_reg, operand);
2235 }
2236 void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) {
2237 Msr(al, spec_reg, operand);
2238 }
2239
2240 void Mul(Condition cond, Register rd, Register rn, Register rm) {
2241 VIXL_ASSERT(allow_macro_instructions_);
2242 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002243 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002244 bool can_use_it =
2245 // MUL<c>{<q>} <Rdm>, <Rn>{, <Rdm>} ; T1
2246 rd.Is(rm) && rn.IsLow() && rm.IsLow();
2247 ITScope it_scope(this, &cond, can_use_it);
2248 mul(cond, rd, rn, rm);
2249 }
2250 void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002251 void Mul(FlagsUpdate flags,
2252 Condition cond,
2253 Register rd,
2254 Register rn,
2255 Register rm) {
2256 switch (flags) {
2257 case LeaveFlags:
2258 Mul(cond, rd, rn, rm);
2259 break;
2260 case SetFlags:
2261 Muls(cond, rd, rn, rm);
2262 break;
2263 case DontCare:
2264 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2265 rn.IsLow() && rm.Is(rd);
2266 if (can_be_16bit_encoded) {
2267 Muls(cond, rd, rn, rm);
2268 } else {
2269 Mul(cond, rd, rn, rm);
2270 }
2271 break;
2272 }
2273 }
2274 void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) {
2275 Mul(flags, al, rd, rn, rm);
2276 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002277
2278 void Muls(Condition cond, Register rd, Register rn, Register rm) {
2279 VIXL_ASSERT(allow_macro_instructions_);
2280 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002281 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002282 ITScope it_scope(this, &cond);
2283 muls(cond, rd, rn, rm);
2284 }
2285 void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); }
2286
2287 void Mvn(Condition cond, Register rd, const Operand& operand) {
2288 VIXL_ASSERT(allow_macro_instructions_);
2289 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002290 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002291 bool can_use_it =
2292 // MVN<c>{<q>} <Rd>, <Rm> ; T1
2293 operand.IsPlainRegister() && rd.IsLow() &&
2294 operand.GetBaseRegister().IsLow();
2295 ITScope it_scope(this, &cond, can_use_it);
2296 mvn(cond, rd, operand);
2297 }
2298 void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002299 void Mvn(FlagsUpdate flags,
2300 Condition cond,
2301 Register rd,
2302 const Operand& operand) {
2303 switch (flags) {
2304 case LeaveFlags:
2305 Mvn(cond, rd, operand);
2306 break;
2307 case SetFlags:
2308 Mvns(cond, rd, operand);
2309 break;
2310 case DontCare:
2311 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2312 operand.IsPlainRegister() &&
2313 operand.GetBaseRegister().IsLow();
2314 if (can_be_16bit_encoded) {
2315 Mvns(cond, rd, operand);
2316 } else {
2317 Mvn(cond, rd, operand);
2318 }
2319 break;
2320 }
2321 }
2322 void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) {
2323 Mvn(flags, al, rd, operand);
2324 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002325
2326 void Mvns(Condition cond, Register rd, const Operand& operand) {
2327 VIXL_ASSERT(allow_macro_instructions_);
2328 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002329 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002330 ITScope it_scope(this, &cond);
2331 mvns(cond, rd, operand);
2332 }
2333 void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); }
2334
2335 void Nop(Condition cond) {
2336 VIXL_ASSERT(allow_macro_instructions_);
2337 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002338 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002339 ITScope it_scope(this, &cond);
2340 nop(cond);
2341 }
2342 void Nop() { Nop(al); }
2343
2344 void Orn(Condition cond, Register rd, Register rn, const Operand& operand) {
2345 VIXL_ASSERT(allow_macro_instructions_);
2346 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002347 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002348 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002349 uint32_t immediate = operand.GetImmediate();
2350 if (immediate == 0) {
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002351 mvn(rd, 0);
Alexandre Rames628c5262016-09-21 11:52:30 +01002352 return;
2353 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002354 if ((immediate == 0xffffffff) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002355 return;
2356 }
2357 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002358 ITScope it_scope(this, &cond);
2359 orn(cond, rd, rn, operand);
2360 }
2361 void Orn(Register rd, Register rn, const Operand& operand) {
2362 Orn(al, rd, rn, operand);
2363 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002364 void Orn(FlagsUpdate flags,
2365 Condition cond,
2366 Register rd,
2367 Register rn,
2368 const Operand& operand) {
2369 switch (flags) {
2370 case LeaveFlags:
2371 Orn(cond, rd, rn, operand);
2372 break;
2373 case SetFlags:
2374 Orns(cond, rd, rn, operand);
2375 break;
2376 case DontCare:
2377 Orn(cond, rd, rn, operand);
2378 break;
2379 }
2380 }
2381 void Orn(FlagsUpdate flags,
2382 Register rd,
2383 Register rn,
2384 const Operand& operand) {
2385 Orn(flags, al, rd, rn, operand);
2386 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002387
2388 void Orns(Condition cond, Register rd, Register rn, const Operand& operand) {
2389 VIXL_ASSERT(allow_macro_instructions_);
2390 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002391 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002392 ITScope it_scope(this, &cond);
2393 orns(cond, rd, rn, operand);
2394 }
2395 void Orns(Register rd, Register rn, const Operand& operand) {
2396 Orns(al, rd, rn, operand);
2397 }
2398
2399 void Orr(Condition cond, Register rd, Register rn, const Operand& operand) {
2400 VIXL_ASSERT(allow_macro_instructions_);
2401 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002402 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002403 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002404 uint32_t immediate = operand.GetImmediate();
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002405 if ((immediate == 0) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002406 return;
2407 }
2408 if (immediate == 0xffffffff) {
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002409 mvn(rd, 0);
Alexandre Rames628c5262016-09-21 11:52:30 +01002410 return;
2411 }
2412 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002413 bool can_use_it =
2414 // ORR<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
2415 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
2416 operand.GetBaseRegister().IsLow();
2417 ITScope it_scope(this, &cond, can_use_it);
2418 orr(cond, rd, rn, operand);
2419 }
2420 void Orr(Register rd, Register rn, const Operand& operand) {
2421 Orr(al, rd, rn, operand);
2422 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002423 void Orr(FlagsUpdate flags,
2424 Condition cond,
2425 Register rd,
2426 Register rn,
2427 const Operand& operand) {
2428 switch (flags) {
2429 case LeaveFlags:
2430 Orr(cond, rd, rn, operand);
2431 break;
2432 case SetFlags:
2433 Orrs(cond, rd, rn, operand);
2434 break;
2435 case DontCare:
2436 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2437 rn.Is(rd) && operand.IsPlainRegister() &&
2438 operand.GetBaseRegister().IsLow();
2439 if (can_be_16bit_encoded) {
2440 Orrs(cond, rd, rn, operand);
2441 } else {
2442 Orr(cond, rd, rn, operand);
2443 }
2444 break;
2445 }
2446 }
2447 void Orr(FlagsUpdate flags,
2448 Register rd,
2449 Register rn,
2450 const Operand& operand) {
2451 Orr(flags, al, rd, rn, operand);
2452 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002453
2454 void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) {
2455 VIXL_ASSERT(allow_macro_instructions_);
2456 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002457 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002458 ITScope it_scope(this, &cond);
2459 orrs(cond, rd, rn, operand);
2460 }
2461 void Orrs(Register rd, Register rn, const Operand& operand) {
2462 Orrs(al, rd, rn, operand);
2463 }
2464
2465 void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) {
2466 VIXL_ASSERT(allow_macro_instructions_);
2467 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002468 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002469 ITScope it_scope(this, &cond);
2470 pkhbt(cond, rd, rn, operand);
2471 }
2472 void Pkhbt(Register rd, Register rn, const Operand& operand) {
2473 Pkhbt(al, rd, rn, operand);
2474 }
2475
2476 void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) {
2477 VIXL_ASSERT(allow_macro_instructions_);
2478 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002479 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002480 ITScope it_scope(this, &cond);
2481 pkhtb(cond, rd, rn, operand);
2482 }
2483 void Pkhtb(Register rd, Register rn, const Operand& operand) {
2484 Pkhtb(al, rd, rn, operand);
2485 }
2486
2487 void Pld(Condition cond, Label* label) {
2488 VIXL_ASSERT(allow_macro_instructions_);
2489 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002490 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002491 ITScope it_scope(this, &cond);
2492 pld(cond, label);
2493 }
2494 void Pld(Label* label) { Pld(al, label); }
2495
2496 void Pld(Condition cond, const MemOperand& operand) {
2497 VIXL_ASSERT(allow_macro_instructions_);
2498 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002499 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002500 ITScope it_scope(this, &cond);
2501 pld(cond, operand);
2502 }
2503 void Pld(const MemOperand& operand) { Pld(al, operand); }
2504
2505 void Pldw(Condition cond, const MemOperand& operand) {
2506 VIXL_ASSERT(allow_macro_instructions_);
2507 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002508 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002509 ITScope it_scope(this, &cond);
2510 pldw(cond, operand);
2511 }
2512 void Pldw(const MemOperand& operand) { Pldw(al, operand); }
2513
2514 void Pli(Condition cond, const MemOperand& operand) {
2515 VIXL_ASSERT(allow_macro_instructions_);
2516 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002517 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002518 ITScope it_scope(this, &cond);
2519 pli(cond, operand);
2520 }
2521 void Pli(const MemOperand& operand) { Pli(al, operand); }
2522
2523 void Pli(Condition cond, Label* label) {
2524 VIXL_ASSERT(allow_macro_instructions_);
2525 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002526 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002527 ITScope it_scope(this, &cond);
2528 pli(cond, label);
2529 }
2530 void Pli(Label* label) { Pli(al, label); }
2531
2532 void Pop(Condition cond, RegisterList registers) {
2533 VIXL_ASSERT(allow_macro_instructions_);
2534 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002535 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002536 ITScope it_scope(this, &cond);
2537 pop(cond, registers);
2538 }
2539 void Pop(RegisterList registers) { Pop(al, registers); }
2540
2541 void Pop(Condition cond, Register rt) {
2542 VIXL_ASSERT(allow_macro_instructions_);
2543 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002544 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002545 ITScope it_scope(this, &cond);
2546 pop(cond, rt);
2547 }
2548 void Pop(Register rt) { Pop(al, rt); }
2549
2550 void Push(Condition cond, RegisterList registers) {
2551 VIXL_ASSERT(allow_macro_instructions_);
2552 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002553 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002554 ITScope it_scope(this, &cond);
2555 push(cond, registers);
2556 }
2557 void Push(RegisterList registers) { Push(al, registers); }
2558
2559 void Push(Condition cond, Register rt) {
2560 VIXL_ASSERT(allow_macro_instructions_);
2561 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002562 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002563 ITScope it_scope(this, &cond);
2564 push(cond, rt);
2565 }
2566 void Push(Register rt) { Push(al, rt); }
2567
2568 void Qadd(Condition cond, Register rd, Register rm, Register rn) {
2569 VIXL_ASSERT(allow_macro_instructions_);
2570 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002571 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002572 ITScope it_scope(this, &cond);
2573 qadd(cond, rd, rm, rn);
2574 }
2575 void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); }
2576
2577 void Qadd16(Condition cond, Register rd, Register rn, Register rm) {
2578 VIXL_ASSERT(allow_macro_instructions_);
2579 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002580 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002581 ITScope it_scope(this, &cond);
2582 qadd16(cond, rd, rn, rm);
2583 }
2584 void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); }
2585
2586 void Qadd8(Condition cond, Register rd, Register rn, Register rm) {
2587 VIXL_ASSERT(allow_macro_instructions_);
2588 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002589 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002590 ITScope it_scope(this, &cond);
2591 qadd8(cond, rd, rn, rm);
2592 }
2593 void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); }
2594
2595 void Qasx(Condition cond, Register rd, Register rn, Register rm) {
2596 VIXL_ASSERT(allow_macro_instructions_);
2597 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002598 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002599 ITScope it_scope(this, &cond);
2600 qasx(cond, rd, rn, rm);
2601 }
2602 void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); }
2603
2604 void Qdadd(Condition cond, Register rd, Register rm, Register rn) {
2605 VIXL_ASSERT(allow_macro_instructions_);
2606 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002607 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002608 ITScope it_scope(this, &cond);
2609 qdadd(cond, rd, rm, rn);
2610 }
2611 void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); }
2612
2613 void Qdsub(Condition cond, Register rd, Register rm, Register rn) {
2614 VIXL_ASSERT(allow_macro_instructions_);
2615 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002616 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002617 ITScope it_scope(this, &cond);
2618 qdsub(cond, rd, rm, rn);
2619 }
2620 void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); }
2621
2622 void Qsax(Condition cond, Register rd, Register rn, Register rm) {
2623 VIXL_ASSERT(allow_macro_instructions_);
2624 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002625 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002626 ITScope it_scope(this, &cond);
2627 qsax(cond, rd, rn, rm);
2628 }
2629 void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); }
2630
2631 void Qsub(Condition cond, Register rd, Register rm, Register rn) {
2632 VIXL_ASSERT(allow_macro_instructions_);
2633 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002634 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002635 ITScope it_scope(this, &cond);
2636 qsub(cond, rd, rm, rn);
2637 }
2638 void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); }
2639
2640 void Qsub16(Condition cond, Register rd, Register rn, Register rm) {
2641 VIXL_ASSERT(allow_macro_instructions_);
2642 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002643 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002644 ITScope it_scope(this, &cond);
2645 qsub16(cond, rd, rn, rm);
2646 }
2647 void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); }
2648
2649 void Qsub8(Condition cond, Register rd, Register rn, Register rm) {
2650 VIXL_ASSERT(allow_macro_instructions_);
2651 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002652 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002653 ITScope it_scope(this, &cond);
2654 qsub8(cond, rd, rn, rm);
2655 }
2656 void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); }
2657
2658 void Rbit(Condition cond, Register rd, Register rm) {
2659 VIXL_ASSERT(allow_macro_instructions_);
2660 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002661 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002662 ITScope it_scope(this, &cond);
2663 rbit(cond, rd, rm);
2664 }
2665 void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); }
2666
2667 void Rev(Condition cond, Register rd, Register rm) {
2668 VIXL_ASSERT(allow_macro_instructions_);
2669 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002670 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002671 ITScope it_scope(this, &cond);
2672 rev(cond, rd, rm);
2673 }
2674 void Rev(Register rd, Register rm) { Rev(al, rd, rm); }
2675
2676 void Rev16(Condition cond, Register rd, Register rm) {
2677 VIXL_ASSERT(allow_macro_instructions_);
2678 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002679 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002680 ITScope it_scope(this, &cond);
2681 rev16(cond, rd, rm);
2682 }
2683 void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); }
2684
2685 void Revsh(Condition cond, Register rd, Register rm) {
2686 VIXL_ASSERT(allow_macro_instructions_);
2687 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002688 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002689 ITScope it_scope(this, &cond);
2690 revsh(cond, rd, rm);
2691 }
2692 void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); }
2693
2694 void Ror(Condition cond, Register rd, Register rm, const Operand& operand) {
2695 VIXL_ASSERT(allow_macro_instructions_);
2696 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002697 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002698 bool can_use_it =
2699 // ROR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
2700 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2701 (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) ||
2702 // ROR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
2703 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
2704 operand.GetBaseRegister().IsLow());
2705 ITScope it_scope(this, &cond, can_use_it);
2706 ror(cond, rd, rm, operand);
2707 }
2708 void Ror(Register rd, Register rm, const Operand& operand) {
2709 Ror(al, rd, rm, operand);
2710 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002711 void Ror(FlagsUpdate flags,
2712 Condition cond,
2713 Register rd,
2714 Register rm,
2715 const Operand& operand) {
2716 switch (flags) {
2717 case LeaveFlags:
2718 Ror(cond, rd, rm, operand);
2719 break;
2720 case SetFlags:
2721 Rors(cond, rd, rm, operand);
2722 break;
2723 case DontCare:
2724 Ror(cond, rd, rm, operand);
2725 break;
2726 }
2727 }
2728 void Ror(FlagsUpdate flags,
2729 Register rd,
2730 Register rm,
2731 const Operand& operand) {
2732 Ror(flags, al, rd, rm, operand);
2733 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002734
2735 void Rors(Condition cond, Register rd, Register rm, const Operand& operand) {
2736 VIXL_ASSERT(allow_macro_instructions_);
2737 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002738 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002739 ITScope it_scope(this, &cond);
2740 rors(cond, rd, rm, operand);
2741 }
2742 void Rors(Register rd, Register rm, const Operand& operand) {
2743 Rors(al, rd, rm, operand);
2744 }
2745
2746 void Rrx(Condition cond, Register rd, Register rm) {
2747 VIXL_ASSERT(allow_macro_instructions_);
2748 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002749 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002750 ITScope it_scope(this, &cond);
2751 rrx(cond, rd, rm);
2752 }
2753 void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002754 void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) {
2755 switch (flags) {
2756 case LeaveFlags:
2757 Rrx(cond, rd, rm);
2758 break;
2759 case SetFlags:
2760 Rrxs(cond, rd, rm);
2761 break;
2762 case DontCare:
2763 Rrx(cond, rd, rm);
2764 break;
2765 }
2766 }
2767 void Rrx(FlagsUpdate flags, Register rd, Register rm) {
2768 Rrx(flags, al, rd, rm);
2769 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002770
2771 void Rrxs(Condition cond, Register rd, Register rm) {
2772 VIXL_ASSERT(allow_macro_instructions_);
2773 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002774 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002775 ITScope it_scope(this, &cond);
2776 rrxs(cond, rd, rm);
2777 }
2778 void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); }
2779
2780 void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) {
2781 VIXL_ASSERT(allow_macro_instructions_);
2782 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002783 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002784 bool can_use_it =
2785 // RSB<c>{<q>} {<Rd>, }<Rn>, #0 ; T1
2786 operand.IsImmediate() && rd.IsLow() && rn.IsLow() &&
2787 (operand.GetImmediate() == 0);
2788 ITScope it_scope(this, &cond, can_use_it);
2789 rsb(cond, rd, rn, operand);
2790 }
2791 void Rsb(Register rd, Register rn, const Operand& operand) {
2792 Rsb(al, rd, rn, operand);
2793 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002794 void Rsb(FlagsUpdate flags,
2795 Condition cond,
2796 Register rd,
2797 Register rn,
2798 const Operand& operand) {
2799 switch (flags) {
2800 case LeaveFlags:
2801 Rsb(cond, rd, rn, operand);
2802 break;
2803 case SetFlags:
2804 Rsbs(cond, rd, rn, operand);
2805 break;
2806 case DontCare:
2807 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2808 rn.IsLow() && operand.IsImmediate() &&
2809 (operand.GetImmediate() == 0);
2810 if (can_be_16bit_encoded) {
2811 Rsbs(cond, rd, rn, operand);
2812 } else {
2813 Rsb(cond, rd, rn, operand);
2814 }
2815 break;
2816 }
2817 }
2818 void Rsb(FlagsUpdate flags,
2819 Register rd,
2820 Register rn,
2821 const Operand& operand) {
2822 Rsb(flags, al, rd, rn, operand);
2823 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002824
2825 void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) {
2826 VIXL_ASSERT(allow_macro_instructions_);
2827 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002828 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002829 ITScope it_scope(this, &cond);
2830 rsbs(cond, rd, rn, operand);
2831 }
2832 void Rsbs(Register rd, Register rn, const Operand& operand) {
2833 Rsbs(al, rd, rn, operand);
2834 }
2835
2836 void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) {
2837 VIXL_ASSERT(allow_macro_instructions_);
2838 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002839 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002840 ITScope it_scope(this, &cond);
2841 rsc(cond, rd, rn, operand);
2842 }
2843 void Rsc(Register rd, Register rn, const Operand& operand) {
2844 Rsc(al, rd, rn, operand);
2845 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002846 void Rsc(FlagsUpdate flags,
2847 Condition cond,
2848 Register rd,
2849 Register rn,
2850 const Operand& operand) {
2851 switch (flags) {
2852 case LeaveFlags:
2853 Rsc(cond, rd, rn, operand);
2854 break;
2855 case SetFlags:
2856 Rscs(cond, rd, rn, operand);
2857 break;
2858 case DontCare:
2859 Rsc(cond, rd, rn, operand);
2860 break;
2861 }
2862 }
2863 void Rsc(FlagsUpdate flags,
2864 Register rd,
2865 Register rn,
2866 const Operand& operand) {
2867 Rsc(flags, al, rd, rn, operand);
2868 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002869
2870 void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) {
2871 VIXL_ASSERT(allow_macro_instructions_);
2872 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002873 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002874 ITScope it_scope(this, &cond);
2875 rscs(cond, rd, rn, operand);
2876 }
2877 void Rscs(Register rd, Register rn, const Operand& operand) {
2878 Rscs(al, rd, rn, operand);
2879 }
2880
2881 void Sadd16(Condition cond, Register rd, Register rn, Register rm) {
2882 VIXL_ASSERT(allow_macro_instructions_);
2883 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002884 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002885 ITScope it_scope(this, &cond);
2886 sadd16(cond, rd, rn, rm);
2887 }
2888 void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); }
2889
2890 void Sadd8(Condition cond, Register rd, Register rn, Register rm) {
2891 VIXL_ASSERT(allow_macro_instructions_);
2892 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002893 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002894 ITScope it_scope(this, &cond);
2895 sadd8(cond, rd, rn, rm);
2896 }
2897 void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); }
2898
2899 void Sasx(Condition cond, Register rd, Register rn, Register rm) {
2900 VIXL_ASSERT(allow_macro_instructions_);
2901 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002902 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002903 ITScope it_scope(this, &cond);
2904 sasx(cond, rd, rn, rm);
2905 }
2906 void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); }
2907
2908 void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) {
2909 VIXL_ASSERT(allow_macro_instructions_);
2910 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002911 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002912 bool can_use_it =
2913 // SBC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
2914 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) &&
2915 operand.GetBaseRegister().IsLow();
2916 ITScope it_scope(this, &cond, can_use_it);
2917 sbc(cond, rd, rn, operand);
2918 }
2919 void Sbc(Register rd, Register rn, const Operand& operand) {
2920 Sbc(al, rd, rn, operand);
2921 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002922 void Sbc(FlagsUpdate flags,
2923 Condition cond,
2924 Register rd,
2925 Register rn,
2926 const Operand& operand) {
2927 switch (flags) {
2928 case LeaveFlags:
2929 Sbc(cond, rd, rn, operand);
2930 break;
2931 case SetFlags:
2932 Sbcs(cond, rd, rn, operand);
2933 break;
2934 case DontCare:
2935 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2936 rn.Is(rd) && operand.IsPlainRegister() &&
2937 operand.GetBaseRegister().IsLow();
2938 if (can_be_16bit_encoded) {
2939 Sbcs(cond, rd, rn, operand);
2940 } else {
2941 Sbc(cond, rd, rn, operand);
2942 }
2943 break;
2944 }
2945 }
2946 void Sbc(FlagsUpdate flags,
2947 Register rd,
2948 Register rn,
2949 const Operand& operand) {
2950 Sbc(flags, al, rd, rn, operand);
2951 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002952
2953 void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) {
2954 VIXL_ASSERT(allow_macro_instructions_);
2955 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002956 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002957 ITScope it_scope(this, &cond);
2958 sbcs(cond, rd, rn, operand);
2959 }
2960 void Sbcs(Register rd, Register rn, const Operand& operand) {
2961 Sbcs(al, rd, rn, operand);
2962 }
2963
2964 void Sbfx(Condition cond,
2965 Register rd,
2966 Register rn,
2967 uint32_t lsb,
2968 const Operand& operand) {
2969 VIXL_ASSERT(allow_macro_instructions_);
2970 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002971 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002972 ITScope it_scope(this, &cond);
2973 sbfx(cond, rd, rn, lsb, operand);
2974 }
2975 void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) {
2976 Sbfx(al, rd, rn, lsb, operand);
2977 }
2978
2979 void Sdiv(Condition cond, Register rd, Register rn, Register rm) {
2980 VIXL_ASSERT(allow_macro_instructions_);
2981 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002982 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002983 ITScope it_scope(this, &cond);
2984 sdiv(cond, rd, rn, rm);
2985 }
2986 void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); }
2987
2988 void Sel(Condition cond, Register rd, Register rn, Register rm) {
2989 VIXL_ASSERT(allow_macro_instructions_);
2990 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002991 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002992 ITScope it_scope(this, &cond);
2993 sel(cond, rd, rn, rm);
2994 }
2995 void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); }
2996
2997 void Shadd16(Condition cond, Register rd, Register rn, Register rm) {
2998 VIXL_ASSERT(allow_macro_instructions_);
2999 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003000 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003001 ITScope it_scope(this, &cond);
3002 shadd16(cond, rd, rn, rm);
3003 }
3004 void Shadd16(Register rd, Register rn, Register rm) {
3005 Shadd16(al, rd, rn, rm);
3006 }
3007
3008 void Shadd8(Condition cond, Register rd, Register rn, Register rm) {
3009 VIXL_ASSERT(allow_macro_instructions_);
3010 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003011 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003012 ITScope it_scope(this, &cond);
3013 shadd8(cond, rd, rn, rm);
3014 }
3015 void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); }
3016
3017 void Shasx(Condition cond, Register rd, Register rn, Register rm) {
3018 VIXL_ASSERT(allow_macro_instructions_);
3019 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003020 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003021 ITScope it_scope(this, &cond);
3022 shasx(cond, rd, rn, rm);
3023 }
3024 void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); }
3025
3026 void Shsax(Condition cond, Register rd, Register rn, Register rm) {
3027 VIXL_ASSERT(allow_macro_instructions_);
3028 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003029 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003030 ITScope it_scope(this, &cond);
3031 shsax(cond, rd, rn, rm);
3032 }
3033 void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); }
3034
3035 void Shsub16(Condition cond, Register rd, Register rn, Register rm) {
3036 VIXL_ASSERT(allow_macro_instructions_);
3037 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003038 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003039 ITScope it_scope(this, &cond);
3040 shsub16(cond, rd, rn, rm);
3041 }
3042 void Shsub16(Register rd, Register rn, Register rm) {
3043 Shsub16(al, rd, rn, rm);
3044 }
3045
3046 void Shsub8(Condition cond, Register rd, Register rn, Register rm) {
3047 VIXL_ASSERT(allow_macro_instructions_);
3048 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003049 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003050 ITScope it_scope(this, &cond);
3051 shsub8(cond, rd, rn, rm);
3052 }
3053 void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); }
3054
3055 void Smlabb(
3056 Condition cond, Register rd, Register rn, Register rm, Register ra) {
3057 VIXL_ASSERT(allow_macro_instructions_);
3058 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003059 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003060 ITScope it_scope(this, &cond);
3061 smlabb(cond, rd, rn, rm, ra);
3062 }
3063 void Smlabb(Register rd, Register rn, Register rm, Register ra) {
3064 Smlabb(al, rd, rn, rm, ra);
3065 }
3066
3067 void Smlabt(
3068 Condition cond, Register rd, Register rn, Register rm, Register ra) {
3069 VIXL_ASSERT(allow_macro_instructions_);
3070 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003071 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003072 ITScope it_scope(this, &cond);
3073 smlabt(cond, rd, rn, rm, ra);
3074 }
3075 void Smlabt(Register rd, Register rn, Register rm, Register ra) {
3076 Smlabt(al, rd, rn, rm, ra);
3077 }
3078
3079 void Smlad(
3080 Condition cond, Register rd, Register rn, Register rm, Register ra) {
3081 VIXL_ASSERT(allow_macro_instructions_);
3082 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003083 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003084 ITScope it_scope(this, &cond);
3085 smlad(cond, rd, rn, rm, ra);
3086 }
3087 void Smlad(Register rd, Register rn, Register rm, Register ra) {
3088 Smlad(al, rd, rn, rm, ra);
3089 }
3090
3091 void Smladx(
3092 Condition cond, Register rd, Register rn, Register rm, Register ra) {
3093 VIXL_ASSERT(allow_macro_instructions_);
3094 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003095 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003096 ITScope it_scope(this, &cond);
3097 smladx(cond, rd, rn, rm, ra);
3098 }
3099 void Smladx(Register rd, Register rn, Register rm, Register ra) {
3100 Smladx(al, rd, rn, rm, ra);
3101 }
3102
3103 void Smlal(
3104 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
3105 VIXL_ASSERT(allow_macro_instructions_);
3106 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003107 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003108 ITScope it_scope(this, &cond);
3109 smlal(cond, rdlo, rdhi, rn, rm);
3110 }
3111 void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) {
3112 Smlal(al, rdlo, rdhi, rn, rm);
3113 }
3114
3115 void Smlalbb(
3116 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
3117 VIXL_ASSERT(allow_macro_instructions_);
3118 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003119 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003120 ITScope it_scope(this, &cond);
3121 smlalbb(cond, rdlo, rdhi, rn, rm);
3122 }
3123 void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) {
3124 Smlalbb(al, rdlo, rdhi, rn, rm);
3125 }
3126
3127 void Smlalbt(
3128 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
3129 VIXL_ASSERT(allow_macro_instructions_);
3130 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003131 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003132 ITScope it_scope(this, &cond);
3133 smlalbt(cond, rdlo, rdhi, rn, rm);
3134 }
3135 void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) {
3136 Smlalbt(al, rdlo, rdhi, rn, rm);
3137 }
3138
3139 void Smlald(
3140 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
3141 VIXL_ASSERT(allow_macro_instructions_);
3142 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003143 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003144 ITScope it_scope(this, &cond);
3145 smlald(cond, rdlo, rdhi, rn, rm);
3146 }
3147 void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) {
3148 Smlald(al, rdlo, rdhi, rn, rm);
3149 }
3150
3151 void Smlaldx(
3152 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
3153 VIXL_ASSERT(allow_macro_instructions_);
3154 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003155 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003156 ITScope it_scope(this, &cond);
3157 smlaldx(cond, rdlo, rdhi, rn, rm);
3158 }
3159 void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) {
3160 Smlaldx(al, rdlo, rdhi, rn, rm);
3161 }
3162
3163 void Smlals(
3164 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
3165 VIXL_ASSERT(allow_macro_instructions_);
3166 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003167 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003168 ITScope it_scope(this, &cond);
3169 smlals(cond, rdlo, rdhi, rn, rm);
3170 }
3171 void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) {
3172 Smlals(al, rdlo, rdhi, rn, rm);
3173 }
3174
3175 void Smlaltb(
3176 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
3177 VIXL_ASSERT(allow_macro_instructions_);
3178 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003179 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003180 ITScope it_scope(this, &cond);
3181 smlaltb(cond, rdlo, rdhi, rn, rm);
3182 }
3183 void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) {
3184 Smlaltb(al, rdlo, rdhi, rn, rm);
3185 }
3186
3187 void Smlaltt(
3188 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
3189 VIXL_ASSERT(allow_macro_instructions_);
3190 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003191 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003192 ITScope it_scope(this, &cond);
3193 smlaltt(cond, rdlo, rdhi, rn, rm);
3194 }
3195 void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) {
3196 Smlaltt(al, rdlo, rdhi, rn, rm);
3197 }
3198
3199 void Smlatb(
3200 Condition cond, Register rd, Register rn, Register rm, Register ra) {
3201 VIXL_ASSERT(allow_macro_instructions_);
3202 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003203 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003204 ITScope it_scope(this, &cond);
3205 smlatb(cond, rd, rn, rm, ra);
3206 }
3207 void Smlatb(Register rd, Register rn, Register rm, Register ra) {
3208 Smlatb(al, rd, rn, rm, ra);
3209 }
3210
3211 void Smlatt(
3212 Condition cond, Register rd, Register rn, Register rm, Register ra) {
3213 VIXL_ASSERT(allow_macro_instructions_);
3214 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003215 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003216 ITScope it_scope(this, &cond);
3217 smlatt(cond, rd, rn, rm, ra);
3218 }
3219 void Smlatt(Register rd, Register rn, Register rm, Register ra) {
3220 Smlatt(al, rd, rn, rm, ra);
3221 }
3222
3223 void Smlawb(
3224 Condition cond, Register rd, Register rn, Register rm, Register ra) {
3225 VIXL_ASSERT(allow_macro_instructions_);
3226 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003227 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003228 ITScope it_scope(this, &cond);
3229 smlawb(cond, rd, rn, rm, ra);
3230 }
3231 void Smlawb(Register rd, Register rn, Register rm, Register ra) {
3232 Smlawb(al, rd, rn, rm, ra);
3233 }
3234
3235 void Smlawt(
3236 Condition cond, Register rd, Register rn, Register rm, Register ra) {
3237 VIXL_ASSERT(allow_macro_instructions_);
3238 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003239 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003240 ITScope it_scope(this, &cond);
3241 smlawt(cond, rd, rn, rm, ra);
3242 }
3243 void Smlawt(Register rd, Register rn, Register rm, Register ra) {
3244 Smlawt(al, rd, rn, rm, ra);
3245 }
3246
3247 void Smlsd(
3248 Condition cond, Register rd, Register rn, Register rm, Register ra) {
3249 VIXL_ASSERT(allow_macro_instructions_);
3250 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003251 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003252 ITScope it_scope(this, &cond);
3253 smlsd(cond, rd, rn, rm, ra);
3254 }
3255 void Smlsd(Register rd, Register rn, Register rm, Register ra) {
3256 Smlsd(al, rd, rn, rm, ra);
3257 }
3258
3259 void Smlsdx(
3260 Condition cond, Register rd, Register rn, Register rm, Register ra) {
3261 VIXL_ASSERT(allow_macro_instructions_);
3262 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003263 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003264 ITScope it_scope(this, &cond);
3265 smlsdx(cond, rd, rn, rm, ra);
3266 }
3267 void Smlsdx(Register rd, Register rn, Register rm, Register ra) {
3268 Smlsdx(al, rd, rn, rm, ra);
3269 }
3270
3271 void Smlsld(
3272 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
3273 VIXL_ASSERT(allow_macro_instructions_);
3274 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003275 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003276 ITScope it_scope(this, &cond);
3277 smlsld(cond, rdlo, rdhi, rn, rm);
3278 }
3279 void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) {
3280 Smlsld(al, rdlo, rdhi, rn, rm);
3281 }
3282
3283 void Smlsldx(
3284 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
3285 VIXL_ASSERT(allow_macro_instructions_);
3286 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003287 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003288 ITScope it_scope(this, &cond);
3289 smlsldx(cond, rdlo, rdhi, rn, rm);
3290 }
3291 void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) {
3292 Smlsldx(al, rdlo, rdhi, rn, rm);
3293 }
3294
3295 void Smmla(
3296 Condition cond, Register rd, Register rn, Register rm, Register ra) {
3297 VIXL_ASSERT(allow_macro_instructions_);
3298 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003299 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003300 ITScope it_scope(this, &cond);
3301 smmla(cond, rd, rn, rm, ra);
3302 }
3303 void Smmla(Register rd, Register rn, Register rm, Register ra) {
3304 Smmla(al, rd, rn, rm, ra);
3305 }
3306
3307 void Smmlar(
3308 Condition cond, Register rd, Register rn, Register rm, Register ra) {
3309 VIXL_ASSERT(allow_macro_instructions_);
3310 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003311 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003312 ITScope it_scope(this, &cond);
3313 smmlar(cond, rd, rn, rm, ra);
3314 }
3315 void Smmlar(Register rd, Register rn, Register rm, Register ra) {
3316 Smmlar(al, rd, rn, rm, ra);
3317 }
3318
3319 void Smmls(
3320 Condition cond, Register rd, Register rn, Register rm, Register ra) {
3321 VIXL_ASSERT(allow_macro_instructions_);
3322 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003323 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003324 ITScope it_scope(this, &cond);
3325 smmls(cond, rd, rn, rm, ra);
3326 }
3327 void Smmls(Register rd, Register rn, Register rm, Register ra) {
3328 Smmls(al, rd, rn, rm, ra);
3329 }
3330
3331 void Smmlsr(
3332 Condition cond, Register rd, Register rn, Register rm, Register ra) {
3333 VIXL_ASSERT(allow_macro_instructions_);
3334 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003335 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003336 ITScope it_scope(this, &cond);
3337 smmlsr(cond, rd, rn, rm, ra);
3338 }
3339 void Smmlsr(Register rd, Register rn, Register rm, Register ra) {
3340 Smmlsr(al, rd, rn, rm, ra);
3341 }
3342
3343 void Smmul(Condition cond, Register rd, Register rn, Register rm) {
3344 VIXL_ASSERT(allow_macro_instructions_);
3345 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003346 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003347 ITScope it_scope(this, &cond);
3348 smmul(cond, rd, rn, rm);
3349 }
3350 void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); }
3351
3352 void Smmulr(Condition cond, Register rd, Register rn, Register rm) {
3353 VIXL_ASSERT(allow_macro_instructions_);
3354 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003355 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003356 ITScope it_scope(this, &cond);
3357 smmulr(cond, rd, rn, rm);
3358 }
3359 void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); }
3360
3361 void Smuad(Condition cond, Register rd, Register rn, Register rm) {
3362 VIXL_ASSERT(allow_macro_instructions_);
3363 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003364 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003365 ITScope it_scope(this, &cond);
3366 smuad(cond, rd, rn, rm);
3367 }
3368 void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); }
3369
3370 void Smuadx(Condition cond, Register rd, Register rn, Register rm) {
3371 VIXL_ASSERT(allow_macro_instructions_);
3372 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003373 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003374 ITScope it_scope(this, &cond);
3375 smuadx(cond, rd, rn, rm);
3376 }
3377 void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); }
3378
3379 void Smulbb(Condition cond, Register rd, Register rn, Register rm) {
3380 VIXL_ASSERT(allow_macro_instructions_);
3381 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003382 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003383 ITScope it_scope(this, &cond);
3384 smulbb(cond, rd, rn, rm);
3385 }
3386 void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); }
3387
3388 void Smulbt(Condition cond, Register rd, Register rn, Register rm) {
3389 VIXL_ASSERT(allow_macro_instructions_);
3390 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003391 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003392 ITScope it_scope(this, &cond);
3393 smulbt(cond, rd, rn, rm);
3394 }
3395 void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); }
3396
3397 void Smull(
3398 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
3399 VIXL_ASSERT(allow_macro_instructions_);
3400 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003401 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003402 ITScope it_scope(this, &cond);
3403 smull(cond, rdlo, rdhi, rn, rm);
3404 }
3405 void Smull(Register rdlo, Register rdhi, Register rn, Register rm) {
3406 Smull(al, rdlo, rdhi, rn, rm);
3407 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003408 void Smull(FlagsUpdate flags,
3409 Condition cond,
3410 Register rdlo,
3411 Register rdhi,
3412 Register rn,
3413 Register rm) {
3414 switch (flags) {
3415 case LeaveFlags:
3416 Smull(cond, rdlo, rdhi, rn, rm);
3417 break;
3418 case SetFlags:
3419 Smulls(cond, rdlo, rdhi, rn, rm);
3420 break;
3421 case DontCare:
3422 Smull(cond, rdlo, rdhi, rn, rm);
3423 break;
3424 }
3425 }
3426 void Smull(FlagsUpdate flags,
3427 Register rdlo,
3428 Register rdhi,
3429 Register rn,
3430 Register rm) {
3431 Smull(flags, al, rdlo, rdhi, rn, rm);
3432 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003433
3434 void Smulls(
3435 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
3436 VIXL_ASSERT(allow_macro_instructions_);
3437 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003438 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003439 ITScope it_scope(this, &cond);
3440 smulls(cond, rdlo, rdhi, rn, rm);
3441 }
3442 void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) {
3443 Smulls(al, rdlo, rdhi, rn, rm);
3444 }
3445
3446 void Smultb(Condition cond, Register rd, Register rn, Register rm) {
3447 VIXL_ASSERT(allow_macro_instructions_);
3448 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003449 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003450 ITScope it_scope(this, &cond);
3451 smultb(cond, rd, rn, rm);
3452 }
3453 void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); }
3454
3455 void Smultt(Condition cond, Register rd, Register rn, Register rm) {
3456 VIXL_ASSERT(allow_macro_instructions_);
3457 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003458 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003459 ITScope it_scope(this, &cond);
3460 smultt(cond, rd, rn, rm);
3461 }
3462 void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); }
3463
3464 void Smulwb(Condition cond, Register rd, Register rn, Register rm) {
3465 VIXL_ASSERT(allow_macro_instructions_);
3466 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003467 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003468 ITScope it_scope(this, &cond);
3469 smulwb(cond, rd, rn, rm);
3470 }
3471 void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); }
3472
3473 void Smulwt(Condition cond, Register rd, Register rn, Register rm) {
3474 VIXL_ASSERT(allow_macro_instructions_);
3475 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003476 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003477 ITScope it_scope(this, &cond);
3478 smulwt(cond, rd, rn, rm);
3479 }
3480 void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); }
3481
3482 void Smusd(Condition cond, Register rd, Register rn, Register rm) {
3483 VIXL_ASSERT(allow_macro_instructions_);
3484 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003485 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003486 ITScope it_scope(this, &cond);
3487 smusd(cond, rd, rn, rm);
3488 }
3489 void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); }
3490
3491 void Smusdx(Condition cond, Register rd, Register rn, Register rm) {
3492 VIXL_ASSERT(allow_macro_instructions_);
3493 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003494 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003495 ITScope it_scope(this, &cond);
3496 smusdx(cond, rd, rn, rm);
3497 }
3498 void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); }
3499
3500 void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) {
3501 VIXL_ASSERT(allow_macro_instructions_);
3502 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003503 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003504 ITScope it_scope(this, &cond);
3505 ssat(cond, rd, imm, operand);
3506 }
3507 void Ssat(Register rd, uint32_t imm, const Operand& operand) {
3508 Ssat(al, rd, imm, operand);
3509 }
3510
3511 void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) {
3512 VIXL_ASSERT(allow_macro_instructions_);
3513 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003514 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003515 ITScope it_scope(this, &cond);
3516 ssat16(cond, rd, imm, rn);
3517 }
3518 void Ssat16(Register rd, uint32_t imm, Register rn) {
3519 Ssat16(al, rd, imm, rn);
3520 }
3521
3522 void Ssax(Condition cond, Register rd, Register rn, Register rm) {
3523 VIXL_ASSERT(allow_macro_instructions_);
3524 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003525 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003526 ITScope it_scope(this, &cond);
3527 ssax(cond, rd, rn, rm);
3528 }
3529 void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); }
3530
3531 void Ssub16(Condition cond, Register rd, Register rn, Register rm) {
3532 VIXL_ASSERT(allow_macro_instructions_);
3533 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003534 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003535 ITScope it_scope(this, &cond);
3536 ssub16(cond, rd, rn, rm);
3537 }
3538 void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); }
3539
3540 void Ssub8(Condition cond, Register rd, Register rn, Register rm) {
3541 VIXL_ASSERT(allow_macro_instructions_);
3542 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003543 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003544 ITScope it_scope(this, &cond);
3545 ssub8(cond, rd, rn, rm);
3546 }
3547 void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); }
3548
3549 void Stl(Condition cond, Register rt, const MemOperand& operand) {
3550 VIXL_ASSERT(allow_macro_instructions_);
3551 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003552 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003553 ITScope it_scope(this, &cond);
3554 stl(cond, rt, operand);
3555 }
3556 void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); }
3557
3558 void Stlb(Condition cond, Register rt, const MemOperand& operand) {
3559 VIXL_ASSERT(allow_macro_instructions_);
3560 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003561 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003562 ITScope it_scope(this, &cond);
3563 stlb(cond, rt, operand);
3564 }
3565 void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); }
3566
3567 void Stlex(Condition cond,
3568 Register rd,
3569 Register rt,
3570 const MemOperand& operand) {
3571 VIXL_ASSERT(allow_macro_instructions_);
3572 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003573 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003574 ITScope it_scope(this, &cond);
3575 stlex(cond, rd, rt, operand);
3576 }
3577 void Stlex(Register rd, Register rt, const MemOperand& operand) {
3578 Stlex(al, rd, rt, operand);
3579 }
3580
3581 void Stlexb(Condition cond,
3582 Register rd,
3583 Register rt,
3584 const MemOperand& operand) {
3585 VIXL_ASSERT(allow_macro_instructions_);
3586 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003587 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003588 ITScope it_scope(this, &cond);
3589 stlexb(cond, rd, rt, operand);
3590 }
3591 void Stlexb(Register rd, Register rt, const MemOperand& operand) {
3592 Stlexb(al, rd, rt, operand);
3593 }
3594
3595 void Stlexd(Condition cond,
3596 Register rd,
3597 Register rt,
3598 Register rt2,
3599 const MemOperand& operand) {
3600 VIXL_ASSERT(allow_macro_instructions_);
3601 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003602 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003603 ITScope it_scope(this, &cond);
3604 stlexd(cond, rd, rt, rt2, operand);
3605 }
3606 void Stlexd(Register rd,
3607 Register rt,
3608 Register rt2,
3609 const MemOperand& operand) {
3610 Stlexd(al, rd, rt, rt2, operand);
3611 }
3612
3613 void Stlexh(Condition cond,
3614 Register rd,
3615 Register rt,
3616 const MemOperand& operand) {
3617 VIXL_ASSERT(allow_macro_instructions_);
3618 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003619 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003620 ITScope it_scope(this, &cond);
3621 stlexh(cond, rd, rt, operand);
3622 }
3623 void Stlexh(Register rd, Register rt, const MemOperand& operand) {
3624 Stlexh(al, rd, rt, operand);
3625 }
3626
3627 void Stlh(Condition cond, Register rt, const MemOperand& operand) {
3628 VIXL_ASSERT(allow_macro_instructions_);
3629 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003630 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003631 ITScope it_scope(this, &cond);
3632 stlh(cond, rt, operand);
3633 }
3634 void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); }
3635
3636 void Stm(Condition cond,
3637 Register rn,
3638 WriteBack write_back,
3639 RegisterList registers) {
3640 VIXL_ASSERT(allow_macro_instructions_);
3641 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003642 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003643 ITScope it_scope(this, &cond);
3644 stm(cond, rn, write_back, registers);
3645 }
3646 void Stm(Register rn, WriteBack write_back, RegisterList registers) {
3647 Stm(al, rn, write_back, registers);
3648 }
3649
3650 void Stmda(Condition cond,
3651 Register rn,
3652 WriteBack write_back,
3653 RegisterList registers) {
3654 VIXL_ASSERT(allow_macro_instructions_);
3655 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003656 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003657 ITScope it_scope(this, &cond);
3658 stmda(cond, rn, write_back, registers);
3659 }
3660 void Stmda(Register rn, WriteBack write_back, RegisterList registers) {
3661 Stmda(al, rn, write_back, registers);
3662 }
3663
3664 void Stmdb(Condition cond,
3665 Register rn,
3666 WriteBack write_back,
3667 RegisterList registers) {
3668 VIXL_ASSERT(allow_macro_instructions_);
3669 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003670 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003671 ITScope it_scope(this, &cond);
3672 stmdb(cond, rn, write_back, registers);
3673 }
3674 void Stmdb(Register rn, WriteBack write_back, RegisterList registers) {
3675 Stmdb(al, rn, write_back, registers);
3676 }
3677
3678 void Stmea(Condition cond,
3679 Register rn,
3680 WriteBack write_back,
3681 RegisterList registers) {
3682 VIXL_ASSERT(allow_macro_instructions_);
3683 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003684 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003685 ITScope it_scope(this, &cond);
3686 stmea(cond, rn, write_back, registers);
3687 }
3688 void Stmea(Register rn, WriteBack write_back, RegisterList registers) {
3689 Stmea(al, rn, write_back, registers);
3690 }
3691
3692 void Stmed(Condition cond,
3693 Register rn,
3694 WriteBack write_back,
3695 RegisterList registers) {
3696 VIXL_ASSERT(allow_macro_instructions_);
3697 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003698 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003699 ITScope it_scope(this, &cond);
3700 stmed(cond, rn, write_back, registers);
3701 }
3702 void Stmed(Register rn, WriteBack write_back, RegisterList registers) {
3703 Stmed(al, rn, write_back, registers);
3704 }
3705
3706 void Stmfa(Condition cond,
3707 Register rn,
3708 WriteBack write_back,
3709 RegisterList registers) {
3710 VIXL_ASSERT(allow_macro_instructions_);
3711 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003712 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003713 ITScope it_scope(this, &cond);
3714 stmfa(cond, rn, write_back, registers);
3715 }
3716 void Stmfa(Register rn, WriteBack write_back, RegisterList registers) {
3717 Stmfa(al, rn, write_back, registers);
3718 }
3719
3720 void Stmfd(Condition cond,
3721 Register rn,
3722 WriteBack write_back,
3723 RegisterList registers) {
3724 VIXL_ASSERT(allow_macro_instructions_);
3725 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003726 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003727 ITScope it_scope(this, &cond);
3728 stmfd(cond, rn, write_back, registers);
3729 }
3730 void Stmfd(Register rn, WriteBack write_back, RegisterList registers) {
3731 Stmfd(al, rn, write_back, registers);
3732 }
3733
3734 void Stmib(Condition cond,
3735 Register rn,
3736 WriteBack write_back,
3737 RegisterList registers) {
3738 VIXL_ASSERT(allow_macro_instructions_);
3739 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003740 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003741 ITScope it_scope(this, &cond);
3742 stmib(cond, rn, write_back, registers);
3743 }
3744 void Stmib(Register rn, WriteBack write_back, RegisterList registers) {
3745 Stmib(al, rn, write_back, registers);
3746 }
3747
3748 void Str(Condition cond, Register rt, const MemOperand& operand) {
3749 VIXL_ASSERT(allow_macro_instructions_);
3750 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003751 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003752 bool can_use_it =
3753 // STR{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
3754 (operand.IsImmediate() && rt.IsLow() &&
3755 operand.GetBaseRegister().IsLow() &&
3756 operand.IsOffsetImmediateWithinRange(0, 124, 4) &&
3757 (operand.GetAddrMode() == Offset)) ||
3758 // STR{<c>}{<q>} <Rt>, [SP{, #{+}<imm>}] ; T2
3759 (operand.IsImmediate() && rt.IsLow() &&
3760 operand.GetBaseRegister().IsSP() &&
3761 operand.IsOffsetImmediateWithinRange(0, 1020, 4) &&
3762 (operand.GetAddrMode() == Offset)) ||
3763 // STR{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
3764 (operand.IsPlainRegister() && rt.IsLow() &&
3765 operand.GetBaseRegister().IsLow() &&
3766 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
3767 (operand.GetAddrMode() == Offset));
3768 ITScope it_scope(this, &cond, can_use_it);
3769 str(cond, rt, operand);
3770 }
3771 void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); }
3772
3773 void Strb(Condition cond, Register rt, const MemOperand& operand) {
3774 VIXL_ASSERT(allow_macro_instructions_);
3775 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003776 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003777 bool can_use_it =
3778 // STRB{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
3779 (operand.IsImmediate() && rt.IsLow() &&
3780 operand.GetBaseRegister().IsLow() &&
3781 operand.IsOffsetImmediateWithinRange(0, 31) &&
3782 (operand.GetAddrMode() == Offset)) ||
3783 // STRB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
3784 (operand.IsPlainRegister() && rt.IsLow() &&
3785 operand.GetBaseRegister().IsLow() &&
3786 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
3787 (operand.GetAddrMode() == Offset));
3788 ITScope it_scope(this, &cond, can_use_it);
3789 strb(cond, rt, operand);
3790 }
3791 void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); }
3792
3793 void Strd(Condition cond,
3794 Register rt,
3795 Register rt2,
3796 const MemOperand& operand) {
3797 VIXL_ASSERT(allow_macro_instructions_);
3798 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003799 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003800 ITScope it_scope(this, &cond);
3801 strd(cond, rt, rt2, operand);
3802 }
3803 void Strd(Register rt, Register rt2, const MemOperand& operand) {
3804 Strd(al, rt, rt2, operand);
3805 }
3806
3807 void Strex(Condition cond,
3808 Register rd,
3809 Register rt,
3810 const MemOperand& operand) {
3811 VIXL_ASSERT(allow_macro_instructions_);
3812 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003813 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003814 ITScope it_scope(this, &cond);
3815 strex(cond, rd, rt, operand);
3816 }
3817 void Strex(Register rd, Register rt, const MemOperand& operand) {
3818 Strex(al, rd, rt, operand);
3819 }
3820
3821 void Strexb(Condition cond,
3822 Register rd,
3823 Register rt,
3824 const MemOperand& operand) {
3825 VIXL_ASSERT(allow_macro_instructions_);
3826 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003827 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003828 ITScope it_scope(this, &cond);
3829 strexb(cond, rd, rt, operand);
3830 }
3831 void Strexb(Register rd, Register rt, const MemOperand& operand) {
3832 Strexb(al, rd, rt, operand);
3833 }
3834
3835 void Strexd(Condition cond,
3836 Register rd,
3837 Register rt,
3838 Register rt2,
3839 const MemOperand& operand) {
3840 VIXL_ASSERT(allow_macro_instructions_);
3841 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003842 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003843 ITScope it_scope(this, &cond);
3844 strexd(cond, rd, rt, rt2, operand);
3845 }
3846 void Strexd(Register rd,
3847 Register rt,
3848 Register rt2,
3849 const MemOperand& operand) {
3850 Strexd(al, rd, rt, rt2, operand);
3851 }
3852
3853 void Strexh(Condition cond,
3854 Register rd,
3855 Register rt,
3856 const MemOperand& operand) {
3857 VIXL_ASSERT(allow_macro_instructions_);
3858 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003859 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003860 ITScope it_scope(this, &cond);
3861 strexh(cond, rd, rt, operand);
3862 }
3863 void Strexh(Register rd, Register rt, const MemOperand& operand) {
3864 Strexh(al, rd, rt, operand);
3865 }
3866
3867 void Strh(Condition cond, Register rt, const MemOperand& operand) {
3868 VIXL_ASSERT(allow_macro_instructions_);
3869 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003870 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003871 bool can_use_it =
3872 // STRH{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
3873 (operand.IsImmediate() && rt.IsLow() &&
3874 operand.GetBaseRegister().IsLow() &&
3875 operand.IsOffsetImmediateWithinRange(0, 62, 2) &&
3876 (operand.GetAddrMode() == Offset)) ||
3877 // STRH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
3878 (operand.IsPlainRegister() && rt.IsLow() &&
3879 operand.GetBaseRegister().IsLow() &&
3880 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
3881 (operand.GetAddrMode() == Offset));
3882 ITScope it_scope(this, &cond, can_use_it);
3883 strh(cond, rt, operand);
3884 }
3885 void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); }
3886
3887 void Sub(Condition cond, Register rd, Register rn, const Operand& operand) {
3888 VIXL_ASSERT(allow_macro_instructions_);
3889 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003890 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Rames628c5262016-09-21 11:52:30 +01003891 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
3892 uint32_t immediate = operand.GetImmediate();
3893 if (immediate == 0) {
3894 return;
3895 }
3896 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003897 bool can_use_it =
3898 // SUB<c>{<q>} <Rd>, <Rn>, #<imm3> ; T1
3899 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() &&
3900 rd.IsLow()) ||
3901 // SUB<c>{<q>} {<Rdn>,} <Rdn>, #<imm8> ; T2
3902 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
3903 rd.IsLow() && rn.Is(rd)) ||
3904 // SUB<c>{<q>} <Rd>, <Rn>, <Rm>
3905 (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
3906 operand.GetBaseRegister().IsLow());
3907 ITScope it_scope(this, &cond, can_use_it);
3908 sub(cond, rd, rn, operand);
3909 }
3910 void Sub(Register rd, Register rn, const Operand& operand) {
3911 Sub(al, rd, rn, operand);
3912 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003913 void Sub(FlagsUpdate flags,
3914 Condition cond,
3915 Register rd,
3916 Register rn,
3917 const Operand& operand) {
3918 switch (flags) {
3919 case LeaveFlags:
3920 Sub(cond, rd, rn, operand);
3921 break;
3922 case SetFlags:
3923 Subs(cond, rd, rn, operand);
3924 break;
3925 case DontCare:
3926 bool can_be_16bit_encoded =
3927 IsUsingT32() && cond.Is(al) &&
3928 ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
3929 operand.GetBaseRegister().IsLow()) ||
3930 (operand.IsImmediate() &&
3931 ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) ||
3932 (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256)))));
3933 if (can_be_16bit_encoded) {
3934 Subs(cond, rd, rn, operand);
3935 } else {
3936 Sub(cond, rd, rn, operand);
3937 }
3938 break;
3939 }
3940 }
3941 void Sub(FlagsUpdate flags,
3942 Register rd,
3943 Register rn,
3944 const Operand& operand) {
3945 Sub(flags, al, rd, rn, operand);
3946 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003947
3948 void Subs(Condition cond, Register rd, Register rn, const Operand& operand) {
3949 VIXL_ASSERT(allow_macro_instructions_);
3950 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003951 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003952 ITScope it_scope(this, &cond);
3953 subs(cond, rd, rn, operand);
3954 }
3955 void Subs(Register rd, Register rn, const Operand& operand) {
3956 Subs(al, rd, rn, operand);
3957 }
3958
3959 void Subw(Condition cond, Register rd, Register rn, const Operand& operand) {
3960 VIXL_ASSERT(allow_macro_instructions_);
3961 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003962 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003963 ITScope it_scope(this, &cond);
3964 subw(cond, rd, rn, operand);
3965 }
3966 void Subw(Register rd, Register rn, const Operand& operand) {
3967 Subw(al, rd, rn, operand);
3968 }
3969
3970 void Svc(Condition cond, uint32_t imm) {
3971 VIXL_ASSERT(allow_macro_instructions_);
3972 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003973 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003974 ITScope it_scope(this, &cond);
3975 svc(cond, imm);
3976 }
3977 void Svc(uint32_t imm) { Svc(al, imm); }
3978
3979 void Sxtab(Condition cond, Register rd, Register rn, const Operand& operand) {
3980 VIXL_ASSERT(allow_macro_instructions_);
3981 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003982 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003983 ITScope it_scope(this, &cond);
3984 sxtab(cond, rd, rn, operand);
3985 }
3986 void Sxtab(Register rd, Register rn, const Operand& operand) {
3987 Sxtab(al, rd, rn, operand);
3988 }
3989
3990 void Sxtab16(Condition cond,
3991 Register rd,
3992 Register rn,
3993 const Operand& operand) {
3994 VIXL_ASSERT(allow_macro_instructions_);
3995 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003996 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003997 ITScope it_scope(this, &cond);
3998 sxtab16(cond, rd, rn, operand);
3999 }
4000 void Sxtab16(Register rd, Register rn, const Operand& operand) {
4001 Sxtab16(al, rd, rn, operand);
4002 }
4003
4004 void Sxtah(Condition cond, Register rd, Register rn, const Operand& operand) {
4005 VIXL_ASSERT(allow_macro_instructions_);
4006 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004007 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004008 ITScope it_scope(this, &cond);
4009 sxtah(cond, rd, rn, operand);
4010 }
4011 void Sxtah(Register rd, Register rn, const Operand& operand) {
4012 Sxtah(al, rd, rn, operand);
4013 }
4014
4015 void Sxtb(Condition cond, Register rd, const Operand& operand) {
4016 VIXL_ASSERT(allow_macro_instructions_);
4017 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004018 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004019 ITScope it_scope(this, &cond);
4020 sxtb(cond, rd, operand);
4021 }
4022 void Sxtb(Register rd, const Operand& operand) { Sxtb(al, rd, operand); }
4023
4024 void Sxtb16(Condition cond, Register rd, const Operand& operand) {
4025 VIXL_ASSERT(allow_macro_instructions_);
4026 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004027 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004028 ITScope it_scope(this, &cond);
4029 sxtb16(cond, rd, operand);
4030 }
4031 void Sxtb16(Register rd, const Operand& operand) { Sxtb16(al, rd, operand); }
4032
4033 void Sxth(Condition cond, Register rd, const Operand& operand) {
4034 VIXL_ASSERT(allow_macro_instructions_);
4035 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004036 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004037 ITScope it_scope(this, &cond);
4038 sxth(cond, rd, operand);
4039 }
4040 void Sxth(Register rd, const Operand& operand) { Sxth(al, rd, operand); }
4041
4042 void Tbb(Condition cond, Register rn, Register rm) {
4043 VIXL_ASSERT(allow_macro_instructions_);
4044 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004045 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004046 ITScope it_scope(this, &cond);
4047 tbb(cond, rn, rm);
4048 }
4049 void Tbb(Register rn, Register rm) { Tbb(al, rn, rm); }
4050
4051 void Tbh(Condition cond, Register rn, Register rm) {
4052 VIXL_ASSERT(allow_macro_instructions_);
4053 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004054 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004055 ITScope it_scope(this, &cond);
4056 tbh(cond, rn, rm);
4057 }
4058 void Tbh(Register rn, Register rm) { Tbh(al, rn, rm); }
4059
4060 void Teq(Condition cond, Register rn, const Operand& operand) {
4061 VIXL_ASSERT(allow_macro_instructions_);
4062 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004063 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004064 ITScope it_scope(this, &cond);
4065 teq(cond, rn, operand);
4066 }
4067 void Teq(Register rn, const Operand& operand) { Teq(al, rn, operand); }
4068
4069 void Tst(Condition cond, Register rn, const Operand& operand) {
4070 VIXL_ASSERT(allow_macro_instructions_);
4071 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004072 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004073 bool can_use_it =
4074 // TST{<c>}{<q>} <Rn>, <Rm> ; T1
4075 operand.IsPlainRegister() && rn.IsLow() &&
4076 operand.GetBaseRegister().IsLow();
4077 ITScope it_scope(this, &cond, can_use_it);
4078 tst(cond, rn, operand);
4079 }
4080 void Tst(Register rn, const Operand& operand) { Tst(al, rn, operand); }
4081
4082 void Uadd16(Condition cond, Register rd, Register rn, Register rm) {
4083 VIXL_ASSERT(allow_macro_instructions_);
4084 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004085 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004086 ITScope it_scope(this, &cond);
4087 uadd16(cond, rd, rn, rm);
4088 }
4089 void Uadd16(Register rd, Register rn, Register rm) { Uadd16(al, rd, rn, rm); }
4090
4091 void Uadd8(Condition cond, Register rd, Register rn, Register rm) {
4092 VIXL_ASSERT(allow_macro_instructions_);
4093 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004094 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004095 ITScope it_scope(this, &cond);
4096 uadd8(cond, rd, rn, rm);
4097 }
4098 void Uadd8(Register rd, Register rn, Register rm) { Uadd8(al, rd, rn, rm); }
4099
4100 void Uasx(Condition cond, Register rd, Register rn, Register rm) {
4101 VIXL_ASSERT(allow_macro_instructions_);
4102 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004103 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004104 ITScope it_scope(this, &cond);
4105 uasx(cond, rd, rn, rm);
4106 }
4107 void Uasx(Register rd, Register rn, Register rm) { Uasx(al, rd, rn, rm); }
4108
4109 void Ubfx(Condition cond,
4110 Register rd,
4111 Register rn,
4112 uint32_t lsb,
4113 const Operand& operand) {
4114 VIXL_ASSERT(allow_macro_instructions_);
4115 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004116 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004117 ITScope it_scope(this, &cond);
4118 ubfx(cond, rd, rn, lsb, operand);
4119 }
4120 void Ubfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) {
4121 Ubfx(al, rd, rn, lsb, operand);
4122 }
4123
4124 void Udf(Condition cond, uint32_t imm) {
4125 VIXL_ASSERT(allow_macro_instructions_);
4126 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004127 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004128 ITScope it_scope(this, &cond);
4129 udf(cond, imm);
4130 }
4131 void Udf(uint32_t imm) { Udf(al, imm); }
4132
4133 void Udiv(Condition cond, Register rd, Register rn, Register rm) {
4134 VIXL_ASSERT(allow_macro_instructions_);
4135 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004136 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004137 ITScope it_scope(this, &cond);
4138 udiv(cond, rd, rn, rm);
4139 }
4140 void Udiv(Register rd, Register rn, Register rm) { Udiv(al, rd, rn, rm); }
4141
4142 void Uhadd16(Condition cond, Register rd, Register rn, Register rm) {
4143 VIXL_ASSERT(allow_macro_instructions_);
4144 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004145 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004146 ITScope it_scope(this, &cond);
4147 uhadd16(cond, rd, rn, rm);
4148 }
4149 void Uhadd16(Register rd, Register rn, Register rm) {
4150 Uhadd16(al, rd, rn, rm);
4151 }
4152
4153 void Uhadd8(Condition cond, Register rd, Register rn, Register rm) {
4154 VIXL_ASSERT(allow_macro_instructions_);
4155 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004156 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004157 ITScope it_scope(this, &cond);
4158 uhadd8(cond, rd, rn, rm);
4159 }
4160 void Uhadd8(Register rd, Register rn, Register rm) { Uhadd8(al, rd, rn, rm); }
4161
4162 void Uhasx(Condition cond, Register rd, Register rn, Register rm) {
4163 VIXL_ASSERT(allow_macro_instructions_);
4164 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004165 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004166 ITScope it_scope(this, &cond);
4167 uhasx(cond, rd, rn, rm);
4168 }
4169 void Uhasx(Register rd, Register rn, Register rm) { Uhasx(al, rd, rn, rm); }
4170
4171 void Uhsax(Condition cond, Register rd, Register rn, Register rm) {
4172 VIXL_ASSERT(allow_macro_instructions_);
4173 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004174 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004175 ITScope it_scope(this, &cond);
4176 uhsax(cond, rd, rn, rm);
4177 }
4178 void Uhsax(Register rd, Register rn, Register rm) { Uhsax(al, rd, rn, rm); }
4179
4180 void Uhsub16(Condition cond, Register rd, Register rn, Register rm) {
4181 VIXL_ASSERT(allow_macro_instructions_);
4182 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004183 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004184 ITScope it_scope(this, &cond);
4185 uhsub16(cond, rd, rn, rm);
4186 }
4187 void Uhsub16(Register rd, Register rn, Register rm) {
4188 Uhsub16(al, rd, rn, rm);
4189 }
4190
4191 void Uhsub8(Condition cond, Register rd, Register rn, Register rm) {
4192 VIXL_ASSERT(allow_macro_instructions_);
4193 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004194 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004195 ITScope it_scope(this, &cond);
4196 uhsub8(cond, rd, rn, rm);
4197 }
4198 void Uhsub8(Register rd, Register rn, Register rm) { Uhsub8(al, rd, rn, rm); }
4199
4200 void Umaal(
4201 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
4202 VIXL_ASSERT(allow_macro_instructions_);
4203 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004204 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004205 ITScope it_scope(this, &cond);
4206 umaal(cond, rdlo, rdhi, rn, rm);
4207 }
4208 void Umaal(Register rdlo, Register rdhi, Register rn, Register rm) {
4209 Umaal(al, rdlo, rdhi, rn, rm);
4210 }
4211
4212 void Umlal(
4213 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
4214 VIXL_ASSERT(allow_macro_instructions_);
4215 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004216 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004217 ITScope it_scope(this, &cond);
4218 umlal(cond, rdlo, rdhi, rn, rm);
4219 }
4220 void Umlal(Register rdlo, Register rdhi, Register rn, Register rm) {
4221 Umlal(al, rdlo, rdhi, rn, rm);
4222 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004223 void Umlal(FlagsUpdate flags,
4224 Condition cond,
4225 Register rdlo,
4226 Register rdhi,
4227 Register rn,
4228 Register rm) {
4229 switch (flags) {
4230 case LeaveFlags:
4231 Umlal(cond, rdlo, rdhi, rn, rm);
4232 break;
4233 case SetFlags:
4234 Umlals(cond, rdlo, rdhi, rn, rm);
4235 break;
4236 case DontCare:
4237 Umlal(cond, rdlo, rdhi, rn, rm);
4238 break;
4239 }
4240 }
4241 void Umlal(FlagsUpdate flags,
4242 Register rdlo,
4243 Register rdhi,
4244 Register rn,
4245 Register rm) {
4246 Umlal(flags, al, rdlo, rdhi, rn, rm);
4247 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004248
4249 void Umlals(
4250 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
4251 VIXL_ASSERT(allow_macro_instructions_);
4252 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004253 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004254 ITScope it_scope(this, &cond);
4255 umlals(cond, rdlo, rdhi, rn, rm);
4256 }
4257 void Umlals(Register rdlo, Register rdhi, Register rn, Register rm) {
4258 Umlals(al, rdlo, rdhi, rn, rm);
4259 }
4260
4261 void Umull(
4262 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
4263 VIXL_ASSERT(allow_macro_instructions_);
4264 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004265 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004266 ITScope it_scope(this, &cond);
4267 umull(cond, rdlo, rdhi, rn, rm);
4268 }
4269 void Umull(Register rdlo, Register rdhi, Register rn, Register rm) {
4270 Umull(al, rdlo, rdhi, rn, rm);
4271 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004272 void Umull(FlagsUpdate flags,
4273 Condition cond,
4274 Register rdlo,
4275 Register rdhi,
4276 Register rn,
4277 Register rm) {
4278 switch (flags) {
4279 case LeaveFlags:
4280 Umull(cond, rdlo, rdhi, rn, rm);
4281 break;
4282 case SetFlags:
4283 Umulls(cond, rdlo, rdhi, rn, rm);
4284 break;
4285 case DontCare:
4286 Umull(cond, rdlo, rdhi, rn, rm);
4287 break;
4288 }
4289 }
4290 void Umull(FlagsUpdate flags,
4291 Register rdlo,
4292 Register rdhi,
4293 Register rn,
4294 Register rm) {
4295 Umull(flags, al, rdlo, rdhi, rn, rm);
4296 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004297
4298 void Umulls(
4299 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
4300 VIXL_ASSERT(allow_macro_instructions_);
4301 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004302 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004303 ITScope it_scope(this, &cond);
4304 umulls(cond, rdlo, rdhi, rn, rm);
4305 }
4306 void Umulls(Register rdlo, Register rdhi, Register rn, Register rm) {
4307 Umulls(al, rdlo, rdhi, rn, rm);
4308 }
4309
4310 void Uqadd16(Condition cond, Register rd, Register rn, Register rm) {
4311 VIXL_ASSERT(allow_macro_instructions_);
4312 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004313 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004314 ITScope it_scope(this, &cond);
4315 uqadd16(cond, rd, rn, rm);
4316 }
4317 void Uqadd16(Register rd, Register rn, Register rm) {
4318 Uqadd16(al, rd, rn, rm);
4319 }
4320
4321 void Uqadd8(Condition cond, Register rd, Register rn, Register rm) {
4322 VIXL_ASSERT(allow_macro_instructions_);
4323 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004324 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004325 ITScope it_scope(this, &cond);
4326 uqadd8(cond, rd, rn, rm);
4327 }
4328 void Uqadd8(Register rd, Register rn, Register rm) { Uqadd8(al, rd, rn, rm); }
4329
4330 void Uqasx(Condition cond, Register rd, Register rn, Register rm) {
4331 VIXL_ASSERT(allow_macro_instructions_);
4332 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004333 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004334 ITScope it_scope(this, &cond);
4335 uqasx(cond, rd, rn, rm);
4336 }
4337 void Uqasx(Register rd, Register rn, Register rm) { Uqasx(al, rd, rn, rm); }
4338
4339 void Uqsax(Condition cond, Register rd, Register rn, Register rm) {
4340 VIXL_ASSERT(allow_macro_instructions_);
4341 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004342 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004343 ITScope it_scope(this, &cond);
4344 uqsax(cond, rd, rn, rm);
4345 }
4346 void Uqsax(Register rd, Register rn, Register rm) { Uqsax(al, rd, rn, rm); }
4347
4348 void Uqsub16(Condition cond, Register rd, Register rn, Register rm) {
4349 VIXL_ASSERT(allow_macro_instructions_);
4350 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004351 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004352 ITScope it_scope(this, &cond);
4353 uqsub16(cond, rd, rn, rm);
4354 }
4355 void Uqsub16(Register rd, Register rn, Register rm) {
4356 Uqsub16(al, rd, rn, rm);
4357 }
4358
4359 void Uqsub8(Condition cond, Register rd, Register rn, Register rm) {
4360 VIXL_ASSERT(allow_macro_instructions_);
4361 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004362 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004363 ITScope it_scope(this, &cond);
4364 uqsub8(cond, rd, rn, rm);
4365 }
4366 void Uqsub8(Register rd, Register rn, Register rm) { Uqsub8(al, rd, rn, rm); }
4367
4368 void Usad8(Condition cond, Register rd, Register rn, Register rm) {
4369 VIXL_ASSERT(allow_macro_instructions_);
4370 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004371 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004372 ITScope it_scope(this, &cond);
4373 usad8(cond, rd, rn, rm);
4374 }
4375 void Usad8(Register rd, Register rn, Register rm) { Usad8(al, rd, rn, rm); }
4376
4377 void Usada8(
4378 Condition cond, Register rd, Register rn, Register rm, Register ra) {
4379 VIXL_ASSERT(allow_macro_instructions_);
4380 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004381 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004382 ITScope it_scope(this, &cond);
4383 usada8(cond, rd, rn, rm, ra);
4384 }
4385 void Usada8(Register rd, Register rn, Register rm, Register ra) {
4386 Usada8(al, rd, rn, rm, ra);
4387 }
4388
4389 void Usat(Condition cond, Register rd, uint32_t imm, const Operand& operand) {
4390 VIXL_ASSERT(allow_macro_instructions_);
4391 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004392 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004393 ITScope it_scope(this, &cond);
4394 usat(cond, rd, imm, operand);
4395 }
4396 void Usat(Register rd, uint32_t imm, const Operand& operand) {
4397 Usat(al, rd, imm, operand);
4398 }
4399
4400 void Usat16(Condition cond, Register rd, uint32_t imm, Register rn) {
4401 VIXL_ASSERT(allow_macro_instructions_);
4402 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004403 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004404 ITScope it_scope(this, &cond);
4405 usat16(cond, rd, imm, rn);
4406 }
4407 void Usat16(Register rd, uint32_t imm, Register rn) {
4408 Usat16(al, rd, imm, rn);
4409 }
4410
4411 void Usax(Condition cond, Register rd, Register rn, Register rm) {
4412 VIXL_ASSERT(allow_macro_instructions_);
4413 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004414 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004415 ITScope it_scope(this, &cond);
4416 usax(cond, rd, rn, rm);
4417 }
4418 void Usax(Register rd, Register rn, Register rm) { Usax(al, rd, rn, rm); }
4419
4420 void Usub16(Condition cond, Register rd, Register rn, Register rm) {
4421 VIXL_ASSERT(allow_macro_instructions_);
4422 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004423 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004424 ITScope it_scope(this, &cond);
4425 usub16(cond, rd, rn, rm);
4426 }
4427 void Usub16(Register rd, Register rn, Register rm) { Usub16(al, rd, rn, rm); }
4428
4429 void Usub8(Condition cond, Register rd, Register rn, Register rm) {
4430 VIXL_ASSERT(allow_macro_instructions_);
4431 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004432 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004433 ITScope it_scope(this, &cond);
4434 usub8(cond, rd, rn, rm);
4435 }
4436 void Usub8(Register rd, Register rn, Register rm) { Usub8(al, rd, rn, rm); }
4437
4438 void Uxtab(Condition cond, Register rd, Register rn, const Operand& operand) {
4439 VIXL_ASSERT(allow_macro_instructions_);
4440 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004441 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004442 ITScope it_scope(this, &cond);
4443 uxtab(cond, rd, rn, operand);
4444 }
4445 void Uxtab(Register rd, Register rn, const Operand& operand) {
4446 Uxtab(al, rd, rn, operand);
4447 }
4448
4449 void Uxtab16(Condition cond,
4450 Register rd,
4451 Register rn,
4452 const Operand& operand) {
4453 VIXL_ASSERT(allow_macro_instructions_);
4454 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004455 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004456 ITScope it_scope(this, &cond);
4457 uxtab16(cond, rd, rn, operand);
4458 }
4459 void Uxtab16(Register rd, Register rn, const Operand& operand) {
4460 Uxtab16(al, rd, rn, operand);
4461 }
4462
4463 void Uxtah(Condition cond, Register rd, Register rn, const Operand& operand) {
4464 VIXL_ASSERT(allow_macro_instructions_);
4465 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004466 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004467 ITScope it_scope(this, &cond);
4468 uxtah(cond, rd, rn, operand);
4469 }
4470 void Uxtah(Register rd, Register rn, const Operand& operand) {
4471 Uxtah(al, rd, rn, operand);
4472 }
4473
4474 void Uxtb(Condition cond, Register rd, const Operand& operand) {
4475 VIXL_ASSERT(allow_macro_instructions_);
4476 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004477 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004478 ITScope it_scope(this, &cond);
4479 uxtb(cond, rd, operand);
4480 }
4481 void Uxtb(Register rd, const Operand& operand) { Uxtb(al, rd, operand); }
4482
4483 void Uxtb16(Condition cond, Register rd, const Operand& operand) {
4484 VIXL_ASSERT(allow_macro_instructions_);
4485 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004486 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004487 ITScope it_scope(this, &cond);
4488 uxtb16(cond, rd, operand);
4489 }
4490 void Uxtb16(Register rd, const Operand& operand) { Uxtb16(al, rd, operand); }
4491
4492 void Uxth(Condition cond, Register rd, const Operand& operand) {
4493 VIXL_ASSERT(allow_macro_instructions_);
4494 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004495 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004496 ITScope it_scope(this, &cond);
4497 uxth(cond, rd, operand);
4498 }
4499 void Uxth(Register rd, const Operand& operand) { Uxth(al, rd, operand); }
4500
4501 void Vaba(
4502 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4503 VIXL_ASSERT(allow_macro_instructions_);
4504 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004505 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004506 ITScope it_scope(this, &cond);
4507 vaba(cond, dt, rd, rn, rm);
4508 }
4509 void Vaba(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4510 Vaba(al, dt, rd, rn, rm);
4511 }
4512
4513 void Vaba(
4514 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4515 VIXL_ASSERT(allow_macro_instructions_);
4516 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004517 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004518 ITScope it_scope(this, &cond);
4519 vaba(cond, dt, rd, rn, rm);
4520 }
4521 void Vaba(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4522 Vaba(al, dt, rd, rn, rm);
4523 }
4524
4525 void Vabal(
4526 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
4527 VIXL_ASSERT(allow_macro_instructions_);
4528 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004529 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004530 ITScope it_scope(this, &cond);
4531 vabal(cond, dt, rd, rn, rm);
4532 }
4533 void Vabal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
4534 Vabal(al, dt, rd, rn, rm);
4535 }
4536
4537 void Vabd(
4538 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4539 VIXL_ASSERT(allow_macro_instructions_);
4540 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004541 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004542 ITScope it_scope(this, &cond);
4543 vabd(cond, dt, rd, rn, rm);
4544 }
4545 void Vabd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4546 Vabd(al, dt, rd, rn, rm);
4547 }
4548
4549 void Vabd(
4550 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4551 VIXL_ASSERT(allow_macro_instructions_);
4552 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004553 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004554 ITScope it_scope(this, &cond);
4555 vabd(cond, dt, rd, rn, rm);
4556 }
4557 void Vabd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4558 Vabd(al, dt, rd, rn, rm);
4559 }
4560
4561 void Vabdl(
4562 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
4563 VIXL_ASSERT(allow_macro_instructions_);
4564 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004565 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004566 ITScope it_scope(this, &cond);
4567 vabdl(cond, dt, rd, rn, rm);
4568 }
4569 void Vabdl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
4570 Vabdl(al, dt, rd, rn, rm);
4571 }
4572
4573 void Vabs(Condition cond, DataType dt, DRegister rd, DRegister rm) {
4574 VIXL_ASSERT(allow_macro_instructions_);
4575 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004576 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004577 ITScope it_scope(this, &cond);
4578 vabs(cond, dt, rd, rm);
4579 }
4580 void Vabs(DataType dt, DRegister rd, DRegister rm) { Vabs(al, dt, rd, rm); }
4581
4582 void Vabs(Condition cond, DataType dt, QRegister rd, QRegister rm) {
4583 VIXL_ASSERT(allow_macro_instructions_);
4584 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004585 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004586 ITScope it_scope(this, &cond);
4587 vabs(cond, dt, rd, rm);
4588 }
4589 void Vabs(DataType dt, QRegister rd, QRegister rm) { Vabs(al, dt, rd, rm); }
4590
4591 void Vabs(Condition cond, DataType dt, SRegister rd, SRegister rm) {
4592 VIXL_ASSERT(allow_macro_instructions_);
4593 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004594 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004595 ITScope it_scope(this, &cond);
4596 vabs(cond, dt, rd, rm);
4597 }
4598 void Vabs(DataType dt, SRegister rd, SRegister rm) { Vabs(al, dt, rd, rm); }
4599
4600 void Vacge(
4601 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4602 VIXL_ASSERT(allow_macro_instructions_);
4603 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004604 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004605 ITScope it_scope(this, &cond);
4606 vacge(cond, dt, rd, rn, rm);
4607 }
4608 void Vacge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4609 Vacge(al, dt, rd, rn, rm);
4610 }
4611
4612 void Vacge(
4613 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4614 VIXL_ASSERT(allow_macro_instructions_);
4615 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004616 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004617 ITScope it_scope(this, &cond);
4618 vacge(cond, dt, rd, rn, rm);
4619 }
4620 void Vacge(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4621 Vacge(al, dt, rd, rn, rm);
4622 }
4623
4624 void Vacgt(
4625 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4626 VIXL_ASSERT(allow_macro_instructions_);
4627 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004628 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004629 ITScope it_scope(this, &cond);
4630 vacgt(cond, dt, rd, rn, rm);
4631 }
4632 void Vacgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4633 Vacgt(al, dt, rd, rn, rm);
4634 }
4635
4636 void Vacgt(
4637 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4638 VIXL_ASSERT(allow_macro_instructions_);
4639 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004640 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004641 ITScope it_scope(this, &cond);
4642 vacgt(cond, dt, rd, rn, rm);
4643 }
4644 void Vacgt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4645 Vacgt(al, dt, rd, rn, rm);
4646 }
4647
4648 void Vacle(
4649 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4650 VIXL_ASSERT(allow_macro_instructions_);
4651 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004652 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004653 ITScope it_scope(this, &cond);
4654 vacle(cond, dt, rd, rn, rm);
4655 }
4656 void Vacle(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4657 Vacle(al, dt, rd, rn, rm);
4658 }
4659
4660 void Vacle(
4661 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4662 VIXL_ASSERT(allow_macro_instructions_);
4663 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004664 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004665 ITScope it_scope(this, &cond);
4666 vacle(cond, dt, rd, rn, rm);
4667 }
4668 void Vacle(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4669 Vacle(al, dt, rd, rn, rm);
4670 }
4671
4672 void Vaclt(
4673 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4674 VIXL_ASSERT(allow_macro_instructions_);
4675 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004676 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004677 ITScope it_scope(this, &cond);
4678 vaclt(cond, dt, rd, rn, rm);
4679 }
4680 void Vaclt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4681 Vaclt(al, dt, rd, rn, rm);
4682 }
4683
4684 void Vaclt(
4685 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4686 VIXL_ASSERT(allow_macro_instructions_);
4687 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004688 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004689 ITScope it_scope(this, &cond);
4690 vaclt(cond, dt, rd, rn, rm);
4691 }
4692 void Vaclt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4693 Vaclt(al, dt, rd, rn, rm);
4694 }
4695
4696 void Vadd(
4697 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4698 VIXL_ASSERT(allow_macro_instructions_);
4699 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004700 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004701 ITScope it_scope(this, &cond);
4702 vadd(cond, dt, rd, rn, rm);
4703 }
4704 void Vadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4705 Vadd(al, dt, rd, rn, rm);
4706 }
4707
4708 void Vadd(
4709 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4710 VIXL_ASSERT(allow_macro_instructions_);
4711 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004712 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004713 ITScope it_scope(this, &cond);
4714 vadd(cond, dt, rd, rn, rm);
4715 }
4716 void Vadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4717 Vadd(al, dt, rd, rn, rm);
4718 }
4719
4720 void Vadd(
4721 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
4722 VIXL_ASSERT(allow_macro_instructions_);
4723 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004724 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004725 ITScope it_scope(this, &cond);
4726 vadd(cond, dt, rd, rn, rm);
4727 }
4728 void Vadd(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
4729 Vadd(al, dt, rd, rn, rm);
4730 }
4731
4732 void Vaddhn(
4733 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
4734 VIXL_ASSERT(allow_macro_instructions_);
4735 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004736 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004737 ITScope it_scope(this, &cond);
4738 vaddhn(cond, dt, rd, rn, rm);
4739 }
4740 void Vaddhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
4741 Vaddhn(al, dt, rd, rn, rm);
4742 }
4743
4744 void Vaddl(
4745 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
4746 VIXL_ASSERT(allow_macro_instructions_);
4747 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004748 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004749 ITScope it_scope(this, &cond);
4750 vaddl(cond, dt, rd, rn, rm);
4751 }
4752 void Vaddl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
4753 Vaddl(al, dt, rd, rn, rm);
4754 }
4755
4756 void Vaddw(
4757 Condition cond, DataType dt, QRegister rd, QRegister rn, DRegister rm) {
4758 VIXL_ASSERT(allow_macro_instructions_);
4759 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004760 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004761 ITScope it_scope(this, &cond);
4762 vaddw(cond, dt, rd, rn, rm);
4763 }
4764 void Vaddw(DataType dt, QRegister rd, QRegister rn, DRegister rm) {
4765 Vaddw(al, dt, rd, rn, rm);
4766 }
4767
4768 void Vand(Condition cond,
4769 DataType dt,
4770 DRegister rd,
4771 DRegister rn,
4772 const DOperand& operand) {
4773 VIXL_ASSERT(allow_macro_instructions_);
4774 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004775 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004776 ITScope it_scope(this, &cond);
4777 vand(cond, dt, rd, rn, operand);
4778 }
4779 void Vand(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
4780 Vand(al, dt, rd, rn, operand);
4781 }
4782
4783 void Vand(Condition cond,
4784 DataType dt,
4785 QRegister rd,
4786 QRegister rn,
4787 const QOperand& operand) {
4788 VIXL_ASSERT(allow_macro_instructions_);
4789 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004790 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004791 ITScope it_scope(this, &cond);
4792 vand(cond, dt, rd, rn, operand);
4793 }
4794 void Vand(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
4795 Vand(al, dt, rd, rn, operand);
4796 }
4797
4798 void Vbic(Condition cond,
4799 DataType dt,
4800 DRegister rd,
4801 DRegister rn,
4802 const DOperand& operand) {
4803 VIXL_ASSERT(allow_macro_instructions_);
4804 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004805 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004806 ITScope it_scope(this, &cond);
4807 vbic(cond, dt, rd, rn, operand);
4808 }
4809 void Vbic(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
4810 Vbic(al, dt, rd, rn, operand);
4811 }
4812
4813 void Vbic(Condition cond,
4814 DataType dt,
4815 QRegister rd,
4816 QRegister rn,
4817 const QOperand& operand) {
4818 VIXL_ASSERT(allow_macro_instructions_);
4819 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004820 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004821 ITScope it_scope(this, &cond);
4822 vbic(cond, dt, rd, rn, operand);
4823 }
4824 void Vbic(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
4825 Vbic(al, dt, rd, rn, operand);
4826 }
4827
4828 void Vbif(
4829 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4830 VIXL_ASSERT(allow_macro_instructions_);
4831 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004832 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004833 ITScope it_scope(this, &cond);
4834 vbif(cond, dt, rd, rn, rm);
4835 }
4836 void Vbif(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4837 Vbif(al, dt, rd, rn, rm);
4838 }
4839 void Vbif(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
4840 Vbif(cond, kDataTypeValueNone, rd, rn, rm);
4841 }
4842 void Vbif(DRegister rd, DRegister rn, DRegister rm) {
4843 Vbif(al, kDataTypeValueNone, rd, rn, rm);
4844 }
4845
4846 void Vbif(
4847 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4848 VIXL_ASSERT(allow_macro_instructions_);
4849 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004850 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004851 ITScope it_scope(this, &cond);
4852 vbif(cond, dt, rd, rn, rm);
4853 }
4854 void Vbif(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4855 Vbif(al, dt, rd, rn, rm);
4856 }
4857 void Vbif(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
4858 Vbif(cond, kDataTypeValueNone, rd, rn, rm);
4859 }
4860 void Vbif(QRegister rd, QRegister rn, QRegister rm) {
4861 Vbif(al, kDataTypeValueNone, rd, rn, rm);
4862 }
4863
4864 void Vbit(
4865 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4866 VIXL_ASSERT(allow_macro_instructions_);
4867 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004868 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004869 ITScope it_scope(this, &cond);
4870 vbit(cond, dt, rd, rn, rm);
4871 }
4872 void Vbit(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4873 Vbit(al, dt, rd, rn, rm);
4874 }
4875 void Vbit(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
4876 Vbit(cond, kDataTypeValueNone, rd, rn, rm);
4877 }
4878 void Vbit(DRegister rd, DRegister rn, DRegister rm) {
4879 Vbit(al, kDataTypeValueNone, rd, rn, rm);
4880 }
4881
4882 void Vbit(
4883 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4884 VIXL_ASSERT(allow_macro_instructions_);
4885 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004886 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004887 ITScope it_scope(this, &cond);
4888 vbit(cond, dt, rd, rn, rm);
4889 }
4890 void Vbit(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4891 Vbit(al, dt, rd, rn, rm);
4892 }
4893 void Vbit(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
4894 Vbit(cond, kDataTypeValueNone, rd, rn, rm);
4895 }
4896 void Vbit(QRegister rd, QRegister rn, QRegister rm) {
4897 Vbit(al, kDataTypeValueNone, rd, rn, rm);
4898 }
4899
4900 void Vbsl(
4901 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4902 VIXL_ASSERT(allow_macro_instructions_);
4903 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004904 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004905 ITScope it_scope(this, &cond);
4906 vbsl(cond, dt, rd, rn, rm);
4907 }
4908 void Vbsl(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4909 Vbsl(al, dt, rd, rn, rm);
4910 }
4911 void Vbsl(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
4912 Vbsl(cond, kDataTypeValueNone, rd, rn, rm);
4913 }
4914 void Vbsl(DRegister rd, DRegister rn, DRegister rm) {
4915 Vbsl(al, kDataTypeValueNone, rd, rn, rm);
4916 }
4917
4918 void Vbsl(
4919 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4920 VIXL_ASSERT(allow_macro_instructions_);
4921 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004922 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004923 ITScope it_scope(this, &cond);
4924 vbsl(cond, dt, rd, rn, rm);
4925 }
4926 void Vbsl(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4927 Vbsl(al, dt, rd, rn, rm);
4928 }
4929 void Vbsl(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
4930 Vbsl(cond, kDataTypeValueNone, rd, rn, rm);
4931 }
4932 void Vbsl(QRegister rd, QRegister rn, QRegister rm) {
4933 Vbsl(al, kDataTypeValueNone, rd, rn, rm);
4934 }
4935
4936 void Vceq(Condition cond,
4937 DataType dt,
4938 DRegister rd,
4939 DRegister rm,
4940 const DOperand& operand) {
4941 VIXL_ASSERT(allow_macro_instructions_);
4942 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004943 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004944 ITScope it_scope(this, &cond);
4945 vceq(cond, dt, rd, rm, operand);
4946 }
4947 void Vceq(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
4948 Vceq(al, dt, rd, rm, operand);
4949 }
4950
4951 void Vceq(Condition cond,
4952 DataType dt,
4953 QRegister rd,
4954 QRegister rm,
4955 const QOperand& operand) {
4956 VIXL_ASSERT(allow_macro_instructions_);
4957 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004958 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004959 ITScope it_scope(this, &cond);
4960 vceq(cond, dt, rd, rm, operand);
4961 }
4962 void Vceq(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
4963 Vceq(al, dt, rd, rm, operand);
4964 }
4965
4966 void Vceq(
4967 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4968 VIXL_ASSERT(allow_macro_instructions_);
4969 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004970 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004971 ITScope it_scope(this, &cond);
4972 vceq(cond, dt, rd, rn, rm);
4973 }
4974 void Vceq(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
4975 Vceq(al, dt, rd, rn, rm);
4976 }
4977
4978 void Vceq(
4979 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4980 VIXL_ASSERT(allow_macro_instructions_);
4981 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004982 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004983 ITScope it_scope(this, &cond);
4984 vceq(cond, dt, rd, rn, rm);
4985 }
4986 void Vceq(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
4987 Vceq(al, dt, rd, rn, rm);
4988 }
4989
4990 void Vcge(Condition cond,
4991 DataType dt,
4992 DRegister rd,
4993 DRegister rm,
4994 const DOperand& operand) {
4995 VIXL_ASSERT(allow_macro_instructions_);
4996 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004997 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004998 ITScope it_scope(this, &cond);
4999 vcge(cond, dt, rd, rm, operand);
5000 }
5001 void Vcge(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5002 Vcge(al, dt, rd, rm, operand);
5003 }
5004
5005 void Vcge(Condition cond,
5006 DataType dt,
5007 QRegister rd,
5008 QRegister rm,
5009 const QOperand& operand) {
5010 VIXL_ASSERT(allow_macro_instructions_);
5011 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005012 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005013 ITScope it_scope(this, &cond);
5014 vcge(cond, dt, rd, rm, operand);
5015 }
5016 void Vcge(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5017 Vcge(al, dt, rd, rm, operand);
5018 }
5019
5020 void Vcge(
5021 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5022 VIXL_ASSERT(allow_macro_instructions_);
5023 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005024 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005025 ITScope it_scope(this, &cond);
5026 vcge(cond, dt, rd, rn, rm);
5027 }
5028 void Vcge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5029 Vcge(al, dt, rd, rn, rm);
5030 }
5031
5032 void Vcge(
5033 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5034 VIXL_ASSERT(allow_macro_instructions_);
5035 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005036 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005037 ITScope it_scope(this, &cond);
5038 vcge(cond, dt, rd, rn, rm);
5039 }
5040 void Vcge(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5041 Vcge(al, dt, rd, rn, rm);
5042 }
5043
5044 void Vcgt(Condition cond,
5045 DataType dt,
5046 DRegister rd,
5047 DRegister rm,
5048 const DOperand& operand) {
5049 VIXL_ASSERT(allow_macro_instructions_);
5050 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005051 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005052 ITScope it_scope(this, &cond);
5053 vcgt(cond, dt, rd, rm, operand);
5054 }
5055 void Vcgt(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5056 Vcgt(al, dt, rd, rm, operand);
5057 }
5058
5059 void Vcgt(Condition cond,
5060 DataType dt,
5061 QRegister rd,
5062 QRegister rm,
5063 const QOperand& operand) {
5064 VIXL_ASSERT(allow_macro_instructions_);
5065 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005066 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005067 ITScope it_scope(this, &cond);
5068 vcgt(cond, dt, rd, rm, operand);
5069 }
5070 void Vcgt(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5071 Vcgt(al, dt, rd, rm, operand);
5072 }
5073
5074 void Vcgt(
5075 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5076 VIXL_ASSERT(allow_macro_instructions_);
5077 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005078 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005079 ITScope it_scope(this, &cond);
5080 vcgt(cond, dt, rd, rn, rm);
5081 }
5082 void Vcgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5083 Vcgt(al, dt, rd, rn, rm);
5084 }
5085
5086 void Vcgt(
5087 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5088 VIXL_ASSERT(allow_macro_instructions_);
5089 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005090 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005091 ITScope it_scope(this, &cond);
5092 vcgt(cond, dt, rd, rn, rm);
5093 }
5094 void Vcgt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5095 Vcgt(al, dt, rd, rn, rm);
5096 }
5097
5098 void Vcle(Condition cond,
5099 DataType dt,
5100 DRegister rd,
5101 DRegister rm,
5102 const DOperand& operand) {
5103 VIXL_ASSERT(allow_macro_instructions_);
5104 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005105 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005106 ITScope it_scope(this, &cond);
5107 vcle(cond, dt, rd, rm, operand);
5108 }
5109 void Vcle(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5110 Vcle(al, dt, rd, rm, operand);
5111 }
5112
5113 void Vcle(Condition cond,
5114 DataType dt,
5115 QRegister rd,
5116 QRegister rm,
5117 const QOperand& operand) {
5118 VIXL_ASSERT(allow_macro_instructions_);
5119 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005120 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005121 ITScope it_scope(this, &cond);
5122 vcle(cond, dt, rd, rm, operand);
5123 }
5124 void Vcle(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5125 Vcle(al, dt, rd, rm, operand);
5126 }
5127
5128 void Vcle(
5129 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5130 VIXL_ASSERT(allow_macro_instructions_);
5131 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005132 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005133 ITScope it_scope(this, &cond);
5134 vcle(cond, dt, rd, rn, rm);
5135 }
5136 void Vcle(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5137 Vcle(al, dt, rd, rn, rm);
5138 }
5139
5140 void Vcle(
5141 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5142 VIXL_ASSERT(allow_macro_instructions_);
5143 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005144 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005145 ITScope it_scope(this, &cond);
5146 vcle(cond, dt, rd, rn, rm);
5147 }
5148 void Vcle(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5149 Vcle(al, dt, rd, rn, rm);
5150 }
5151
5152 void Vcls(Condition cond, DataType dt, DRegister rd, DRegister rm) {
5153 VIXL_ASSERT(allow_macro_instructions_);
5154 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005155 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005156 ITScope it_scope(this, &cond);
5157 vcls(cond, dt, rd, rm);
5158 }
5159 void Vcls(DataType dt, DRegister rd, DRegister rm) { Vcls(al, dt, rd, rm); }
5160
5161 void Vcls(Condition cond, DataType dt, QRegister rd, QRegister rm) {
5162 VIXL_ASSERT(allow_macro_instructions_);
5163 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005164 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005165 ITScope it_scope(this, &cond);
5166 vcls(cond, dt, rd, rm);
5167 }
5168 void Vcls(DataType dt, QRegister rd, QRegister rm) { Vcls(al, dt, rd, rm); }
5169
5170 void Vclt(Condition cond,
5171 DataType dt,
5172 DRegister rd,
5173 DRegister rm,
5174 const DOperand& operand) {
5175 VIXL_ASSERT(allow_macro_instructions_);
5176 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005177 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005178 ITScope it_scope(this, &cond);
5179 vclt(cond, dt, rd, rm, operand);
5180 }
5181 void Vclt(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5182 Vclt(al, dt, rd, rm, operand);
5183 }
5184
5185 void Vclt(Condition cond,
5186 DataType dt,
5187 QRegister rd,
5188 QRegister rm,
5189 const QOperand& operand) {
5190 VIXL_ASSERT(allow_macro_instructions_);
5191 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005192 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005193 ITScope it_scope(this, &cond);
5194 vclt(cond, dt, rd, rm, operand);
5195 }
5196 void Vclt(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5197 Vclt(al, dt, rd, rm, operand);
5198 }
5199
5200 void Vclt(
5201 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5202 VIXL_ASSERT(allow_macro_instructions_);
5203 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005204 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005205 ITScope it_scope(this, &cond);
5206 vclt(cond, dt, rd, rn, rm);
5207 }
5208 void Vclt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5209 Vclt(al, dt, rd, rn, rm);
5210 }
5211
5212 void Vclt(
5213 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5214 VIXL_ASSERT(allow_macro_instructions_);
5215 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005216 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005217 ITScope it_scope(this, &cond);
5218 vclt(cond, dt, rd, rn, rm);
5219 }
5220 void Vclt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5221 Vclt(al, dt, rd, rn, rm);
5222 }
5223
5224 void Vclz(Condition cond, DataType dt, DRegister rd, DRegister rm) {
5225 VIXL_ASSERT(allow_macro_instructions_);
5226 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005227 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005228 ITScope it_scope(this, &cond);
5229 vclz(cond, dt, rd, rm);
5230 }
5231 void Vclz(DataType dt, DRegister rd, DRegister rm) { Vclz(al, dt, rd, rm); }
5232
5233 void Vclz(Condition cond, DataType dt, QRegister rd, QRegister rm) {
5234 VIXL_ASSERT(allow_macro_instructions_);
5235 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005236 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005237 ITScope it_scope(this, &cond);
5238 vclz(cond, dt, rd, rm);
5239 }
5240 void Vclz(DataType dt, QRegister rd, QRegister rm) { Vclz(al, dt, rd, rm); }
5241
5242 void Vcmp(Condition cond, DataType dt, SRegister rd, SRegister rm) {
5243 VIXL_ASSERT(allow_macro_instructions_);
5244 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005245 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005246 ITScope it_scope(this, &cond);
5247 vcmp(cond, dt, rd, rm);
5248 }
5249 void Vcmp(DataType dt, SRegister rd, SRegister rm) { Vcmp(al, dt, rd, rm); }
5250
5251 void Vcmp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
5252 VIXL_ASSERT(allow_macro_instructions_);
5253 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005254 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005255 ITScope it_scope(this, &cond);
5256 vcmp(cond, dt, rd, rm);
5257 }
5258 void Vcmp(DataType dt, DRegister rd, DRegister rm) { Vcmp(al, dt, rd, rm); }
5259
5260 void Vcmp(Condition cond, DataType dt, SRegister rd, double imm) {
5261 VIXL_ASSERT(allow_macro_instructions_);
5262 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005263 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005264 ITScope it_scope(this, &cond);
5265 vcmp(cond, dt, rd, imm);
5266 }
5267 void Vcmp(DataType dt, SRegister rd, double imm) { Vcmp(al, dt, rd, imm); }
5268
5269 void Vcmp(Condition cond, DataType dt, DRegister rd, double imm) {
5270 VIXL_ASSERT(allow_macro_instructions_);
5271 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005272 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005273 ITScope it_scope(this, &cond);
5274 vcmp(cond, dt, rd, imm);
5275 }
5276 void Vcmp(DataType dt, DRegister rd, double imm) { Vcmp(al, dt, rd, imm); }
5277
5278 void Vcmpe(Condition cond, DataType dt, SRegister rd, SRegister rm) {
5279 VIXL_ASSERT(allow_macro_instructions_);
5280 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005281 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005282 ITScope it_scope(this, &cond);
5283 vcmpe(cond, dt, rd, rm);
5284 }
5285 void Vcmpe(DataType dt, SRegister rd, SRegister rm) { Vcmpe(al, dt, rd, rm); }
5286
5287 void Vcmpe(Condition cond, DataType dt, DRegister rd, DRegister rm) {
5288 VIXL_ASSERT(allow_macro_instructions_);
5289 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005290 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005291 ITScope it_scope(this, &cond);
5292 vcmpe(cond, dt, rd, rm);
5293 }
5294 void Vcmpe(DataType dt, DRegister rd, DRegister rm) { Vcmpe(al, dt, rd, rm); }
5295
5296 void Vcmpe(Condition cond, DataType dt, SRegister rd, double imm) {
5297 VIXL_ASSERT(allow_macro_instructions_);
5298 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005299 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005300 ITScope it_scope(this, &cond);
5301 vcmpe(cond, dt, rd, imm);
5302 }
5303 void Vcmpe(DataType dt, SRegister rd, double imm) { Vcmpe(al, dt, rd, imm); }
5304
5305 void Vcmpe(Condition cond, DataType dt, DRegister rd, double imm) {
5306 VIXL_ASSERT(allow_macro_instructions_);
5307 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005308 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005309 ITScope it_scope(this, &cond);
5310 vcmpe(cond, dt, rd, imm);
5311 }
5312 void Vcmpe(DataType dt, DRegister rd, double imm) { Vcmpe(al, dt, rd, imm); }
5313
5314 void Vcnt(Condition cond, DataType dt, DRegister rd, DRegister rm) {
5315 VIXL_ASSERT(allow_macro_instructions_);
5316 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005317 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005318 ITScope it_scope(this, &cond);
5319 vcnt(cond, dt, rd, rm);
5320 }
5321 void Vcnt(DataType dt, DRegister rd, DRegister rm) { Vcnt(al, dt, rd, rm); }
5322
5323 void Vcnt(Condition cond, DataType dt, QRegister rd, QRegister rm) {
5324 VIXL_ASSERT(allow_macro_instructions_);
5325 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005326 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005327 ITScope it_scope(this, &cond);
5328 vcnt(cond, dt, rd, rm);
5329 }
5330 void Vcnt(DataType dt, QRegister rd, QRegister rm) { Vcnt(al, dt, rd, rm); }
5331
5332 void Vcvt(
5333 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
5334 VIXL_ASSERT(allow_macro_instructions_);
5335 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005336 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005337 ITScope it_scope(this, &cond);
5338 vcvt(cond, dt1, dt2, rd, rm);
5339 }
5340 void Vcvt(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
5341 Vcvt(al, dt1, dt2, rd, rm);
5342 }
5343
5344 void Vcvt(
5345 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
5346 VIXL_ASSERT(allow_macro_instructions_);
5347 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005348 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005349 ITScope it_scope(this, &cond);
5350 vcvt(cond, dt1, dt2, rd, rm);
5351 }
5352 void Vcvt(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
5353 Vcvt(al, dt1, dt2, rd, rm);
5354 }
5355
5356 void Vcvt(Condition cond,
5357 DataType dt1,
5358 DataType dt2,
5359 DRegister rd,
5360 DRegister rm,
5361 int32_t fbits) {
5362 VIXL_ASSERT(allow_macro_instructions_);
5363 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005364 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005365 ITScope it_scope(this, &cond);
5366 vcvt(cond, dt1, dt2, rd, rm, fbits);
5367 }
5368 void Vcvt(
5369 DataType dt1, DataType dt2, DRegister rd, DRegister rm, int32_t fbits) {
5370 Vcvt(al, dt1, dt2, rd, rm, fbits);
5371 }
5372
5373 void Vcvt(Condition cond,
5374 DataType dt1,
5375 DataType dt2,
5376 QRegister rd,
5377 QRegister rm,
5378 int32_t fbits) {
5379 VIXL_ASSERT(allow_macro_instructions_);
5380 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005381 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005382 ITScope it_scope(this, &cond);
5383 vcvt(cond, dt1, dt2, rd, rm, fbits);
5384 }
5385 void Vcvt(
5386 DataType dt1, DataType dt2, QRegister rd, QRegister rm, int32_t fbits) {
5387 Vcvt(al, dt1, dt2, rd, rm, fbits);
5388 }
5389
5390 void Vcvt(Condition cond,
5391 DataType dt1,
5392 DataType dt2,
5393 SRegister rd,
5394 SRegister rm,
5395 int32_t fbits) {
5396 VIXL_ASSERT(allow_macro_instructions_);
5397 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005398 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005399 ITScope it_scope(this, &cond);
5400 vcvt(cond, dt1, dt2, rd, rm, fbits);
5401 }
5402 void Vcvt(
5403 DataType dt1, DataType dt2, SRegister rd, SRegister rm, int32_t fbits) {
5404 Vcvt(al, dt1, dt2, rd, rm, fbits);
5405 }
5406
5407 void Vcvt(
5408 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
5409 VIXL_ASSERT(allow_macro_instructions_);
5410 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005411 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005412 ITScope it_scope(this, &cond);
5413 vcvt(cond, dt1, dt2, rd, rm);
5414 }
5415 void Vcvt(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
5416 Vcvt(al, dt1, dt2, rd, rm);
5417 }
5418
5419 void Vcvt(
5420 Condition cond, DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
5421 VIXL_ASSERT(allow_macro_instructions_);
5422 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005423 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005424 ITScope it_scope(this, &cond);
5425 vcvt(cond, dt1, dt2, rd, rm);
5426 }
5427 void Vcvt(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
5428 Vcvt(al, dt1, dt2, rd, rm);
5429 }
5430
5431 void Vcvt(
5432 Condition cond, DataType dt1, DataType dt2, DRegister rd, QRegister rm) {
5433 VIXL_ASSERT(allow_macro_instructions_);
5434 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005435 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005436 ITScope it_scope(this, &cond);
5437 vcvt(cond, dt1, dt2, rd, rm);
5438 }
5439 void Vcvt(DataType dt1, DataType dt2, DRegister rd, QRegister rm) {
5440 Vcvt(al, dt1, dt2, rd, rm);
5441 }
5442
5443 void Vcvt(
5444 Condition cond, DataType dt1, DataType dt2, QRegister rd, DRegister rm) {
5445 VIXL_ASSERT(allow_macro_instructions_);
5446 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005447 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005448 ITScope it_scope(this, &cond);
5449 vcvt(cond, dt1, dt2, rd, rm);
5450 }
5451 void Vcvt(DataType dt1, DataType dt2, QRegister rd, DRegister rm) {
5452 Vcvt(al, dt1, dt2, rd, rm);
5453 }
5454
5455 void Vcvt(
5456 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
5457 VIXL_ASSERT(allow_macro_instructions_);
5458 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005459 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005460 ITScope it_scope(this, &cond);
5461 vcvt(cond, dt1, dt2, rd, rm);
5462 }
5463 void Vcvt(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
5464 Vcvt(al, dt1, dt2, rd, rm);
5465 }
5466
5467 void Vcvta(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
5468 VIXL_ASSERT(allow_macro_instructions_);
5469 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005470 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005471 vcvta(dt1, dt2, rd, rm);
5472 }
5473
5474 void Vcvta(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
5475 VIXL_ASSERT(allow_macro_instructions_);
5476 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005477 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005478 vcvta(dt1, dt2, rd, rm);
5479 }
5480
5481 void Vcvta(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
5482 VIXL_ASSERT(allow_macro_instructions_);
5483 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005484 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005485 vcvta(dt1, dt2, rd, rm);
5486 }
5487
5488 void Vcvta(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
5489 VIXL_ASSERT(allow_macro_instructions_);
5490 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005491 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005492 vcvta(dt1, dt2, rd, rm);
5493 }
5494
5495 void Vcvtb(
5496 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
5497 VIXL_ASSERT(allow_macro_instructions_);
5498 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005499 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005500 ITScope it_scope(this, &cond);
5501 vcvtb(cond, dt1, dt2, rd, rm);
5502 }
5503 void Vcvtb(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
5504 Vcvtb(al, dt1, dt2, rd, rm);
5505 }
5506
5507 void Vcvtb(
5508 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
5509 VIXL_ASSERT(allow_macro_instructions_);
5510 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005511 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005512 ITScope it_scope(this, &cond);
5513 vcvtb(cond, dt1, dt2, rd, rm);
5514 }
5515 void Vcvtb(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
5516 Vcvtb(al, dt1, dt2, rd, rm);
5517 }
5518
5519 void Vcvtb(
5520 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
5521 VIXL_ASSERT(allow_macro_instructions_);
5522 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005523 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005524 ITScope it_scope(this, &cond);
5525 vcvtb(cond, dt1, dt2, rd, rm);
5526 }
5527 void Vcvtb(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
5528 Vcvtb(al, dt1, dt2, rd, rm);
5529 }
5530
5531 void Vcvtm(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
5532 VIXL_ASSERT(allow_macro_instructions_);
5533 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005534 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005535 vcvtm(dt1, dt2, rd, rm);
5536 }
5537
5538 void Vcvtm(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
5539 VIXL_ASSERT(allow_macro_instructions_);
5540 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005541 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005542 vcvtm(dt1, dt2, rd, rm);
5543 }
5544
5545 void Vcvtm(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
5546 VIXL_ASSERT(allow_macro_instructions_);
5547 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005548 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005549 vcvtm(dt1, dt2, rd, rm);
5550 }
5551
5552 void Vcvtm(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
5553 VIXL_ASSERT(allow_macro_instructions_);
5554 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005555 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005556 vcvtm(dt1, dt2, rd, rm);
5557 }
5558
5559 void Vcvtn(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
5560 VIXL_ASSERT(allow_macro_instructions_);
5561 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005562 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005563 vcvtn(dt1, dt2, rd, rm);
5564 }
5565
5566 void Vcvtn(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
5567 VIXL_ASSERT(allow_macro_instructions_);
5568 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005569 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005570 vcvtn(dt1, dt2, rd, rm);
5571 }
5572
5573 void Vcvtn(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
5574 VIXL_ASSERT(allow_macro_instructions_);
5575 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005576 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005577 vcvtn(dt1, dt2, rd, rm);
5578 }
5579
5580 void Vcvtn(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
5581 VIXL_ASSERT(allow_macro_instructions_);
5582 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005583 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005584 vcvtn(dt1, dt2, rd, rm);
5585 }
5586
5587 void Vcvtp(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
5588 VIXL_ASSERT(allow_macro_instructions_);
5589 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005590 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005591 vcvtp(dt1, dt2, rd, rm);
5592 }
5593
5594 void Vcvtp(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
5595 VIXL_ASSERT(allow_macro_instructions_);
5596 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005597 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005598 vcvtp(dt1, dt2, rd, rm);
5599 }
5600
5601 void Vcvtp(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
5602 VIXL_ASSERT(allow_macro_instructions_);
5603 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005604 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005605 vcvtp(dt1, dt2, rd, rm);
5606 }
5607
5608 void Vcvtp(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
5609 VIXL_ASSERT(allow_macro_instructions_);
5610 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005611 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005612 vcvtp(dt1, dt2, rd, rm);
5613 }
5614
5615 void Vcvtr(
5616 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
5617 VIXL_ASSERT(allow_macro_instructions_);
5618 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005619 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005620 ITScope it_scope(this, &cond);
5621 vcvtr(cond, dt1, dt2, rd, rm);
5622 }
5623 void Vcvtr(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
5624 Vcvtr(al, dt1, dt2, rd, rm);
5625 }
5626
5627 void Vcvtr(
5628 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
5629 VIXL_ASSERT(allow_macro_instructions_);
5630 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005631 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005632 ITScope it_scope(this, &cond);
5633 vcvtr(cond, dt1, dt2, rd, rm);
5634 }
5635 void Vcvtr(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
5636 Vcvtr(al, dt1, dt2, rd, rm);
5637 }
5638
5639 void Vcvtt(
5640 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
5641 VIXL_ASSERT(allow_macro_instructions_);
5642 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005643 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005644 ITScope it_scope(this, &cond);
5645 vcvtt(cond, dt1, dt2, rd, rm);
5646 }
5647 void Vcvtt(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
5648 Vcvtt(al, dt1, dt2, rd, rm);
5649 }
5650
5651 void Vcvtt(
5652 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
5653 VIXL_ASSERT(allow_macro_instructions_);
5654 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005655 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005656 ITScope it_scope(this, &cond);
5657 vcvtt(cond, dt1, dt2, rd, rm);
5658 }
5659 void Vcvtt(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
5660 Vcvtt(al, dt1, dt2, rd, rm);
5661 }
5662
5663 void Vcvtt(
5664 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
5665 VIXL_ASSERT(allow_macro_instructions_);
5666 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005667 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005668 ITScope it_scope(this, &cond);
5669 vcvtt(cond, dt1, dt2, rd, rm);
5670 }
5671 void Vcvtt(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
5672 Vcvtt(al, dt1, dt2, rd, rm);
5673 }
5674
5675 void Vdiv(
5676 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
5677 VIXL_ASSERT(allow_macro_instructions_);
5678 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005679 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005680 ITScope it_scope(this, &cond);
5681 vdiv(cond, dt, rd, rn, rm);
5682 }
5683 void Vdiv(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
5684 Vdiv(al, dt, rd, rn, rm);
5685 }
5686
5687 void Vdiv(
5688 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5689 VIXL_ASSERT(allow_macro_instructions_);
5690 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005691 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005692 ITScope it_scope(this, &cond);
5693 vdiv(cond, dt, rd, rn, rm);
5694 }
5695 void Vdiv(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5696 Vdiv(al, dt, rd, rn, rm);
5697 }
5698
5699 void Vdup(Condition cond, DataType dt, QRegister rd, Register rt) {
5700 VIXL_ASSERT(allow_macro_instructions_);
5701 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005702 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005703 ITScope it_scope(this, &cond);
5704 vdup(cond, dt, rd, rt);
5705 }
5706 void Vdup(DataType dt, QRegister rd, Register rt) { Vdup(al, dt, rd, rt); }
5707
5708 void Vdup(Condition cond, DataType dt, DRegister rd, Register rt) {
5709 VIXL_ASSERT(allow_macro_instructions_);
5710 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005711 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005712 ITScope it_scope(this, &cond);
5713 vdup(cond, dt, rd, rt);
5714 }
5715 void Vdup(DataType dt, DRegister rd, Register rt) { Vdup(al, dt, rd, rt); }
5716
5717 void Vdup(Condition cond, DataType dt, DRegister rd, DRegisterLane rm) {
5718 VIXL_ASSERT(allow_macro_instructions_);
5719 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005720 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005721 ITScope it_scope(this, &cond);
5722 vdup(cond, dt, rd, rm);
5723 }
5724 void Vdup(DataType dt, DRegister rd, DRegisterLane rm) {
5725 Vdup(al, dt, rd, rm);
5726 }
5727
5728 void Vdup(Condition cond, DataType dt, QRegister rd, DRegisterLane rm) {
5729 VIXL_ASSERT(allow_macro_instructions_);
5730 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005731 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005732 ITScope it_scope(this, &cond);
5733 vdup(cond, dt, rd, rm);
5734 }
5735 void Vdup(DataType dt, QRegister rd, DRegisterLane rm) {
5736 Vdup(al, dt, rd, rm);
5737 }
5738
5739 void Veor(
5740 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5741 VIXL_ASSERT(allow_macro_instructions_);
5742 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005743 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005744 ITScope it_scope(this, &cond);
5745 veor(cond, dt, rd, rn, rm);
5746 }
5747 void Veor(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5748 Veor(al, dt, rd, rn, rm);
5749 }
5750 void Veor(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5751 Veor(cond, kDataTypeValueNone, rd, rn, rm);
5752 }
5753 void Veor(DRegister rd, DRegister rn, DRegister rm) {
5754 Veor(al, kDataTypeValueNone, rd, rn, rm);
5755 }
5756
5757 void Veor(
5758 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5759 VIXL_ASSERT(allow_macro_instructions_);
5760 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005761 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005762 ITScope it_scope(this, &cond);
5763 veor(cond, dt, rd, rn, rm);
5764 }
5765 void Veor(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5766 Veor(al, dt, rd, rn, rm);
5767 }
5768 void Veor(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5769 Veor(cond, kDataTypeValueNone, rd, rn, rm);
5770 }
5771 void Veor(QRegister rd, QRegister rn, QRegister rm) {
5772 Veor(al, kDataTypeValueNone, rd, rn, rm);
5773 }
5774
5775 void Vext(Condition cond,
5776 DataType dt,
5777 DRegister rd,
5778 DRegister rn,
5779 DRegister rm,
5780 const DOperand& operand) {
5781 VIXL_ASSERT(allow_macro_instructions_);
5782 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005783 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005784 ITScope it_scope(this, &cond);
5785 vext(cond, dt, rd, rn, rm, operand);
5786 }
5787 void Vext(DataType dt,
5788 DRegister rd,
5789 DRegister rn,
5790 DRegister rm,
5791 const DOperand& operand) {
5792 Vext(al, dt, rd, rn, rm, operand);
5793 }
5794
5795 void Vext(Condition cond,
5796 DataType dt,
5797 QRegister rd,
5798 QRegister rn,
5799 QRegister rm,
5800 const QOperand& operand) {
5801 VIXL_ASSERT(allow_macro_instructions_);
5802 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005803 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005804 ITScope it_scope(this, &cond);
5805 vext(cond, dt, rd, rn, rm, operand);
5806 }
5807 void Vext(DataType dt,
5808 QRegister rd,
5809 QRegister rn,
5810 QRegister rm,
5811 const QOperand& operand) {
5812 Vext(al, dt, rd, rn, rm, operand);
5813 }
5814
5815 void Vfma(
5816 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5817 VIXL_ASSERT(allow_macro_instructions_);
5818 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005819 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005820 ITScope it_scope(this, &cond);
5821 vfma(cond, dt, rd, rn, rm);
5822 }
5823 void Vfma(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5824 Vfma(al, dt, rd, rn, rm);
5825 }
5826
5827 void Vfma(
5828 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5829 VIXL_ASSERT(allow_macro_instructions_);
5830 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005831 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005832 ITScope it_scope(this, &cond);
5833 vfma(cond, dt, rd, rn, rm);
5834 }
5835 void Vfma(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5836 Vfma(al, dt, rd, rn, rm);
5837 }
5838
5839 void Vfma(
5840 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
5841 VIXL_ASSERT(allow_macro_instructions_);
5842 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005843 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005844 ITScope it_scope(this, &cond);
5845 vfma(cond, dt, rd, rn, rm);
5846 }
5847 void Vfma(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
5848 Vfma(al, dt, rd, rn, rm);
5849 }
5850
5851 void Vfms(
5852 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5853 VIXL_ASSERT(allow_macro_instructions_);
5854 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005855 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005856 ITScope it_scope(this, &cond);
5857 vfms(cond, dt, rd, rn, rm);
5858 }
5859 void Vfms(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5860 Vfms(al, dt, rd, rn, rm);
5861 }
5862
5863 void Vfms(
5864 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5865 VIXL_ASSERT(allow_macro_instructions_);
5866 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005867 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005868 ITScope it_scope(this, &cond);
5869 vfms(cond, dt, rd, rn, rm);
5870 }
5871 void Vfms(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5872 Vfms(al, dt, rd, rn, rm);
5873 }
5874
5875 void Vfms(
5876 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
5877 VIXL_ASSERT(allow_macro_instructions_);
5878 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005879 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005880 ITScope it_scope(this, &cond);
5881 vfms(cond, dt, rd, rn, rm);
5882 }
5883 void Vfms(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
5884 Vfms(al, dt, rd, rn, rm);
5885 }
5886
5887 void Vfnma(
5888 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
5889 VIXL_ASSERT(allow_macro_instructions_);
5890 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005891 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005892 ITScope it_scope(this, &cond);
5893 vfnma(cond, dt, rd, rn, rm);
5894 }
5895 void Vfnma(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
5896 Vfnma(al, dt, rd, rn, rm);
5897 }
5898
5899 void Vfnma(
5900 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5901 VIXL_ASSERT(allow_macro_instructions_);
5902 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005903 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005904 ITScope it_scope(this, &cond);
5905 vfnma(cond, dt, rd, rn, rm);
5906 }
5907 void Vfnma(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5908 Vfnma(al, dt, rd, rn, rm);
5909 }
5910
5911 void Vfnms(
5912 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
5913 VIXL_ASSERT(allow_macro_instructions_);
5914 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005915 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005916 ITScope it_scope(this, &cond);
5917 vfnms(cond, dt, rd, rn, rm);
5918 }
5919 void Vfnms(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
5920 Vfnms(al, dt, rd, rn, rm);
5921 }
5922
5923 void Vfnms(
5924 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5925 VIXL_ASSERT(allow_macro_instructions_);
5926 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005927 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005928 ITScope it_scope(this, &cond);
5929 vfnms(cond, dt, rd, rn, rm);
5930 }
5931 void Vfnms(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5932 Vfnms(al, dt, rd, rn, rm);
5933 }
5934
5935 void Vhadd(
5936 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5937 VIXL_ASSERT(allow_macro_instructions_);
5938 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005939 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005940 ITScope it_scope(this, &cond);
5941 vhadd(cond, dt, rd, rn, rm);
5942 }
5943 void Vhadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5944 Vhadd(al, dt, rd, rn, rm);
5945 }
5946
5947 void Vhadd(
5948 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5949 VIXL_ASSERT(allow_macro_instructions_);
5950 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005951 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005952 ITScope it_scope(this, &cond);
5953 vhadd(cond, dt, rd, rn, rm);
5954 }
5955 void Vhadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5956 Vhadd(al, dt, rd, rn, rm);
5957 }
5958
5959 void Vhsub(
5960 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5961 VIXL_ASSERT(allow_macro_instructions_);
5962 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005963 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005964 ITScope it_scope(this, &cond);
5965 vhsub(cond, dt, rd, rn, rm);
5966 }
5967 void Vhsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5968 Vhsub(al, dt, rd, rn, rm);
5969 }
5970
5971 void Vhsub(
5972 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5973 VIXL_ASSERT(allow_macro_instructions_);
5974 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005975 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005976 ITScope it_scope(this, &cond);
5977 vhsub(cond, dt, rd, rn, rm);
5978 }
5979 void Vhsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5980 Vhsub(al, dt, rd, rn, rm);
5981 }
5982
5983 void Vld1(Condition cond,
5984 DataType dt,
5985 const NeonRegisterList& nreglist,
5986 const AlignedMemOperand& operand) {
5987 VIXL_ASSERT(allow_macro_instructions_);
5988 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005989 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005990 ITScope it_scope(this, &cond);
5991 vld1(cond, dt, nreglist, operand);
5992 }
5993 void Vld1(DataType dt,
5994 const NeonRegisterList& nreglist,
5995 const AlignedMemOperand& operand) {
5996 Vld1(al, dt, nreglist, operand);
5997 }
5998
5999 void Vld2(Condition cond,
6000 DataType dt,
6001 const NeonRegisterList& nreglist,
6002 const AlignedMemOperand& operand) {
6003 VIXL_ASSERT(allow_macro_instructions_);
6004 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006005 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006006 ITScope it_scope(this, &cond);
6007 vld2(cond, dt, nreglist, operand);
6008 }
6009 void Vld2(DataType dt,
6010 const NeonRegisterList& nreglist,
6011 const AlignedMemOperand& operand) {
6012 Vld2(al, dt, nreglist, operand);
6013 }
6014
6015 void Vld3(Condition cond,
6016 DataType dt,
6017 const NeonRegisterList& nreglist,
6018 const AlignedMemOperand& operand) {
6019 VIXL_ASSERT(allow_macro_instructions_);
6020 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006021 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006022 ITScope it_scope(this, &cond);
6023 vld3(cond, dt, nreglist, operand);
6024 }
6025 void Vld3(DataType dt,
6026 const NeonRegisterList& nreglist,
6027 const AlignedMemOperand& operand) {
6028 Vld3(al, dt, nreglist, operand);
6029 }
6030
6031 void Vld3(Condition cond,
6032 DataType dt,
6033 const NeonRegisterList& nreglist,
6034 const MemOperand& operand) {
6035 VIXL_ASSERT(allow_macro_instructions_);
6036 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006037 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006038 ITScope it_scope(this, &cond);
6039 vld3(cond, dt, nreglist, operand);
6040 }
6041 void Vld3(DataType dt,
6042 const NeonRegisterList& nreglist,
6043 const MemOperand& operand) {
6044 Vld3(al, dt, nreglist, operand);
6045 }
6046
6047 void Vld4(Condition cond,
6048 DataType dt,
6049 const NeonRegisterList& nreglist,
6050 const AlignedMemOperand& operand) {
6051 VIXL_ASSERT(allow_macro_instructions_);
6052 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006053 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006054 ITScope it_scope(this, &cond);
6055 vld4(cond, dt, nreglist, operand);
6056 }
6057 void Vld4(DataType dt,
6058 const NeonRegisterList& nreglist,
6059 const AlignedMemOperand& operand) {
6060 Vld4(al, dt, nreglist, operand);
6061 }
6062
6063 void Vldm(Condition cond,
6064 DataType dt,
6065 Register rn,
6066 WriteBack write_back,
6067 DRegisterList dreglist) {
6068 VIXL_ASSERT(allow_macro_instructions_);
6069 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006070 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006071 ITScope it_scope(this, &cond);
6072 vldm(cond, dt, rn, write_back, dreglist);
6073 }
6074 void Vldm(DataType dt,
6075 Register rn,
6076 WriteBack write_back,
6077 DRegisterList dreglist) {
6078 Vldm(al, dt, rn, write_back, dreglist);
6079 }
6080 void Vldm(Condition cond,
6081 Register rn,
6082 WriteBack write_back,
6083 DRegisterList dreglist) {
6084 Vldm(cond, kDataTypeValueNone, rn, write_back, dreglist);
6085 }
6086 void Vldm(Register rn, WriteBack write_back, DRegisterList dreglist) {
6087 Vldm(al, kDataTypeValueNone, rn, write_back, dreglist);
6088 }
6089
6090 void Vldm(Condition cond,
6091 DataType dt,
6092 Register rn,
6093 WriteBack write_back,
6094 SRegisterList sreglist) {
6095 VIXL_ASSERT(allow_macro_instructions_);
6096 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006097 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006098 ITScope it_scope(this, &cond);
6099 vldm(cond, dt, rn, write_back, sreglist);
6100 }
6101 void Vldm(DataType dt,
6102 Register rn,
6103 WriteBack write_back,
6104 SRegisterList sreglist) {
6105 Vldm(al, dt, rn, write_back, sreglist);
6106 }
6107 void Vldm(Condition cond,
6108 Register rn,
6109 WriteBack write_back,
6110 SRegisterList sreglist) {
6111 Vldm(cond, kDataTypeValueNone, rn, write_back, sreglist);
6112 }
6113 void Vldm(Register rn, WriteBack write_back, SRegisterList sreglist) {
6114 Vldm(al, kDataTypeValueNone, rn, write_back, sreglist);
6115 }
6116
6117 void Vldmdb(Condition cond,
6118 DataType dt,
6119 Register rn,
6120 WriteBack write_back,
6121 DRegisterList dreglist) {
6122 VIXL_ASSERT(allow_macro_instructions_);
6123 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006124 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006125 ITScope it_scope(this, &cond);
6126 vldmdb(cond, dt, rn, write_back, dreglist);
6127 }
6128 void Vldmdb(DataType dt,
6129 Register rn,
6130 WriteBack write_back,
6131 DRegisterList dreglist) {
6132 Vldmdb(al, dt, rn, write_back, dreglist);
6133 }
6134 void Vldmdb(Condition cond,
6135 Register rn,
6136 WriteBack write_back,
6137 DRegisterList dreglist) {
6138 Vldmdb(cond, kDataTypeValueNone, rn, write_back, dreglist);
6139 }
6140 void Vldmdb(Register rn, WriteBack write_back, DRegisterList dreglist) {
6141 Vldmdb(al, kDataTypeValueNone, rn, write_back, dreglist);
6142 }
6143
6144 void Vldmdb(Condition cond,
6145 DataType dt,
6146 Register rn,
6147 WriteBack write_back,
6148 SRegisterList sreglist) {
6149 VIXL_ASSERT(allow_macro_instructions_);
6150 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006151 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006152 ITScope it_scope(this, &cond);
6153 vldmdb(cond, dt, rn, write_back, sreglist);
6154 }
6155 void Vldmdb(DataType dt,
6156 Register rn,
6157 WriteBack write_back,
6158 SRegisterList sreglist) {
6159 Vldmdb(al, dt, rn, write_back, sreglist);
6160 }
6161 void Vldmdb(Condition cond,
6162 Register rn,
6163 WriteBack write_back,
6164 SRegisterList sreglist) {
6165 Vldmdb(cond, kDataTypeValueNone, rn, write_back, sreglist);
6166 }
6167 void Vldmdb(Register rn, WriteBack write_back, SRegisterList sreglist) {
6168 Vldmdb(al, kDataTypeValueNone, rn, write_back, sreglist);
6169 }
6170
6171 void Vldmia(Condition cond,
6172 DataType dt,
6173 Register rn,
6174 WriteBack write_back,
6175 DRegisterList dreglist) {
6176 VIXL_ASSERT(allow_macro_instructions_);
6177 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006178 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006179 ITScope it_scope(this, &cond);
6180 vldmia(cond, dt, rn, write_back, dreglist);
6181 }
6182 void Vldmia(DataType dt,
6183 Register rn,
6184 WriteBack write_back,
6185 DRegisterList dreglist) {
6186 Vldmia(al, dt, rn, write_back, dreglist);
6187 }
6188 void Vldmia(Condition cond,
6189 Register rn,
6190 WriteBack write_back,
6191 DRegisterList dreglist) {
6192 Vldmia(cond, kDataTypeValueNone, rn, write_back, dreglist);
6193 }
6194 void Vldmia(Register rn, WriteBack write_back, DRegisterList dreglist) {
6195 Vldmia(al, kDataTypeValueNone, rn, write_back, dreglist);
6196 }
6197
6198 void Vldmia(Condition cond,
6199 DataType dt,
6200 Register rn,
6201 WriteBack write_back,
6202 SRegisterList sreglist) {
6203 VIXL_ASSERT(allow_macro_instructions_);
6204 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006205 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006206 ITScope it_scope(this, &cond);
6207 vldmia(cond, dt, rn, write_back, sreglist);
6208 }
6209 void Vldmia(DataType dt,
6210 Register rn,
6211 WriteBack write_back,
6212 SRegisterList sreglist) {
6213 Vldmia(al, dt, rn, write_back, sreglist);
6214 }
6215 void Vldmia(Condition cond,
6216 Register rn,
6217 WriteBack write_back,
6218 SRegisterList sreglist) {
6219 Vldmia(cond, kDataTypeValueNone, rn, write_back, sreglist);
6220 }
6221 void Vldmia(Register rn, WriteBack write_back, SRegisterList sreglist) {
6222 Vldmia(al, kDataTypeValueNone, rn, write_back, sreglist);
6223 }
6224
6225 void Vldr(Condition cond, DataType dt, DRegister rd, Label* label) {
6226 VIXL_ASSERT(allow_macro_instructions_);
6227 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006228 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006229 ITScope it_scope(this, &cond);
6230 vldr(cond, dt, rd, label);
6231 }
6232 void Vldr(DataType dt, DRegister rd, Label* label) {
6233 Vldr(al, dt, rd, label);
6234 }
6235 void Vldr(Condition cond, DRegister rd, Label* label) {
6236 Vldr(cond, Untyped64, rd, label);
6237 }
6238 void Vldr(DRegister rd, Label* label) { Vldr(al, Untyped64, rd, label); }
6239
6240 void Vldr(Condition cond,
6241 DataType dt,
6242 DRegister rd,
6243 const MemOperand& operand) {
6244 VIXL_ASSERT(allow_macro_instructions_);
6245 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006246 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006247 ITScope it_scope(this, &cond);
6248 vldr(cond, dt, rd, operand);
6249 }
6250 void Vldr(DataType dt, DRegister rd, const MemOperand& operand) {
6251 Vldr(al, dt, rd, operand);
6252 }
6253 void Vldr(Condition cond, DRegister rd, const MemOperand& operand) {
6254 Vldr(cond, Untyped64, rd, operand);
6255 }
6256 void Vldr(DRegister rd, const MemOperand& operand) {
6257 Vldr(al, Untyped64, rd, operand);
6258 }
6259
6260 void Vldr(Condition cond, DataType dt, SRegister rd, Label* label) {
6261 VIXL_ASSERT(allow_macro_instructions_);
6262 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006263 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006264 ITScope it_scope(this, &cond);
6265 vldr(cond, dt, rd, label);
6266 }
6267 void Vldr(DataType dt, SRegister rd, Label* label) {
6268 Vldr(al, dt, rd, label);
6269 }
6270 void Vldr(Condition cond, SRegister rd, Label* label) {
6271 Vldr(cond, Untyped32, rd, label);
6272 }
6273 void Vldr(SRegister rd, Label* label) { Vldr(al, Untyped32, rd, label); }
6274
6275 void Vldr(Condition cond,
6276 DataType dt,
6277 SRegister rd,
6278 const MemOperand& operand) {
6279 VIXL_ASSERT(allow_macro_instructions_);
6280 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006281 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006282 ITScope it_scope(this, &cond);
6283 vldr(cond, dt, rd, operand);
6284 }
6285 void Vldr(DataType dt, SRegister rd, const MemOperand& operand) {
6286 Vldr(al, dt, rd, operand);
6287 }
6288 void Vldr(Condition cond, SRegister rd, const MemOperand& operand) {
6289 Vldr(cond, Untyped32, rd, operand);
6290 }
6291 void Vldr(SRegister rd, const MemOperand& operand) {
6292 Vldr(al, Untyped32, rd, operand);
6293 }
6294
6295 void Vmax(
6296 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6297 VIXL_ASSERT(allow_macro_instructions_);
6298 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006299 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006300 ITScope it_scope(this, &cond);
6301 vmax(cond, dt, rd, rn, rm);
6302 }
6303 void Vmax(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6304 Vmax(al, dt, rd, rn, rm);
6305 }
6306
6307 void Vmax(
6308 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6309 VIXL_ASSERT(allow_macro_instructions_);
6310 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006311 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006312 ITScope it_scope(this, &cond);
6313 vmax(cond, dt, rd, rn, rm);
6314 }
6315 void Vmax(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6316 Vmax(al, dt, rd, rn, rm);
6317 }
6318
6319 void Vmaxnm(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6320 VIXL_ASSERT(allow_macro_instructions_);
6321 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006322 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006323 vmaxnm(dt, rd, rn, rm);
6324 }
6325
6326 void Vmaxnm(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6327 VIXL_ASSERT(allow_macro_instructions_);
6328 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006329 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006330 vmaxnm(dt, rd, rn, rm);
6331 }
6332
6333 void Vmaxnm(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6334 VIXL_ASSERT(allow_macro_instructions_);
6335 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006336 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006337 vmaxnm(dt, rd, rn, rm);
6338 }
6339
6340 void Vmin(
6341 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6342 VIXL_ASSERT(allow_macro_instructions_);
6343 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006344 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006345 ITScope it_scope(this, &cond);
6346 vmin(cond, dt, rd, rn, rm);
6347 }
6348 void Vmin(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6349 Vmin(al, dt, rd, rn, rm);
6350 }
6351
6352 void Vmin(
6353 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6354 VIXL_ASSERT(allow_macro_instructions_);
6355 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006356 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006357 ITScope it_scope(this, &cond);
6358 vmin(cond, dt, rd, rn, rm);
6359 }
6360 void Vmin(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6361 Vmin(al, dt, rd, rn, rm);
6362 }
6363
6364 void Vminnm(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6365 VIXL_ASSERT(allow_macro_instructions_);
6366 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006367 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006368 vminnm(dt, rd, rn, rm);
6369 }
6370
6371 void Vminnm(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6372 VIXL_ASSERT(allow_macro_instructions_);
6373 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006374 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006375 vminnm(dt, rd, rn, rm);
6376 }
6377
6378 void Vminnm(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6379 VIXL_ASSERT(allow_macro_instructions_);
6380 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006381 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006382 vminnm(dt, rd, rn, rm);
6383 }
6384
6385 void Vmla(Condition cond,
6386 DataType dt,
6387 DRegister rd,
6388 DRegister rn,
6389 DRegisterLane rm) {
6390 VIXL_ASSERT(allow_macro_instructions_);
6391 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006392 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006393 ITScope it_scope(this, &cond);
6394 vmla(cond, dt, rd, rn, rm);
6395 }
6396 void Vmla(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
6397 Vmla(al, dt, rd, rn, rm);
6398 }
6399
6400 void Vmla(Condition cond,
6401 DataType dt,
6402 QRegister rd,
6403 QRegister rn,
6404 DRegisterLane rm) {
6405 VIXL_ASSERT(allow_macro_instructions_);
6406 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006407 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006408 ITScope it_scope(this, &cond);
6409 vmla(cond, dt, rd, rn, rm);
6410 }
6411 void Vmla(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
6412 Vmla(al, dt, rd, rn, rm);
6413 }
6414
6415 void Vmla(
6416 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6417 VIXL_ASSERT(allow_macro_instructions_);
6418 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006419 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006420 ITScope it_scope(this, &cond);
6421 vmla(cond, dt, rd, rn, rm);
6422 }
6423 void Vmla(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6424 Vmla(al, dt, rd, rn, rm);
6425 }
6426
6427 void Vmla(
6428 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6429 VIXL_ASSERT(allow_macro_instructions_);
6430 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006431 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006432 ITScope it_scope(this, &cond);
6433 vmla(cond, dt, rd, rn, rm);
6434 }
6435 void Vmla(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6436 Vmla(al, dt, rd, rn, rm);
6437 }
6438
6439 void Vmla(
6440 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6441 VIXL_ASSERT(allow_macro_instructions_);
6442 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006443 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006444 ITScope it_scope(this, &cond);
6445 vmla(cond, dt, rd, rn, rm);
6446 }
6447 void Vmla(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6448 Vmla(al, dt, rd, rn, rm);
6449 }
6450
6451 void Vmlal(Condition cond,
6452 DataType dt,
6453 QRegister rd,
6454 DRegister rn,
6455 DRegisterLane rm) {
6456 VIXL_ASSERT(allow_macro_instructions_);
6457 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006458 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006459 ITScope it_scope(this, &cond);
6460 vmlal(cond, dt, rd, rn, rm);
6461 }
6462 void Vmlal(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
6463 Vmlal(al, dt, rd, rn, rm);
6464 }
6465
6466 void Vmlal(
6467 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
6468 VIXL_ASSERT(allow_macro_instructions_);
6469 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006470 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006471 ITScope it_scope(this, &cond);
6472 vmlal(cond, dt, rd, rn, rm);
6473 }
6474 void Vmlal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
6475 Vmlal(al, dt, rd, rn, rm);
6476 }
6477
6478 void Vmls(Condition cond,
6479 DataType dt,
6480 DRegister rd,
6481 DRegister rn,
6482 DRegisterLane rm) {
6483 VIXL_ASSERT(allow_macro_instructions_);
6484 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006485 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006486 ITScope it_scope(this, &cond);
6487 vmls(cond, dt, rd, rn, rm);
6488 }
6489 void Vmls(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
6490 Vmls(al, dt, rd, rn, rm);
6491 }
6492
6493 void Vmls(Condition cond,
6494 DataType dt,
6495 QRegister rd,
6496 QRegister rn,
6497 DRegisterLane rm) {
6498 VIXL_ASSERT(allow_macro_instructions_);
6499 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006500 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006501 ITScope it_scope(this, &cond);
6502 vmls(cond, dt, rd, rn, rm);
6503 }
6504 void Vmls(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
6505 Vmls(al, dt, rd, rn, rm);
6506 }
6507
6508 void Vmls(
6509 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6510 VIXL_ASSERT(allow_macro_instructions_);
6511 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006512 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006513 ITScope it_scope(this, &cond);
6514 vmls(cond, dt, rd, rn, rm);
6515 }
6516 void Vmls(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6517 Vmls(al, dt, rd, rn, rm);
6518 }
6519
6520 void Vmls(
6521 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6522 VIXL_ASSERT(allow_macro_instructions_);
6523 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006524 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006525 ITScope it_scope(this, &cond);
6526 vmls(cond, dt, rd, rn, rm);
6527 }
6528 void Vmls(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6529 Vmls(al, dt, rd, rn, rm);
6530 }
6531
6532 void Vmls(
6533 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6534 VIXL_ASSERT(allow_macro_instructions_);
6535 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006536 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006537 ITScope it_scope(this, &cond);
6538 vmls(cond, dt, rd, rn, rm);
6539 }
6540 void Vmls(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6541 Vmls(al, dt, rd, rn, rm);
6542 }
6543
6544 void Vmlsl(Condition cond,
6545 DataType dt,
6546 QRegister rd,
6547 DRegister rn,
6548 DRegisterLane rm) {
6549 VIXL_ASSERT(allow_macro_instructions_);
6550 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006551 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006552 ITScope it_scope(this, &cond);
6553 vmlsl(cond, dt, rd, rn, rm);
6554 }
6555 void Vmlsl(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
6556 Vmlsl(al, dt, rd, rn, rm);
6557 }
6558
6559 void Vmlsl(
6560 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
6561 VIXL_ASSERT(allow_macro_instructions_);
6562 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006563 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006564 ITScope it_scope(this, &cond);
6565 vmlsl(cond, dt, rd, rn, rm);
6566 }
6567 void Vmlsl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
6568 Vmlsl(al, dt, rd, rn, rm);
6569 }
6570
6571 void Vmov(Condition cond, Register rt, SRegister rn) {
6572 VIXL_ASSERT(allow_macro_instructions_);
6573 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006574 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006575 ITScope it_scope(this, &cond);
6576 vmov(cond, rt, rn);
6577 }
6578 void Vmov(Register rt, SRegister rn) { Vmov(al, rt, rn); }
6579
6580 void Vmov(Condition cond, SRegister rn, Register rt) {
6581 VIXL_ASSERT(allow_macro_instructions_);
6582 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006583 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006584 ITScope it_scope(this, &cond);
6585 vmov(cond, rn, rt);
6586 }
6587 void Vmov(SRegister rn, Register rt) { Vmov(al, rn, rt); }
6588
6589 void Vmov(Condition cond, Register rt, Register rt2, DRegister rm) {
6590 VIXL_ASSERT(allow_macro_instructions_);
6591 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006592 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006593 ITScope it_scope(this, &cond);
6594 vmov(cond, rt, rt2, rm);
6595 }
6596 void Vmov(Register rt, Register rt2, DRegister rm) { Vmov(al, rt, rt2, rm); }
6597
6598 void Vmov(Condition cond, DRegister rm, Register rt, Register rt2) {
6599 VIXL_ASSERT(allow_macro_instructions_);
6600 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006601 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006602 ITScope it_scope(this, &cond);
6603 vmov(cond, rm, rt, rt2);
6604 }
6605 void Vmov(DRegister rm, Register rt, Register rt2) { Vmov(al, rm, rt, rt2); }
6606
6607 void Vmov(
6608 Condition cond, Register rt, Register rt2, SRegister rm, SRegister rm1) {
6609 VIXL_ASSERT(allow_macro_instructions_);
6610 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006611 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006612 ITScope it_scope(this, &cond);
6613 vmov(cond, rt, rt2, rm, rm1);
6614 }
6615 void Vmov(Register rt, Register rt2, SRegister rm, SRegister rm1) {
6616 Vmov(al, rt, rt2, rm, rm1);
6617 }
6618
6619 void Vmov(
6620 Condition cond, SRegister rm, SRegister rm1, Register rt, Register rt2) {
6621 VIXL_ASSERT(allow_macro_instructions_);
6622 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006623 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006624 ITScope it_scope(this, &cond);
6625 vmov(cond, rm, rm1, rt, rt2);
6626 }
6627 void Vmov(SRegister rm, SRegister rm1, Register rt, Register rt2) {
6628 Vmov(al, rm, rm1, rt, rt2);
6629 }
6630
6631 void Vmov(Condition cond, DataType dt, DRegisterLane rd, Register rt) {
6632 VIXL_ASSERT(allow_macro_instructions_);
6633 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006634 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006635 ITScope it_scope(this, &cond);
6636 vmov(cond, dt, rd, rt);
6637 }
6638 void Vmov(DataType dt, DRegisterLane rd, Register rt) {
6639 Vmov(al, dt, rd, rt);
6640 }
6641 void Vmov(Condition cond, DRegisterLane rd, Register rt) {
6642 Vmov(cond, kDataTypeValueNone, rd, rt);
6643 }
6644 void Vmov(DRegisterLane rd, Register rt) {
6645 Vmov(al, kDataTypeValueNone, rd, rt);
6646 }
6647
6648 void Vmov(Condition cond,
6649 DataType dt,
6650 DRegister rd,
6651 const DOperand& operand) {
6652 VIXL_ASSERT(allow_macro_instructions_);
6653 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006654 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006655 ITScope it_scope(this, &cond);
6656 vmov(cond, dt, rd, operand);
6657 }
6658 void Vmov(DataType dt, DRegister rd, const DOperand& operand) {
6659 Vmov(al, dt, rd, operand);
6660 }
6661
6662 void Vmov(Condition cond,
6663 DataType dt,
6664 QRegister rd,
6665 const QOperand& operand) {
6666 VIXL_ASSERT(allow_macro_instructions_);
6667 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006668 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006669 ITScope it_scope(this, &cond);
6670 vmov(cond, dt, rd, operand);
6671 }
6672 void Vmov(DataType dt, QRegister rd, const QOperand& operand) {
6673 Vmov(al, dt, rd, operand);
6674 }
6675
6676 void Vmov(Condition cond,
6677 DataType dt,
6678 SRegister rd,
6679 const SOperand& operand) {
6680 VIXL_ASSERT(allow_macro_instructions_);
6681 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006682 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006683 ITScope it_scope(this, &cond);
6684 vmov(cond, dt, rd, operand);
6685 }
6686 void Vmov(DataType dt, SRegister rd, const SOperand& operand) {
6687 Vmov(al, dt, rd, operand);
6688 }
6689
6690 void Vmov(Condition cond, DataType dt, Register rt, DRegisterLane rn) {
6691 VIXL_ASSERT(allow_macro_instructions_);
6692 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006693 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006694 ITScope it_scope(this, &cond);
6695 vmov(cond, dt, rt, rn);
6696 }
6697 void Vmov(DataType dt, Register rt, DRegisterLane rn) {
6698 Vmov(al, dt, rt, rn);
6699 }
6700 void Vmov(Condition cond, Register rt, DRegisterLane rn) {
6701 Vmov(cond, kDataTypeValueNone, rt, rn);
6702 }
6703 void Vmov(Register rt, DRegisterLane rn) {
6704 Vmov(al, kDataTypeValueNone, rt, rn);
6705 }
6706
6707 void Vmovl(Condition cond, DataType dt, QRegister rd, DRegister rm) {
6708 VIXL_ASSERT(allow_macro_instructions_);
6709 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006710 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006711 ITScope it_scope(this, &cond);
6712 vmovl(cond, dt, rd, rm);
6713 }
6714 void Vmovl(DataType dt, QRegister rd, DRegister rm) { Vmovl(al, dt, rd, rm); }
6715
6716 void Vmovn(Condition cond, DataType dt, DRegister rd, QRegister rm) {
6717 VIXL_ASSERT(allow_macro_instructions_);
6718 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006719 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006720 ITScope it_scope(this, &cond);
6721 vmovn(cond, dt, rd, rm);
6722 }
6723 void Vmovn(DataType dt, DRegister rd, QRegister rm) { Vmovn(al, dt, rd, rm); }
6724
6725 void Vmrs(Condition cond,
6726 RegisterOrAPSR_nzcv rt,
6727 SpecialFPRegister spec_reg) {
6728 VIXL_ASSERT(allow_macro_instructions_);
6729 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006730 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006731 ITScope it_scope(this, &cond);
6732 vmrs(cond, rt, spec_reg);
6733 }
6734 void Vmrs(RegisterOrAPSR_nzcv rt, SpecialFPRegister spec_reg) {
6735 Vmrs(al, rt, spec_reg);
6736 }
6737
6738 void Vmsr(Condition cond, SpecialFPRegister spec_reg, Register rt) {
6739 VIXL_ASSERT(allow_macro_instructions_);
6740 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006741 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006742 ITScope it_scope(this, &cond);
6743 vmsr(cond, spec_reg, rt);
6744 }
6745 void Vmsr(SpecialFPRegister spec_reg, Register rt) { Vmsr(al, spec_reg, rt); }
6746
6747 void Vmul(Condition cond,
6748 DataType dt,
6749 DRegister rd,
6750 DRegister rn,
6751 DRegister dm,
6752 unsigned index) {
6753 VIXL_ASSERT(allow_macro_instructions_);
6754 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006755 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006756 ITScope it_scope(this, &cond);
6757 vmul(cond, dt, rd, rn, dm, index);
6758 }
6759 void Vmul(
6760 DataType dt, DRegister rd, DRegister rn, DRegister dm, unsigned index) {
6761 Vmul(al, dt, rd, rn, dm, index);
6762 }
6763
6764 void Vmul(Condition cond,
6765 DataType dt,
6766 QRegister rd,
6767 QRegister rn,
6768 DRegister dm,
6769 unsigned index) {
6770 VIXL_ASSERT(allow_macro_instructions_);
6771 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006772 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006773 ITScope it_scope(this, &cond);
6774 vmul(cond, dt, rd, rn, dm, index);
6775 }
6776 void Vmul(
6777 DataType dt, QRegister rd, QRegister rn, DRegister dm, unsigned index) {
6778 Vmul(al, dt, rd, rn, dm, index);
6779 }
6780
6781 void Vmul(
6782 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6783 VIXL_ASSERT(allow_macro_instructions_);
6784 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006785 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006786 ITScope it_scope(this, &cond);
6787 vmul(cond, dt, rd, rn, rm);
6788 }
6789 void Vmul(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6790 Vmul(al, dt, rd, rn, rm);
6791 }
6792
6793 void Vmul(
6794 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6795 VIXL_ASSERT(allow_macro_instructions_);
6796 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006797 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006798 ITScope it_scope(this, &cond);
6799 vmul(cond, dt, rd, rn, rm);
6800 }
6801 void Vmul(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6802 Vmul(al, dt, rd, rn, rm);
6803 }
6804
6805 void Vmul(
6806 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6807 VIXL_ASSERT(allow_macro_instructions_);
6808 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006809 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006810 ITScope it_scope(this, &cond);
6811 vmul(cond, dt, rd, rn, rm);
6812 }
6813 void Vmul(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6814 Vmul(al, dt, rd, rn, rm);
6815 }
6816
6817 void Vmull(Condition cond,
6818 DataType dt,
6819 QRegister rd,
6820 DRegister rn,
6821 DRegister dm,
6822 unsigned index) {
6823 VIXL_ASSERT(allow_macro_instructions_);
6824 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006825 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006826 ITScope it_scope(this, &cond);
6827 vmull(cond, dt, rd, rn, dm, index);
6828 }
6829 void Vmull(
6830 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
6831 Vmull(al, dt, rd, rn, dm, index);
6832 }
6833
6834 void Vmull(
6835 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
6836 VIXL_ASSERT(allow_macro_instructions_);
6837 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006838 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006839 ITScope it_scope(this, &cond);
6840 vmull(cond, dt, rd, rn, rm);
6841 }
6842 void Vmull(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
6843 Vmull(al, dt, rd, rn, rm);
6844 }
6845
6846 void Vmvn(Condition cond,
6847 DataType dt,
6848 DRegister rd,
6849 const DOperand& operand) {
6850 VIXL_ASSERT(allow_macro_instructions_);
6851 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006852 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006853 ITScope it_scope(this, &cond);
6854 vmvn(cond, dt, rd, operand);
6855 }
6856 void Vmvn(DataType dt, DRegister rd, const DOperand& operand) {
6857 Vmvn(al, dt, rd, operand);
6858 }
6859
6860 void Vmvn(Condition cond,
6861 DataType dt,
6862 QRegister rd,
6863 const QOperand& operand) {
6864 VIXL_ASSERT(allow_macro_instructions_);
6865 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006866 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006867 ITScope it_scope(this, &cond);
6868 vmvn(cond, dt, rd, operand);
6869 }
6870 void Vmvn(DataType dt, QRegister rd, const QOperand& operand) {
6871 Vmvn(al, dt, rd, operand);
6872 }
6873
6874 void Vneg(Condition cond, DataType dt, DRegister rd, DRegister rm) {
6875 VIXL_ASSERT(allow_macro_instructions_);
6876 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006877 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006878 ITScope it_scope(this, &cond);
6879 vneg(cond, dt, rd, rm);
6880 }
6881 void Vneg(DataType dt, DRegister rd, DRegister rm) { Vneg(al, dt, rd, rm); }
6882
6883 void Vneg(Condition cond, DataType dt, QRegister rd, QRegister rm) {
6884 VIXL_ASSERT(allow_macro_instructions_);
6885 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006886 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006887 ITScope it_scope(this, &cond);
6888 vneg(cond, dt, rd, rm);
6889 }
6890 void Vneg(DataType dt, QRegister rd, QRegister rm) { Vneg(al, dt, rd, rm); }
6891
6892 void Vneg(Condition cond, DataType dt, SRegister rd, SRegister rm) {
6893 VIXL_ASSERT(allow_macro_instructions_);
6894 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006895 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006896 ITScope it_scope(this, &cond);
6897 vneg(cond, dt, rd, rm);
6898 }
6899 void Vneg(DataType dt, SRegister rd, SRegister rm) { Vneg(al, dt, rd, rm); }
6900
6901 void Vnmla(
6902 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6903 VIXL_ASSERT(allow_macro_instructions_);
6904 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006905 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006906 ITScope it_scope(this, &cond);
6907 vnmla(cond, dt, rd, rn, rm);
6908 }
6909 void Vnmla(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6910 Vnmla(al, dt, rd, rn, rm);
6911 }
6912
6913 void Vnmla(
6914 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6915 VIXL_ASSERT(allow_macro_instructions_);
6916 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006917 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006918 ITScope it_scope(this, &cond);
6919 vnmla(cond, dt, rd, rn, rm);
6920 }
6921 void Vnmla(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6922 Vnmla(al, dt, rd, rn, rm);
6923 }
6924
6925 void Vnmls(
6926 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6927 VIXL_ASSERT(allow_macro_instructions_);
6928 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006929 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006930 ITScope it_scope(this, &cond);
6931 vnmls(cond, dt, rd, rn, rm);
6932 }
6933 void Vnmls(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6934 Vnmls(al, dt, rd, rn, rm);
6935 }
6936
6937 void Vnmls(
6938 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6939 VIXL_ASSERT(allow_macro_instructions_);
6940 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006941 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006942 ITScope it_scope(this, &cond);
6943 vnmls(cond, dt, rd, rn, rm);
6944 }
6945 void Vnmls(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6946 Vnmls(al, dt, rd, rn, rm);
6947 }
6948
6949 void Vnmul(
6950 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6951 VIXL_ASSERT(allow_macro_instructions_);
6952 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006953 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006954 ITScope it_scope(this, &cond);
6955 vnmul(cond, dt, rd, rn, rm);
6956 }
6957 void Vnmul(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6958 Vnmul(al, dt, rd, rn, rm);
6959 }
6960
6961 void Vnmul(
6962 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6963 VIXL_ASSERT(allow_macro_instructions_);
6964 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006965 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006966 ITScope it_scope(this, &cond);
6967 vnmul(cond, dt, rd, rn, rm);
6968 }
6969 void Vnmul(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6970 Vnmul(al, dt, rd, rn, rm);
6971 }
6972
6973 void Vorn(Condition cond,
6974 DataType dt,
6975 DRegister rd,
6976 DRegister rn,
6977 const DOperand& operand) {
6978 VIXL_ASSERT(allow_macro_instructions_);
6979 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006980 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006981 ITScope it_scope(this, &cond);
6982 vorn(cond, dt, rd, rn, operand);
6983 }
6984 void Vorn(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
6985 Vorn(al, dt, rd, rn, operand);
6986 }
6987
6988 void Vorn(Condition cond,
6989 DataType dt,
6990 QRegister rd,
6991 QRegister rn,
6992 const QOperand& operand) {
6993 VIXL_ASSERT(allow_macro_instructions_);
6994 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006995 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006996 ITScope it_scope(this, &cond);
6997 vorn(cond, dt, rd, rn, operand);
6998 }
6999 void Vorn(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
7000 Vorn(al, dt, rd, rn, operand);
7001 }
7002
7003 void Vorr(Condition cond,
7004 DataType dt,
7005 DRegister rd,
7006 DRegister rn,
7007 const DOperand& operand) {
7008 VIXL_ASSERT(allow_macro_instructions_);
7009 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007010 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007011 ITScope it_scope(this, &cond);
7012 vorr(cond, dt, rd, rn, operand);
7013 }
7014 void Vorr(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
7015 Vorr(al, dt, rd, rn, operand);
7016 }
7017 void Vorr(Condition cond,
7018 DRegister rd,
7019 DRegister rn,
7020 const DOperand& operand) {
7021 Vorr(cond, kDataTypeValueNone, rd, rn, operand);
7022 }
7023 void Vorr(DRegister rd, DRegister rn, const DOperand& operand) {
7024 Vorr(al, kDataTypeValueNone, rd, rn, operand);
7025 }
7026
7027 void Vorr(Condition cond,
7028 DataType dt,
7029 QRegister rd,
7030 QRegister rn,
7031 const QOperand& operand) {
7032 VIXL_ASSERT(allow_macro_instructions_);
7033 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007034 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007035 ITScope it_scope(this, &cond);
7036 vorr(cond, dt, rd, rn, operand);
7037 }
7038 void Vorr(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
7039 Vorr(al, dt, rd, rn, operand);
7040 }
7041 void Vorr(Condition cond,
7042 QRegister rd,
7043 QRegister rn,
7044 const QOperand& operand) {
7045 Vorr(cond, kDataTypeValueNone, rd, rn, operand);
7046 }
7047 void Vorr(QRegister rd, QRegister rn, const QOperand& operand) {
7048 Vorr(al, kDataTypeValueNone, rd, rn, operand);
7049 }
7050
7051 void Vpadal(Condition cond, DataType dt, DRegister rd, DRegister rm) {
7052 VIXL_ASSERT(allow_macro_instructions_);
7053 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007054 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007055 ITScope it_scope(this, &cond);
7056 vpadal(cond, dt, rd, rm);
7057 }
7058 void Vpadal(DataType dt, DRegister rd, DRegister rm) {
7059 Vpadal(al, dt, rd, rm);
7060 }
7061
7062 void Vpadal(Condition cond, DataType dt, QRegister rd, QRegister rm) {
7063 VIXL_ASSERT(allow_macro_instructions_);
7064 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007065 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007066 ITScope it_scope(this, &cond);
7067 vpadal(cond, dt, rd, rm);
7068 }
7069 void Vpadal(DataType dt, QRegister rd, QRegister rm) {
7070 Vpadal(al, dt, rd, rm);
7071 }
7072
7073 void Vpadd(
7074 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7075 VIXL_ASSERT(allow_macro_instructions_);
7076 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007077 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007078 ITScope it_scope(this, &cond);
7079 vpadd(cond, dt, rd, rn, rm);
7080 }
7081 void Vpadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7082 Vpadd(al, dt, rd, rn, rm);
7083 }
7084
7085 void Vpaddl(Condition cond, DataType dt, DRegister rd, DRegister rm) {
7086 VIXL_ASSERT(allow_macro_instructions_);
7087 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007088 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007089 ITScope it_scope(this, &cond);
7090 vpaddl(cond, dt, rd, rm);
7091 }
7092 void Vpaddl(DataType dt, DRegister rd, DRegister rm) {
7093 Vpaddl(al, dt, rd, rm);
7094 }
7095
7096 void Vpaddl(Condition cond, DataType dt, QRegister rd, QRegister rm) {
7097 VIXL_ASSERT(allow_macro_instructions_);
7098 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007099 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007100 ITScope it_scope(this, &cond);
7101 vpaddl(cond, dt, rd, rm);
7102 }
7103 void Vpaddl(DataType dt, QRegister rd, QRegister rm) {
7104 Vpaddl(al, dt, rd, rm);
7105 }
7106
7107 void Vpmax(
7108 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7109 VIXL_ASSERT(allow_macro_instructions_);
7110 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007111 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007112 ITScope it_scope(this, &cond);
7113 vpmax(cond, dt, rd, rn, rm);
7114 }
7115 void Vpmax(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7116 Vpmax(al, dt, rd, rn, rm);
7117 }
7118
7119 void Vpmin(
7120 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7121 VIXL_ASSERT(allow_macro_instructions_);
7122 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007123 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007124 ITScope it_scope(this, &cond);
7125 vpmin(cond, dt, rd, rn, rm);
7126 }
7127 void Vpmin(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7128 Vpmin(al, dt, rd, rn, rm);
7129 }
7130
7131 void Vpop(Condition cond, DataType dt, DRegisterList dreglist) {
7132 VIXL_ASSERT(allow_macro_instructions_);
7133 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007134 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007135 ITScope it_scope(this, &cond);
7136 vpop(cond, dt, dreglist);
7137 }
7138 void Vpop(DataType dt, DRegisterList dreglist) { Vpop(al, dt, dreglist); }
7139 void Vpop(Condition cond, DRegisterList dreglist) {
7140 Vpop(cond, kDataTypeValueNone, dreglist);
7141 }
7142 void Vpop(DRegisterList dreglist) { Vpop(al, kDataTypeValueNone, dreglist); }
7143
7144 void Vpop(Condition cond, DataType dt, SRegisterList sreglist) {
7145 VIXL_ASSERT(allow_macro_instructions_);
7146 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007147 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007148 ITScope it_scope(this, &cond);
7149 vpop(cond, dt, sreglist);
7150 }
7151 void Vpop(DataType dt, SRegisterList sreglist) { Vpop(al, dt, sreglist); }
7152 void Vpop(Condition cond, SRegisterList sreglist) {
7153 Vpop(cond, kDataTypeValueNone, sreglist);
7154 }
7155 void Vpop(SRegisterList sreglist) { Vpop(al, kDataTypeValueNone, sreglist); }
7156
7157 void Vpush(Condition cond, DataType dt, DRegisterList dreglist) {
7158 VIXL_ASSERT(allow_macro_instructions_);
7159 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007160 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007161 ITScope it_scope(this, &cond);
7162 vpush(cond, dt, dreglist);
7163 }
7164 void Vpush(DataType dt, DRegisterList dreglist) { Vpush(al, dt, dreglist); }
7165 void Vpush(Condition cond, DRegisterList dreglist) {
7166 Vpush(cond, kDataTypeValueNone, dreglist);
7167 }
7168 void Vpush(DRegisterList dreglist) {
7169 Vpush(al, kDataTypeValueNone, dreglist);
7170 }
7171
7172 void Vpush(Condition cond, DataType dt, SRegisterList sreglist) {
7173 VIXL_ASSERT(allow_macro_instructions_);
7174 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007175 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007176 ITScope it_scope(this, &cond);
7177 vpush(cond, dt, sreglist);
7178 }
7179 void Vpush(DataType dt, SRegisterList sreglist) { Vpush(al, dt, sreglist); }
7180 void Vpush(Condition cond, SRegisterList sreglist) {
7181 Vpush(cond, kDataTypeValueNone, sreglist);
7182 }
7183 void Vpush(SRegisterList sreglist) {
7184 Vpush(al, kDataTypeValueNone, sreglist);
7185 }
7186
7187 void Vqabs(Condition cond, DataType dt, DRegister rd, DRegister rm) {
7188 VIXL_ASSERT(allow_macro_instructions_);
7189 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007190 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007191 ITScope it_scope(this, &cond);
7192 vqabs(cond, dt, rd, rm);
7193 }
7194 void Vqabs(DataType dt, DRegister rd, DRegister rm) { Vqabs(al, dt, rd, rm); }
7195
7196 void Vqabs(Condition cond, DataType dt, QRegister rd, QRegister rm) {
7197 VIXL_ASSERT(allow_macro_instructions_);
7198 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007199 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007200 ITScope it_scope(this, &cond);
7201 vqabs(cond, dt, rd, rm);
7202 }
7203 void Vqabs(DataType dt, QRegister rd, QRegister rm) { Vqabs(al, dt, rd, rm); }
7204
7205 void Vqadd(
7206 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7207 VIXL_ASSERT(allow_macro_instructions_);
7208 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007209 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007210 ITScope it_scope(this, &cond);
7211 vqadd(cond, dt, rd, rn, rm);
7212 }
7213 void Vqadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7214 Vqadd(al, dt, rd, rn, rm);
7215 }
7216
7217 void Vqadd(
7218 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7219 VIXL_ASSERT(allow_macro_instructions_);
7220 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007221 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007222 ITScope it_scope(this, &cond);
7223 vqadd(cond, dt, rd, rn, rm);
7224 }
7225 void Vqadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7226 Vqadd(al, dt, rd, rn, rm);
7227 }
7228
7229 void Vqdmlal(
7230 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7231 VIXL_ASSERT(allow_macro_instructions_);
7232 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007233 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007234 ITScope it_scope(this, &cond);
7235 vqdmlal(cond, dt, rd, rn, rm);
7236 }
7237 void Vqdmlal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7238 Vqdmlal(al, dt, rd, rn, rm);
7239 }
7240
7241 void Vqdmlal(Condition cond,
7242 DataType dt,
7243 QRegister rd,
7244 DRegister rn,
7245 DRegister dm,
7246 unsigned index) {
7247 VIXL_ASSERT(allow_macro_instructions_);
7248 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007249 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007250 ITScope it_scope(this, &cond);
7251 vqdmlal(cond, dt, rd, rn, dm, index);
7252 }
7253 void Vqdmlal(
7254 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
7255 Vqdmlal(al, dt, rd, rn, dm, index);
7256 }
7257
7258 void Vqdmlsl(
7259 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7260 VIXL_ASSERT(allow_macro_instructions_);
7261 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007262 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007263 ITScope it_scope(this, &cond);
7264 vqdmlsl(cond, dt, rd, rn, rm);
7265 }
7266 void Vqdmlsl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7267 Vqdmlsl(al, dt, rd, rn, rm);
7268 }
7269
7270 void Vqdmlsl(Condition cond,
7271 DataType dt,
7272 QRegister rd,
7273 DRegister rn,
7274 DRegister dm,
7275 unsigned index) {
7276 VIXL_ASSERT(allow_macro_instructions_);
7277 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007278 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007279 ITScope it_scope(this, &cond);
7280 vqdmlsl(cond, dt, rd, rn, dm, index);
7281 }
7282 void Vqdmlsl(
7283 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
7284 Vqdmlsl(al, dt, rd, rn, dm, index);
7285 }
7286
7287 void Vqdmulh(
7288 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7289 VIXL_ASSERT(allow_macro_instructions_);
7290 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007291 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007292 ITScope it_scope(this, &cond);
7293 vqdmulh(cond, dt, rd, rn, rm);
7294 }
7295 void Vqdmulh(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7296 Vqdmulh(al, dt, rd, rn, rm);
7297 }
7298
7299 void Vqdmulh(
7300 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7301 VIXL_ASSERT(allow_macro_instructions_);
7302 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007303 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007304 ITScope it_scope(this, &cond);
7305 vqdmulh(cond, dt, rd, rn, rm);
7306 }
7307 void Vqdmulh(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7308 Vqdmulh(al, dt, rd, rn, rm);
7309 }
7310
7311 void Vqdmulh(Condition cond,
7312 DataType dt,
7313 DRegister rd,
7314 DRegister rn,
7315 DRegisterLane rm) {
7316 VIXL_ASSERT(allow_macro_instructions_);
7317 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007318 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007319 ITScope it_scope(this, &cond);
7320 vqdmulh(cond, dt, rd, rn, rm);
7321 }
7322 void Vqdmulh(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
7323 Vqdmulh(al, dt, rd, rn, rm);
7324 }
7325
7326 void Vqdmulh(Condition cond,
7327 DataType dt,
7328 QRegister rd,
7329 QRegister rn,
7330 DRegisterLane rm) {
7331 VIXL_ASSERT(allow_macro_instructions_);
7332 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007333 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007334 ITScope it_scope(this, &cond);
7335 vqdmulh(cond, dt, rd, rn, rm);
7336 }
7337 void Vqdmulh(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
7338 Vqdmulh(al, dt, rd, rn, rm);
7339 }
7340
7341 void Vqdmull(
7342 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7343 VIXL_ASSERT(allow_macro_instructions_);
7344 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007345 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007346 ITScope it_scope(this, &cond);
7347 vqdmull(cond, dt, rd, rn, rm);
7348 }
7349 void Vqdmull(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7350 Vqdmull(al, dt, rd, rn, rm);
7351 }
7352
7353 void Vqdmull(Condition cond,
7354 DataType dt,
7355 QRegister rd,
7356 DRegister rn,
7357 DRegisterLane rm) {
7358 VIXL_ASSERT(allow_macro_instructions_);
7359 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007360 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007361 ITScope it_scope(this, &cond);
7362 vqdmull(cond, dt, rd, rn, rm);
7363 }
7364 void Vqdmull(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
7365 Vqdmull(al, dt, rd, rn, rm);
7366 }
7367
7368 void Vqmovn(Condition cond, DataType dt, DRegister rd, QRegister rm) {
7369 VIXL_ASSERT(allow_macro_instructions_);
7370 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007371 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007372 ITScope it_scope(this, &cond);
7373 vqmovn(cond, dt, rd, rm);
7374 }
7375 void Vqmovn(DataType dt, DRegister rd, QRegister rm) {
7376 Vqmovn(al, dt, rd, rm);
7377 }
7378
7379 void Vqmovun(Condition cond, DataType dt, DRegister rd, QRegister rm) {
7380 VIXL_ASSERT(allow_macro_instructions_);
7381 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007382 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007383 ITScope it_scope(this, &cond);
7384 vqmovun(cond, dt, rd, rm);
7385 }
7386 void Vqmovun(DataType dt, DRegister rd, QRegister rm) {
7387 Vqmovun(al, dt, rd, rm);
7388 }
7389
7390 void Vqneg(Condition cond, DataType dt, DRegister rd, DRegister rm) {
7391 VIXL_ASSERT(allow_macro_instructions_);
7392 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007393 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007394 ITScope it_scope(this, &cond);
7395 vqneg(cond, dt, rd, rm);
7396 }
7397 void Vqneg(DataType dt, DRegister rd, DRegister rm) { Vqneg(al, dt, rd, rm); }
7398
7399 void Vqneg(Condition cond, DataType dt, QRegister rd, QRegister rm) {
7400 VIXL_ASSERT(allow_macro_instructions_);
7401 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007402 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007403 ITScope it_scope(this, &cond);
7404 vqneg(cond, dt, rd, rm);
7405 }
7406 void Vqneg(DataType dt, QRegister rd, QRegister rm) { Vqneg(al, dt, rd, rm); }
7407
7408 void Vqrdmulh(
7409 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7410 VIXL_ASSERT(allow_macro_instructions_);
7411 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007412 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007413 ITScope it_scope(this, &cond);
7414 vqrdmulh(cond, dt, rd, rn, rm);
7415 }
7416 void Vqrdmulh(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7417 Vqrdmulh(al, dt, rd, rn, rm);
7418 }
7419
7420 void Vqrdmulh(
7421 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7422 VIXL_ASSERT(allow_macro_instructions_);
7423 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007424 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007425 ITScope it_scope(this, &cond);
7426 vqrdmulh(cond, dt, rd, rn, rm);
7427 }
7428 void Vqrdmulh(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7429 Vqrdmulh(al, dt, rd, rn, rm);
7430 }
7431
7432 void Vqrdmulh(Condition cond,
7433 DataType dt,
7434 DRegister rd,
7435 DRegister rn,
7436 DRegisterLane rm) {
7437 VIXL_ASSERT(allow_macro_instructions_);
7438 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007439 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007440 ITScope it_scope(this, &cond);
7441 vqrdmulh(cond, dt, rd, rn, rm);
7442 }
7443 void Vqrdmulh(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
7444 Vqrdmulh(al, dt, rd, rn, rm);
7445 }
7446
7447 void Vqrdmulh(Condition cond,
7448 DataType dt,
7449 QRegister rd,
7450 QRegister rn,
7451 DRegisterLane rm) {
7452 VIXL_ASSERT(allow_macro_instructions_);
7453 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007454 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007455 ITScope it_scope(this, &cond);
7456 vqrdmulh(cond, dt, rd, rn, rm);
7457 }
7458 void Vqrdmulh(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
7459 Vqrdmulh(al, dt, rd, rn, rm);
7460 }
7461
7462 void Vqrshl(
7463 Condition cond, DataType dt, DRegister rd, DRegister rm, DRegister rn) {
7464 VIXL_ASSERT(allow_macro_instructions_);
7465 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007466 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007467 ITScope it_scope(this, &cond);
7468 vqrshl(cond, dt, rd, rm, rn);
7469 }
7470 void Vqrshl(DataType dt, DRegister rd, DRegister rm, DRegister rn) {
7471 Vqrshl(al, dt, rd, rm, rn);
7472 }
7473
7474 void Vqrshl(
7475 Condition cond, DataType dt, QRegister rd, QRegister rm, QRegister rn) {
7476 VIXL_ASSERT(allow_macro_instructions_);
7477 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007478 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007479 ITScope it_scope(this, &cond);
7480 vqrshl(cond, dt, rd, rm, rn);
7481 }
7482 void Vqrshl(DataType dt, QRegister rd, QRegister rm, QRegister rn) {
7483 Vqrshl(al, dt, rd, rm, rn);
7484 }
7485
7486 void Vqrshrn(Condition cond,
7487 DataType dt,
7488 DRegister rd,
7489 QRegister rm,
7490 const QOperand& operand) {
7491 VIXL_ASSERT(allow_macro_instructions_);
7492 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007493 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007494 ITScope it_scope(this, &cond);
7495 vqrshrn(cond, dt, rd, rm, operand);
7496 }
7497 void Vqrshrn(DataType dt,
7498 DRegister rd,
7499 QRegister rm,
7500 const QOperand& operand) {
7501 Vqrshrn(al, dt, rd, rm, operand);
7502 }
7503
7504 void Vqrshrun(Condition cond,
7505 DataType dt,
7506 DRegister rd,
7507 QRegister rm,
7508 const QOperand& operand) {
7509 VIXL_ASSERT(allow_macro_instructions_);
7510 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007511 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007512 ITScope it_scope(this, &cond);
7513 vqrshrun(cond, dt, rd, rm, operand);
7514 }
7515 void Vqrshrun(DataType dt,
7516 DRegister rd,
7517 QRegister rm,
7518 const QOperand& operand) {
7519 Vqrshrun(al, dt, rd, rm, operand);
7520 }
7521
7522 void Vqshl(Condition cond,
7523 DataType dt,
7524 DRegister rd,
7525 DRegister rm,
7526 const DOperand& operand) {
7527 VIXL_ASSERT(allow_macro_instructions_);
7528 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007529 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007530 ITScope it_scope(this, &cond);
7531 vqshl(cond, dt, rd, rm, operand);
7532 }
7533 void Vqshl(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
7534 Vqshl(al, dt, rd, rm, operand);
7535 }
7536
7537 void Vqshl(Condition cond,
7538 DataType dt,
7539 QRegister rd,
7540 QRegister rm,
7541 const QOperand& operand) {
7542 VIXL_ASSERT(allow_macro_instructions_);
7543 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007544 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007545 ITScope it_scope(this, &cond);
7546 vqshl(cond, dt, rd, rm, operand);
7547 }
7548 void Vqshl(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
7549 Vqshl(al, dt, rd, rm, operand);
7550 }
7551
7552 void Vqshlu(Condition cond,
7553 DataType dt,
7554 DRegister rd,
7555 DRegister rm,
7556 const DOperand& operand) {
7557 VIXL_ASSERT(allow_macro_instructions_);
7558 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007559 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007560 ITScope it_scope(this, &cond);
7561 vqshlu(cond, dt, rd, rm, operand);
7562 }
7563 void Vqshlu(DataType dt,
7564 DRegister rd,
7565 DRegister rm,
7566 const DOperand& operand) {
7567 Vqshlu(al, dt, rd, rm, operand);
7568 }
7569
7570 void Vqshlu(Condition cond,
7571 DataType dt,
7572 QRegister rd,
7573 QRegister rm,
7574 const QOperand& operand) {
7575 VIXL_ASSERT(allow_macro_instructions_);
7576 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007577 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007578 ITScope it_scope(this, &cond);
7579 vqshlu(cond, dt, rd, rm, operand);
7580 }
7581 void Vqshlu(DataType dt,
7582 QRegister rd,
7583 QRegister rm,
7584 const QOperand& operand) {
7585 Vqshlu(al, dt, rd, rm, operand);
7586 }
7587
7588 void Vqshrn(Condition cond,
7589 DataType dt,
7590 DRegister rd,
7591 QRegister rm,
7592 const QOperand& operand) {
7593 VIXL_ASSERT(allow_macro_instructions_);
7594 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007595 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007596 ITScope it_scope(this, &cond);
7597 vqshrn(cond, dt, rd, rm, operand);
7598 }
7599 void Vqshrn(DataType dt,
7600 DRegister rd,
7601 QRegister rm,
7602 const QOperand& operand) {
7603 Vqshrn(al, dt, rd, rm, operand);
7604 }
7605
7606 void Vqshrun(Condition cond,
7607 DataType dt,
7608 DRegister rd,
7609 QRegister rm,
7610 const QOperand& operand) {
7611 VIXL_ASSERT(allow_macro_instructions_);
7612 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007613 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007614 ITScope it_scope(this, &cond);
7615 vqshrun(cond, dt, rd, rm, operand);
7616 }
7617 void Vqshrun(DataType dt,
7618 DRegister rd,
7619 QRegister rm,
7620 const QOperand& operand) {
7621 Vqshrun(al, dt, rd, rm, operand);
7622 }
7623
7624 void Vqsub(
7625 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7626 VIXL_ASSERT(allow_macro_instructions_);
7627 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007628 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007629 ITScope it_scope(this, &cond);
7630 vqsub(cond, dt, rd, rn, rm);
7631 }
7632 void Vqsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7633 Vqsub(al, dt, rd, rn, rm);
7634 }
7635
7636 void Vqsub(
7637 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7638 VIXL_ASSERT(allow_macro_instructions_);
7639 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007640 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007641 ITScope it_scope(this, &cond);
7642 vqsub(cond, dt, rd, rn, rm);
7643 }
7644 void Vqsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7645 Vqsub(al, dt, rd, rn, rm);
7646 }
7647
7648 void Vraddhn(
7649 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
7650 VIXL_ASSERT(allow_macro_instructions_);
7651 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007652 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007653 ITScope it_scope(this, &cond);
7654 vraddhn(cond, dt, rd, rn, rm);
7655 }
7656 void Vraddhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
7657 Vraddhn(al, dt, rd, rn, rm);
7658 }
7659
7660 void Vrecpe(Condition cond, DataType dt, DRegister rd, DRegister rm) {
7661 VIXL_ASSERT(allow_macro_instructions_);
7662 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007663 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007664 ITScope it_scope(this, &cond);
7665 vrecpe(cond, dt, rd, rm);
7666 }
7667 void Vrecpe(DataType dt, DRegister rd, DRegister rm) {
7668 Vrecpe(al, dt, rd, rm);
7669 }
7670
7671 void Vrecpe(Condition cond, DataType dt, QRegister rd, QRegister rm) {
7672 VIXL_ASSERT(allow_macro_instructions_);
7673 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007674 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007675 ITScope it_scope(this, &cond);
7676 vrecpe(cond, dt, rd, rm);
7677 }
7678 void Vrecpe(DataType dt, QRegister rd, QRegister rm) {
7679 Vrecpe(al, dt, rd, rm);
7680 }
7681
7682 void Vrecps(
7683 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7684 VIXL_ASSERT(allow_macro_instructions_);
7685 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007686 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007687 ITScope it_scope(this, &cond);
7688 vrecps(cond, dt, rd, rn, rm);
7689 }
7690 void Vrecps(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7691 Vrecps(al, dt, rd, rn, rm);
7692 }
7693
7694 void Vrecps(
7695 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7696 VIXL_ASSERT(allow_macro_instructions_);
7697 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007698 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007699 ITScope it_scope(this, &cond);
7700 vrecps(cond, dt, rd, rn, rm);
7701 }
7702 void Vrecps(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7703 Vrecps(al, dt, rd, rn, rm);
7704 }
7705
7706 void Vrev16(Condition cond, DataType dt, DRegister rd, DRegister rm) {
7707 VIXL_ASSERT(allow_macro_instructions_);
7708 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007709 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007710 ITScope it_scope(this, &cond);
7711 vrev16(cond, dt, rd, rm);
7712 }
7713 void Vrev16(DataType dt, DRegister rd, DRegister rm) {
7714 Vrev16(al, dt, rd, rm);
7715 }
7716
7717 void Vrev16(Condition cond, DataType dt, QRegister rd, QRegister rm) {
7718 VIXL_ASSERT(allow_macro_instructions_);
7719 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007720 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007721 ITScope it_scope(this, &cond);
7722 vrev16(cond, dt, rd, rm);
7723 }
7724 void Vrev16(DataType dt, QRegister rd, QRegister rm) {
7725 Vrev16(al, dt, rd, rm);
7726 }
7727
7728 void Vrev32(Condition cond, DataType dt, DRegister rd, DRegister rm) {
7729 VIXL_ASSERT(allow_macro_instructions_);
7730 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007731 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007732 ITScope it_scope(this, &cond);
7733 vrev32(cond, dt, rd, rm);
7734 }
7735 void Vrev32(DataType dt, DRegister rd, DRegister rm) {
7736 Vrev32(al, dt, rd, rm);
7737 }
7738
7739 void Vrev32(Condition cond, DataType dt, QRegister rd, QRegister rm) {
7740 VIXL_ASSERT(allow_macro_instructions_);
7741 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007742 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007743 ITScope it_scope(this, &cond);
7744 vrev32(cond, dt, rd, rm);
7745 }
7746 void Vrev32(DataType dt, QRegister rd, QRegister rm) {
7747 Vrev32(al, dt, rd, rm);
7748 }
7749
7750 void Vrev64(Condition cond, DataType dt, DRegister rd, DRegister rm) {
7751 VIXL_ASSERT(allow_macro_instructions_);
7752 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007753 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007754 ITScope it_scope(this, &cond);
7755 vrev64(cond, dt, rd, rm);
7756 }
7757 void Vrev64(DataType dt, DRegister rd, DRegister rm) {
7758 Vrev64(al, dt, rd, rm);
7759 }
7760
7761 void Vrev64(Condition cond, DataType dt, QRegister rd, QRegister rm) {
7762 VIXL_ASSERT(allow_macro_instructions_);
7763 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007764 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007765 ITScope it_scope(this, &cond);
7766 vrev64(cond, dt, rd, rm);
7767 }
7768 void Vrev64(DataType dt, QRegister rd, QRegister rm) {
7769 Vrev64(al, dt, rd, rm);
7770 }
7771
7772 void Vrhadd(
7773 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7774 VIXL_ASSERT(allow_macro_instructions_);
7775 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007776 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007777 ITScope it_scope(this, &cond);
7778 vrhadd(cond, dt, rd, rn, rm);
7779 }
7780 void Vrhadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7781 Vrhadd(al, dt, rd, rn, rm);
7782 }
7783
7784 void Vrhadd(
7785 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7786 VIXL_ASSERT(allow_macro_instructions_);
7787 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007788 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007789 ITScope it_scope(this, &cond);
7790 vrhadd(cond, dt, rd, rn, rm);
7791 }
7792 void Vrhadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7793 Vrhadd(al, dt, rd, rn, rm);
7794 }
7795
7796 void Vrinta(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
7797 VIXL_ASSERT(allow_macro_instructions_);
7798 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007799 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007800 vrinta(dt1, dt2, rd, rm);
7801 }
7802
7803 void Vrinta(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
7804 VIXL_ASSERT(allow_macro_instructions_);
7805 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007806 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007807 vrinta(dt1, dt2, rd, rm);
7808 }
7809
7810 void Vrinta(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
7811 VIXL_ASSERT(allow_macro_instructions_);
7812 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007813 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007814 vrinta(dt1, dt2, rd, rm);
7815 }
7816
7817 void Vrintm(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
7818 VIXL_ASSERT(allow_macro_instructions_);
7819 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007820 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007821 vrintm(dt1, dt2, rd, rm);
7822 }
7823
7824 void Vrintm(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
7825 VIXL_ASSERT(allow_macro_instructions_);
7826 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007827 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007828 vrintm(dt1, dt2, rd, rm);
7829 }
7830
7831 void Vrintm(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
7832 VIXL_ASSERT(allow_macro_instructions_);
7833 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007834 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007835 vrintm(dt1, dt2, rd, rm);
7836 }
7837
7838 void Vrintn(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
7839 VIXL_ASSERT(allow_macro_instructions_);
7840 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007841 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007842 vrintn(dt1, dt2, rd, rm);
7843 }
7844
7845 void Vrintn(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
7846 VIXL_ASSERT(allow_macro_instructions_);
7847 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007848 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007849 vrintn(dt1, dt2, rd, rm);
7850 }
7851
7852 void Vrintn(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
7853 VIXL_ASSERT(allow_macro_instructions_);
7854 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007855 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007856 vrintn(dt1, dt2, rd, rm);
7857 }
7858
7859 void Vrintp(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
7860 VIXL_ASSERT(allow_macro_instructions_);
7861 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007862 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007863 vrintp(dt1, dt2, rd, rm);
7864 }
7865
7866 void Vrintp(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
7867 VIXL_ASSERT(allow_macro_instructions_);
7868 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007869 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007870 vrintp(dt1, dt2, rd, rm);
7871 }
7872
7873 void Vrintp(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
7874 VIXL_ASSERT(allow_macro_instructions_);
7875 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007876 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007877 vrintp(dt1, dt2, rd, rm);
7878 }
7879
7880 void Vrintr(
7881 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
7882 VIXL_ASSERT(allow_macro_instructions_);
7883 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007884 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007885 ITScope it_scope(this, &cond);
7886 vrintr(cond, dt1, dt2, rd, rm);
7887 }
7888 void Vrintr(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
7889 Vrintr(al, dt1, dt2, rd, rm);
7890 }
7891
7892 void Vrintr(
7893 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
7894 VIXL_ASSERT(allow_macro_instructions_);
7895 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007896 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007897 ITScope it_scope(this, &cond);
7898 vrintr(cond, dt1, dt2, rd, rm);
7899 }
7900 void Vrintr(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
7901 Vrintr(al, dt1, dt2, rd, rm);
7902 }
7903
7904 void Vrintx(
7905 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
7906 VIXL_ASSERT(allow_macro_instructions_);
7907 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007908 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007909 ITScope it_scope(this, &cond);
7910 vrintx(cond, dt1, dt2, rd, rm);
7911 }
7912 void Vrintx(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
7913 Vrintx(al, dt1, dt2, rd, rm);
7914 }
7915
7916 void Vrintx(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
7917 VIXL_ASSERT(allow_macro_instructions_);
7918 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007919 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007920 vrintx(dt1, dt2, rd, rm);
7921 }
7922
7923 void Vrintx(
7924 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
7925 VIXL_ASSERT(allow_macro_instructions_);
7926 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007927 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007928 ITScope it_scope(this, &cond);
7929 vrintx(cond, dt1, dt2, rd, rm);
7930 }
7931 void Vrintx(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
7932 Vrintx(al, dt1, dt2, rd, rm);
7933 }
7934
7935 void Vrintz(
7936 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
7937 VIXL_ASSERT(allow_macro_instructions_);
7938 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007939 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007940 ITScope it_scope(this, &cond);
7941 vrintz(cond, dt1, dt2, rd, rm);
7942 }
7943 void Vrintz(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
7944 Vrintz(al, dt1, dt2, rd, rm);
7945 }
7946
7947 void Vrintz(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
7948 VIXL_ASSERT(allow_macro_instructions_);
7949 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007950 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007951 vrintz(dt1, dt2, rd, rm);
7952 }
7953
7954 void Vrintz(
7955 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
7956 VIXL_ASSERT(allow_macro_instructions_);
7957 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007958 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007959 ITScope it_scope(this, &cond);
7960 vrintz(cond, dt1, dt2, rd, rm);
7961 }
7962 void Vrintz(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
7963 Vrintz(al, dt1, dt2, rd, rm);
7964 }
7965
7966 void Vrshl(
7967 Condition cond, DataType dt, DRegister rd, DRegister rm, DRegister rn) {
7968 VIXL_ASSERT(allow_macro_instructions_);
7969 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007970 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007971 ITScope it_scope(this, &cond);
7972 vrshl(cond, dt, rd, rm, rn);
7973 }
7974 void Vrshl(DataType dt, DRegister rd, DRegister rm, DRegister rn) {
7975 Vrshl(al, dt, rd, rm, rn);
7976 }
7977
7978 void Vrshl(
7979 Condition cond, DataType dt, QRegister rd, QRegister rm, QRegister rn) {
7980 VIXL_ASSERT(allow_macro_instructions_);
7981 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007982 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007983 ITScope it_scope(this, &cond);
7984 vrshl(cond, dt, rd, rm, rn);
7985 }
7986 void Vrshl(DataType dt, QRegister rd, QRegister rm, QRegister rn) {
7987 Vrshl(al, dt, rd, rm, rn);
7988 }
7989
7990 void Vrshr(Condition cond,
7991 DataType dt,
7992 DRegister rd,
7993 DRegister rm,
7994 const DOperand& operand) {
7995 VIXL_ASSERT(allow_macro_instructions_);
7996 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007997 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007998 ITScope it_scope(this, &cond);
7999 vrshr(cond, dt, rd, rm, operand);
8000 }
8001 void Vrshr(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
8002 Vrshr(al, dt, rd, rm, operand);
8003 }
8004
8005 void Vrshr(Condition cond,
8006 DataType dt,
8007 QRegister rd,
8008 QRegister rm,
8009 const QOperand& operand) {
8010 VIXL_ASSERT(allow_macro_instructions_);
8011 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008012 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008013 ITScope it_scope(this, &cond);
8014 vrshr(cond, dt, rd, rm, operand);
8015 }
8016 void Vrshr(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
8017 Vrshr(al, dt, rd, rm, operand);
8018 }
8019
8020 void Vrshrn(Condition cond,
8021 DataType dt,
8022 DRegister rd,
8023 QRegister rm,
8024 const QOperand& operand) {
8025 VIXL_ASSERT(allow_macro_instructions_);
8026 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008027 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008028 ITScope it_scope(this, &cond);
8029 vrshrn(cond, dt, rd, rm, operand);
8030 }
8031 void Vrshrn(DataType dt,
8032 DRegister rd,
8033 QRegister rm,
8034 const QOperand& operand) {
8035 Vrshrn(al, dt, rd, rm, operand);
8036 }
8037
8038 void Vrsqrte(Condition cond, DataType dt, DRegister rd, DRegister rm) {
8039 VIXL_ASSERT(allow_macro_instructions_);
8040 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008041 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008042 ITScope it_scope(this, &cond);
8043 vrsqrte(cond, dt, rd, rm);
8044 }
8045 void Vrsqrte(DataType dt, DRegister rd, DRegister rm) {
8046 Vrsqrte(al, dt, rd, rm);
8047 }
8048
8049 void Vrsqrte(Condition cond, DataType dt, QRegister rd, QRegister rm) {
8050 VIXL_ASSERT(allow_macro_instructions_);
8051 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008052 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008053 ITScope it_scope(this, &cond);
8054 vrsqrte(cond, dt, rd, rm);
8055 }
8056 void Vrsqrte(DataType dt, QRegister rd, QRegister rm) {
8057 Vrsqrte(al, dt, rd, rm);
8058 }
8059
8060 void Vrsqrts(
8061 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8062 VIXL_ASSERT(allow_macro_instructions_);
8063 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008064 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008065 ITScope it_scope(this, &cond);
8066 vrsqrts(cond, dt, rd, rn, rm);
8067 }
8068 void Vrsqrts(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8069 Vrsqrts(al, dt, rd, rn, rm);
8070 }
8071
8072 void Vrsqrts(
8073 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8074 VIXL_ASSERT(allow_macro_instructions_);
8075 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008076 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008077 ITScope it_scope(this, &cond);
8078 vrsqrts(cond, dt, rd, rn, rm);
8079 }
8080 void Vrsqrts(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8081 Vrsqrts(al, dt, rd, rn, rm);
8082 }
8083
8084 void Vrsra(Condition cond,
8085 DataType dt,
8086 DRegister rd,
8087 DRegister rm,
8088 const DOperand& operand) {
8089 VIXL_ASSERT(allow_macro_instructions_);
8090 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008091 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008092 ITScope it_scope(this, &cond);
8093 vrsra(cond, dt, rd, rm, operand);
8094 }
8095 void Vrsra(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
8096 Vrsra(al, dt, rd, rm, operand);
8097 }
8098
8099 void Vrsra(Condition cond,
8100 DataType dt,
8101 QRegister rd,
8102 QRegister rm,
8103 const QOperand& operand) {
8104 VIXL_ASSERT(allow_macro_instructions_);
8105 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008106 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008107 ITScope it_scope(this, &cond);
8108 vrsra(cond, dt, rd, rm, operand);
8109 }
8110 void Vrsra(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
8111 Vrsra(al, dt, rd, rm, operand);
8112 }
8113
8114 void Vrsubhn(
8115 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
8116 VIXL_ASSERT(allow_macro_instructions_);
8117 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008118 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008119 ITScope it_scope(this, &cond);
8120 vrsubhn(cond, dt, rd, rn, rm);
8121 }
8122 void Vrsubhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
8123 Vrsubhn(al, dt, rd, rn, rm);
8124 }
8125
8126 void Vseleq(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8127 VIXL_ASSERT(allow_macro_instructions_);
8128 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008129 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008130 vseleq(dt, rd, rn, rm);
8131 }
8132
8133 void Vseleq(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8134 VIXL_ASSERT(allow_macro_instructions_);
8135 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008136 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008137 vseleq(dt, rd, rn, rm);
8138 }
8139
8140 void Vselge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8141 VIXL_ASSERT(allow_macro_instructions_);
8142 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008143 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008144 vselge(dt, rd, rn, rm);
8145 }
8146
8147 void Vselge(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8148 VIXL_ASSERT(allow_macro_instructions_);
8149 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008150 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008151 vselge(dt, rd, rn, rm);
8152 }
8153
8154 void Vselgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8155 VIXL_ASSERT(allow_macro_instructions_);
8156 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008157 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008158 vselgt(dt, rd, rn, rm);
8159 }
8160
8161 void Vselgt(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8162 VIXL_ASSERT(allow_macro_instructions_);
8163 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008164 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008165 vselgt(dt, rd, rn, rm);
8166 }
8167
8168 void Vselvs(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8169 VIXL_ASSERT(allow_macro_instructions_);
8170 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008171 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008172 vselvs(dt, rd, rn, rm);
8173 }
8174
8175 void Vselvs(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8176 VIXL_ASSERT(allow_macro_instructions_);
8177 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008178 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008179 vselvs(dt, rd, rn, rm);
8180 }
8181
8182 void Vshl(Condition cond,
8183 DataType dt,
8184 DRegister rd,
8185 DRegister rm,
8186 const DOperand& operand) {
8187 VIXL_ASSERT(allow_macro_instructions_);
8188 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008189 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008190 ITScope it_scope(this, &cond);
8191 vshl(cond, dt, rd, rm, operand);
8192 }
8193 void Vshl(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
8194 Vshl(al, dt, rd, rm, operand);
8195 }
8196
8197 void Vshl(Condition cond,
8198 DataType dt,
8199 QRegister rd,
8200 QRegister rm,
8201 const QOperand& operand) {
8202 VIXL_ASSERT(allow_macro_instructions_);
8203 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008204 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008205 ITScope it_scope(this, &cond);
8206 vshl(cond, dt, rd, rm, operand);
8207 }
8208 void Vshl(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
8209 Vshl(al, dt, rd, rm, operand);
8210 }
8211
8212 void Vshll(Condition cond,
8213 DataType dt,
8214 QRegister rd,
8215 DRegister rm,
8216 const DOperand& operand) {
8217 VIXL_ASSERT(allow_macro_instructions_);
8218 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008219 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008220 ITScope it_scope(this, &cond);
8221 vshll(cond, dt, rd, rm, operand);
8222 }
8223 void Vshll(DataType dt, QRegister rd, DRegister rm, const DOperand& operand) {
8224 Vshll(al, dt, rd, rm, operand);
8225 }
8226
8227 void Vshr(Condition cond,
8228 DataType dt,
8229 DRegister rd,
8230 DRegister rm,
8231 const DOperand& operand) {
8232 VIXL_ASSERT(allow_macro_instructions_);
8233 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008234 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008235 ITScope it_scope(this, &cond);
8236 vshr(cond, dt, rd, rm, operand);
8237 }
8238 void Vshr(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
8239 Vshr(al, dt, rd, rm, operand);
8240 }
8241
8242 void Vshr(Condition cond,
8243 DataType dt,
8244 QRegister rd,
8245 QRegister rm,
8246 const QOperand& operand) {
8247 VIXL_ASSERT(allow_macro_instructions_);
8248 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008249 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008250 ITScope it_scope(this, &cond);
8251 vshr(cond, dt, rd, rm, operand);
8252 }
8253 void Vshr(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
8254 Vshr(al, dt, rd, rm, operand);
8255 }
8256
8257 void Vshrn(Condition cond,
8258 DataType dt,
8259 DRegister rd,
8260 QRegister rm,
8261 const QOperand& operand) {
8262 VIXL_ASSERT(allow_macro_instructions_);
8263 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008264 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008265 ITScope it_scope(this, &cond);
8266 vshrn(cond, dt, rd, rm, operand);
8267 }
8268 void Vshrn(DataType dt, DRegister rd, QRegister rm, const QOperand& operand) {
8269 Vshrn(al, dt, rd, rm, operand);
8270 }
8271
8272 void Vsli(Condition cond,
8273 DataType dt,
8274 DRegister rd,
8275 DRegister rm,
8276 const DOperand& operand) {
8277 VIXL_ASSERT(allow_macro_instructions_);
8278 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008279 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008280 ITScope it_scope(this, &cond);
8281 vsli(cond, dt, rd, rm, operand);
8282 }
8283 void Vsli(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
8284 Vsli(al, dt, rd, rm, operand);
8285 }
8286
8287 void Vsli(Condition cond,
8288 DataType dt,
8289 QRegister rd,
8290 QRegister rm,
8291 const QOperand& operand) {
8292 VIXL_ASSERT(allow_macro_instructions_);
8293 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008294 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008295 ITScope it_scope(this, &cond);
8296 vsli(cond, dt, rd, rm, operand);
8297 }
8298 void Vsli(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
8299 Vsli(al, dt, rd, rm, operand);
8300 }
8301
8302 void Vsqrt(Condition cond, DataType dt, SRegister rd, SRegister rm) {
8303 VIXL_ASSERT(allow_macro_instructions_);
8304 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008305 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008306 ITScope it_scope(this, &cond);
8307 vsqrt(cond, dt, rd, rm);
8308 }
8309 void Vsqrt(DataType dt, SRegister rd, SRegister rm) { Vsqrt(al, dt, rd, rm); }
8310
8311 void Vsqrt(Condition cond, DataType dt, DRegister rd, DRegister rm) {
8312 VIXL_ASSERT(allow_macro_instructions_);
8313 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008314 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008315 ITScope it_scope(this, &cond);
8316 vsqrt(cond, dt, rd, rm);
8317 }
8318 void Vsqrt(DataType dt, DRegister rd, DRegister rm) { Vsqrt(al, dt, rd, rm); }
8319
8320 void Vsra(Condition cond,
8321 DataType dt,
8322 DRegister rd,
8323 DRegister rm,
8324 const DOperand& operand) {
8325 VIXL_ASSERT(allow_macro_instructions_);
8326 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008327 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008328 ITScope it_scope(this, &cond);
8329 vsra(cond, dt, rd, rm, operand);
8330 }
8331 void Vsra(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
8332 Vsra(al, dt, rd, rm, operand);
8333 }
8334
8335 void Vsra(Condition cond,
8336 DataType dt,
8337 QRegister rd,
8338 QRegister rm,
8339 const QOperand& operand) {
8340 VIXL_ASSERT(allow_macro_instructions_);
8341 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008342 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008343 ITScope it_scope(this, &cond);
8344 vsra(cond, dt, rd, rm, operand);
8345 }
8346 void Vsra(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
8347 Vsra(al, dt, rd, rm, operand);
8348 }
8349
8350 void Vsri(Condition cond,
8351 DataType dt,
8352 DRegister rd,
8353 DRegister rm,
8354 const DOperand& operand) {
8355 VIXL_ASSERT(allow_macro_instructions_);
8356 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008357 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008358 ITScope it_scope(this, &cond);
8359 vsri(cond, dt, rd, rm, operand);
8360 }
8361 void Vsri(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
8362 Vsri(al, dt, rd, rm, operand);
8363 }
8364
8365 void Vsri(Condition cond,
8366 DataType dt,
8367 QRegister rd,
8368 QRegister rm,
8369 const QOperand& operand) {
8370 VIXL_ASSERT(allow_macro_instructions_);
8371 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008372 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008373 ITScope it_scope(this, &cond);
8374 vsri(cond, dt, rd, rm, operand);
8375 }
8376 void Vsri(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
8377 Vsri(al, dt, rd, rm, operand);
8378 }
8379
8380 void Vst1(Condition cond,
8381 DataType dt,
8382 const NeonRegisterList& nreglist,
8383 const AlignedMemOperand& operand) {
8384 VIXL_ASSERT(allow_macro_instructions_);
8385 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008386 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008387 ITScope it_scope(this, &cond);
8388 vst1(cond, dt, nreglist, operand);
8389 }
8390 void Vst1(DataType dt,
8391 const NeonRegisterList& nreglist,
8392 const AlignedMemOperand& operand) {
8393 Vst1(al, dt, nreglist, operand);
8394 }
8395
8396 void Vst2(Condition cond,
8397 DataType dt,
8398 const NeonRegisterList& nreglist,
8399 const AlignedMemOperand& operand) {
8400 VIXL_ASSERT(allow_macro_instructions_);
8401 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008402 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008403 ITScope it_scope(this, &cond);
8404 vst2(cond, dt, nreglist, operand);
8405 }
8406 void Vst2(DataType dt,
8407 const NeonRegisterList& nreglist,
8408 const AlignedMemOperand& operand) {
8409 Vst2(al, dt, nreglist, operand);
8410 }
8411
8412 void Vst3(Condition cond,
8413 DataType dt,
8414 const NeonRegisterList& nreglist,
8415 const AlignedMemOperand& operand) {
8416 VIXL_ASSERT(allow_macro_instructions_);
8417 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008418 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008419 ITScope it_scope(this, &cond);
8420 vst3(cond, dt, nreglist, operand);
8421 }
8422 void Vst3(DataType dt,
8423 const NeonRegisterList& nreglist,
8424 const AlignedMemOperand& operand) {
8425 Vst3(al, dt, nreglist, operand);
8426 }
8427
8428 void Vst3(Condition cond,
8429 DataType dt,
8430 const NeonRegisterList& nreglist,
8431 const MemOperand& operand) {
8432 VIXL_ASSERT(allow_macro_instructions_);
8433 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008434 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008435 ITScope it_scope(this, &cond);
8436 vst3(cond, dt, nreglist, operand);
8437 }
8438 void Vst3(DataType dt,
8439 const NeonRegisterList& nreglist,
8440 const MemOperand& operand) {
8441 Vst3(al, dt, nreglist, operand);
8442 }
8443
8444 void Vst4(Condition cond,
8445 DataType dt,
8446 const NeonRegisterList& nreglist,
8447 const AlignedMemOperand& operand) {
8448 VIXL_ASSERT(allow_macro_instructions_);
8449 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008450 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008451 ITScope it_scope(this, &cond);
8452 vst4(cond, dt, nreglist, operand);
8453 }
8454 void Vst4(DataType dt,
8455 const NeonRegisterList& nreglist,
8456 const AlignedMemOperand& operand) {
8457 Vst4(al, dt, nreglist, operand);
8458 }
8459
8460 void Vstm(Condition cond,
8461 DataType dt,
8462 Register rn,
8463 WriteBack write_back,
8464 DRegisterList dreglist) {
8465 VIXL_ASSERT(allow_macro_instructions_);
8466 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008467 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008468 ITScope it_scope(this, &cond);
8469 vstm(cond, dt, rn, write_back, dreglist);
8470 }
8471 void Vstm(DataType dt,
8472 Register rn,
8473 WriteBack write_back,
8474 DRegisterList dreglist) {
8475 Vstm(al, dt, rn, write_back, dreglist);
8476 }
8477 void Vstm(Condition cond,
8478 Register rn,
8479 WriteBack write_back,
8480 DRegisterList dreglist) {
8481 Vstm(cond, kDataTypeValueNone, rn, write_back, dreglist);
8482 }
8483 void Vstm(Register rn, WriteBack write_back, DRegisterList dreglist) {
8484 Vstm(al, kDataTypeValueNone, rn, write_back, dreglist);
8485 }
8486
8487 void Vstm(Condition cond,
8488 DataType dt,
8489 Register rn,
8490 WriteBack write_back,
8491 SRegisterList sreglist) {
8492 VIXL_ASSERT(allow_macro_instructions_);
8493 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008494 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008495 ITScope it_scope(this, &cond);
8496 vstm(cond, dt, rn, write_back, sreglist);
8497 }
8498 void Vstm(DataType dt,
8499 Register rn,
8500 WriteBack write_back,
8501 SRegisterList sreglist) {
8502 Vstm(al, dt, rn, write_back, sreglist);
8503 }
8504 void Vstm(Condition cond,
8505 Register rn,
8506 WriteBack write_back,
8507 SRegisterList sreglist) {
8508 Vstm(cond, kDataTypeValueNone, rn, write_back, sreglist);
8509 }
8510 void Vstm(Register rn, WriteBack write_back, SRegisterList sreglist) {
8511 Vstm(al, kDataTypeValueNone, rn, write_back, sreglist);
8512 }
8513
8514 void Vstmdb(Condition cond,
8515 DataType dt,
8516 Register rn,
8517 WriteBack write_back,
8518 DRegisterList dreglist) {
8519 VIXL_ASSERT(allow_macro_instructions_);
8520 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008521 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008522 ITScope it_scope(this, &cond);
8523 vstmdb(cond, dt, rn, write_back, dreglist);
8524 }
8525 void Vstmdb(DataType dt,
8526 Register rn,
8527 WriteBack write_back,
8528 DRegisterList dreglist) {
8529 Vstmdb(al, dt, rn, write_back, dreglist);
8530 }
8531 void Vstmdb(Condition cond,
8532 Register rn,
8533 WriteBack write_back,
8534 DRegisterList dreglist) {
8535 Vstmdb(cond, kDataTypeValueNone, rn, write_back, dreglist);
8536 }
8537 void Vstmdb(Register rn, WriteBack write_back, DRegisterList dreglist) {
8538 Vstmdb(al, kDataTypeValueNone, rn, write_back, dreglist);
8539 }
8540
8541 void Vstmdb(Condition cond,
8542 DataType dt,
8543 Register rn,
8544 WriteBack write_back,
8545 SRegisterList sreglist) {
8546 VIXL_ASSERT(allow_macro_instructions_);
8547 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008548 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008549 ITScope it_scope(this, &cond);
8550 vstmdb(cond, dt, rn, write_back, sreglist);
8551 }
8552 void Vstmdb(DataType dt,
8553 Register rn,
8554 WriteBack write_back,
8555 SRegisterList sreglist) {
8556 Vstmdb(al, dt, rn, write_back, sreglist);
8557 }
8558 void Vstmdb(Condition cond,
8559 Register rn,
8560 WriteBack write_back,
8561 SRegisterList sreglist) {
8562 Vstmdb(cond, kDataTypeValueNone, rn, write_back, sreglist);
8563 }
8564 void Vstmdb(Register rn, WriteBack write_back, SRegisterList sreglist) {
8565 Vstmdb(al, kDataTypeValueNone, rn, write_back, sreglist);
8566 }
8567
8568 void Vstmia(Condition cond,
8569 DataType dt,
8570 Register rn,
8571 WriteBack write_back,
8572 DRegisterList dreglist) {
8573 VIXL_ASSERT(allow_macro_instructions_);
8574 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008575 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008576 ITScope it_scope(this, &cond);
8577 vstmia(cond, dt, rn, write_back, dreglist);
8578 }
8579 void Vstmia(DataType dt,
8580 Register rn,
8581 WriteBack write_back,
8582 DRegisterList dreglist) {
8583 Vstmia(al, dt, rn, write_back, dreglist);
8584 }
8585 void Vstmia(Condition cond,
8586 Register rn,
8587 WriteBack write_back,
8588 DRegisterList dreglist) {
8589 Vstmia(cond, kDataTypeValueNone, rn, write_back, dreglist);
8590 }
8591 void Vstmia(Register rn, WriteBack write_back, DRegisterList dreglist) {
8592 Vstmia(al, kDataTypeValueNone, rn, write_back, dreglist);
8593 }
8594
8595 void Vstmia(Condition cond,
8596 DataType dt,
8597 Register rn,
8598 WriteBack write_back,
8599 SRegisterList sreglist) {
8600 VIXL_ASSERT(allow_macro_instructions_);
8601 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008602 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008603 ITScope it_scope(this, &cond);
8604 vstmia(cond, dt, rn, write_back, sreglist);
8605 }
8606 void Vstmia(DataType dt,
8607 Register rn,
8608 WriteBack write_back,
8609 SRegisterList sreglist) {
8610 Vstmia(al, dt, rn, write_back, sreglist);
8611 }
8612 void Vstmia(Condition cond,
8613 Register rn,
8614 WriteBack write_back,
8615 SRegisterList sreglist) {
8616 Vstmia(cond, kDataTypeValueNone, rn, write_back, sreglist);
8617 }
8618 void Vstmia(Register rn, WriteBack write_back, SRegisterList sreglist) {
8619 Vstmia(al, kDataTypeValueNone, rn, write_back, sreglist);
8620 }
8621
8622 void Vstr(Condition cond,
8623 DataType dt,
8624 DRegister rd,
8625 const MemOperand& operand) {
8626 VIXL_ASSERT(allow_macro_instructions_);
8627 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008628 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008629 ITScope it_scope(this, &cond);
8630 vstr(cond, dt, rd, operand);
8631 }
8632 void Vstr(DataType dt, DRegister rd, const MemOperand& operand) {
8633 Vstr(al, dt, rd, operand);
8634 }
8635 void Vstr(Condition cond, DRegister rd, const MemOperand& operand) {
8636 Vstr(cond, Untyped64, rd, operand);
8637 }
8638 void Vstr(DRegister rd, const MemOperand& operand) {
8639 Vstr(al, Untyped64, rd, operand);
8640 }
8641
8642 void Vstr(Condition cond,
8643 DataType dt,
8644 SRegister rd,
8645 const MemOperand& operand) {
8646 VIXL_ASSERT(allow_macro_instructions_);
8647 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008648 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008649 ITScope it_scope(this, &cond);
8650 vstr(cond, dt, rd, operand);
8651 }
8652 void Vstr(DataType dt, SRegister rd, const MemOperand& operand) {
8653 Vstr(al, dt, rd, operand);
8654 }
8655 void Vstr(Condition cond, SRegister rd, const MemOperand& operand) {
8656 Vstr(cond, Untyped32, rd, operand);
8657 }
8658 void Vstr(SRegister rd, const MemOperand& operand) {
8659 Vstr(al, Untyped32, rd, operand);
8660 }
8661
8662 void Vsub(
8663 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8664 VIXL_ASSERT(allow_macro_instructions_);
8665 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008666 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008667 ITScope it_scope(this, &cond);
8668 vsub(cond, dt, rd, rn, rm);
8669 }
8670 void Vsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8671 Vsub(al, dt, rd, rn, rm);
8672 }
8673
8674 void Vsub(
8675 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8676 VIXL_ASSERT(allow_macro_instructions_);
8677 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008678 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008679 ITScope it_scope(this, &cond);
8680 vsub(cond, dt, rd, rn, rm);
8681 }
8682 void Vsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8683 Vsub(al, dt, rd, rn, rm);
8684 }
8685
8686 void Vsub(
8687 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8688 VIXL_ASSERT(allow_macro_instructions_);
8689 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008690 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008691 ITScope it_scope(this, &cond);
8692 vsub(cond, dt, rd, rn, rm);
8693 }
8694 void Vsub(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8695 Vsub(al, dt, rd, rn, rm);
8696 }
8697
8698 void Vsubhn(
8699 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
8700 VIXL_ASSERT(allow_macro_instructions_);
8701 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008702 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008703 ITScope it_scope(this, &cond);
8704 vsubhn(cond, dt, rd, rn, rm);
8705 }
8706 void Vsubhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
8707 Vsubhn(al, dt, rd, rn, rm);
8708 }
8709
8710 void Vsubl(
8711 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8712 VIXL_ASSERT(allow_macro_instructions_);
8713 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008714 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008715 ITScope it_scope(this, &cond);
8716 vsubl(cond, dt, rd, rn, rm);
8717 }
8718 void Vsubl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8719 Vsubl(al, dt, rd, rn, rm);
8720 }
8721
8722 void Vsubw(
8723 Condition cond, DataType dt, QRegister rd, QRegister rn, DRegister rm) {
8724 VIXL_ASSERT(allow_macro_instructions_);
8725 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008726 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008727 ITScope it_scope(this, &cond);
8728 vsubw(cond, dt, rd, rn, rm);
8729 }
8730 void Vsubw(DataType dt, QRegister rd, QRegister rn, DRegister rm) {
8731 Vsubw(al, dt, rd, rn, rm);
8732 }
8733
8734 void Vswp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
8735 VIXL_ASSERT(allow_macro_instructions_);
8736 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008737 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008738 ITScope it_scope(this, &cond);
8739 vswp(cond, dt, rd, rm);
8740 }
8741 void Vswp(DataType dt, DRegister rd, DRegister rm) { Vswp(al, dt, rd, rm); }
8742 void Vswp(Condition cond, DRegister rd, DRegister rm) {
8743 Vswp(cond, kDataTypeValueNone, rd, rm);
8744 }
8745 void Vswp(DRegister rd, DRegister rm) {
8746 Vswp(al, kDataTypeValueNone, rd, rm);
8747 }
8748
8749 void Vswp(Condition cond, DataType dt, QRegister rd, QRegister rm) {
8750 VIXL_ASSERT(allow_macro_instructions_);
8751 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008752 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008753 ITScope it_scope(this, &cond);
8754 vswp(cond, dt, rd, rm);
8755 }
8756 void Vswp(DataType dt, QRegister rd, QRegister rm) { Vswp(al, dt, rd, rm); }
8757 void Vswp(Condition cond, QRegister rd, QRegister rm) {
8758 Vswp(cond, kDataTypeValueNone, rd, rm);
8759 }
8760 void Vswp(QRegister rd, QRegister rm) {
8761 Vswp(al, kDataTypeValueNone, rd, rm);
8762 }
8763
8764 void Vtbl(Condition cond,
8765 DataType dt,
8766 DRegister rd,
8767 const NeonRegisterList& nreglist,
8768 DRegister rm) {
8769 VIXL_ASSERT(allow_macro_instructions_);
8770 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008771 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008772 ITScope it_scope(this, &cond);
8773 vtbl(cond, dt, rd, nreglist, rm);
8774 }
8775 void Vtbl(DataType dt,
8776 DRegister rd,
8777 const NeonRegisterList& nreglist,
8778 DRegister rm) {
8779 Vtbl(al, dt, rd, nreglist, rm);
8780 }
8781
8782 void Vtbx(Condition cond,
8783 DataType dt,
8784 DRegister rd,
8785 const NeonRegisterList& nreglist,
8786 DRegister rm) {
8787 VIXL_ASSERT(allow_macro_instructions_);
8788 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008789 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008790 ITScope it_scope(this, &cond);
8791 vtbx(cond, dt, rd, nreglist, rm);
8792 }
8793 void Vtbx(DataType dt,
8794 DRegister rd,
8795 const NeonRegisterList& nreglist,
8796 DRegister rm) {
8797 Vtbx(al, dt, rd, nreglist, rm);
8798 }
8799
8800 void Vtrn(Condition cond, DataType dt, DRegister rd, DRegister rm) {
8801 VIXL_ASSERT(allow_macro_instructions_);
8802 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008803 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008804 ITScope it_scope(this, &cond);
8805 vtrn(cond, dt, rd, rm);
8806 }
8807 void Vtrn(DataType dt, DRegister rd, DRegister rm) { Vtrn(al, dt, rd, rm); }
8808
8809 void Vtrn(Condition cond, DataType dt, QRegister rd, QRegister rm) {
8810 VIXL_ASSERT(allow_macro_instructions_);
8811 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008812 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008813 ITScope it_scope(this, &cond);
8814 vtrn(cond, dt, rd, rm);
8815 }
8816 void Vtrn(DataType dt, QRegister rd, QRegister rm) { Vtrn(al, dt, rd, rm); }
8817
8818 void Vtst(
8819 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8820 VIXL_ASSERT(allow_macro_instructions_);
8821 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008822 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008823 ITScope it_scope(this, &cond);
8824 vtst(cond, dt, rd, rn, rm);
8825 }
8826 void Vtst(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8827 Vtst(al, dt, rd, rn, rm);
8828 }
8829
8830 void Vtst(
8831 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8832 VIXL_ASSERT(allow_macro_instructions_);
8833 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008834 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008835 ITScope it_scope(this, &cond);
8836 vtst(cond, dt, rd, rn, rm);
8837 }
8838 void Vtst(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8839 Vtst(al, dt, rd, rn, rm);
8840 }
8841
8842 void Vuzp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
8843 VIXL_ASSERT(allow_macro_instructions_);
8844 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008845 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008846 ITScope it_scope(this, &cond);
8847 vuzp(cond, dt, rd, rm);
8848 }
8849 void Vuzp(DataType dt, DRegister rd, DRegister rm) { Vuzp(al, dt, rd, rm); }
8850
8851 void Vuzp(Condition cond, DataType dt, QRegister rd, QRegister rm) {
8852 VIXL_ASSERT(allow_macro_instructions_);
8853 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008854 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008855 ITScope it_scope(this, &cond);
8856 vuzp(cond, dt, rd, rm);
8857 }
8858 void Vuzp(DataType dt, QRegister rd, QRegister rm) { Vuzp(al, dt, rd, rm); }
8859
8860 void Vzip(Condition cond, DataType dt, DRegister rd, DRegister rm) {
8861 VIXL_ASSERT(allow_macro_instructions_);
8862 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008863 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008864 ITScope it_scope(this, &cond);
8865 vzip(cond, dt, rd, rm);
8866 }
8867 void Vzip(DataType dt, DRegister rd, DRegister rm) { Vzip(al, dt, rd, rm); }
8868
8869 void Vzip(Condition cond, DataType dt, QRegister rd, QRegister rm) {
8870 VIXL_ASSERT(allow_macro_instructions_);
8871 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008872 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008873 ITScope it_scope(this, &cond);
8874 vzip(cond, dt, rd, rm);
8875 }
8876 void Vzip(DataType dt, QRegister rd, QRegister rm) { Vzip(al, dt, rd, rm); }
8877
8878 void Yield(Condition cond) {
8879 VIXL_ASSERT(allow_macro_instructions_);
8880 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008881 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008882 ITScope it_scope(this, &cond);
8883 yield(cond);
8884 }
8885 void Yield() { Yield(al); }
Vincent Belliardf6786182016-09-21 11:55:28 +01008886 void Vabs(Condition cond, VRegister rd, VRegister rm) {
8887 VIXL_ASSERT(rd.IsS() || rd.IsD());
8888 VIXL_ASSERT(rd.GetType() == rm.GetType());
8889 if (rd.IsS()) {
8890 Vabs(cond, F32, rd.S(), rm.S());
8891 } else {
8892 Vabs(cond, F64, rd.D(), rm.D());
8893 }
8894 }
8895 void Vabs(VRegister rd, VRegister rm) { Vabs(al, rd, rm); }
8896 void Vadd(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
8897 VIXL_ASSERT(rd.IsS() || rd.IsD());
8898 VIXL_ASSERT(rd.GetType() == rn.GetType());
8899 VIXL_ASSERT(rd.GetType() == rm.GetType());
8900 if (rd.IsS()) {
8901 Vadd(cond, F32, rd.S(), rn.S(), rm.S());
8902 } else {
8903 Vadd(cond, F64, rd.D(), rn.D(), rm.D());
8904 }
8905 }
8906 void Vadd(VRegister rd, VRegister rn, VRegister rm) { Vadd(al, rd, rn, rm); }
8907 void Vcmp(Condition cond, VRegister rd, VRegister rm) {
8908 VIXL_ASSERT(rd.IsS() || rd.IsD());
8909 VIXL_ASSERT(rd.GetType() == rm.GetType());
8910 if (rd.IsS()) {
8911 Vcmp(cond, F32, rd.S(), rm.S());
8912 } else {
8913 Vcmp(cond, F64, rd.D(), rm.D());
8914 }
8915 }
8916 void Vcmp(VRegister rd, VRegister rm) { Vcmp(al, rd, rm); }
8917 void Vcmpe(Condition cond, VRegister rd, VRegister rm) {
8918 VIXL_ASSERT(rd.IsS() || rd.IsD());
8919 VIXL_ASSERT(rd.GetType() == rm.GetType());
8920 if (rd.IsS()) {
8921 Vcmpe(cond, F32, rd.S(), rm.S());
8922 } else {
8923 Vcmpe(cond, F64, rd.D(), rm.D());
8924 }
8925 }
8926 void Vcmpe(VRegister rd, VRegister rm) { Vcmpe(al, rd, rm); }
8927 void Vdiv(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
8928 VIXL_ASSERT(rd.IsS() || rd.IsD());
8929 VIXL_ASSERT(rd.GetType() == rn.GetType());
8930 VIXL_ASSERT(rd.GetType() == rm.GetType());
8931 if (rd.IsS()) {
8932 Vdiv(cond, F32, rd.S(), rn.S(), rm.S());
8933 } else {
8934 Vdiv(cond, F64, rd.D(), rn.D(), rm.D());
8935 }
8936 }
8937 void Vdiv(VRegister rd, VRegister rn, VRegister rm) { Vdiv(al, rd, rn, rm); }
8938 void Vfma(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
8939 VIXL_ASSERT(rd.IsS() || rd.IsD());
8940 VIXL_ASSERT(rd.GetType() == rn.GetType());
8941 VIXL_ASSERT(rd.GetType() == rm.GetType());
8942 if (rd.IsS()) {
8943 Vfma(cond, F32, rd.S(), rn.S(), rm.S());
8944 } else {
8945 Vfma(cond, F64, rd.D(), rn.D(), rm.D());
8946 }
8947 }
8948 void Vfma(VRegister rd, VRegister rn, VRegister rm) { Vfma(al, rd, rn, rm); }
8949 void Vfms(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
8950 VIXL_ASSERT(rd.IsS() || rd.IsD());
8951 VIXL_ASSERT(rd.GetType() == rn.GetType());
8952 VIXL_ASSERT(rd.GetType() == rm.GetType());
8953 if (rd.IsS()) {
8954 Vfms(cond, F32, rd.S(), rn.S(), rm.S());
8955 } else {
8956 Vfms(cond, F64, rd.D(), rn.D(), rm.D());
8957 }
8958 }
8959 void Vfms(VRegister rd, VRegister rn, VRegister rm) { Vfms(al, rd, rn, rm); }
8960 void Vfnma(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
8961 VIXL_ASSERT(rd.IsS() || rd.IsD());
8962 VIXL_ASSERT(rd.GetType() == rn.GetType());
8963 VIXL_ASSERT(rd.GetType() == rm.GetType());
8964 if (rd.IsS()) {
8965 Vfnma(cond, F32, rd.S(), rn.S(), rm.S());
8966 } else {
8967 Vfnma(cond, F64, rd.D(), rn.D(), rm.D());
8968 }
8969 }
8970 void Vfnma(VRegister rd, VRegister rn, VRegister rm) {
8971 Vfnma(al, rd, rn, rm);
8972 }
8973 void Vfnms(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
8974 VIXL_ASSERT(rd.IsS() || rd.IsD());
8975 VIXL_ASSERT(rd.GetType() == rn.GetType());
8976 VIXL_ASSERT(rd.GetType() == rm.GetType());
8977 if (rd.IsS()) {
8978 Vfnms(cond, F32, rd.S(), rn.S(), rm.S());
8979 } else {
8980 Vfnms(cond, F64, rd.D(), rn.D(), rm.D());
8981 }
8982 }
8983 void Vfnms(VRegister rd, VRegister rn, VRegister rm) {
8984 Vfnms(al, rd, rn, rm);
8985 }
8986 void Vmaxnm(VRegister rd, VRegister rn, VRegister rm) {
8987 VIXL_ASSERT(rd.IsS() || rd.IsD());
8988 VIXL_ASSERT(rd.GetType() == rn.GetType());
8989 VIXL_ASSERT(rd.GetType() == rm.GetType());
8990 if (rd.IsS()) {
8991 Vmaxnm(F32, rd.S(), rn.S(), rm.S());
8992 } else {
8993 Vmaxnm(F64, rd.D(), rn.D(), rm.D());
8994 }
8995 }
8996 void Vminnm(VRegister rd, VRegister rn, VRegister rm) {
8997 VIXL_ASSERT(rd.IsS() || rd.IsD());
8998 VIXL_ASSERT(rd.GetType() == rn.GetType());
8999 VIXL_ASSERT(rd.GetType() == rm.GetType());
9000 if (rd.IsS()) {
9001 Vminnm(F32, rd.S(), rn.S(), rm.S());
9002 } else {
9003 Vminnm(F64, rd.D(), rn.D(), rm.D());
9004 }
9005 }
9006 void Vmla(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
9007 VIXL_ASSERT(rd.IsS() || rd.IsD());
9008 VIXL_ASSERT(rd.GetType() == rn.GetType());
9009 VIXL_ASSERT(rd.GetType() == rm.GetType());
9010 if (rd.IsS()) {
9011 Vmla(cond, F32, rd.S(), rn.S(), rm.S());
9012 } else {
9013 Vmla(cond, F64, rd.D(), rn.D(), rm.D());
9014 }
9015 }
9016 void Vmla(VRegister rd, VRegister rn, VRegister rm) { Vmla(al, rd, rn, rm); }
9017 void Vmls(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
9018 VIXL_ASSERT(rd.IsS() || rd.IsD());
9019 VIXL_ASSERT(rd.GetType() == rn.GetType());
9020 VIXL_ASSERT(rd.GetType() == rm.GetType());
9021 if (rd.IsS()) {
9022 Vmls(cond, F32, rd.S(), rn.S(), rm.S());
9023 } else {
9024 Vmls(cond, F64, rd.D(), rn.D(), rm.D());
9025 }
9026 }
9027 void Vmls(VRegister rd, VRegister rn, VRegister rm) { Vmls(al, rd, rn, rm); }
9028 void Vmov(Condition cond, VRegister rd, VRegister rm) {
9029 VIXL_ASSERT(rd.IsS() || rd.IsD());
9030 VIXL_ASSERT(rd.GetType() == rm.GetType());
9031 if (rd.IsS()) {
9032 Vmov(cond, F32, rd.S(), rm.S());
9033 } else {
9034 Vmov(cond, F64, rd.D(), rm.D());
9035 }
9036 }
9037 void Vmov(VRegister rd, VRegister rm) { Vmov(al, rd, rm); }
9038 void Vmul(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
9039 VIXL_ASSERT(rd.IsS() || rd.IsD());
9040 VIXL_ASSERT(rd.GetType() == rn.GetType());
9041 VIXL_ASSERT(rd.GetType() == rm.GetType());
9042 if (rd.IsS()) {
9043 Vmul(cond, F32, rd.S(), rn.S(), rm.S());
9044 } else {
9045 Vmul(cond, F64, rd.D(), rn.D(), rm.D());
9046 }
9047 }
9048 void Vmul(VRegister rd, VRegister rn, VRegister rm) { Vmul(al, rd, rn, rm); }
9049 void Vneg(Condition cond, VRegister rd, VRegister rm) {
9050 VIXL_ASSERT(rd.IsS() || rd.IsD());
9051 VIXL_ASSERT(rd.GetType() == rm.GetType());
9052 if (rd.IsS()) {
9053 Vneg(cond, F32, rd.S(), rm.S());
9054 } else {
9055 Vneg(cond, F64, rd.D(), rm.D());
9056 }
9057 }
9058 void Vneg(VRegister rd, VRegister rm) { Vneg(al, rd, rm); }
9059 void Vnmla(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
9060 VIXL_ASSERT(rd.IsS() || rd.IsD());
9061 VIXL_ASSERT(rd.GetType() == rn.GetType());
9062 VIXL_ASSERT(rd.GetType() == rm.GetType());
9063 if (rd.IsS()) {
9064 Vnmla(cond, F32, rd.S(), rn.S(), rm.S());
9065 } else {
9066 Vnmla(cond, F64, rd.D(), rn.D(), rm.D());
9067 }
9068 }
9069 void Vnmla(VRegister rd, VRegister rn, VRegister rm) {
9070 Vnmla(al, rd, rn, rm);
9071 }
9072 void Vnmls(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
9073 VIXL_ASSERT(rd.IsS() || rd.IsD());
9074 VIXL_ASSERT(rd.GetType() == rn.GetType());
9075 VIXL_ASSERT(rd.GetType() == rm.GetType());
9076 if (rd.IsS()) {
9077 Vnmls(cond, F32, rd.S(), rn.S(), rm.S());
9078 } else {
9079 Vnmls(cond, F64, rd.D(), rn.D(), rm.D());
9080 }
9081 }
9082 void Vnmls(VRegister rd, VRegister rn, VRegister rm) {
9083 Vnmls(al, rd, rn, rm);
9084 }
9085 void Vnmul(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
9086 VIXL_ASSERT(rd.IsS() || rd.IsD());
9087 VIXL_ASSERT(rd.GetType() == rn.GetType());
9088 VIXL_ASSERT(rd.GetType() == rm.GetType());
9089 if (rd.IsS()) {
9090 Vnmul(cond, F32, rd.S(), rn.S(), rm.S());
9091 } else {
9092 Vnmul(cond, F64, rd.D(), rn.D(), rm.D());
9093 }
9094 }
9095 void Vnmul(VRegister rd, VRegister rn, VRegister rm) {
9096 Vnmul(al, rd, rn, rm);
9097 }
9098 void Vseleq(VRegister rd, VRegister rn, VRegister rm) {
9099 VIXL_ASSERT(rd.IsS() || rd.IsD());
9100 VIXL_ASSERT(rd.GetType() == rn.GetType());
9101 VIXL_ASSERT(rd.GetType() == rm.GetType());
9102 if (rd.IsS()) {
9103 Vseleq(F32, rd.S(), rn.S(), rm.S());
9104 } else {
9105 Vseleq(F64, rd.D(), rn.D(), rm.D());
9106 }
9107 }
9108 void Vselge(VRegister rd, VRegister rn, VRegister rm) {
9109 VIXL_ASSERT(rd.IsS() || rd.IsD());
9110 VIXL_ASSERT(rd.GetType() == rn.GetType());
9111 VIXL_ASSERT(rd.GetType() == rm.GetType());
9112 if (rd.IsS()) {
9113 Vselge(F32, rd.S(), rn.S(), rm.S());
9114 } else {
9115 Vselge(F64, rd.D(), rn.D(), rm.D());
9116 }
9117 }
9118 void Vselgt(VRegister rd, VRegister rn, VRegister rm) {
9119 VIXL_ASSERT(rd.IsS() || rd.IsD());
9120 VIXL_ASSERT(rd.GetType() == rn.GetType());
9121 VIXL_ASSERT(rd.GetType() == rm.GetType());
9122 if (rd.IsS()) {
9123 Vselgt(F32, rd.S(), rn.S(), rm.S());
9124 } else {
9125 Vselgt(F64, rd.D(), rn.D(), rm.D());
9126 }
9127 }
9128 void Vselvs(VRegister rd, VRegister rn, VRegister rm) {
9129 VIXL_ASSERT(rd.IsS() || rd.IsD());
9130 VIXL_ASSERT(rd.GetType() == rn.GetType());
9131 VIXL_ASSERT(rd.GetType() == rm.GetType());
9132 if (rd.IsS()) {
9133 Vselvs(F32, rd.S(), rn.S(), rm.S());
9134 } else {
9135 Vselvs(F64, rd.D(), rn.D(), rm.D());
9136 }
9137 }
9138 void Vsqrt(Condition cond, VRegister rd, VRegister rm) {
9139 VIXL_ASSERT(rd.IsS() || rd.IsD());
9140 VIXL_ASSERT(rd.GetType() == rm.GetType());
9141 if (rd.IsS()) {
9142 Vsqrt(cond, F32, rd.S(), rm.S());
9143 } else {
9144 Vsqrt(cond, F64, rd.D(), rm.D());
9145 }
9146 }
9147 void Vsqrt(VRegister rd, VRegister rm) { Vsqrt(al, rd, rm); }
9148 void Vsub(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
9149 VIXL_ASSERT(rd.IsS() || rd.IsD());
9150 VIXL_ASSERT(rd.GetType() == rn.GetType());
9151 VIXL_ASSERT(rd.GetType() == rm.GetType());
9152 if (rd.IsS()) {
9153 Vsub(cond, F32, rd.S(), rn.S(), rm.S());
9154 } else {
9155 Vsub(cond, F64, rd.D(), rn.D(), rm.D());
9156 }
9157 }
9158 void Vsub(VRegister rd, VRegister rn, VRegister rm) { Vsub(al, rd, rn, rm); }
Alexandre Ramesd3832962016-07-04 15:03:43 +01009159 // End of generated code.
9160 private:
9161 RegisterList available_;
9162 VRegisterList available_vfp_;
9163 MacroAssemblerContext context_;
9164 Label::Offset checkpoint_;
9165 LiteralPoolManager literal_pool_manager_;
9166 VeneerPoolManager veneer_pool_manager_;
Pierre Langlois1e85b7f2016-08-05 14:20:36 +01009167 bool generate_simulator_code_;
Alexandre Ramesd3832962016-07-04 15:03:43 +01009168 bool allow_macro_instructions_;
Alexandre Ramesd3832962016-07-04 15:03:43 +01009169};
9170
9171// This scope is used to ensure that the specified size of instructions will be
9172// emitted contiguously. The assert policy kExtactSize should only be used
9173// when you use directly the assembler as it's difficult to know exactly how
9174// many instructions will be emitted by the macro-assembler. Using the assembler
9175// means that you directly use the assembler instructions (in lower case) from a
9176// MacroAssembler object.
9177class CodeBufferCheckScope {
9178 public:
9179 // Tell whether or not the scope should assert the amount of code emitted
9180 // within the scope is consistent with the requested amount.
9181 enum AssertPolicy {
9182 kNoAssert, // No assert required.
9183 kExactSize, // The code emitted must be exactly size bytes.
9184 kMaximumSize // The code emitted must be at most size bytes.
9185 };
9186
9187 CodeBufferCheckScope(MacroAssembler* masm,
9188 uint32_t size,
9189 AssertPolicy assert_policy = kMaximumSize)
9190 : masm_(masm) {
9191 masm->EnsureEmitFor(size);
9192#ifdef VIXL_DEBUG
9193 initial_cursor_offset_ = masm->GetCursorOffset();
9194 size_ = size;
9195 assert_policy_ = assert_policy;
9196#else
9197 USE(assert_policy);
9198#endif
9199 }
9200
9201 ~CodeBufferCheckScope() {
9202#ifdef VIXL_DEBUG
9203 switch (assert_policy_) {
9204 case kNoAssert:
9205 break;
9206 case kExactSize:
9207 VIXL_ASSERT(masm_->GetCursorOffset() - initial_cursor_offset_ == size_);
9208 break;
9209 case kMaximumSize:
9210 VIXL_ASSERT(masm_->GetCursorOffset() - initial_cursor_offset_ <= size_);
9211 break;
9212 default:
9213 VIXL_UNREACHABLE();
9214 }
9215#endif
9216 }
9217
9218 protected:
9219 MacroAssembler* masm_;
Alexandre Ramesd3832962016-07-04 15:03:43 +01009220 uint32_t initial_cursor_offset_;
9221 uint32_t size_;
9222 AssertPolicy assert_policy_;
Alexandre Ramesd3832962016-07-04 15:03:43 +01009223};
9224
9225// Use this scope when you need a one-to-one mapping between methods and
9226// instructions. This scope prevents the MacroAssembler functions from being
9227// called and the literal pools and veneers from being emitted (they can only be
9228// emitted when you create the scope). It also asserts the size of the emitted
9229// instructions is the specified size (or not greater than the specified size).
9230// This scope must be used when you want to directly use the assembler. It will
9231// ensure that the buffer is big enough and that you don't break the pool and
9232// veneer mechanisms.
9233class AssemblerAccurateScope : public CodeBufferCheckScope {
9234 public:
9235 AssemblerAccurateScope(MacroAssembler* masm,
9236 uint32_t size,
9237 AssertPolicy policy = kExactSize)
9238 : CodeBufferCheckScope(masm, size, policy) {
9239 VIXL_ASSERT(policy != kNoAssert);
9240#ifdef VIXL_DEBUG
9241 old_allow_macro_instructions_ = masm->AllowMacroInstructions();
Vincent Belliard8885c172016-08-24 11:33:19 -07009242 old_allow_assembler_ = masm->AllowAssembler();
Alexandre Ramesd3832962016-07-04 15:03:43 +01009243 masm->SetAllowMacroInstructions(false);
Vincent Belliard8885c172016-08-24 11:33:19 -07009244 masm->SetAllowAssembler(true);
Alexandre Ramesfd098172016-08-09 10:29:53 +01009245#else
9246 USE(old_allow_macro_instructions_);
Vincent Belliard8885c172016-08-24 11:33:19 -07009247 USE(old_allow_assembler_);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009248#endif
9249 }
9250
9251 ~AssemblerAccurateScope() {
9252#ifdef VIXL_DEBUG
9253 masm_->SetAllowMacroInstructions(old_allow_macro_instructions_);
Vincent Belliard8885c172016-08-24 11:33:19 -07009254 masm_->SetAllowAssembler(old_allow_assembler_);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009255#endif
9256 }
9257
9258 private:
Alexandre Ramesd3832962016-07-04 15:03:43 +01009259 bool old_allow_macro_instructions_;
Vincent Belliard8885c172016-08-24 11:33:19 -07009260 bool old_allow_assembler_;
Alexandre Ramesd3832962016-07-04 15:03:43 +01009261};
9262
9263// This scope utility allows scratch registers to be managed safely. The
9264// MacroAssembler's GetScratchRegisterList() is used as a pool of scratch
9265// registers. These registers can be allocated on demand, and will be returned
9266// at the end of the scope.
9267//
9268// When the scope ends, the MacroAssembler's lists will be restored to their
9269// original state, even if the lists were modified by some other means.
9270class UseScratchRegisterScope {
9271 public:
9272 // This constructor implicitly calls the `Open` function to initialise the
9273 // scope, so it is ready to use immediately after it has been constructed.
9274 explicit UseScratchRegisterScope(MacroAssembler* masm)
9275 : available_(NULL),
9276 available_vfp_(NULL),
9277 old_available_(0),
9278 old_available_vfp_(0) {
9279 Open(masm);
9280 }
9281 // This constructor allows deferred and optional initialisation of the scope.
9282 // The user is required to explicitly call the `Open` function before using
9283 // the scope.
9284 UseScratchRegisterScope()
9285 : available_(NULL),
9286 available_vfp_(NULL),
9287 old_available_(0),
9288 old_available_vfp_(0) {}
9289
9290 // This function performs the actual initialisation work.
9291 void Open(MacroAssembler* masm);
9292
9293 // The destructor always implicitly calls the `Close` function.
9294 ~UseScratchRegisterScope() { Close(); }
9295
9296 // This function performs the cleaning-up work. It must succeed even if the
9297 // scope has not been opened. It is safe to call multiple times.
9298 void Close();
9299
9300 bool IsAvailable(const Register& reg) const;
9301 bool IsAvailable(const VRegister& reg) const;
9302
9303 // Take a register from the temp list. It will be returned automatically when
9304 // the scope ends.
9305 Register Acquire();
9306 VRegister AcquireV(unsigned size_in_bits);
9307 QRegister AcquireQ();
9308 DRegister AcquireD();
9309 SRegister AcquireS();
9310
9311 // Explicitly release an acquired (or excluded) register, putting it back in
9312 // the temp list.
9313 void Release(const Register& reg);
9314 void Release(const VRegister& reg);
9315
9316 // Make the specified registers available as scratch registers for the
9317 // duration of this scope.
9318 void Include(const RegisterList& list);
9319 void Include(const Register& reg1,
9320 const Register& reg2 = NoReg,
9321 const Register& reg3 = NoReg,
9322 const Register& reg4 = NoReg) {
9323 Include(RegisterList(reg1, reg2, reg3, reg4));
9324 }
9325 void Include(const VRegisterList& list);
9326 void Include(const VRegister& reg1,
9327 const VRegister& reg2 = NoVReg,
9328 const VRegister& reg3 = NoVReg,
9329 const VRegister& reg4 = NoVReg) {
9330 Include(VRegisterList(reg1, reg2, reg3, reg4));
9331 }
9332
9333 // Make sure that the specified registers are not available in this scope.
9334 // This can be used to prevent helper functions from using sensitive
9335 // registers, for example.
9336 void Exclude(const RegisterList& list);
9337 void Exclude(const Register& reg1,
9338 const Register& reg2 = NoReg,
9339 const Register& reg3 = NoReg,
9340 const Register& reg4 = NoReg) {
9341 Exclude(RegisterList(reg1, reg2, reg3, reg4));
9342 }
9343 void Exclude(const VRegisterList& list);
9344 void Exclude(const VRegister& reg1,
9345 const VRegister& reg2 = NoVReg,
9346 const VRegister& reg3 = NoVReg,
9347 const VRegister& reg4 = NoVReg) {
9348 Exclude(VRegisterList(reg1, reg2, reg3, reg4));
9349 }
9350
9351 // Prevent any scratch registers from being used in this scope.
9352 void ExcludeAll();
9353
9354 private:
9355 // Available scratch registers.
9356 RegisterList* available_; // kRRegister
9357 VRegisterList* available_vfp_; // kVRegister
9358
9359 // The state of the available lists at the start of this scope.
9360 uint32_t old_available_; // kRRegister
9361 uint64_t old_available_vfp_; // kVRegister
9362
9363 VIXL_DEBUG_NO_RETURN UseScratchRegisterScope(const UseScratchRegisterScope&) {
9364 VIXL_UNREACHABLE();
9365 }
9366 VIXL_DEBUG_NO_RETURN void operator=(const UseScratchRegisterScope&) {
9367 VIXL_UNREACHABLE();
9368 }
9369};
9370
9371class JumpTableBase {
9372 protected:
9373 JumpTableBase(int len, int offset_size)
9374 : table_location_(Label::kMaxOffset),
9375 branch_location_(Label::kMaxOffset),
9376 length_(len),
9377 offset_shift_(WhichPowerOf2(offset_size)),
9378 presence_(length_) {
9379 VIXL_ASSERT((length_ >= 0) && (offset_size <= 4));
9380 }
9381 virtual ~JumpTableBase() {}
9382
9383 public:
9384 int GetTableSizeInBytes() const { return length_ * (1 << offset_shift_); }
9385 int GetOffsetShift() const { return offset_shift_; }
9386 int GetLength() const { return length_; }
9387 Label* GetDefaultLabel() { return &default_; }
9388 Label* GetEndLabel() { return &end_; }
9389 void SetBranchLocation(uint32_t branch_location) {
9390 branch_location_ = branch_location;
9391 }
9392 uint32_t GetBranchLocation() const { return branch_location_; }
9393 void BindTable(uint32_t location) { table_location_ = location; }
9394 virtual void Link(MacroAssembler* masm,
9395 int case_index,
9396 uint32_t location) = 0;
9397
9398 uint32_t GetLocationForCase(int i) {
9399 VIXL_ASSERT((i >= 0) && (i < length_));
9400 return table_location_ + (i * (1 << offset_shift_));
9401 }
9402 void SetPresenceBitForCase(int i) {
9403 VIXL_ASSERT((i >= 0) && (i < length_));
9404 presence_.Set(i);
9405 }
9406
9407 void Finalize(MacroAssembler* masm) {
9408 if (!default_.IsBound()) {
9409 masm->Bind(&default_);
9410 }
9411 masm->Bind(&end_);
9412
9413 presence_.ForEachBitNotSet(LinkIt(this, masm, default_.GetLocation()));
9414 }
9415
9416 private:
9417 uint32_t table_location_;
9418 uint32_t branch_location_;
9419 const int length_;
9420 const int offset_shift_;
9421 BitField presence_;
9422 Label default_;
9423 Label end_;
9424 struct LinkIt {
9425 JumpTableBase* table_;
9426 MacroAssembler* const masm_;
9427 const uint32_t location_;
9428 LinkIt(JumpTableBase* table, MacroAssembler* const masm, uint32_t location)
9429 : table_(table), masm_(masm), location_(location) {}
9430 bool execute(int id) const {
9431 VIXL_ASSERT(id < table_->GetLength());
9432 table_->Link(masm_, static_cast<int>(id), location_);
9433 return true;
9434 }
9435 };
9436};
9437
9438// JumpTable<T>(len): Helper to describe a jump table
9439// len here describes the number of possible case. Values in [0, n[ can have a
9440// jump offset. Any other value will assert.
9441template <typename T>
9442class JumpTable : public JumpTableBase {
9443 protected:
9444 explicit JumpTable(int length) : JumpTableBase(length, sizeof(T)) {}
9445
9446 public:
9447 virtual void Link(MacroAssembler* masm, int case_index, uint32_t location) {
9448 uint32_t position_in_table = GetLocationForCase(case_index);
9449 uint32_t from = GetBranchLocation();
9450 int offset = location - from;
Alexandre Rames919e3fe2016-10-14 09:07:54 +01009451 T* case_offset = masm->GetBuffer()->GetOffsetAddress<T*>(position_in_table);
Jacob Bramley10dae1a2016-07-27 09:45:13 +01009452 if (masm->IsUsingT32()) {
Alexandre Ramesd3832962016-07-04 15:03:43 +01009453 *case_offset = offset >> 1;
9454 } else {
9455 *case_offset = offset >> 2;
9456 }
9457 }
9458};
9459
9460class JumpTable8bitOffset : public JumpTable<uint8_t> {
9461 public:
9462 explicit JumpTable8bitOffset(int length) : JumpTable<uint8_t>(length) {}
9463};
9464
9465class JumpTable16bitOffset : public JumpTable<uint16_t> {
9466 public:
9467 explicit JumpTable16bitOffset(int length) : JumpTable<uint16_t>(length) {}
9468};
9469
9470class JumpTable32bitOffset : public JumpTable<uint32_t> {
9471 public:
9472 explicit JumpTable32bitOffset(int length) : JumpTable<uint32_t>(length) {}
9473};
9474
9475} // namespace aarch32
9476} // namespace vixl
9477
9478#endif // VIXL_AARCH32_MACRO_ASSEMBLER_AARCH32_H_