blob: 0ea5d978d21d12e1323ed6a46366fdab9c9be9b8 [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
Alexandre Rames8d191ab2016-11-29 11:23:27 +000031#include "code-generation-scopes-vixl.h"
32#include "macro-assembler-interface.h"
Alexandre Ramesd3832962016-07-04 15:03:43 +010033#include "utils-vixl.h"
Alexandre Rames8d191ab2016-11-29 11:23:27 +000034
Alexandre Ramesd3832962016-07-04 15:03:43 +010035#include "aarch32/instructions-aarch32.h"
36#include "aarch32/assembler-aarch32.h"
Pierre Langlois989663e2016-11-24 13:11:08 +000037#include "aarch32/operands-aarch32.h"
Alexandre Ramesd3832962016-07-04 15:03:43 +010038
39namespace vixl {
40namespace aarch32 {
41
42class JumpTableBase;
43
Vincent Belliard934696d2016-08-18 11:03:56 -070044enum FlagsUpdate { LeaveFlags = 0, SetFlags = 1, DontCare = 2 };
45
Alexandre Ramesd3832962016-07-04 15:03:43 +010046// LiteralPool class, defined as a container for literals
47class LiteralPool {
48 public:
49 typedef std::list<RawLiteral*>::iterator RawLiteralListIterator;
50
51 public:
52 LiteralPool() : size_(0) {}
53 ~LiteralPool() {
54 VIXL_ASSERT(literals_.empty() && (size_ == 0));
55 for (RawLiteralListIterator literal_it = keep_until_delete_.begin();
56 literal_it != keep_until_delete_.end();
57 literal_it++) {
58 delete *literal_it;
59 }
60 keep_until_delete_.clear();
61 }
62
63 unsigned GetSize() const { return size_; }
64
65 // Add a literal to the literal container.
Vincent Belliard51d1ccc2016-09-22 10:17:11 -070066 void AddLiteral(RawLiteral* literal) {
Baptiste Afsa000f93f2016-12-01 13:09:59 +000067 // Manually placed literals can't be added to a literal pool.
68 VIXL_ASSERT(!literal->IsManuallyPlaced());
Vincent Belliard51d1ccc2016-09-22 10:17:11 -070069 if (literal->GetPositionInPool() == Label::kMaxOffset) {
70 uint32_t position = GetSize();
71 literal->SetPositionInPool(position);
72 literals_.push_back(literal);
73 size_ += literal->GetAlignedSize();
74 }
Alexandre Ramesd3832962016-07-04 15:03:43 +010075 }
76
77 // First literal to be emitted.
78 RawLiteralListIterator GetFirst() { return literals_.begin(); }
79
80 // Mark the end of the literal container.
81 RawLiteralListIterator GetEnd() { return literals_.end(); }
82
83 // Remove all the literals from the container.
84 // If the literal's memory management has been delegated to the container
85 // it will be delete'd.
86 void Clear() {
87 for (RawLiteralListIterator literal_it = GetFirst(); literal_it != GetEnd();
88 literal_it++) {
89 RawLiteral* literal = *literal_it;
90 switch (literal->GetDeletionPolicy()) {
91 case RawLiteral::kDeletedOnPlacementByPool:
92 delete literal;
93 break;
94 case RawLiteral::kDeletedOnPoolDestruction:
95 keep_until_delete_.push_back(literal);
96 break;
97 case RawLiteral::kManuallyDeleted:
98 break;
99 }
100 }
101 literals_.clear();
102 size_ = 0;
103 }
104
105 private:
106 // Size (in bytes and including alignments) of the literal pool.
107 unsigned size_;
108
109 // Literal container.
110 std::list<RawLiteral*> literals_;
111 // Already bound Literal container the app requested this pool to keep.
112 std::list<RawLiteral*> keep_until_delete_;
113};
114
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000115
Alexandre Ramesd3832962016-07-04 15:03:43 +0100116// Macro assembler for aarch32 instruction set.
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000117class MacroAssembler : public Assembler, public MacroAssemblerInterface {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100118 public:
119 enum EmitOption { kBranchRequired, kNoBranchRequired };
120
Pierre Langlois4c5d65b2016-12-06 11:56:28 +0000121 virtual internal::AssemblerBase* AsAssemblerBase() VIXL_OVERRIDE {
122 return this;
123 }
Vincent Belliard8885c172016-08-24 11:33:19 -0700124
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000125 virtual void BlockPools() VIXL_OVERRIDE {
126 literal_pool_manager_.Block();
127 veneer_pool_manager_.Block();
128 }
129 virtual void ReleasePools() VIXL_OVERRIDE {
130 literal_pool_manager_.Release();
131 veneer_pool_manager_.Release();
132 }
133 virtual void EnsureEmitPoolsFor(size_t size) VIXL_OVERRIDE {
134 // TODO: Optimise this. It also checks that there is space in the buffer,
135 // which we do not need to do here.
136 VIXL_ASSERT(IsUint32(size));
137 EnsureEmitFor(static_cast<uint32_t>(size));
138 }
139
140 private:
141 class MacroEmissionCheckScope : public EmissionCheckScope {
Vincent Belliard8885c172016-08-24 11:33:19 -0700142 public:
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000143 explicit MacroEmissionCheckScope(MacroAssemblerInterface* masm)
144 : EmissionCheckScope(masm, kTypicalMacroInstructionMaxSize) {}
145
146 private:
147 static const size_t kTypicalMacroInstructionMaxSize =
148 8 * kMaxInstructionSizeInBytes;
Vincent Belliard8885c172016-08-24 11:33:19 -0700149 };
150
Alexandre Ramesd3832962016-07-04 15:03:43 +0100151 class MacroAssemblerContext {
152 public:
153 MacroAssemblerContext() : count_(0) {}
154 ~MacroAssemblerContext() {}
155 unsigned GetRecursiveCount() const { return count_; }
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000156 void Up(const char* loc) {
157 location_stack_[count_] = loc;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100158 count_++;
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000159 if (count_ >= kMaxRecursion) {
160 printf(
161 "Recursion limit reached; unable to resolve macro assembler "
162 "call.\n");
163 printf("Macro assembler context stack:\n");
164 for (unsigned i = 0; i < kMaxRecursion; i++) {
165 printf("%10s %s\n", (i == 0) ? "oldest -> " : "", location_stack_[i]);
166 }
167 VIXL_ABORT();
168 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100169 }
170 void Down() {
171 VIXL_ASSERT((count_ > 0) && (count_ < kMaxRecursion));
172 count_--;
173 }
174
175 private:
176 unsigned count_;
177 static const uint32_t kMaxRecursion = 5;
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000178 const char* location_stack_[kMaxRecursion];
Alexandre Ramesd3832962016-07-04 15:03:43 +0100179 };
180
Vincent Belliard76887c12016-11-10 12:54:09 -0800181 // This scope is used at each Delegate entry to avoid infinite recursion of
182 // Delegate calls. The limit is defined by
183 // MacroAssemblerContext::kMaxRecursion.
Alexandre Ramesd3832962016-07-04 15:03:43 +0100184 class ContextScope {
185 public:
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000186 explicit ContextScope(MacroAssembler* const masm, const char* loc)
187 : masm_(masm) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100188 VIXL_ASSERT(masm_->AllowMacroInstructions());
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000189 masm_->GetContext()->Up(loc);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100190 }
191 ~ContextScope() { masm_->GetContext()->Down(); }
192
193 private:
194 MacroAssembler* const masm_;
195 };
196
197 MacroAssemblerContext* GetContext() { return &context_; }
198
199 class ITScope {
200 public:
201 ITScope(MacroAssembler* masm, Condition* cond, bool can_use_it = false)
202 : masm_(masm), cond_(*cond), can_use_it_(can_use_it) {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100203 if (!cond_.Is(al) && masm->IsUsingT32()) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100204 if (can_use_it_) {
205 // IT is not deprecated (that implies a 16 bit T32 instruction).
206 // We generate an IT instruction and a conditional instruction.
207 masm->it(cond_);
208 } else {
209 // The usage of IT is deprecated for the instruction.
210 // We generate a conditional branch and an unconditional instruction.
Jacob Bramleyaaac3972016-11-09 15:59:18 +0000211 // TODO: Use a scope utility with a size check. To do that, we'd need
212 // one with Open() and Close() implemented.
Alexandre Ramesd3832962016-07-04 15:03:43 +0100213 masm_->EnsureEmitFor(k16BitT32InstructionSizeInBytes +
214 kMaxT32MacroInstructionSizeInBytes);
215 // Generate the branch.
216 masm_->b(cond_.Negate(), Narrow, &label_);
217 // Tell the macro-assembler to generate unconditional instructions.
218 *cond = al;
219 }
220 }
221#ifdef VIXL_DEBUG
222 initial_cursor_offset_ = masm->GetCursorOffset();
Alexandre Ramesfd098172016-08-09 10:29:53 +0100223#else
224 USE(initial_cursor_offset_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100225#endif
226 }
227 ~ITScope() {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100228 if (!cond_.Is(al) && masm_->IsUsingT32() && !can_use_it_) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100229 VIXL_ASSERT(masm_->GetCursorOffset() - initial_cursor_offset_ <=
230 kMaxT32MacroInstructionSizeInBytes);
Vincent Belliarde42218c2016-10-19 13:24:28 -0700231 masm_->BindHelper(&label_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100232 }
233 }
234
235 private:
236 MacroAssembler* masm_;
237 Condition cond_;
238 Label label_;
239 bool can_use_it_;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100240 uint32_t initial_cursor_offset_;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100241 };
242
243 template <Assembler::InstructionCondDtDL asmfn>
244 class EmitLiteralCondDtDL {
245 public:
246 EmitLiteralCondDtDL(Condition cond, DataType dt, DRegister rt)
247 : cond_(cond), dt_(dt), rt_(rt) {}
248 void emit(MacroAssembler* const masm, RawLiteral* const literal) {
249 (masm->*asmfn)(cond_, dt_, rt_, literal);
250 }
251
252 private:
253 Condition cond_;
254 DataType dt_;
255 DRegister rt_;
256 };
257
258 template <Assembler::InstructionCondDtSL asmfn>
259 class EmitLiteralCondDtSL {
260 public:
261 EmitLiteralCondDtSL(Condition cond, DataType dt, SRegister rt)
262 : cond_(cond), dt_(dt), rt_(rt) {}
263 void emit(MacroAssembler* const masm, RawLiteral* const literal) {
264 (masm->*asmfn)(cond_, dt_, rt_, literal);
265 }
266
267 private:
268 Condition cond_;
269 DataType dt_;
270 SRegister rt_;
271 };
272
273 template <Assembler::InstructionCondRL asmfn>
274 class EmitLiteralCondRL {
275 public:
276 EmitLiteralCondRL(Condition cond, Register rt) : cond_(cond), rt_(rt) {}
277 void emit(MacroAssembler* const masm, RawLiteral* const literal) {
278 (masm->*asmfn)(cond_, rt_, literal);
279 }
280
281 private:
282 Condition cond_;
283 Register rt_;
284 };
285
286 template <Assembler::InstructionCondRRL asmfn>
287 class EmitLiteralCondRRL {
288 public:
289 EmitLiteralCondRRL(Condition cond, Register rt, Register rt2)
290 : cond_(cond), rt_(rt), rt2_(rt2) {}
291 void emit(MacroAssembler* const masm, RawLiteral* const literal) {
292 (masm->*asmfn)(cond_, rt_, rt2_, literal);
293 }
294
295 private:
296 Condition cond_;
297 Register rt_, rt2_;
298 };
299
300 class LiteralPoolManager {
301 public:
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000302 explicit LiteralPoolManager(MacroAssembler* const masm)
303 : masm_(masm), monitor_(0) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100304 ResetCheckpoint();
305 }
306
307 void ResetCheckpoint() { checkpoint_ = Label::kMaxOffset; }
308
309 LiteralPool* GetLiteralPool() { return &literal_pool_; }
310 Label::Offset GetCheckpoint() const {
311 // Make room for a branch over the pools.
312 return checkpoint_ - kMaxInstructionSizeInBytes;
313 }
314 size_t GetLiteralPoolSize() const { return literal_pool_.GetSize(); }
315
316 // Checks if the insertion of the literal will put the forward reference
317 // too far in the literal pool.
318 bool IsInsertTooFar(RawLiteral* literal, uint32_t from) const {
319 uint32_t checkpoint = from + literal->GetLastInsertForwardDistance();
320 checkpoint =
321 std::min(checkpoint, static_cast<uint32_t>(literal->GetCheckpoint()));
322 bool too_far = AlignDown(checkpoint, 4) < from + literal_pool_.GetSize() +
323 kMaxInstructionSizeInBytes;
324 return too_far;
325 }
326
327 // Set the different checkpoints where the literal pool has to be emited.
328 void UpdateCheckpoint(RawLiteral* literal) {
329 // The literal should have been placed somewhere in the literal pool
330 VIXL_ASSERT(literal->GetPositionInPool() != Label::kMaxOffset);
331 // TODO(all): Consider AddForwardRef as a virtual so the checkpoint is
332 // updated when inserted. Or move checkpoint_ into Label,
333 literal->UpdateCheckpoint();
334 Label::Offset tmp =
335 literal->GetAlignedCheckpoint(4) - literal->GetPositionInPool();
336 if (checkpoint_ > tmp) {
337 checkpoint_ = tmp;
338 masm_->ComputeCheckpoint();
339 }
340 }
341
Alexandre Rames4e6b4af2016-11-08 16:04:55 +0000342 bool IsEmpty() const { return GetLiteralPoolSize() == 0; }
343
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000344 void Block() { monitor_++; }
345 void Release() {
346 VIXL_ASSERT(IsBlocked());
347 if (--monitor_ == 0) {
348 // Ensure the pool has not been blocked for too long.
349 VIXL_ASSERT(masm_->GetCursorOffset() <= checkpoint_);
350 }
351 }
352 bool IsBlocked() const { return monitor_ != 0; }
353
Alexandre Ramesd3832962016-07-04 15:03:43 +0100354 private:
355 MacroAssembler* const masm_;
356 LiteralPool literal_pool_;
357
358 // Max offset in the code buffer where the literal needs to be
359 // emitted. A default value of Label::kMaxOffset means that the checkpoint
360 // is invalid.
361 Label::Offset checkpoint_;
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000362 // Indicates whether the emission of this pool is blocked.
363 int monitor_;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100364 };
365
Alexandre Ramesd3832962016-07-04 15:03:43 +0100366 void PerformEnsureEmit(Label::Offset target, uint32_t extra_size);
367
368 protected:
369 void HandleOutOfBoundsImmediate(Condition cond, Register tmp, uint32_t imm);
Vincent Belliardf8833fa2016-11-08 15:01:57 -0800370 void PadToMinimumBranchRange(Label* label);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100371
372 // Generate the instruction and if it's not possible revert the whole thing.
373 // emit the literal pool and regenerate the instruction.
374 // Note: The instruction is generated via
375 // void T::emit(MacroAssembler* const, RawLiteral* const)
376 template <typename T>
377 void GenerateInstruction(T instr_callback, RawLiteral* const literal) {
Pierre Langloisf5348ce2016-09-22 11:15:35 +0100378 int32_t cursor = GetCursorOffset();
Alexandre Ramesd3832962016-07-04 15:03:43 +0100379 uint32_t where = cursor + GetArchitectureStatePCOffset();
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000380 bool already_bound = literal->IsBound();
Alexandre Ramesd3832962016-07-04 15:03:43 +0100381 // Emit the instruction, via the assembler
Vincent Belliard8885c172016-08-24 11:33:19 -0700382 {
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000383 MacroEmissionCheckScope guard(this);
Vincent Belliard8885c172016-08-24 11:33:19 -0700384 instr_callback.emit(this, literal);
385 }
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000386 if (!literal->IsManuallyPlaced() && !already_bound) {
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700387 if (IsInsertTooFar(literal, where)) {
388 // The instruction's data is too far: revert the emission
Alexandre Rames919e3fe2016-10-14 09:07:54 +0100389 GetBuffer()->Rewind(cursor);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700390 literal->InvalidateLastForwardReference(RawLiteral::kNoUpdateNecessary);
391 EmitLiteralPool(kBranchRequired);
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000392 MacroEmissionCheckScope guard(this);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700393 instr_callback.emit(this, literal);
394 }
395 literal_pool_manager_.GetLiteralPool()->AddLiteral(literal);
396 literal_pool_manager_.UpdateCheckpoint(literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100397 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100398 }
399
400 public:
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100401 explicit MacroAssembler(InstructionSet isa = A32)
402 : Assembler(isa),
Alexandre Ramesd3832962016-07-04 15:03:43 +0100403 available_(r12),
404 checkpoint_(Label::kMaxOffset),
405 literal_pool_manager_(this),
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100406 veneer_pool_manager_(this),
407 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100408#ifdef VIXL_DEBUG
409 SetAllowMacroInstructions(true);
Alexandre Ramesfd098172016-08-09 10:29:53 +0100410#else
411 USE(literal_pool_manager_);
412 USE(allow_macro_instructions_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100413#endif
414 ComputeCheckpoint();
415 }
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100416 explicit MacroAssembler(size_t size, InstructionSet isa = A32)
417 : Assembler(size, isa),
418 available_(r12),
419 checkpoint_(Label::kMaxOffset),
420 literal_pool_manager_(this),
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100421 veneer_pool_manager_(this),
422 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE) {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100423#ifdef VIXL_DEBUG
424 SetAllowMacroInstructions(true);
425#endif
426 ComputeCheckpoint();
427 }
Alexandre Rames919e3fe2016-10-14 09:07:54 +0100428 MacroAssembler(byte* buffer, size_t size, InstructionSet isa = A32)
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100429 : Assembler(buffer, size, isa),
Alexandre Ramesd3832962016-07-04 15:03:43 +0100430 available_(r12),
431 checkpoint_(Label::kMaxOffset),
432 literal_pool_manager_(this),
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100433 veneer_pool_manager_(this),
434 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100435#ifdef VIXL_DEBUG
436 SetAllowMacroInstructions(true);
437#endif
438 ComputeCheckpoint();
439 }
440
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100441 bool GenerateSimulatorCode() const { return generate_simulator_code_; }
442
Alexandre Ramesd3832962016-07-04 15:03:43 +0100443 // Tell whether any of the macro instruction can be used. When false the
444 // MacroAssembler will assert if a method which can emit a variable number
445 // of instructions is called.
Pierre Langlois4c5d65b2016-12-06 11:56:28 +0000446 virtual void SetAllowMacroInstructions(bool value) VIXL_OVERRIDE {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100447 allow_macro_instructions_ = value;
448 }
Pierre Langlois4c5d65b2016-12-06 11:56:28 +0000449 virtual bool AllowMacroInstructions() const VIXL_OVERRIDE {
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000450 return allow_macro_instructions_;
451 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100452
453 void FinalizeCode() {
454 EmitLiteralPool(kNoBranchRequired);
455 Assembler::FinalizeCode();
456 }
457
458 RegisterList* GetScratchRegisterList() { return &available_; }
459 VRegisterList* GetScratchVRegisterList() { return &available_vfp_; }
460
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000461 // Given an address calculation (Register + immediate), generate code to
462 // partially compute the address. The returned MemOperand will perform any
463 // remaining computation in a subsequent load or store instruction.
464 //
465 // TODO: Improve the handling of negative offsets. They are not implemented
466 // precisely for now because they only have a marginal benefit for the
467 // existing uses (in delegates).
468 MemOperand MemOperandComputationHelper(Condition cond,
469 Register scratch,
470 Register base,
471 uint32_t offset,
472 uint32_t extra_offset_mask = 0);
473
474 MemOperand MemOperandComputationHelper(Register scratch,
475 Register base,
476 uint32_t offset,
477 uint32_t extra_offset_mask = 0) {
478 return MemOperandComputationHelper(al,
479 scratch,
480 base,
481 offset,
482 extra_offset_mask);
483 }
484 MemOperand MemOperandComputationHelper(Condition cond,
485 Register scratch,
486 Label* label,
487 uint32_t extra_offset_mask = 0) {
488 // Check for buffer space _before_ calculating the offset, in case we
489 // generate a pool that affects the offset calculation.
490 CodeBufferCheckScope scope(this, 3 * kMaxInstructionSizeInBytes);
491 Label::Offset offset =
492 label->GetLocation() -
493 AlignDown(GetCursorOffset() + GetArchitectureStatePCOffset(), 4);
494 return MemOperandComputationHelper(cond,
495 scratch,
496 pc,
497 offset,
498 extra_offset_mask);
499 }
500 MemOperand MemOperandComputationHelper(Register scratch,
501 Label* label,
502 uint32_t extra_offset_mask = 0) {
503 return MemOperandComputationHelper(al, scratch, label, extra_offset_mask);
504 }
505
506 // Determine the appropriate mask to pass into MemOperandComputationHelper.
507 uint32_t GetOffsetMask(InstructionType type, AddrMode addrmode);
508
Alexandre Ramesd3832962016-07-04 15:03:43 +0100509 // State and type helpers.
510 bool IsModifiedImmediate(uint32_t imm) {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100511 return (IsUsingT32() && ImmediateT32(imm).IsValid()) ||
Alexandre Ramesd3832962016-07-04 15:03:43 +0100512 ImmediateA32(imm).IsValid();
513 }
514
515 void Bind(Label* label) {
516 VIXL_ASSERT(allow_macro_instructions_);
Vincent Belliardf8833fa2016-11-08 15:01:57 -0800517 PadToMinimumBranchRange(label);
Vincent Belliarde42218c2016-10-19 13:24:28 -0700518 BindHelper(label);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100519 }
520
521 void AddBranchLabel(Label* label) {
522 if (label->IsBound()) return;
523 veneer_pool_manager_.AddLabel(label);
524 }
525
526 void Place(RawLiteral* literal) {
527 VIXL_ASSERT(allow_macro_instructions_);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700528 VIXL_ASSERT(literal->IsManuallyPlaced());
Alexandre Ramesfd7a00d2016-11-09 14:38:04 +0000529 // We have two calls to `GetBuffer()->Align()` below, that aligns on word
530 // (4 bytes) boundaries. Only one is taken into account in
531 // `GetAlignedSize()`.
532 static const size_t kMaxAlignSize = 3;
533 size_t size = literal->GetAlignedSize() + kMaxAlignSize;
534 VIXL_ASSERT(IsUint32(size));
535 // TODO: We should use a scope here to check the size of data emitted. We
536 // currently cannot because `aarch32::CodeBufferCheckScope` currently checks
537 // for pools, so that could lead to an infinite loop.
538 EnsureEmitFor(static_cast<uint32_t>(size));
539 // Literals must be emitted aligned on word (4 bytes) boundaries.
540 GetBuffer()->Align();
Vincent Belliarde42218c2016-10-19 13:24:28 -0700541 PlaceHelper(literal);
542 GetBuffer()->Align();
Alexandre Ramesd3832962016-07-04 15:03:43 +0100543 }
544
545 void ComputeCheckpoint();
546
Vincent Belliarddcffac42016-10-19 11:31:20 -0700547 int32_t GetMarginBeforeVeneerEmission() const {
548 return veneer_pool_manager_.GetCheckpoint() - GetCursorOffset();
549 }
550
Alexandre Rames0eb25b02016-11-22 16:35:55 +0000551 int32_t GetMarginBeforeLiteralEmission() const {
Vincent Belliarddcffac42016-10-19 11:31:20 -0700552 return literal_pool_manager_.GetCheckpoint() - GetCursorOffset();
553 }
554
Alexandre Rames4e6b4af2016-11-08 16:04:55 +0000555 bool VeneerPoolIsEmpty() const { return veneer_pool_manager_.IsEmpty(); }
556 bool LiteralPoolIsEmpty() const { return literal_pool_manager_.IsEmpty(); }
Vincent Belliarddcffac42016-10-19 11:31:20 -0700557
Alexandre Ramesd3832962016-07-04 15:03:43 +0100558 void EnsureEmitFor(uint32_t size) {
Alexandre Ramesfd7a00d2016-11-09 14:38:04 +0000559 Label::Offset target = GetCursorOffset() + size;
Vincent Belliard40b7e472016-11-09 09:46:30 -0800560 if (target <= checkpoint_) return;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100561 PerformEnsureEmit(target, size);
562 }
563
564 bool IsInsertTooFar(RawLiteral* literal, uint32_t where) {
565 return literal_pool_manager_.IsInsertTooFar(literal, where);
566 }
567
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000568 bool AliasesAvailableScratchRegister(Register reg) {
569 return GetScratchRegisterList()->Includes(reg);
570 }
571
Vincent Belliardadbb4a72016-11-22 14:24:54 -0800572 bool AliasesAvailableScratchRegister(RegisterOrAPSR_nzcv reg) {
573 if (reg.IsAPSR_nzcv()) return false;
574 return GetScratchRegisterList()->Includes(reg.AsRegister());
575 }
576
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000577 bool AliasesAvailableScratchRegister(VRegister reg) {
578 return GetScratchVRegisterList()->IncludesAliasOf(reg);
579 }
580
581 bool AliasesAvailableScratchRegister(const Operand& operand) {
582 if (operand.IsImmediate()) return false;
583 return AliasesAvailableScratchRegister(operand.GetBaseRegister()) ||
584 (operand.IsRegisterShiftedRegister() &&
585 AliasesAvailableScratchRegister(operand.GetShiftRegister()));
586 }
587
588 bool AliasesAvailableScratchRegister(const NeonOperand& operand) {
589 if (operand.IsImmediate()) return false;
590 return AliasesAvailableScratchRegister(operand.GetRegister());
591 }
592
593 bool AliasesAvailableScratchRegister(SRegisterList list) {
594 for (int n = 0; n < list.GetLength(); n++) {
595 if (AliasesAvailableScratchRegister(list.GetSRegister(n))) return true;
596 }
597 return false;
598 }
599
600 bool AliasesAvailableScratchRegister(DRegisterList list) {
601 for (int n = 0; n < list.GetLength(); n++) {
602 if (AliasesAvailableScratchRegister(list.GetDRegister(n))) return true;
603 }
604 return false;
605 }
606
607 bool AliasesAvailableScratchRegister(NeonRegisterList list) {
608 for (int n = 0; n < list.GetLength(); n++) {
609 if (AliasesAvailableScratchRegister(list.GetDRegister(n))) return true;
610 }
611 return false;
612 }
613
614 bool AliasesAvailableScratchRegister(RegisterList list) {
615 return GetScratchRegisterList()->Overlaps(list);
616 }
617
618 bool AliasesAvailableScratchRegister(const MemOperand& operand) {
619 return AliasesAvailableScratchRegister(operand.GetBaseRegister()) ||
620 (operand.IsShiftedRegister() &&
621 AliasesAvailableScratchRegister(operand.GetOffsetRegister()));
622 }
623
Alexandre Ramesd3832962016-07-04 15:03:43 +0100624 // Emit the literal pool in the code buffer.
625 // Every literal is placed on a 32bit boundary
626 // All the literals in the pool will be removed from the pool and potentially
627 // delete'd.
Alexandre Rames1661f512016-10-31 09:43:20 +0000628 void EmitLiteralPool(LiteralPool* const literal_pool, EmitOption option);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100629 void EmitLiteralPool(EmitOption option = kBranchRequired) {
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000630 VIXL_ASSERT(!literal_pool_manager_.IsBlocked());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100631 EmitLiteralPool(literal_pool_manager_.GetLiteralPool(), option);
632 literal_pool_manager_.ResetCheckpoint();
633 ComputeCheckpoint();
634 }
635
Pierre Langloisf5348ce2016-09-22 11:15:35 +0100636 size_t GetLiteralPoolSize() const {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100637 return literal_pool_manager_.GetLiteralPoolSize();
638 }
639
Pierre Langlois25e39872016-10-20 17:14:21 +0100640 // Adr with a literal already constructed. Add the literal to the pool if it
641 // is not already done.
642 void Adr(Condition cond, Register rd, RawLiteral* literal) {
643 EmitLiteralCondRL<&Assembler::adr> emit_helper(cond, rd);
644 GenerateInstruction(emit_helper, literal);
645 }
646 void Adr(Register rd, RawLiteral* literal) { Adr(al, rd, literal); }
647
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700648 // Loads with literals already constructed. Add the literal to the pool
649 // if it is not already done.
650 void Ldr(Condition cond, Register rt, RawLiteral* literal) {
651 EmitLiteralCondRL<&Assembler::ldr> emit_helper(cond, rt);
652 GenerateInstruction(emit_helper, literal);
653 }
654 void Ldr(Register rt, RawLiteral* literal) { Ldr(al, rt, literal); }
655
656 void Ldrb(Condition cond, Register rt, RawLiteral* literal) {
657 EmitLiteralCondRL<&Assembler::ldrb> emit_helper(cond, rt);
658 GenerateInstruction(emit_helper, literal);
659 }
660 void Ldrb(Register rt, RawLiteral* literal) { Ldrb(al, rt, literal); }
661
662 void Ldrd(Condition cond, Register rt, Register rt2, RawLiteral* literal) {
663 EmitLiteralCondRRL<&Assembler::ldrd> emit_helper(cond, rt, rt2);
664 GenerateInstruction(emit_helper, literal);
665 }
666 void Ldrd(Register rt, Register rt2, RawLiteral* literal) {
667 Ldrd(al, rt, rt2, literal);
668 }
669
670 void Ldrh(Condition cond, Register rt, RawLiteral* literal) {
671 EmitLiteralCondRL<&Assembler::ldrh> emit_helper(cond, rt);
672 GenerateInstruction(emit_helper, literal);
673 }
674 void Ldrh(Register rt, RawLiteral* literal) { Ldrh(al, rt, literal); }
675
676 void Ldrsb(Condition cond, Register rt, RawLiteral* literal) {
677 EmitLiteralCondRL<&Assembler::ldrsb> emit_helper(cond, rt);
678 GenerateInstruction(emit_helper, literal);
679 }
680 void Ldrsb(Register rt, RawLiteral* literal) { Ldrsb(al, rt, literal); }
681
682 void Ldrsh(Condition cond, Register rt, RawLiteral* literal) {
683 EmitLiteralCondRL<&Assembler::ldrsh> emit_helper(cond, rt);
684 GenerateInstruction(emit_helper, literal);
685 }
686 void Ldrsh(Register rt, RawLiteral* literal) { Ldrsh(al, rt, literal); }
687
688 void Vldr(Condition cond, DataType dt, DRegister rd, RawLiteral* literal) {
689 EmitLiteralCondDtDL<&Assembler::vldr> emit_helper(cond, dt, rd);
690 GenerateInstruction(emit_helper, literal);
691 }
692 void Vldr(DataType dt, DRegister rd, RawLiteral* literal) {
693 Vldr(al, dt, rd, literal);
694 }
695 void Vldr(Condition cond, DRegister rd, RawLiteral* literal) {
696 Vldr(cond, Untyped64, rd, literal);
697 }
698 void Vldr(DRegister rd, RawLiteral* literal) {
699 Vldr(al, Untyped64, rd, literal);
700 }
701
702 void Vldr(Condition cond, DataType dt, SRegister rd, RawLiteral* literal) {
703 EmitLiteralCondDtSL<&Assembler::vldr> emit_helper(cond, dt, rd);
704 GenerateInstruction(emit_helper, literal);
705 }
706 void Vldr(DataType dt, SRegister rd, RawLiteral* literal) {
707 Vldr(al, dt, rd, literal);
708 }
709 void Vldr(Condition cond, SRegister rd, RawLiteral* literal) {
710 Vldr(cond, Untyped32, rd, literal);
711 }
712 void Vldr(SRegister rd, RawLiteral* literal) {
713 Vldr(al, Untyped32, rd, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100714 }
715
716 // Generic Ldr(register, data)
717 void Ldr(Condition cond, Register rt, uint32_t v) {
718 RawLiteral* literal =
719 new Literal<uint32_t>(v, RawLiteral::kDeletedOnPlacementByPool);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100720 EmitLiteralCondRL<&Assembler::ldr> emit_helper(cond, rt);
721 GenerateInstruction(emit_helper, literal);
722 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100723 template <typename T>
724 void Ldr(Register rt, T v) {
725 Ldr(al, rt, v);
726 }
727
728 // Generic Ldrd(rt, rt2, data)
729 void Ldrd(Condition cond, Register rt, Register rt2, uint64_t v) {
730 RawLiteral* literal =
731 new Literal<uint64_t>(v, RawLiteral::kDeletedOnPlacementByPool);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100732 EmitLiteralCondRRL<&Assembler::ldrd> emit_helper(cond, rt, rt2);
733 GenerateInstruction(emit_helper, literal);
734 }
735 template <typename T>
736 void Ldrd(Register rt, Register rt2, T v) {
737 Ldrd(al, rt, rt2, v);
738 }
739
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700740 void Vldr(Condition cond, SRegister rd, float v) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100741 RawLiteral* literal =
742 new Literal<float>(v, RawLiteral::kDeletedOnPlacementByPool);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700743 EmitLiteralCondDtSL<&Assembler::vldr> emit_helper(cond, Untyped32, rd);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100744 GenerateInstruction(emit_helper, literal);
745 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700746 void Vldr(SRegister rd, float v) { Vldr(al, rd, v); }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100747
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700748 void Vldr(Condition cond, DRegister rd, double v) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100749 RawLiteral* literal =
750 new Literal<double>(v, RawLiteral::kDeletedOnPlacementByPool);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700751 EmitLiteralCondDtDL<&Assembler::vldr> emit_helper(cond, Untyped64, rd);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100752 GenerateInstruction(emit_helper, literal);
753 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700754 void Vldr(DRegister rd, double v) { Vldr(al, rd, v); }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100755
756 void Vmov(Condition cond, DRegister rt, double v) { Vmov(cond, F64, rt, v); }
757 void Vmov(DRegister rt, double v) { Vmov(al, F64, rt, v); }
758 void Vmov(Condition cond, SRegister rt, float v) { Vmov(cond, F32, rt, v); }
759 void Vmov(SRegister rt, float v) { Vmov(al, F32, rt, v); }
760
761 void Switch(Register reg, JumpTableBase* table);
Vincent Belliard8885c172016-08-24 11:33:19 -0700762 void GenerateSwitchTable(JumpTableBase* table, int table_size);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100763 void Case(JumpTableBase* table, int case_index);
764 void Break(JumpTableBase* table);
765 void Default(JumpTableBase* table);
766 void EndSwitch(JumpTableBase* table);
767
Alexandre Ramesad91cee2016-07-26 09:31:34 +0100768 // Claim memory on the stack.
769 // Note that the Claim, Drop, and Peek helpers below ensure that offsets used
770 // are multiples of 32 bits to help maintain 32-bit SP alignment.
771 // We could `Align{Up,Down}(size, 4)`, but that's potentially problematic:
Alexandre Ramesd3832962016-07-04 15:03:43 +0100772 // Claim(3)
773 // Claim(1)
774 // Drop(4)
775 // would seem correct, when in fact:
776 // Claim(3) -> sp = sp - 4
Alexandre Ramesad91cee2016-07-26 09:31:34 +0100777 // Claim(1) -> sp = sp - 4
Alexandre Ramesd3832962016-07-04 15:03:43 +0100778 // Drop(4) -> sp = sp + 4
779 //
780 void Claim(int32_t size) {
781 if (size == 0) return;
782 // The stack must be kept 32bit aligned.
783 VIXL_ASSERT((size > 0) && ((size % 4) == 0));
784 Sub(sp, sp, size);
785 }
786 // Release memory on the stack
787 void Drop(int32_t size) {
788 if (size == 0) return;
789 // The stack must be kept 32bit aligned.
790 VIXL_ASSERT((size > 0) && ((size % 4) == 0));
791 Add(sp, sp, size);
792 }
793 void Peek(Register dst, int32_t offset) {
794 VIXL_ASSERT((offset >= 0) && ((offset % 4) == 0));
795 Ldr(dst, MemOperand(sp, offset));
796 }
797 void Poke(Register src, int32_t offset) {
798 VIXL_ASSERT((offset >= 0) && ((offset % 4) == 0));
799 Str(src, MemOperand(sp, offset));
800 }
801 void Printf(const char* format,
802 CPURegister reg1 = NoReg,
803 CPURegister reg2 = NoReg,
804 CPURegister reg3 = NoReg,
805 CPURegister reg4 = NoReg);
806 // Functions used by Printf for generation.
807 void PushRegister(CPURegister reg);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100808 void PreparePrintfArgument(CPURegister reg,
809 int* core_count,
810 int* vfp_count,
811 uint32_t* printf_type);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100812 // Handlers for cases not handled by the assembler.
813 virtual void Delegate(InstructionType type,
814 InstructionCondROp instruction,
815 Condition cond,
816 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000817 const Operand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100818 virtual void Delegate(InstructionType type,
819 InstructionCondSizeROp instruction,
820 Condition cond,
821 EncodingSize size,
822 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000823 const Operand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100824 virtual void Delegate(InstructionType type,
825 InstructionCondRROp instruction,
826 Condition cond,
827 Register rd,
828 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000829 const Operand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100830 virtual void Delegate(InstructionType type,
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000831 InstructionCondSizeRL instruction,
832 Condition cond,
833 EncodingSize size,
834 Register rd,
835 Label* label) VIXL_OVERRIDE;
836 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100837 InstructionCondSizeRROp instruction,
838 Condition cond,
839 EncodingSize size,
840 Register rd,
841 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000842 const Operand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100843 virtual void Delegate(InstructionType type,
844 InstructionRL instruction,
845 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000846 Label* label) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100847 virtual void Delegate(InstructionType type,
848 InstructionCondDtSSop instruction,
849 Condition cond,
850 DataType dt,
851 SRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000852 const SOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100853 virtual void Delegate(InstructionType type,
854 InstructionCondDtDDop instruction,
855 Condition cond,
856 DataType dt,
857 DRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000858 const DOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100859 virtual void Delegate(InstructionType type,
860 InstructionCondDtQQop instruction,
861 Condition cond,
862 DataType dt,
863 QRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000864 const QOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100865 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100866 InstructionCondSizeRMop instruction,
867 Condition cond,
868 EncodingSize size,
869 Register rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000870 const MemOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100871 virtual void Delegate(InstructionType type,
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000872 InstructionCondRL instruction,
873 Condition cond,
874 Register rt,
875 Label* label) VIXL_OVERRIDE;
876 virtual void Delegate(InstructionType type,
877 InstructionCondRRL instruction,
878 Condition cond,
879 Register rt,
880 Register rt2,
881 Label* label) VIXL_OVERRIDE;
882 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100883 InstructionCondRRMop instruction,
884 Condition cond,
885 Register rt,
886 Register rt2,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000887 const MemOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100888 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100889 InstructionCondDtSMop instruction,
890 Condition cond,
891 DataType dt,
892 SRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000893 const MemOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100894 virtual void Delegate(InstructionType type,
895 InstructionCondDtDMop instruction,
896 Condition cond,
897 DataType dt,
898 DRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000899 const MemOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100900 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100901 InstructionCondMsrOp instruction,
902 Condition cond,
903 MaskedSpecialRegister spec_reg,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000904 const Operand& operand) VIXL_OVERRIDE;
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000905 virtual void Delegate(InstructionType type,
906 InstructionCondDtDL instruction,
907 Condition cond,
908 DataType dt,
909 DRegister rd,
910 Label* label) VIXL_OVERRIDE;
911 virtual void Delegate(InstructionType type,
912 InstructionCondDtSL instruction,
913 Condition cond,
914 DataType dt,
915 SRegister rd,
916 Label* label) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100917
918 // Start of generated code.
919
920 void Adc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000921 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
922 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
923 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +0100924 VIXL_ASSERT(allow_macro_instructions_);
925 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000926 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100927 bool can_use_it =
928 // ADC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
929 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) &&
930 operand.GetBaseRegister().IsLow();
931 ITScope it_scope(this, &cond, can_use_it);
932 adc(cond, rd, rn, operand);
933 }
934 void Adc(Register rd, Register rn, const Operand& operand) {
935 Adc(al, rd, rn, operand);
936 }
Vincent Belliard934696d2016-08-18 11:03:56 -0700937 void Adc(FlagsUpdate flags,
938 Condition cond,
939 Register rd,
940 Register rn,
941 const Operand& operand) {
942 switch (flags) {
943 case LeaveFlags:
944 Adc(cond, rd, rn, operand);
945 break;
946 case SetFlags:
947 Adcs(cond, rd, rn, operand);
948 break;
949 case DontCare:
950 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
951 rn.Is(rd) && operand.IsPlainRegister() &&
952 operand.GetBaseRegister().IsLow();
953 if (can_be_16bit_encoded) {
954 Adcs(cond, rd, rn, operand);
955 } else {
956 Adc(cond, rd, rn, operand);
957 }
958 break;
959 }
960 }
961 void Adc(FlagsUpdate flags,
962 Register rd,
963 Register rn,
964 const Operand& operand) {
965 Adc(flags, al, rd, rn, operand);
966 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100967
968 void Adcs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000969 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
970 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
971 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +0100972 VIXL_ASSERT(allow_macro_instructions_);
973 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000974 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100975 ITScope it_scope(this, &cond);
976 adcs(cond, rd, rn, operand);
977 }
978 void Adcs(Register rd, Register rn, const Operand& operand) {
979 Adcs(al, rd, rn, operand);
980 }
981
982 void Add(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000983 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
984 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
985 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +0100986 VIXL_ASSERT(allow_macro_instructions_);
987 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000988 MacroEmissionCheckScope guard(this);
Alexandre Rames628c5262016-09-21 11:52:30 +0100989 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
990 uint32_t immediate = operand.GetImmediate();
991 if (immediate == 0) {
992 return;
993 }
994 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100995 bool can_use_it =
996 // ADD<c>{<q>} <Rd>, <Rn>, #<imm3> ; T1
997 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() &&
998 rd.IsLow()) ||
999 // ADD<c>{<q>} {<Rdn>,} <Rdn>, #<imm8> ; T2
1000 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
1001 rd.IsLow() && rn.Is(rd)) ||
1002 // ADD{<c>}{<q>} <Rd>, SP, #<imm8> ; T1
1003 (operand.IsImmediate() && (operand.GetImmediate() <= 508) &&
1004 ((operand.GetImmediate() & 0x3) == 0) && rd.IsLow() && rn.IsSP()) ||
1005 // ADD<c>{<q>} <Rd>, <Rn>, <Rm>
1006 (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
1007 operand.GetBaseRegister().IsLow()) ||
1008 // ADD<c>{<q>} <Rdn>, <Rm> ; T2
1009 (operand.IsPlainRegister() && !rd.IsPC() && rn.Is(rd) &&
1010 !operand.GetBaseRegister().IsSP() &&
1011 !operand.GetBaseRegister().IsPC()) ||
1012 // ADD{<c>}{<q>} {<Rdm>,} SP, <Rdm> ; T1
1013 (operand.IsPlainRegister() && !rd.IsPC() && rn.IsSP() &&
1014 operand.GetBaseRegister().Is(rd));
1015 ITScope it_scope(this, &cond, can_use_it);
1016 add(cond, rd, rn, operand);
1017 }
1018 void Add(Register rd, Register rn, const Operand& operand) {
1019 Add(al, rd, rn, operand);
1020 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001021 void Add(FlagsUpdate flags,
1022 Condition cond,
1023 Register rd,
1024 Register rn,
1025 const Operand& operand) {
1026 switch (flags) {
1027 case LeaveFlags:
1028 Add(cond, rd, rn, operand);
1029 break;
1030 case SetFlags:
1031 Adds(cond, rd, rn, operand);
1032 break;
1033 case DontCare:
1034 bool can_be_16bit_encoded =
1035 IsUsingT32() && cond.Is(al) &&
1036 ((operand.IsPlainRegister() &&
1037 ((rd.IsLow() && rn.IsLow() &&
1038 operand.GetBaseRegister().IsLow()) ||
1039 rd.Is(rn))) ||
1040 (operand.IsImmediate() &&
1041 ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) ||
1042 (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256)))));
1043 if (can_be_16bit_encoded) {
1044 Adds(cond, rd, rn, operand);
1045 } else {
1046 Add(cond, rd, rn, operand);
1047 }
1048 break;
1049 }
1050 }
1051 void Add(FlagsUpdate flags,
1052 Register rd,
1053 Register rn,
1054 const Operand& operand) {
1055 Add(flags, al, rd, rn, operand);
1056 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001057
1058 void Adds(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001059 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1060 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1061 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001062 VIXL_ASSERT(allow_macro_instructions_);
1063 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001064 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001065 ITScope it_scope(this, &cond);
1066 adds(cond, rd, rn, operand);
1067 }
1068 void Adds(Register rd, Register rn, const Operand& operand) {
1069 Adds(al, rd, rn, operand);
1070 }
1071
Alexandre Ramesd3832962016-07-04 15:03:43 +01001072 void Adr(Condition cond, Register rd, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001073 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001074 VIXL_ASSERT(allow_macro_instructions_);
1075 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001076 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001077 ITScope it_scope(this, &cond);
1078 adr(cond, rd, label);
1079 }
1080 void Adr(Register rd, Label* label) { Adr(al, rd, label); }
1081
1082 void And(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001083 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1084 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1085 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001086 VIXL_ASSERT(allow_macro_instructions_);
1087 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001088 MacroEmissionCheckScope guard(this);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001089 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001090 uint32_t immediate = operand.GetImmediate();
1091 if (immediate == 0) {
1092 mov(rd, 0);
1093 return;
1094 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001095 if ((immediate == 0xffffffff) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001096 return;
1097 }
1098 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001099 bool can_use_it =
1100 // AND<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1101 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1102 operand.GetBaseRegister().IsLow();
1103 ITScope it_scope(this, &cond, can_use_it);
1104 and_(cond, rd, rn, operand);
1105 }
1106 void And(Register rd, Register rn, const Operand& operand) {
1107 And(al, rd, rn, operand);
1108 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001109 void And(FlagsUpdate flags,
1110 Condition cond,
1111 Register rd,
1112 Register rn,
1113 const Operand& operand) {
1114 switch (flags) {
1115 case LeaveFlags:
1116 And(cond, rd, rn, operand);
1117 break;
1118 case SetFlags:
1119 Ands(cond, rd, rn, operand);
1120 break;
1121 case DontCare:
1122 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1123 rn.Is(rd) && operand.IsPlainRegister() &&
1124 operand.GetBaseRegister().IsLow();
1125 if (can_be_16bit_encoded) {
1126 Ands(cond, rd, rn, operand);
1127 } else {
1128 And(cond, rd, rn, operand);
1129 }
1130 break;
1131 }
1132 }
1133 void And(FlagsUpdate flags,
1134 Register rd,
1135 Register rn,
1136 const Operand& operand) {
1137 And(flags, al, rd, rn, operand);
1138 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001139
1140 void Ands(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001141 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1142 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1143 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001144 VIXL_ASSERT(allow_macro_instructions_);
1145 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001146 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001147 ITScope it_scope(this, &cond);
1148 ands(cond, rd, rn, operand);
1149 }
1150 void Ands(Register rd, Register rn, const Operand& operand) {
1151 Ands(al, rd, rn, operand);
1152 }
1153
1154 void Asr(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001155 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1156 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
1157 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001158 VIXL_ASSERT(allow_macro_instructions_);
1159 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001160 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001161 bool can_use_it =
1162 // ASR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
1163 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
1164 (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) ||
1165 // ASR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
1166 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
1167 operand.GetBaseRegister().IsLow());
1168 ITScope it_scope(this, &cond, can_use_it);
1169 asr(cond, rd, rm, operand);
1170 }
1171 void Asr(Register rd, Register rm, const Operand& operand) {
1172 Asr(al, rd, rm, operand);
1173 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001174 void Asr(FlagsUpdate flags,
1175 Condition cond,
1176 Register rd,
1177 Register rm,
1178 const Operand& operand) {
1179 switch (flags) {
1180 case LeaveFlags:
1181 Asr(cond, rd, rm, operand);
1182 break;
1183 case SetFlags:
1184 Asrs(cond, rd, rm, operand);
1185 break;
1186 case DontCare:
1187 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1188 rm.IsLow() && operand.IsImmediate() &&
1189 (operand.GetImmediate() < 32);
1190 if (can_be_16bit_encoded) {
1191 Asrs(cond, rd, rm, operand);
1192 } else {
1193 Asr(cond, rd, rm, operand);
1194 }
1195 break;
1196 }
1197 }
1198 void Asr(FlagsUpdate flags,
1199 Register rd,
1200 Register rm,
1201 const Operand& operand) {
1202 Asr(flags, al, rd, rm, operand);
1203 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001204
1205 void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001206 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1207 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
1208 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001209 VIXL_ASSERT(allow_macro_instructions_);
1210 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001211 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001212 ITScope it_scope(this, &cond);
1213 asrs(cond, rd, rm, operand);
1214 }
1215 void Asrs(Register rd, Register rm, const Operand& operand) {
1216 Asrs(al, rd, rm, operand);
1217 }
1218
1219 void B(Condition cond, Label* label) {
1220 VIXL_ASSERT(allow_macro_instructions_);
1221 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001222 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001223 b(cond, label);
1224 AddBranchLabel(label);
1225 }
1226 void B(Label* label) { B(al, label); }
1227
1228 void Bfc(Condition cond, Register rd, uint32_t lsb, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001229 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1230 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001231 VIXL_ASSERT(allow_macro_instructions_);
1232 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001233 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001234 ITScope it_scope(this, &cond);
1235 bfc(cond, rd, lsb, operand);
1236 }
1237 void Bfc(Register rd, uint32_t lsb, const Operand& operand) {
1238 Bfc(al, rd, lsb, operand);
1239 }
1240
1241 void Bfi(Condition cond,
1242 Register rd,
1243 Register rn,
1244 uint32_t lsb,
1245 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001246 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1247 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1248 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001249 VIXL_ASSERT(allow_macro_instructions_);
1250 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001251 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001252 ITScope it_scope(this, &cond);
1253 bfi(cond, rd, rn, lsb, operand);
1254 }
1255 void Bfi(Register rd, Register rn, uint32_t lsb, const Operand& operand) {
1256 Bfi(al, rd, rn, lsb, operand);
1257 }
1258
1259 void Bic(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001260 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1261 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1262 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001263 VIXL_ASSERT(allow_macro_instructions_);
1264 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001265 MacroEmissionCheckScope guard(this);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001266 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001267 uint32_t immediate = operand.GetImmediate();
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001268 if ((immediate == 0) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001269 return;
1270 }
1271 if (immediate == 0xffffffff) {
1272 mov(rd, 0);
1273 return;
1274 }
1275 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001276 bool can_use_it =
1277 // BIC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1278 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1279 operand.GetBaseRegister().IsLow();
1280 ITScope it_scope(this, &cond, can_use_it);
1281 bic(cond, rd, rn, operand);
1282 }
1283 void Bic(Register rd, Register rn, const Operand& operand) {
1284 Bic(al, rd, rn, operand);
1285 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001286 void Bic(FlagsUpdate flags,
1287 Condition cond,
1288 Register rd,
1289 Register rn,
1290 const Operand& operand) {
1291 switch (flags) {
1292 case LeaveFlags:
1293 Bic(cond, rd, rn, operand);
1294 break;
1295 case SetFlags:
1296 Bics(cond, rd, rn, operand);
1297 break;
1298 case DontCare:
1299 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1300 rn.Is(rd) && operand.IsPlainRegister() &&
1301 operand.GetBaseRegister().IsLow();
1302 if (can_be_16bit_encoded) {
1303 Bics(cond, rd, rn, operand);
1304 } else {
1305 Bic(cond, rd, rn, operand);
1306 }
1307 break;
1308 }
1309 }
1310 void Bic(FlagsUpdate flags,
1311 Register rd,
1312 Register rn,
1313 const Operand& operand) {
1314 Bic(flags, al, rd, rn, operand);
1315 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001316
1317 void Bics(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001318 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1319 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1320 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001321 VIXL_ASSERT(allow_macro_instructions_);
1322 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001323 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001324 ITScope it_scope(this, &cond);
1325 bics(cond, rd, rn, operand);
1326 }
1327 void Bics(Register rd, Register rn, const Operand& operand) {
1328 Bics(al, rd, rn, operand);
1329 }
1330
1331 void Bkpt(Condition cond, uint32_t imm) {
1332 VIXL_ASSERT(allow_macro_instructions_);
1333 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001334 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001335 ITScope it_scope(this, &cond);
1336 bkpt(cond, imm);
1337 }
1338 void Bkpt(uint32_t imm) { Bkpt(al, imm); }
1339
1340 void Bl(Condition cond, Label* label) {
1341 VIXL_ASSERT(allow_macro_instructions_);
1342 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001343 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001344 ITScope it_scope(this, &cond);
1345 bl(cond, label);
1346 AddBranchLabel(label);
1347 }
1348 void Bl(Label* label) { Bl(al, label); }
1349
1350 void Blx(Condition cond, Label* label) {
1351 VIXL_ASSERT(allow_macro_instructions_);
1352 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001353 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001354 ITScope it_scope(this, &cond);
1355 blx(cond, label);
1356 AddBranchLabel(label);
1357 }
1358 void Blx(Label* label) { Blx(al, label); }
1359
1360 void Blx(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001361 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001362 VIXL_ASSERT(allow_macro_instructions_);
1363 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001364 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001365 bool can_use_it =
1366 // BLX{<c>}{<q>} <Rm> ; T1
1367 !rm.IsPC();
1368 ITScope it_scope(this, &cond, can_use_it);
1369 blx(cond, rm);
1370 }
1371 void Blx(Register rm) { Blx(al, rm); }
1372
1373 void Bx(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001374 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001375 VIXL_ASSERT(allow_macro_instructions_);
1376 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001377 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001378 bool can_use_it =
1379 // BX{<c>}{<q>} <Rm> ; T1
1380 !rm.IsPC();
1381 ITScope it_scope(this, &cond, can_use_it);
1382 bx(cond, rm);
1383 }
1384 void Bx(Register rm) { Bx(al, rm); }
1385
1386 void Bxj(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001387 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001388 VIXL_ASSERT(allow_macro_instructions_);
1389 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001390 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001391 ITScope it_scope(this, &cond);
1392 bxj(cond, rm);
1393 }
1394 void Bxj(Register rm) { Bxj(al, rm); }
1395
1396 void Cbnz(Register rn, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001397 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001398 VIXL_ASSERT(allow_macro_instructions_);
1399 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001400 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001401 cbnz(rn, label);
1402 AddBranchLabel(label);
1403 }
1404
1405 void Cbz(Register rn, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001406 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001407 VIXL_ASSERT(allow_macro_instructions_);
1408 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001409 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001410 cbz(rn, label);
1411 AddBranchLabel(label);
1412 }
1413
1414 void Clrex(Condition cond) {
1415 VIXL_ASSERT(allow_macro_instructions_);
1416 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001417 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001418 ITScope it_scope(this, &cond);
1419 clrex(cond);
1420 }
1421 void Clrex() { Clrex(al); }
1422
1423 void Clz(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001424 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1425 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001426 VIXL_ASSERT(allow_macro_instructions_);
1427 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001428 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001429 ITScope it_scope(this, &cond);
1430 clz(cond, rd, rm);
1431 }
1432 void Clz(Register rd, Register rm) { Clz(al, rd, rm); }
1433
1434 void Cmn(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001435 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1436 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001437 VIXL_ASSERT(allow_macro_instructions_);
1438 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001439 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001440 bool can_use_it =
1441 // CMN{<c>}{<q>} <Rn>, <Rm> ; T1
1442 operand.IsPlainRegister() && rn.IsLow() &&
1443 operand.GetBaseRegister().IsLow();
1444 ITScope it_scope(this, &cond, can_use_it);
1445 cmn(cond, rn, operand);
1446 }
1447 void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); }
1448
1449 void Cmp(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001450 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1451 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001452 VIXL_ASSERT(allow_macro_instructions_);
1453 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001454 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001455 bool can_use_it =
1456 // CMP{<c>}{<q>} <Rn>, #<imm8> ; T1
1457 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
1458 rn.IsLow()) ||
1459 // CMP{<c>}{<q>} <Rn>, <Rm> ; T1 T2
1460 (operand.IsPlainRegister() && !rn.IsPC() &&
1461 !operand.GetBaseRegister().IsPC());
1462 ITScope it_scope(this, &cond, can_use_it);
1463 cmp(cond, rn, operand);
1464 }
1465 void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); }
1466
1467 void Crc32b(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001468 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1469 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1470 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001471 VIXL_ASSERT(allow_macro_instructions_);
1472 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001473 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001474 ITScope it_scope(this, &cond);
1475 crc32b(cond, rd, rn, rm);
1476 }
1477 void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); }
1478
1479 void Crc32cb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001480 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1481 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1482 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001483 VIXL_ASSERT(allow_macro_instructions_);
1484 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001485 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001486 ITScope it_scope(this, &cond);
1487 crc32cb(cond, rd, rn, rm);
1488 }
1489 void Crc32cb(Register rd, Register rn, Register rm) {
1490 Crc32cb(al, rd, rn, rm);
1491 }
1492
1493 void Crc32ch(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001494 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1495 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1496 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001497 VIXL_ASSERT(allow_macro_instructions_);
1498 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001499 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001500 ITScope it_scope(this, &cond);
1501 crc32ch(cond, rd, rn, rm);
1502 }
1503 void Crc32ch(Register rd, Register rn, Register rm) {
1504 Crc32ch(al, rd, rn, rm);
1505 }
1506
1507 void Crc32cw(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001508 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1509 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1510 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001511 VIXL_ASSERT(allow_macro_instructions_);
1512 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001513 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001514 ITScope it_scope(this, &cond);
1515 crc32cw(cond, rd, rn, rm);
1516 }
1517 void Crc32cw(Register rd, Register rn, Register rm) {
1518 Crc32cw(al, rd, rn, rm);
1519 }
1520
1521 void Crc32h(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001522 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1523 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1524 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001525 VIXL_ASSERT(allow_macro_instructions_);
1526 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001527 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001528 ITScope it_scope(this, &cond);
1529 crc32h(cond, rd, rn, rm);
1530 }
1531 void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); }
1532
1533 void Crc32w(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001534 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1535 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1536 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001537 VIXL_ASSERT(allow_macro_instructions_);
1538 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001539 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001540 ITScope it_scope(this, &cond);
1541 crc32w(cond, rd, rn, rm);
1542 }
1543 void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); }
1544
1545 void Dmb(Condition cond, MemoryBarrier option) {
1546 VIXL_ASSERT(allow_macro_instructions_);
1547 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001548 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001549 ITScope it_scope(this, &cond);
1550 dmb(cond, option);
1551 }
1552 void Dmb(MemoryBarrier option) { Dmb(al, option); }
1553
1554 void Dsb(Condition cond, MemoryBarrier option) {
1555 VIXL_ASSERT(allow_macro_instructions_);
1556 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001557 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001558 ITScope it_scope(this, &cond);
1559 dsb(cond, option);
1560 }
1561 void Dsb(MemoryBarrier option) { Dsb(al, option); }
1562
1563 void Eor(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001564 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1565 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1566 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001567 VIXL_ASSERT(allow_macro_instructions_);
1568 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001569 MacroEmissionCheckScope guard(this);
Alexandre Rames628c5262016-09-21 11:52:30 +01001570 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
1571 uint32_t immediate = operand.GetImmediate();
1572 if (immediate == 0) {
1573 return;
1574 }
1575 if (immediate == 0xffffffff) {
1576 mvn(rd, rn);
1577 return;
1578 }
1579 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001580 bool can_use_it =
1581 // EOR<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1582 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1583 operand.GetBaseRegister().IsLow();
1584 ITScope it_scope(this, &cond, can_use_it);
1585 eor(cond, rd, rn, operand);
1586 }
1587 void Eor(Register rd, Register rn, const Operand& operand) {
1588 Eor(al, rd, rn, operand);
1589 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001590 void Eor(FlagsUpdate flags,
1591 Condition cond,
1592 Register rd,
1593 Register rn,
1594 const Operand& operand) {
1595 switch (flags) {
1596 case LeaveFlags:
1597 Eor(cond, rd, rn, operand);
1598 break;
1599 case SetFlags:
1600 Eors(cond, rd, rn, operand);
1601 break;
1602 case DontCare:
1603 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1604 rn.Is(rd) && operand.IsPlainRegister() &&
1605 operand.GetBaseRegister().IsLow();
1606 if (can_be_16bit_encoded) {
1607 Eors(cond, rd, rn, operand);
1608 } else {
1609 Eor(cond, rd, rn, operand);
1610 }
1611 break;
1612 }
1613 }
1614 void Eor(FlagsUpdate flags,
1615 Register rd,
1616 Register rn,
1617 const Operand& operand) {
1618 Eor(flags, al, rd, rn, operand);
1619 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001620
1621 void Eors(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001622 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1623 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1624 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001625 VIXL_ASSERT(allow_macro_instructions_);
1626 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001627 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001628 ITScope it_scope(this, &cond);
1629 eors(cond, rd, rn, operand);
1630 }
1631 void Eors(Register rd, Register rn, const Operand& operand) {
1632 Eors(al, rd, rn, operand);
1633 }
1634
1635 void Fldmdbx(Condition cond,
1636 Register rn,
1637 WriteBack write_back,
1638 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001639 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1640 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001641 VIXL_ASSERT(allow_macro_instructions_);
1642 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001643 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001644 ITScope it_scope(this, &cond);
1645 fldmdbx(cond, rn, write_back, dreglist);
1646 }
1647 void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) {
1648 Fldmdbx(al, rn, write_back, dreglist);
1649 }
1650
1651 void Fldmiax(Condition cond,
1652 Register rn,
1653 WriteBack write_back,
1654 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001655 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1656 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001657 VIXL_ASSERT(allow_macro_instructions_);
1658 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001659 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001660 ITScope it_scope(this, &cond);
1661 fldmiax(cond, rn, write_back, dreglist);
1662 }
1663 void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) {
1664 Fldmiax(al, rn, write_back, dreglist);
1665 }
1666
1667 void Fstmdbx(Condition cond,
1668 Register rn,
1669 WriteBack write_back,
1670 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001671 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1672 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001673 VIXL_ASSERT(allow_macro_instructions_);
1674 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001675 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001676 ITScope it_scope(this, &cond);
1677 fstmdbx(cond, rn, write_back, dreglist);
1678 }
1679 void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) {
1680 Fstmdbx(al, rn, write_back, dreglist);
1681 }
1682
1683 void Fstmiax(Condition cond,
1684 Register rn,
1685 WriteBack write_back,
1686 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001687 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1688 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001689 VIXL_ASSERT(allow_macro_instructions_);
1690 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001691 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001692 ITScope it_scope(this, &cond);
1693 fstmiax(cond, rn, write_back, dreglist);
1694 }
1695 void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) {
1696 Fstmiax(al, rn, write_back, dreglist);
1697 }
1698
1699 void Hlt(Condition cond, uint32_t imm) {
1700 VIXL_ASSERT(allow_macro_instructions_);
1701 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001702 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001703 ITScope it_scope(this, &cond);
1704 hlt(cond, imm);
1705 }
1706 void Hlt(uint32_t imm) { Hlt(al, imm); }
1707
1708 void Hvc(Condition cond, uint32_t imm) {
1709 VIXL_ASSERT(allow_macro_instructions_);
1710 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001711 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001712 ITScope it_scope(this, &cond);
1713 hvc(cond, imm);
1714 }
1715 void Hvc(uint32_t imm) { Hvc(al, imm); }
1716
1717 void Isb(Condition cond, MemoryBarrier option) {
1718 VIXL_ASSERT(allow_macro_instructions_);
1719 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001720 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001721 ITScope it_scope(this, &cond);
1722 isb(cond, option);
1723 }
1724 void Isb(MemoryBarrier option) { Isb(al, option); }
1725
Alexandre Rames628c5262016-09-21 11:52:30 +01001726
Alexandre Ramesd3832962016-07-04 15:03:43 +01001727 void Lda(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001728 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1729 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001730 VIXL_ASSERT(allow_macro_instructions_);
1731 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001732 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001733 ITScope it_scope(this, &cond);
1734 lda(cond, rt, operand);
1735 }
1736 void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); }
1737
1738 void Ldab(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001739 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1740 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001741 VIXL_ASSERT(allow_macro_instructions_);
1742 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001743 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001744 ITScope it_scope(this, &cond);
1745 ldab(cond, rt, operand);
1746 }
1747 void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); }
1748
1749 void Ldaex(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001750 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1751 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001752 VIXL_ASSERT(allow_macro_instructions_);
1753 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001754 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001755 ITScope it_scope(this, &cond);
1756 ldaex(cond, rt, operand);
1757 }
1758 void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); }
1759
1760 void Ldaexb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001761 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1762 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001763 VIXL_ASSERT(allow_macro_instructions_);
1764 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001765 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001766 ITScope it_scope(this, &cond);
1767 ldaexb(cond, rt, operand);
1768 }
1769 void Ldaexb(Register rt, const MemOperand& operand) {
1770 Ldaexb(al, rt, operand);
1771 }
1772
1773 void Ldaexd(Condition cond,
1774 Register rt,
1775 Register rt2,
1776 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001777 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1778 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
1779 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001780 VIXL_ASSERT(allow_macro_instructions_);
1781 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001782 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001783 ITScope it_scope(this, &cond);
1784 ldaexd(cond, rt, rt2, operand);
1785 }
1786 void Ldaexd(Register rt, Register rt2, const MemOperand& operand) {
1787 Ldaexd(al, rt, rt2, operand);
1788 }
1789
1790 void Ldaexh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001791 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1792 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001793 VIXL_ASSERT(allow_macro_instructions_);
1794 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001795 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001796 ITScope it_scope(this, &cond);
1797 ldaexh(cond, rt, operand);
1798 }
1799 void Ldaexh(Register rt, const MemOperand& operand) {
1800 Ldaexh(al, rt, operand);
1801 }
1802
1803 void Ldah(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001804 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1805 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001806 VIXL_ASSERT(allow_macro_instructions_);
1807 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001808 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001809 ITScope it_scope(this, &cond);
1810 ldah(cond, rt, operand);
1811 }
1812 void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); }
1813
1814 void Ldm(Condition cond,
1815 Register rn,
1816 WriteBack write_back,
1817 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001818 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1819 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001820 VIXL_ASSERT(allow_macro_instructions_);
1821 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001822 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001823 ITScope it_scope(this, &cond);
1824 ldm(cond, rn, write_back, registers);
1825 }
1826 void Ldm(Register rn, WriteBack write_back, RegisterList registers) {
1827 Ldm(al, rn, write_back, registers);
1828 }
1829
1830 void Ldmda(Condition cond,
1831 Register rn,
1832 WriteBack write_back,
1833 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001834 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1835 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001836 VIXL_ASSERT(allow_macro_instructions_);
1837 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001838 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001839 ITScope it_scope(this, &cond);
1840 ldmda(cond, rn, write_back, registers);
1841 }
1842 void Ldmda(Register rn, WriteBack write_back, RegisterList registers) {
1843 Ldmda(al, rn, write_back, registers);
1844 }
1845
1846 void Ldmdb(Condition cond,
1847 Register rn,
1848 WriteBack write_back,
1849 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001850 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1851 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001852 VIXL_ASSERT(allow_macro_instructions_);
1853 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001854 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001855 ITScope it_scope(this, &cond);
1856 ldmdb(cond, rn, write_back, registers);
1857 }
1858 void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) {
1859 Ldmdb(al, rn, write_back, registers);
1860 }
1861
1862 void Ldmea(Condition cond,
1863 Register rn,
1864 WriteBack write_back,
1865 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001866 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1867 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001868 VIXL_ASSERT(allow_macro_instructions_);
1869 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001870 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001871 ITScope it_scope(this, &cond);
1872 ldmea(cond, rn, write_back, registers);
1873 }
1874 void Ldmea(Register rn, WriteBack write_back, RegisterList registers) {
1875 Ldmea(al, rn, write_back, registers);
1876 }
1877
1878 void Ldmed(Condition cond,
1879 Register rn,
1880 WriteBack write_back,
1881 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001882 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1883 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001884 VIXL_ASSERT(allow_macro_instructions_);
1885 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001886 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001887 ITScope it_scope(this, &cond);
1888 ldmed(cond, rn, write_back, registers);
1889 }
1890 void Ldmed(Register rn, WriteBack write_back, RegisterList registers) {
1891 Ldmed(al, rn, write_back, registers);
1892 }
1893
1894 void Ldmfa(Condition cond,
1895 Register rn,
1896 WriteBack write_back,
1897 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001898 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1899 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001900 VIXL_ASSERT(allow_macro_instructions_);
1901 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001902 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001903 ITScope it_scope(this, &cond);
1904 ldmfa(cond, rn, write_back, registers);
1905 }
1906 void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) {
1907 Ldmfa(al, rn, write_back, registers);
1908 }
1909
1910 void Ldmfd(Condition cond,
1911 Register rn,
1912 WriteBack write_back,
1913 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001914 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1915 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001916 VIXL_ASSERT(allow_macro_instructions_);
1917 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001918 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001919 ITScope it_scope(this, &cond);
1920 ldmfd(cond, rn, write_back, registers);
1921 }
1922 void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) {
1923 Ldmfd(al, rn, write_back, registers);
1924 }
1925
1926 void Ldmib(Condition cond,
1927 Register rn,
1928 WriteBack write_back,
1929 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001930 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1931 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001932 VIXL_ASSERT(allow_macro_instructions_);
1933 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001934 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001935 ITScope it_scope(this, &cond);
1936 ldmib(cond, rn, write_back, registers);
1937 }
1938 void Ldmib(Register rn, WriteBack write_back, RegisterList registers) {
1939 Ldmib(al, rn, write_back, registers);
1940 }
1941
1942 void Ldr(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001943 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1944 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001945 VIXL_ASSERT(allow_macro_instructions_);
1946 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001947 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001948 bool can_use_it =
1949 // LDR{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
1950 (operand.IsImmediate() && rt.IsLow() &&
1951 operand.GetBaseRegister().IsLow() &&
1952 operand.IsOffsetImmediateWithinRange(0, 124, 4) &&
1953 (operand.GetAddrMode() == Offset)) ||
1954 // LDR{<c>}{<q>} <Rt>, [SP{, #{+}<imm>}] ; T2
1955 (operand.IsImmediate() && rt.IsLow() &&
1956 operand.GetBaseRegister().IsSP() &&
1957 operand.IsOffsetImmediateWithinRange(0, 1020, 4) &&
1958 (operand.GetAddrMode() == Offset)) ||
1959 // LDR{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
1960 (operand.IsPlainRegister() && rt.IsLow() &&
1961 operand.GetBaseRegister().IsLow() &&
1962 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
1963 (operand.GetAddrMode() == Offset));
1964 ITScope it_scope(this, &cond, can_use_it);
1965 ldr(cond, rt, operand);
1966 }
1967 void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); }
1968
1969 void Ldr(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001970 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001971 VIXL_ASSERT(allow_macro_instructions_);
1972 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001973 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001974 ITScope it_scope(this, &cond);
1975 ldr(cond, rt, label);
1976 }
1977 void Ldr(Register rt, Label* label) { Ldr(al, rt, label); }
1978
1979 void Ldrb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001980 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1981 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001982 VIXL_ASSERT(allow_macro_instructions_);
1983 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001984 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001985 bool can_use_it =
1986 // LDRB{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
1987 (operand.IsImmediate() && rt.IsLow() &&
1988 operand.GetBaseRegister().IsLow() &&
1989 operand.IsOffsetImmediateWithinRange(0, 31) &&
1990 (operand.GetAddrMode() == Offset)) ||
1991 // LDRB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
1992 (operand.IsPlainRegister() && rt.IsLow() &&
1993 operand.GetBaseRegister().IsLow() &&
1994 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
1995 (operand.GetAddrMode() == Offset));
1996 ITScope it_scope(this, &cond, can_use_it);
1997 ldrb(cond, rt, operand);
1998 }
1999 void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); }
2000
2001 void Ldrb(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002002 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002003 VIXL_ASSERT(allow_macro_instructions_);
2004 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002005 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002006 ITScope it_scope(this, &cond);
2007 ldrb(cond, rt, label);
2008 }
2009 void Ldrb(Register rt, Label* label) { Ldrb(al, rt, label); }
2010
2011 void Ldrd(Condition cond,
2012 Register rt,
2013 Register rt2,
2014 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002015 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2016 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
2017 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002018 VIXL_ASSERT(allow_macro_instructions_);
2019 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002020 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002021 ITScope it_scope(this, &cond);
2022 ldrd(cond, rt, rt2, operand);
2023 }
2024 void Ldrd(Register rt, Register rt2, const MemOperand& operand) {
2025 Ldrd(al, rt, rt2, operand);
2026 }
2027
2028 void Ldrd(Condition cond, Register rt, Register rt2, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002029 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2030 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002031 VIXL_ASSERT(allow_macro_instructions_);
2032 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002033 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002034 ITScope it_scope(this, &cond);
2035 ldrd(cond, rt, rt2, label);
2036 }
2037 void Ldrd(Register rt, Register rt2, Label* label) {
2038 Ldrd(al, rt, rt2, label);
2039 }
2040
2041 void Ldrex(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002042 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2043 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002044 VIXL_ASSERT(allow_macro_instructions_);
2045 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002046 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002047 ITScope it_scope(this, &cond);
2048 ldrex(cond, rt, operand);
2049 }
2050 void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); }
2051
2052 void Ldrexb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002053 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2054 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002055 VIXL_ASSERT(allow_macro_instructions_);
2056 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002057 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002058 ITScope it_scope(this, &cond);
2059 ldrexb(cond, rt, operand);
2060 }
2061 void Ldrexb(Register rt, const MemOperand& operand) {
2062 Ldrexb(al, rt, operand);
2063 }
2064
2065 void Ldrexd(Condition cond,
2066 Register rt,
2067 Register rt2,
2068 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002069 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2070 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
2071 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002072 VIXL_ASSERT(allow_macro_instructions_);
2073 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002074 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002075 ITScope it_scope(this, &cond);
2076 ldrexd(cond, rt, rt2, operand);
2077 }
2078 void Ldrexd(Register rt, Register rt2, const MemOperand& operand) {
2079 Ldrexd(al, rt, rt2, operand);
2080 }
2081
2082 void Ldrexh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002083 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2084 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002085 VIXL_ASSERT(allow_macro_instructions_);
2086 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002087 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002088 ITScope it_scope(this, &cond);
2089 ldrexh(cond, rt, operand);
2090 }
2091 void Ldrexh(Register rt, const MemOperand& operand) {
2092 Ldrexh(al, rt, operand);
2093 }
2094
2095 void Ldrh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002096 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2097 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002098 VIXL_ASSERT(allow_macro_instructions_);
2099 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002100 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002101 bool can_use_it =
2102 // LDRH{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
2103 (operand.IsImmediate() && rt.IsLow() &&
2104 operand.GetBaseRegister().IsLow() &&
2105 operand.IsOffsetImmediateWithinRange(0, 62, 2) &&
2106 (operand.GetAddrMode() == Offset)) ||
2107 // LDRH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2108 (operand.IsPlainRegister() && rt.IsLow() &&
2109 operand.GetBaseRegister().IsLow() &&
2110 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2111 (operand.GetAddrMode() == Offset));
2112 ITScope it_scope(this, &cond, can_use_it);
2113 ldrh(cond, rt, operand);
2114 }
2115 void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); }
2116
2117 void Ldrh(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002118 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002119 VIXL_ASSERT(allow_macro_instructions_);
2120 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002121 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002122 ITScope it_scope(this, &cond);
2123 ldrh(cond, rt, label);
2124 }
2125 void Ldrh(Register rt, Label* label) { Ldrh(al, rt, label); }
2126
2127 void Ldrsb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002128 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2129 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002130 VIXL_ASSERT(allow_macro_instructions_);
2131 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002132 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002133 bool can_use_it =
2134 // LDRSB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2135 operand.IsPlainRegister() && rt.IsLow() &&
2136 operand.GetBaseRegister().IsLow() &&
2137 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2138 (operand.GetAddrMode() == Offset);
2139 ITScope it_scope(this, &cond, can_use_it);
2140 ldrsb(cond, rt, operand);
2141 }
2142 void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); }
2143
2144 void Ldrsb(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002145 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002146 VIXL_ASSERT(allow_macro_instructions_);
2147 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002148 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002149 ITScope it_scope(this, &cond);
2150 ldrsb(cond, rt, label);
2151 }
2152 void Ldrsb(Register rt, Label* label) { Ldrsb(al, rt, label); }
2153
2154 void Ldrsh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002155 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2156 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002157 VIXL_ASSERT(allow_macro_instructions_);
2158 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002159 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002160 bool can_use_it =
2161 // LDRSH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2162 operand.IsPlainRegister() && rt.IsLow() &&
2163 operand.GetBaseRegister().IsLow() &&
2164 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2165 (operand.GetAddrMode() == Offset);
2166 ITScope it_scope(this, &cond, can_use_it);
2167 ldrsh(cond, rt, operand);
2168 }
2169 void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); }
2170
2171 void Ldrsh(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002172 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002173 VIXL_ASSERT(allow_macro_instructions_);
2174 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002175 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002176 ITScope it_scope(this, &cond);
2177 ldrsh(cond, rt, label);
2178 }
2179 void Ldrsh(Register rt, Label* label) { Ldrsh(al, rt, label); }
2180
2181 void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002182 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2183 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2184 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002185 VIXL_ASSERT(allow_macro_instructions_);
2186 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002187 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002188 bool can_use_it =
2189 // LSL<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
2190 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2191 (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) ||
2192 // LSL<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
2193 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
2194 operand.GetBaseRegister().IsLow());
2195 ITScope it_scope(this, &cond, can_use_it);
2196 lsl(cond, rd, rm, operand);
2197 }
2198 void Lsl(Register rd, Register rm, const Operand& operand) {
2199 Lsl(al, rd, rm, operand);
2200 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002201 void Lsl(FlagsUpdate flags,
2202 Condition cond,
2203 Register rd,
2204 Register rm,
2205 const Operand& operand) {
2206 switch (flags) {
2207 case LeaveFlags:
2208 Lsl(cond, rd, rm, operand);
2209 break;
2210 case SetFlags:
2211 Lsls(cond, rd, rm, operand);
2212 break;
2213 case DontCare:
2214 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2215 rm.IsLow() && operand.IsImmediate() &&
2216 (operand.GetImmediate() < 32) &&
2217 (operand.GetImmediate() != 0);
2218 if (can_be_16bit_encoded) {
2219 Lsls(cond, rd, rm, operand);
2220 } else {
2221 Lsl(cond, rd, rm, operand);
2222 }
2223 break;
2224 }
2225 }
2226 void Lsl(FlagsUpdate flags,
2227 Register rd,
2228 Register rm,
2229 const Operand& operand) {
2230 Lsl(flags, al, rd, rm, operand);
2231 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002232
2233 void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002234 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2235 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2236 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002237 VIXL_ASSERT(allow_macro_instructions_);
2238 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002239 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002240 ITScope it_scope(this, &cond);
2241 lsls(cond, rd, rm, operand);
2242 }
2243 void Lsls(Register rd, Register rm, const Operand& operand) {
2244 Lsls(al, rd, rm, operand);
2245 }
2246
2247 void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002248 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2249 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2250 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002251 VIXL_ASSERT(allow_macro_instructions_);
2252 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002253 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002254 bool can_use_it =
2255 // LSR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
2256 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2257 (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) ||
2258 // LSR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
2259 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
2260 operand.GetBaseRegister().IsLow());
2261 ITScope it_scope(this, &cond, can_use_it);
2262 lsr(cond, rd, rm, operand);
2263 }
2264 void Lsr(Register rd, Register rm, const Operand& operand) {
2265 Lsr(al, rd, rm, operand);
2266 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002267 void Lsr(FlagsUpdate flags,
2268 Condition cond,
2269 Register rd,
2270 Register rm,
2271 const Operand& operand) {
2272 switch (flags) {
2273 case LeaveFlags:
2274 Lsr(cond, rd, rm, operand);
2275 break;
2276 case SetFlags:
2277 Lsrs(cond, rd, rm, operand);
2278 break;
2279 case DontCare:
2280 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2281 rm.IsLow() && operand.IsImmediate() &&
2282 (operand.GetImmediate() < 32);
2283 if (can_be_16bit_encoded) {
2284 Lsrs(cond, rd, rm, operand);
2285 } else {
2286 Lsr(cond, rd, rm, operand);
2287 }
2288 break;
2289 }
2290 }
2291 void Lsr(FlagsUpdate flags,
2292 Register rd,
2293 Register rm,
2294 const Operand& operand) {
2295 Lsr(flags, al, rd, rm, operand);
2296 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002297
2298 void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002299 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2300 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2301 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002302 VIXL_ASSERT(allow_macro_instructions_);
2303 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002304 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002305 ITScope it_scope(this, &cond);
2306 lsrs(cond, rd, rm, operand);
2307 }
2308 void Lsrs(Register rd, Register rm, const Operand& operand) {
2309 Lsrs(al, rd, rm, operand);
2310 }
2311
2312 void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002313 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2314 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2315 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2316 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002317 VIXL_ASSERT(allow_macro_instructions_);
2318 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002319 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002320 ITScope it_scope(this, &cond);
2321 mla(cond, rd, rn, rm, ra);
2322 }
2323 void Mla(Register rd, Register rn, Register rm, Register ra) {
2324 Mla(al, rd, rn, rm, ra);
2325 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002326 void Mla(FlagsUpdate flags,
2327 Condition cond,
2328 Register rd,
2329 Register rn,
2330 Register rm,
2331 Register ra) {
2332 switch (flags) {
2333 case LeaveFlags:
2334 Mla(cond, rd, rn, rm, ra);
2335 break;
2336 case SetFlags:
2337 Mlas(cond, rd, rn, rm, ra);
2338 break;
2339 case DontCare:
2340 Mla(cond, rd, rn, rm, ra);
2341 break;
2342 }
2343 }
2344 void Mla(
2345 FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) {
2346 Mla(flags, al, rd, rn, rm, ra);
2347 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002348
2349 void Mlas(
2350 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002351 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2352 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2353 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2354 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002355 VIXL_ASSERT(allow_macro_instructions_);
2356 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002357 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002358 ITScope it_scope(this, &cond);
2359 mlas(cond, rd, rn, rm, ra);
2360 }
2361 void Mlas(Register rd, Register rn, Register rm, Register ra) {
2362 Mlas(al, rd, rn, rm, ra);
2363 }
2364
2365 void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002366 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2367 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2368 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2369 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002370 VIXL_ASSERT(allow_macro_instructions_);
2371 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002372 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002373 ITScope it_scope(this, &cond);
2374 mls(cond, rd, rn, rm, ra);
2375 }
2376 void Mls(Register rd, Register rn, Register rm, Register ra) {
2377 Mls(al, rd, rn, rm, ra);
2378 }
2379
2380 void Mov(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002381 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2382 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002383 VIXL_ASSERT(allow_macro_instructions_);
2384 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002385 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002386 bool can_use_it =
2387 // MOV<c>{<q>} <Rd>, #<imm8> ; T1
2388 (operand.IsImmediate() && rd.IsLow() &&
2389 (operand.GetImmediate() <= 255)) ||
2390 // MOV{<c>}{<q>} <Rd>, <Rm> ; T1
2391 (operand.IsPlainRegister() && !rd.IsPC() &&
2392 !operand.GetBaseRegister().IsPC()) ||
2393 // MOV<c>{<q>} <Rd>, <Rm> {, <shift> #<amount>} ; T2
2394 (operand.IsImmediateShiftedRegister() && rd.IsLow() &&
2395 operand.GetBaseRegister().IsLow() &&
2396 (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) ||
2397 operand.GetShift().Is(ASR))) ||
2398 // MOV<c>{<q>} <Rdm>, <Rdm>, LSL <Rs> ; T1
2399 // MOV<c>{<q>} <Rdm>, <Rdm>, LSR <Rs> ; T1
2400 // MOV<c>{<q>} <Rdm>, <Rdm>, ASR <Rs> ; T1
2401 // MOV<c>{<q>} <Rdm>, <Rdm>, ROR <Rs> ; T1
2402 (operand.IsRegisterShiftedRegister() &&
2403 rd.Is(operand.GetBaseRegister()) && rd.IsLow() &&
2404 (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) ||
2405 operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) &&
2406 operand.GetShiftRegister().IsLow());
2407 ITScope it_scope(this, &cond, can_use_it);
2408 mov(cond, rd, operand);
2409 }
2410 void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002411 void Mov(FlagsUpdate flags,
2412 Condition cond,
2413 Register rd,
2414 const Operand& operand) {
2415 switch (flags) {
2416 case LeaveFlags:
2417 Mov(cond, rd, operand);
2418 break;
2419 case SetFlags:
2420 Movs(cond, rd, operand);
2421 break;
2422 case DontCare:
2423 bool can_be_16bit_encoded =
2424 IsUsingT32() && cond.Is(al) &&
2425 ((operand.IsImmediateShiftedRegister() && rd.IsLow() &&
2426 operand.GetBaseRegister().IsLow() &&
2427 (operand.GetShiftAmount() < 32) &&
2428 (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() ||
2429 operand.GetShift().IsASR())) ||
2430 (operand.IsRegisterShiftedRegister() && rd.IsLow() &&
2431 operand.GetBaseRegister().Is(rd) &&
2432 operand.GetShiftRegister().IsLow() &&
2433 (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() ||
2434 operand.GetShift().IsASR() || operand.GetShift().IsROR())) ||
2435 (operand.IsImmediate() && rd.IsLow() &&
2436 (operand.GetImmediate() < 256)));
2437 if (can_be_16bit_encoded) {
2438 Movs(cond, rd, operand);
2439 } else {
2440 Mov(cond, rd, operand);
2441 }
2442 break;
2443 }
2444 }
2445 void Mov(FlagsUpdate flags, Register rd, const Operand& operand) {
2446 Mov(flags, al, rd, operand);
2447 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002448
2449 void Movs(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002450 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2451 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002452 VIXL_ASSERT(allow_macro_instructions_);
2453 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002454 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002455 ITScope it_scope(this, &cond);
2456 movs(cond, rd, operand);
2457 }
2458 void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); }
2459
2460 void Movt(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002461 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2462 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002463 VIXL_ASSERT(allow_macro_instructions_);
2464 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002465 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002466 ITScope it_scope(this, &cond);
2467 movt(cond, rd, operand);
2468 }
2469 void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); }
2470
Alexandre Ramesd3832962016-07-04 15:03:43 +01002471 void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002472 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002473 VIXL_ASSERT(allow_macro_instructions_);
2474 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002475 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002476 ITScope it_scope(this, &cond);
2477 mrs(cond, rd, spec_reg);
2478 }
2479 void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); }
2480
2481 void Msr(Condition cond,
2482 MaskedSpecialRegister spec_reg,
2483 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002484 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002485 VIXL_ASSERT(allow_macro_instructions_);
2486 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002487 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002488 ITScope it_scope(this, &cond);
2489 msr(cond, spec_reg, operand);
2490 }
2491 void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) {
2492 Msr(al, spec_reg, operand);
2493 }
2494
2495 void Mul(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002496 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2497 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2498 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002499 VIXL_ASSERT(allow_macro_instructions_);
2500 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002501 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002502 bool can_use_it =
2503 // MUL<c>{<q>} <Rdm>, <Rn>{, <Rdm>} ; T1
2504 rd.Is(rm) && rn.IsLow() && rm.IsLow();
2505 ITScope it_scope(this, &cond, can_use_it);
2506 mul(cond, rd, rn, rm);
2507 }
2508 void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002509 void Mul(FlagsUpdate flags,
2510 Condition cond,
2511 Register rd,
2512 Register rn,
2513 Register rm) {
2514 switch (flags) {
2515 case LeaveFlags:
2516 Mul(cond, rd, rn, rm);
2517 break;
2518 case SetFlags:
2519 Muls(cond, rd, rn, rm);
2520 break;
2521 case DontCare:
2522 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2523 rn.IsLow() && rm.Is(rd);
2524 if (can_be_16bit_encoded) {
2525 Muls(cond, rd, rn, rm);
2526 } else {
2527 Mul(cond, rd, rn, rm);
2528 }
2529 break;
2530 }
2531 }
2532 void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) {
2533 Mul(flags, al, rd, rn, rm);
2534 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002535
2536 void Muls(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002537 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2538 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2539 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002540 VIXL_ASSERT(allow_macro_instructions_);
2541 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002542 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002543 ITScope it_scope(this, &cond);
2544 muls(cond, rd, rn, rm);
2545 }
2546 void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); }
2547
2548 void Mvn(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002549 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2550 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002551 VIXL_ASSERT(allow_macro_instructions_);
2552 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002553 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002554 bool can_use_it =
2555 // MVN<c>{<q>} <Rd>, <Rm> ; T1
2556 operand.IsPlainRegister() && rd.IsLow() &&
2557 operand.GetBaseRegister().IsLow();
2558 ITScope it_scope(this, &cond, can_use_it);
2559 mvn(cond, rd, operand);
2560 }
2561 void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002562 void Mvn(FlagsUpdate flags,
2563 Condition cond,
2564 Register rd,
2565 const Operand& operand) {
2566 switch (flags) {
2567 case LeaveFlags:
2568 Mvn(cond, rd, operand);
2569 break;
2570 case SetFlags:
2571 Mvns(cond, rd, operand);
2572 break;
2573 case DontCare:
2574 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2575 operand.IsPlainRegister() &&
2576 operand.GetBaseRegister().IsLow();
2577 if (can_be_16bit_encoded) {
2578 Mvns(cond, rd, operand);
2579 } else {
2580 Mvn(cond, rd, operand);
2581 }
2582 break;
2583 }
2584 }
2585 void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) {
2586 Mvn(flags, al, rd, operand);
2587 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002588
2589 void Mvns(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002590 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2591 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002592 VIXL_ASSERT(allow_macro_instructions_);
2593 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002594 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002595 ITScope it_scope(this, &cond);
2596 mvns(cond, rd, operand);
2597 }
2598 void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); }
2599
2600 void Nop(Condition cond) {
2601 VIXL_ASSERT(allow_macro_instructions_);
2602 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002603 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002604 ITScope it_scope(this, &cond);
2605 nop(cond);
2606 }
2607 void Nop() { Nop(al); }
2608
2609 void Orn(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002610 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2611 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2612 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002613 VIXL_ASSERT(allow_macro_instructions_);
2614 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002615 MacroEmissionCheckScope guard(this);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002616 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002617 uint32_t immediate = operand.GetImmediate();
2618 if (immediate == 0) {
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002619 mvn(rd, 0);
Alexandre Rames628c5262016-09-21 11:52:30 +01002620 return;
2621 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002622 if ((immediate == 0xffffffff) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002623 return;
2624 }
2625 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002626 ITScope it_scope(this, &cond);
2627 orn(cond, rd, rn, operand);
2628 }
2629 void Orn(Register rd, Register rn, const Operand& operand) {
2630 Orn(al, rd, rn, operand);
2631 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002632 void Orn(FlagsUpdate flags,
2633 Condition cond,
2634 Register rd,
2635 Register rn,
2636 const Operand& operand) {
2637 switch (flags) {
2638 case LeaveFlags:
2639 Orn(cond, rd, rn, operand);
2640 break;
2641 case SetFlags:
2642 Orns(cond, rd, rn, operand);
2643 break;
2644 case DontCare:
2645 Orn(cond, rd, rn, operand);
2646 break;
2647 }
2648 }
2649 void Orn(FlagsUpdate flags,
2650 Register rd,
2651 Register rn,
2652 const Operand& operand) {
2653 Orn(flags, al, rd, rn, operand);
2654 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002655
2656 void Orns(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002657 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2658 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2659 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002660 VIXL_ASSERT(allow_macro_instructions_);
2661 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002662 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002663 ITScope it_scope(this, &cond);
2664 orns(cond, rd, rn, operand);
2665 }
2666 void Orns(Register rd, Register rn, const Operand& operand) {
2667 Orns(al, rd, rn, operand);
2668 }
2669
2670 void Orr(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002671 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2672 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2673 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002674 VIXL_ASSERT(allow_macro_instructions_);
2675 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002676 MacroEmissionCheckScope guard(this);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002677 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002678 uint32_t immediate = operand.GetImmediate();
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002679 if ((immediate == 0) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002680 return;
2681 }
2682 if (immediate == 0xffffffff) {
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002683 mvn(rd, 0);
Alexandre Rames628c5262016-09-21 11:52:30 +01002684 return;
2685 }
2686 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002687 bool can_use_it =
2688 // ORR<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
2689 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
2690 operand.GetBaseRegister().IsLow();
2691 ITScope it_scope(this, &cond, can_use_it);
2692 orr(cond, rd, rn, operand);
2693 }
2694 void Orr(Register rd, Register rn, const Operand& operand) {
2695 Orr(al, rd, rn, operand);
2696 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002697 void Orr(FlagsUpdate flags,
2698 Condition cond,
2699 Register rd,
2700 Register rn,
2701 const Operand& operand) {
2702 switch (flags) {
2703 case LeaveFlags:
2704 Orr(cond, rd, rn, operand);
2705 break;
2706 case SetFlags:
2707 Orrs(cond, rd, rn, operand);
2708 break;
2709 case DontCare:
2710 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2711 rn.Is(rd) && operand.IsPlainRegister() &&
2712 operand.GetBaseRegister().IsLow();
2713 if (can_be_16bit_encoded) {
2714 Orrs(cond, rd, rn, operand);
2715 } else {
2716 Orr(cond, rd, rn, operand);
2717 }
2718 break;
2719 }
2720 }
2721 void Orr(FlagsUpdate flags,
2722 Register rd,
2723 Register rn,
2724 const Operand& operand) {
2725 Orr(flags, al, rd, rn, operand);
2726 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002727
2728 void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002729 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2730 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2731 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002732 VIXL_ASSERT(allow_macro_instructions_);
2733 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002734 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002735 ITScope it_scope(this, &cond);
2736 orrs(cond, rd, rn, operand);
2737 }
2738 void Orrs(Register rd, Register rn, const Operand& operand) {
2739 Orrs(al, rd, rn, operand);
2740 }
2741
2742 void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002743 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2744 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2745 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002746 VIXL_ASSERT(allow_macro_instructions_);
2747 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002748 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002749 ITScope it_scope(this, &cond);
2750 pkhbt(cond, rd, rn, operand);
2751 }
2752 void Pkhbt(Register rd, Register rn, const Operand& operand) {
2753 Pkhbt(al, rd, rn, operand);
2754 }
2755
2756 void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002757 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2758 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2759 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002760 VIXL_ASSERT(allow_macro_instructions_);
2761 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002762 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002763 ITScope it_scope(this, &cond);
2764 pkhtb(cond, rd, rn, operand);
2765 }
2766 void Pkhtb(Register rd, Register rn, const Operand& operand) {
2767 Pkhtb(al, rd, rn, operand);
2768 }
2769
2770 void Pld(Condition cond, Label* label) {
2771 VIXL_ASSERT(allow_macro_instructions_);
2772 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002773 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002774 ITScope it_scope(this, &cond);
2775 pld(cond, label);
2776 }
2777 void Pld(Label* label) { Pld(al, label); }
2778
2779 void Pld(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002780 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002781 VIXL_ASSERT(allow_macro_instructions_);
2782 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002783 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002784 ITScope it_scope(this, &cond);
2785 pld(cond, operand);
2786 }
2787 void Pld(const MemOperand& operand) { Pld(al, operand); }
2788
2789 void Pldw(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002790 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002791 VIXL_ASSERT(allow_macro_instructions_);
2792 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002793 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002794 ITScope it_scope(this, &cond);
2795 pldw(cond, operand);
2796 }
2797 void Pldw(const MemOperand& operand) { Pldw(al, operand); }
2798
2799 void Pli(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002800 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002801 VIXL_ASSERT(allow_macro_instructions_);
2802 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002803 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002804 ITScope it_scope(this, &cond);
2805 pli(cond, operand);
2806 }
2807 void Pli(const MemOperand& operand) { Pli(al, operand); }
2808
2809 void Pli(Condition cond, Label* label) {
2810 VIXL_ASSERT(allow_macro_instructions_);
2811 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002812 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002813 ITScope it_scope(this, &cond);
2814 pli(cond, label);
2815 }
2816 void Pli(Label* label) { Pli(al, label); }
2817
2818 void Pop(Condition cond, RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002819 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002820 VIXL_ASSERT(allow_macro_instructions_);
2821 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002822 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002823 ITScope it_scope(this, &cond);
2824 pop(cond, registers);
2825 }
2826 void Pop(RegisterList registers) { Pop(al, registers); }
2827
2828 void Pop(Condition cond, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002829 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002830 VIXL_ASSERT(allow_macro_instructions_);
2831 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002832 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002833 ITScope it_scope(this, &cond);
2834 pop(cond, rt);
2835 }
2836 void Pop(Register rt) { Pop(al, rt); }
2837
2838 void Push(Condition cond, RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002839 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002840 VIXL_ASSERT(allow_macro_instructions_);
2841 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002842 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002843 ITScope it_scope(this, &cond);
2844 push(cond, registers);
2845 }
2846 void Push(RegisterList registers) { Push(al, registers); }
2847
2848 void Push(Condition cond, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002849 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002850 VIXL_ASSERT(allow_macro_instructions_);
2851 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002852 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002853 ITScope it_scope(this, &cond);
2854 push(cond, rt);
2855 }
2856 void Push(Register rt) { Push(al, rt); }
2857
2858 void Qadd(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002859 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2860 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2861 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002862 VIXL_ASSERT(allow_macro_instructions_);
2863 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002864 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002865 ITScope it_scope(this, &cond);
2866 qadd(cond, rd, rm, rn);
2867 }
2868 void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); }
2869
2870 void Qadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002871 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2872 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2873 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002874 VIXL_ASSERT(allow_macro_instructions_);
2875 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002876 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002877 ITScope it_scope(this, &cond);
2878 qadd16(cond, rd, rn, rm);
2879 }
2880 void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); }
2881
2882 void Qadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002883 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2884 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2885 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002886 VIXL_ASSERT(allow_macro_instructions_);
2887 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002888 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002889 ITScope it_scope(this, &cond);
2890 qadd8(cond, rd, rn, rm);
2891 }
2892 void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); }
2893
2894 void Qasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002895 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2896 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2897 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002898 VIXL_ASSERT(allow_macro_instructions_);
2899 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002900 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002901 ITScope it_scope(this, &cond);
2902 qasx(cond, rd, rn, rm);
2903 }
2904 void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); }
2905
2906 void Qdadd(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002907 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2908 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2909 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002910 VIXL_ASSERT(allow_macro_instructions_);
2911 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002912 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002913 ITScope it_scope(this, &cond);
2914 qdadd(cond, rd, rm, rn);
2915 }
2916 void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); }
2917
2918 void Qdsub(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002919 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2920 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2921 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002922 VIXL_ASSERT(allow_macro_instructions_);
2923 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002924 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002925 ITScope it_scope(this, &cond);
2926 qdsub(cond, rd, rm, rn);
2927 }
2928 void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); }
2929
2930 void Qsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002931 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2932 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2933 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002934 VIXL_ASSERT(allow_macro_instructions_);
2935 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002936 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002937 ITScope it_scope(this, &cond);
2938 qsax(cond, rd, rn, rm);
2939 }
2940 void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); }
2941
2942 void Qsub(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002943 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2945 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002946 VIXL_ASSERT(allow_macro_instructions_);
2947 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002948 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002949 ITScope it_scope(this, &cond);
2950 qsub(cond, rd, rm, rn);
2951 }
2952 void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); }
2953
2954 void Qsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002955 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2956 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2957 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002958 VIXL_ASSERT(allow_macro_instructions_);
2959 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002960 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002961 ITScope it_scope(this, &cond);
2962 qsub16(cond, rd, rn, rm);
2963 }
2964 void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); }
2965
2966 void Qsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002967 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2968 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2969 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002970 VIXL_ASSERT(allow_macro_instructions_);
2971 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002972 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002973 ITScope it_scope(this, &cond);
2974 qsub8(cond, rd, rn, rm);
2975 }
2976 void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); }
2977
2978 void Rbit(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002979 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2980 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002981 VIXL_ASSERT(allow_macro_instructions_);
2982 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002983 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002984 ITScope it_scope(this, &cond);
2985 rbit(cond, rd, rm);
2986 }
2987 void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); }
2988
2989 void Rev(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002990 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2991 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002992 VIXL_ASSERT(allow_macro_instructions_);
2993 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002994 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002995 ITScope it_scope(this, &cond);
2996 rev(cond, rd, rm);
2997 }
2998 void Rev(Register rd, Register rm) { Rev(al, rd, rm); }
2999
3000 void Rev16(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003001 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3002 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003003 VIXL_ASSERT(allow_macro_instructions_);
3004 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003005 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003006 ITScope it_scope(this, &cond);
3007 rev16(cond, rd, rm);
3008 }
3009 void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); }
3010
3011 void Revsh(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003012 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3013 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003014 VIXL_ASSERT(allow_macro_instructions_);
3015 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003016 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003017 ITScope it_scope(this, &cond);
3018 revsh(cond, rd, rm);
3019 }
3020 void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); }
3021
3022 void Ror(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003023 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3024 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3025 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003026 VIXL_ASSERT(allow_macro_instructions_);
3027 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003028 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003029 bool can_use_it =
Alexandre Ramesd3832962016-07-04 15:03:43 +01003030 // ROR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
Georgia Kouvelie7a16902016-11-23 16:13:22 +00003031 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
3032 operand.GetBaseRegister().IsLow();
Alexandre Ramesd3832962016-07-04 15:03:43 +01003033 ITScope it_scope(this, &cond, can_use_it);
3034 ror(cond, rd, rm, operand);
3035 }
3036 void Ror(Register rd, Register rm, const Operand& operand) {
3037 Ror(al, rd, rm, operand);
3038 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003039 void Ror(FlagsUpdate flags,
3040 Condition cond,
3041 Register rd,
3042 Register rm,
3043 const Operand& operand) {
3044 switch (flags) {
3045 case LeaveFlags:
3046 Ror(cond, rd, rm, operand);
3047 break;
3048 case SetFlags:
3049 Rors(cond, rd, rm, operand);
3050 break;
3051 case DontCare:
3052 Ror(cond, rd, rm, operand);
3053 break;
3054 }
3055 }
3056 void Ror(FlagsUpdate flags,
3057 Register rd,
3058 Register rm,
3059 const Operand& operand) {
3060 Ror(flags, al, rd, rm, operand);
3061 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003062
3063 void Rors(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003064 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3065 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3066 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003067 VIXL_ASSERT(allow_macro_instructions_);
3068 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003069 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003070 ITScope it_scope(this, &cond);
3071 rors(cond, rd, rm, operand);
3072 }
3073 void Rors(Register rd, Register rm, const Operand& operand) {
3074 Rors(al, rd, rm, operand);
3075 }
3076
3077 void Rrx(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003078 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3079 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003080 VIXL_ASSERT(allow_macro_instructions_);
3081 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003082 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003083 ITScope it_scope(this, &cond);
3084 rrx(cond, rd, rm);
3085 }
3086 void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); }
Vincent Belliard934696d2016-08-18 11:03:56 -07003087 void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) {
3088 switch (flags) {
3089 case LeaveFlags:
3090 Rrx(cond, rd, rm);
3091 break;
3092 case SetFlags:
3093 Rrxs(cond, rd, rm);
3094 break;
3095 case DontCare:
3096 Rrx(cond, rd, rm);
3097 break;
3098 }
3099 }
3100 void Rrx(FlagsUpdate flags, Register rd, Register rm) {
3101 Rrx(flags, al, rd, rm);
3102 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003103
3104 void Rrxs(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003105 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3106 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003107 VIXL_ASSERT(allow_macro_instructions_);
3108 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003109 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003110 ITScope it_scope(this, &cond);
3111 rrxs(cond, rd, rm);
3112 }
3113 void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); }
3114
3115 void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003116 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3117 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3118 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003119 VIXL_ASSERT(allow_macro_instructions_);
3120 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003121 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003122 bool can_use_it =
3123 // RSB<c>{<q>} {<Rd>, }<Rn>, #0 ; T1
3124 operand.IsImmediate() && rd.IsLow() && rn.IsLow() &&
3125 (operand.GetImmediate() == 0);
3126 ITScope it_scope(this, &cond, can_use_it);
3127 rsb(cond, rd, rn, operand);
3128 }
3129 void Rsb(Register rd, Register rn, const Operand& operand) {
3130 Rsb(al, rd, rn, operand);
3131 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003132 void Rsb(FlagsUpdate flags,
3133 Condition cond,
3134 Register rd,
3135 Register rn,
3136 const Operand& operand) {
3137 switch (flags) {
3138 case LeaveFlags:
3139 Rsb(cond, rd, rn, operand);
3140 break;
3141 case SetFlags:
3142 Rsbs(cond, rd, rn, operand);
3143 break;
3144 case DontCare:
3145 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
3146 rn.IsLow() && operand.IsImmediate() &&
3147 (operand.GetImmediate() == 0);
3148 if (can_be_16bit_encoded) {
3149 Rsbs(cond, rd, rn, operand);
3150 } else {
3151 Rsb(cond, rd, rn, operand);
3152 }
3153 break;
3154 }
3155 }
3156 void Rsb(FlagsUpdate flags,
3157 Register rd,
3158 Register rn,
3159 const Operand& operand) {
3160 Rsb(flags, al, rd, rn, operand);
3161 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003162
3163 void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003164 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3165 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3166 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003167 VIXL_ASSERT(allow_macro_instructions_);
3168 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003169 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003170 ITScope it_scope(this, &cond);
3171 rsbs(cond, rd, rn, operand);
3172 }
3173 void Rsbs(Register rd, Register rn, const Operand& operand) {
3174 Rsbs(al, rd, rn, operand);
3175 }
3176
3177 void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003178 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3179 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3180 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003181 VIXL_ASSERT(allow_macro_instructions_);
3182 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003183 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003184 ITScope it_scope(this, &cond);
3185 rsc(cond, rd, rn, operand);
3186 }
3187 void Rsc(Register rd, Register rn, const Operand& operand) {
3188 Rsc(al, rd, rn, operand);
3189 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003190 void Rsc(FlagsUpdate flags,
3191 Condition cond,
3192 Register rd,
3193 Register rn,
3194 const Operand& operand) {
3195 switch (flags) {
3196 case LeaveFlags:
3197 Rsc(cond, rd, rn, operand);
3198 break;
3199 case SetFlags:
3200 Rscs(cond, rd, rn, operand);
3201 break;
3202 case DontCare:
3203 Rsc(cond, rd, rn, operand);
3204 break;
3205 }
3206 }
3207 void Rsc(FlagsUpdate flags,
3208 Register rd,
3209 Register rn,
3210 const Operand& operand) {
3211 Rsc(flags, al, rd, rn, operand);
3212 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003213
3214 void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003215 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3216 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3217 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003218 VIXL_ASSERT(allow_macro_instructions_);
3219 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003220 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003221 ITScope it_scope(this, &cond);
3222 rscs(cond, rd, rn, operand);
3223 }
3224 void Rscs(Register rd, Register rn, const Operand& operand) {
3225 Rscs(al, rd, rn, operand);
3226 }
3227
3228 void Sadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003229 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3230 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3231 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003232 VIXL_ASSERT(allow_macro_instructions_);
3233 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003234 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003235 ITScope it_scope(this, &cond);
3236 sadd16(cond, rd, rn, rm);
3237 }
3238 void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); }
3239
3240 void Sadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003241 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3242 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3243 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003244 VIXL_ASSERT(allow_macro_instructions_);
3245 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003246 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003247 ITScope it_scope(this, &cond);
3248 sadd8(cond, rd, rn, rm);
3249 }
3250 void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); }
3251
3252 void Sasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003253 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3254 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3255 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003256 VIXL_ASSERT(allow_macro_instructions_);
3257 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003258 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003259 ITScope it_scope(this, &cond);
3260 sasx(cond, rd, rn, rm);
3261 }
3262 void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); }
3263
3264 void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003265 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3266 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3267 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003268 VIXL_ASSERT(allow_macro_instructions_);
3269 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003270 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003271 bool can_use_it =
3272 // SBC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
3273 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) &&
3274 operand.GetBaseRegister().IsLow();
3275 ITScope it_scope(this, &cond, can_use_it);
3276 sbc(cond, rd, rn, operand);
3277 }
3278 void Sbc(Register rd, Register rn, const Operand& operand) {
3279 Sbc(al, rd, rn, operand);
3280 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003281 void Sbc(FlagsUpdate flags,
3282 Condition cond,
3283 Register rd,
3284 Register rn,
3285 const Operand& operand) {
3286 switch (flags) {
3287 case LeaveFlags:
3288 Sbc(cond, rd, rn, operand);
3289 break;
3290 case SetFlags:
3291 Sbcs(cond, rd, rn, operand);
3292 break;
3293 case DontCare:
3294 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
3295 rn.Is(rd) && operand.IsPlainRegister() &&
3296 operand.GetBaseRegister().IsLow();
3297 if (can_be_16bit_encoded) {
3298 Sbcs(cond, rd, rn, operand);
3299 } else {
3300 Sbc(cond, rd, rn, operand);
3301 }
3302 break;
3303 }
3304 }
3305 void Sbc(FlagsUpdate flags,
3306 Register rd,
3307 Register rn,
3308 const Operand& operand) {
3309 Sbc(flags, al, rd, rn, operand);
3310 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003311
3312 void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003313 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3314 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3315 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003316 VIXL_ASSERT(allow_macro_instructions_);
3317 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003318 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003319 ITScope it_scope(this, &cond);
3320 sbcs(cond, rd, rn, operand);
3321 }
3322 void Sbcs(Register rd, Register rn, const Operand& operand) {
3323 Sbcs(al, rd, rn, operand);
3324 }
3325
3326 void Sbfx(Condition cond,
3327 Register rd,
3328 Register rn,
3329 uint32_t lsb,
3330 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003331 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3332 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3333 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003334 VIXL_ASSERT(allow_macro_instructions_);
3335 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003336 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003337 ITScope it_scope(this, &cond);
3338 sbfx(cond, rd, rn, lsb, operand);
3339 }
3340 void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) {
3341 Sbfx(al, rd, rn, lsb, operand);
3342 }
3343
3344 void Sdiv(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003345 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3346 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3347 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003348 VIXL_ASSERT(allow_macro_instructions_);
3349 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003350 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003351 ITScope it_scope(this, &cond);
3352 sdiv(cond, rd, rn, rm);
3353 }
3354 void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); }
3355
3356 void Sel(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003357 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3358 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3359 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003360 VIXL_ASSERT(allow_macro_instructions_);
3361 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003362 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003363 ITScope it_scope(this, &cond);
3364 sel(cond, rd, rn, rm);
3365 }
3366 void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); }
3367
3368 void Shadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003369 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3370 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3371 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003372 VIXL_ASSERT(allow_macro_instructions_);
3373 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003374 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003375 ITScope it_scope(this, &cond);
3376 shadd16(cond, rd, rn, rm);
3377 }
3378 void Shadd16(Register rd, Register rn, Register rm) {
3379 Shadd16(al, rd, rn, rm);
3380 }
3381
3382 void Shadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003383 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3384 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3385 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003386 VIXL_ASSERT(allow_macro_instructions_);
3387 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003388 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003389 ITScope it_scope(this, &cond);
3390 shadd8(cond, rd, rn, rm);
3391 }
3392 void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); }
3393
3394 void Shasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003395 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3396 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3397 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003398 VIXL_ASSERT(allow_macro_instructions_);
3399 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003400 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003401 ITScope it_scope(this, &cond);
3402 shasx(cond, rd, rn, rm);
3403 }
3404 void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); }
3405
3406 void Shsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003407 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3408 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3409 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003410 VIXL_ASSERT(allow_macro_instructions_);
3411 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003412 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003413 ITScope it_scope(this, &cond);
3414 shsax(cond, rd, rn, rm);
3415 }
3416 void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); }
3417
3418 void Shsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003419 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3420 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3421 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003422 VIXL_ASSERT(allow_macro_instructions_);
3423 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003424 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003425 ITScope it_scope(this, &cond);
3426 shsub16(cond, rd, rn, rm);
3427 }
3428 void Shsub16(Register rd, Register rn, Register rm) {
3429 Shsub16(al, rd, rn, rm);
3430 }
3431
3432 void Shsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003433 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3434 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3435 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003436 VIXL_ASSERT(allow_macro_instructions_);
3437 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003438 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003439 ITScope it_scope(this, &cond);
3440 shsub8(cond, rd, rn, rm);
3441 }
3442 void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); }
3443
3444 void Smlabb(
3445 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003446 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3447 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3448 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3449 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003450 VIXL_ASSERT(allow_macro_instructions_);
3451 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003452 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003453 ITScope it_scope(this, &cond);
3454 smlabb(cond, rd, rn, rm, ra);
3455 }
3456 void Smlabb(Register rd, Register rn, Register rm, Register ra) {
3457 Smlabb(al, rd, rn, rm, ra);
3458 }
3459
3460 void Smlabt(
3461 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003462 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3463 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3464 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3465 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003466 VIXL_ASSERT(allow_macro_instructions_);
3467 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003468 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003469 ITScope it_scope(this, &cond);
3470 smlabt(cond, rd, rn, rm, ra);
3471 }
3472 void Smlabt(Register rd, Register rn, Register rm, Register ra) {
3473 Smlabt(al, rd, rn, rm, ra);
3474 }
3475
3476 void Smlad(
3477 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003478 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3479 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3480 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3481 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003482 VIXL_ASSERT(allow_macro_instructions_);
3483 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003484 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003485 ITScope it_scope(this, &cond);
3486 smlad(cond, rd, rn, rm, ra);
3487 }
3488 void Smlad(Register rd, Register rn, Register rm, Register ra) {
3489 Smlad(al, rd, rn, rm, ra);
3490 }
3491
3492 void Smladx(
3493 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003494 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3495 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3496 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3497 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003498 VIXL_ASSERT(allow_macro_instructions_);
3499 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003500 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003501 ITScope it_scope(this, &cond);
3502 smladx(cond, rd, rn, rm, ra);
3503 }
3504 void Smladx(Register rd, Register rn, Register rm, Register ra) {
3505 Smladx(al, rd, rn, rm, ra);
3506 }
3507
3508 void Smlal(
3509 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003510 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3511 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3512 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3513 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003514 VIXL_ASSERT(allow_macro_instructions_);
3515 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003516 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003517 ITScope it_scope(this, &cond);
3518 smlal(cond, rdlo, rdhi, rn, rm);
3519 }
3520 void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) {
3521 Smlal(al, rdlo, rdhi, rn, rm);
3522 }
3523
3524 void Smlalbb(
3525 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003526 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3527 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3528 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3529 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003530 VIXL_ASSERT(allow_macro_instructions_);
3531 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003532 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003533 ITScope it_scope(this, &cond);
3534 smlalbb(cond, rdlo, rdhi, rn, rm);
3535 }
3536 void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) {
3537 Smlalbb(al, rdlo, rdhi, rn, rm);
3538 }
3539
3540 void Smlalbt(
3541 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003542 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3543 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3544 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3545 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003546 VIXL_ASSERT(allow_macro_instructions_);
3547 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003548 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003549 ITScope it_scope(this, &cond);
3550 smlalbt(cond, rdlo, rdhi, rn, rm);
3551 }
3552 void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) {
3553 Smlalbt(al, rdlo, rdhi, rn, rm);
3554 }
3555
3556 void Smlald(
3557 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003558 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3559 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3560 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3561 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003562 VIXL_ASSERT(allow_macro_instructions_);
3563 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003564 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003565 ITScope it_scope(this, &cond);
3566 smlald(cond, rdlo, rdhi, rn, rm);
3567 }
3568 void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) {
3569 Smlald(al, rdlo, rdhi, rn, rm);
3570 }
3571
3572 void Smlaldx(
3573 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003574 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3575 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3576 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3577 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003578 VIXL_ASSERT(allow_macro_instructions_);
3579 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003580 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003581 ITScope it_scope(this, &cond);
3582 smlaldx(cond, rdlo, rdhi, rn, rm);
3583 }
3584 void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) {
3585 Smlaldx(al, rdlo, rdhi, rn, rm);
3586 }
3587
3588 void Smlals(
3589 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003590 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3591 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3592 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3593 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003594 VIXL_ASSERT(allow_macro_instructions_);
3595 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003596 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003597 ITScope it_scope(this, &cond);
3598 smlals(cond, rdlo, rdhi, rn, rm);
3599 }
3600 void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) {
3601 Smlals(al, rdlo, rdhi, rn, rm);
3602 }
3603
3604 void Smlaltb(
3605 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003606 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3607 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3608 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3609 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003610 VIXL_ASSERT(allow_macro_instructions_);
3611 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003612 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003613 ITScope it_scope(this, &cond);
3614 smlaltb(cond, rdlo, rdhi, rn, rm);
3615 }
3616 void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) {
3617 Smlaltb(al, rdlo, rdhi, rn, rm);
3618 }
3619
3620 void Smlaltt(
3621 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003622 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3623 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3624 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3625 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003626 VIXL_ASSERT(allow_macro_instructions_);
3627 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003628 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003629 ITScope it_scope(this, &cond);
3630 smlaltt(cond, rdlo, rdhi, rn, rm);
3631 }
3632 void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) {
3633 Smlaltt(al, rdlo, rdhi, rn, rm);
3634 }
3635
3636 void Smlatb(
3637 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003638 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3639 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3640 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3641 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003642 VIXL_ASSERT(allow_macro_instructions_);
3643 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003644 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003645 ITScope it_scope(this, &cond);
3646 smlatb(cond, rd, rn, rm, ra);
3647 }
3648 void Smlatb(Register rd, Register rn, Register rm, Register ra) {
3649 Smlatb(al, rd, rn, rm, ra);
3650 }
3651
3652 void Smlatt(
3653 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003654 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3655 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3656 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3657 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003658 VIXL_ASSERT(allow_macro_instructions_);
3659 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003660 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003661 ITScope it_scope(this, &cond);
3662 smlatt(cond, rd, rn, rm, ra);
3663 }
3664 void Smlatt(Register rd, Register rn, Register rm, Register ra) {
3665 Smlatt(al, rd, rn, rm, ra);
3666 }
3667
3668 void Smlawb(
3669 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003670 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3671 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3672 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3673 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003674 VIXL_ASSERT(allow_macro_instructions_);
3675 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003676 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003677 ITScope it_scope(this, &cond);
3678 smlawb(cond, rd, rn, rm, ra);
3679 }
3680 void Smlawb(Register rd, Register rn, Register rm, Register ra) {
3681 Smlawb(al, rd, rn, rm, ra);
3682 }
3683
3684 void Smlawt(
3685 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003686 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3687 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3688 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3689 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003690 VIXL_ASSERT(allow_macro_instructions_);
3691 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003692 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003693 ITScope it_scope(this, &cond);
3694 smlawt(cond, rd, rn, rm, ra);
3695 }
3696 void Smlawt(Register rd, Register rn, Register rm, Register ra) {
3697 Smlawt(al, rd, rn, rm, ra);
3698 }
3699
3700 void Smlsd(
3701 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003702 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3703 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3704 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3705 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003706 VIXL_ASSERT(allow_macro_instructions_);
3707 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003708 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003709 ITScope it_scope(this, &cond);
3710 smlsd(cond, rd, rn, rm, ra);
3711 }
3712 void Smlsd(Register rd, Register rn, Register rm, Register ra) {
3713 Smlsd(al, rd, rn, rm, ra);
3714 }
3715
3716 void Smlsdx(
3717 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003718 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3719 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3720 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3721 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003722 VIXL_ASSERT(allow_macro_instructions_);
3723 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003724 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003725 ITScope it_scope(this, &cond);
3726 smlsdx(cond, rd, rn, rm, ra);
3727 }
3728 void Smlsdx(Register rd, Register rn, Register rm, Register ra) {
3729 Smlsdx(al, rd, rn, rm, ra);
3730 }
3731
3732 void Smlsld(
3733 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003734 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3735 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3736 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3737 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003738 VIXL_ASSERT(allow_macro_instructions_);
3739 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003740 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003741 ITScope it_scope(this, &cond);
3742 smlsld(cond, rdlo, rdhi, rn, rm);
3743 }
3744 void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) {
3745 Smlsld(al, rdlo, rdhi, rn, rm);
3746 }
3747
3748 void Smlsldx(
3749 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003750 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3751 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3752 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3753 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003754 VIXL_ASSERT(allow_macro_instructions_);
3755 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003756 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003757 ITScope it_scope(this, &cond);
3758 smlsldx(cond, rdlo, rdhi, rn, rm);
3759 }
3760 void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) {
3761 Smlsldx(al, rdlo, rdhi, rn, rm);
3762 }
3763
3764 void Smmla(
3765 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003766 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3767 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3768 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3769 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003770 VIXL_ASSERT(allow_macro_instructions_);
3771 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003772 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003773 ITScope it_scope(this, &cond);
3774 smmla(cond, rd, rn, rm, ra);
3775 }
3776 void Smmla(Register rd, Register rn, Register rm, Register ra) {
3777 Smmla(al, rd, rn, rm, ra);
3778 }
3779
3780 void Smmlar(
3781 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003782 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3783 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3784 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3785 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003786 VIXL_ASSERT(allow_macro_instructions_);
3787 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003788 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003789 ITScope it_scope(this, &cond);
3790 smmlar(cond, rd, rn, rm, ra);
3791 }
3792 void Smmlar(Register rd, Register rn, Register rm, Register ra) {
3793 Smmlar(al, rd, rn, rm, ra);
3794 }
3795
3796 void Smmls(
3797 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003798 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3799 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3800 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3801 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003802 VIXL_ASSERT(allow_macro_instructions_);
3803 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003804 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003805 ITScope it_scope(this, &cond);
3806 smmls(cond, rd, rn, rm, ra);
3807 }
3808 void Smmls(Register rd, Register rn, Register rm, Register ra) {
3809 Smmls(al, rd, rn, rm, ra);
3810 }
3811
3812 void Smmlsr(
3813 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003814 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3815 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3816 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3817 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003818 VIXL_ASSERT(allow_macro_instructions_);
3819 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003820 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003821 ITScope it_scope(this, &cond);
3822 smmlsr(cond, rd, rn, rm, ra);
3823 }
3824 void Smmlsr(Register rd, Register rn, Register rm, Register ra) {
3825 Smmlsr(al, rd, rn, rm, ra);
3826 }
3827
3828 void Smmul(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003829 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3830 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3831 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003832 VIXL_ASSERT(allow_macro_instructions_);
3833 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003834 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003835 ITScope it_scope(this, &cond);
3836 smmul(cond, rd, rn, rm);
3837 }
3838 void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); }
3839
3840 void Smmulr(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003841 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3842 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3843 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003844 VIXL_ASSERT(allow_macro_instructions_);
3845 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003846 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003847 ITScope it_scope(this, &cond);
3848 smmulr(cond, rd, rn, rm);
3849 }
3850 void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); }
3851
3852 void Smuad(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003853 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3854 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3855 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003856 VIXL_ASSERT(allow_macro_instructions_);
3857 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003858 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003859 ITScope it_scope(this, &cond);
3860 smuad(cond, rd, rn, rm);
3861 }
3862 void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); }
3863
3864 void Smuadx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003865 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3866 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3867 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003868 VIXL_ASSERT(allow_macro_instructions_);
3869 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003870 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003871 ITScope it_scope(this, &cond);
3872 smuadx(cond, rd, rn, rm);
3873 }
3874 void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); }
3875
3876 void Smulbb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003877 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3878 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3879 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003880 VIXL_ASSERT(allow_macro_instructions_);
3881 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003882 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003883 ITScope it_scope(this, &cond);
3884 smulbb(cond, rd, rn, rm);
3885 }
3886 void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); }
3887
3888 void Smulbt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003889 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3890 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3891 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003892 VIXL_ASSERT(allow_macro_instructions_);
3893 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003894 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003895 ITScope it_scope(this, &cond);
3896 smulbt(cond, rd, rn, rm);
3897 }
3898 void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); }
3899
3900 void Smull(
3901 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003902 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3903 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3904 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3905 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003906 VIXL_ASSERT(allow_macro_instructions_);
3907 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003908 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003909 ITScope it_scope(this, &cond);
3910 smull(cond, rdlo, rdhi, rn, rm);
3911 }
3912 void Smull(Register rdlo, Register rdhi, Register rn, Register rm) {
3913 Smull(al, rdlo, rdhi, rn, rm);
3914 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003915 void Smull(FlagsUpdate flags,
3916 Condition cond,
3917 Register rdlo,
3918 Register rdhi,
3919 Register rn,
3920 Register rm) {
3921 switch (flags) {
3922 case LeaveFlags:
3923 Smull(cond, rdlo, rdhi, rn, rm);
3924 break;
3925 case SetFlags:
3926 Smulls(cond, rdlo, rdhi, rn, rm);
3927 break;
3928 case DontCare:
3929 Smull(cond, rdlo, rdhi, rn, rm);
3930 break;
3931 }
3932 }
3933 void Smull(FlagsUpdate flags,
3934 Register rdlo,
3935 Register rdhi,
3936 Register rn,
3937 Register rm) {
3938 Smull(flags, al, rdlo, rdhi, rn, rm);
3939 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003940
3941 void Smulls(
3942 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003943 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3945 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3946 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003947 VIXL_ASSERT(allow_macro_instructions_);
3948 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003949 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003950 ITScope it_scope(this, &cond);
3951 smulls(cond, rdlo, rdhi, rn, rm);
3952 }
3953 void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) {
3954 Smulls(al, rdlo, rdhi, rn, rm);
3955 }
3956
3957 void Smultb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003958 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3959 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3960 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003961 VIXL_ASSERT(allow_macro_instructions_);
3962 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003963 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003964 ITScope it_scope(this, &cond);
3965 smultb(cond, rd, rn, rm);
3966 }
3967 void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); }
3968
3969 void Smultt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003970 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3971 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3972 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003973 VIXL_ASSERT(allow_macro_instructions_);
3974 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003975 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003976 ITScope it_scope(this, &cond);
3977 smultt(cond, rd, rn, rm);
3978 }
3979 void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); }
3980
3981 void Smulwb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003982 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3983 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3984 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003985 VIXL_ASSERT(allow_macro_instructions_);
3986 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003987 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003988 ITScope it_scope(this, &cond);
3989 smulwb(cond, rd, rn, rm);
3990 }
3991 void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); }
3992
3993 void Smulwt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003994 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3995 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3996 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003997 VIXL_ASSERT(allow_macro_instructions_);
3998 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003999 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004000 ITScope it_scope(this, &cond);
4001 smulwt(cond, rd, rn, rm);
4002 }
4003 void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); }
4004
4005 void Smusd(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004006 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4007 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4008 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004009 VIXL_ASSERT(allow_macro_instructions_);
4010 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004011 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004012 ITScope it_scope(this, &cond);
4013 smusd(cond, rd, rn, rm);
4014 }
4015 void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); }
4016
4017 void Smusdx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004018 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4019 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4020 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004021 VIXL_ASSERT(allow_macro_instructions_);
4022 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004023 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004024 ITScope it_scope(this, &cond);
4025 smusdx(cond, rd, rn, rm);
4026 }
4027 void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); }
4028
4029 void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004030 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4031 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004032 VIXL_ASSERT(allow_macro_instructions_);
4033 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004034 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004035 ITScope it_scope(this, &cond);
4036 ssat(cond, rd, imm, operand);
4037 }
4038 void Ssat(Register rd, uint32_t imm, const Operand& operand) {
4039 Ssat(al, rd, imm, operand);
4040 }
4041
4042 void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004043 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4044 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004045 VIXL_ASSERT(allow_macro_instructions_);
4046 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004047 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004048 ITScope it_scope(this, &cond);
4049 ssat16(cond, rd, imm, rn);
4050 }
4051 void Ssat16(Register rd, uint32_t imm, Register rn) {
4052 Ssat16(al, rd, imm, rn);
4053 }
4054
4055 void Ssax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004056 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4057 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4058 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004059 VIXL_ASSERT(allow_macro_instructions_);
4060 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004061 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004062 ITScope it_scope(this, &cond);
4063 ssax(cond, rd, rn, rm);
4064 }
4065 void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); }
4066
4067 void Ssub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004068 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4069 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4070 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004071 VIXL_ASSERT(allow_macro_instructions_);
4072 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004073 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004074 ITScope it_scope(this, &cond);
4075 ssub16(cond, rd, rn, rm);
4076 }
4077 void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); }
4078
4079 void Ssub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004080 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4081 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4082 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004083 VIXL_ASSERT(allow_macro_instructions_);
4084 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004085 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004086 ITScope it_scope(this, &cond);
4087 ssub8(cond, rd, rn, rm);
4088 }
4089 void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); }
4090
4091 void Stl(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004092 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4093 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004094 VIXL_ASSERT(allow_macro_instructions_);
4095 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004096 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004097 ITScope it_scope(this, &cond);
4098 stl(cond, rt, operand);
4099 }
4100 void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); }
4101
4102 void Stlb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004103 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4104 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004105 VIXL_ASSERT(allow_macro_instructions_);
4106 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004107 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004108 ITScope it_scope(this, &cond);
4109 stlb(cond, rt, operand);
4110 }
4111 void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); }
4112
4113 void Stlex(Condition cond,
4114 Register rd,
4115 Register rt,
4116 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004117 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4118 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4119 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004120 VIXL_ASSERT(allow_macro_instructions_);
4121 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004122 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004123 ITScope it_scope(this, &cond);
4124 stlex(cond, rd, rt, operand);
4125 }
4126 void Stlex(Register rd, Register rt, const MemOperand& operand) {
4127 Stlex(al, rd, rt, operand);
4128 }
4129
4130 void Stlexb(Condition cond,
4131 Register rd,
4132 Register rt,
4133 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004134 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4135 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4136 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004137 VIXL_ASSERT(allow_macro_instructions_);
4138 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004139 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004140 ITScope it_scope(this, &cond);
4141 stlexb(cond, rd, rt, operand);
4142 }
4143 void Stlexb(Register rd, Register rt, const MemOperand& operand) {
4144 Stlexb(al, rd, rt, operand);
4145 }
4146
4147 void Stlexd(Condition cond,
4148 Register rd,
4149 Register rt,
4150 Register rt2,
4151 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004152 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4153 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4154 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4155 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004156 VIXL_ASSERT(allow_macro_instructions_);
4157 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004158 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004159 ITScope it_scope(this, &cond);
4160 stlexd(cond, rd, rt, rt2, operand);
4161 }
4162 void Stlexd(Register rd,
4163 Register rt,
4164 Register rt2,
4165 const MemOperand& operand) {
4166 Stlexd(al, rd, rt, rt2, operand);
4167 }
4168
4169 void Stlexh(Condition cond,
4170 Register rd,
4171 Register rt,
4172 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004173 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4174 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4175 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004176 VIXL_ASSERT(allow_macro_instructions_);
4177 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004178 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004179 ITScope it_scope(this, &cond);
4180 stlexh(cond, rd, rt, operand);
4181 }
4182 void Stlexh(Register rd, Register rt, const MemOperand& operand) {
4183 Stlexh(al, rd, rt, operand);
4184 }
4185
4186 void Stlh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004187 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4188 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004189 VIXL_ASSERT(allow_macro_instructions_);
4190 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004191 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004192 ITScope it_scope(this, &cond);
4193 stlh(cond, rt, operand);
4194 }
4195 void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); }
4196
4197 void Stm(Condition cond,
4198 Register rn,
4199 WriteBack write_back,
4200 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004201 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4202 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004203 VIXL_ASSERT(allow_macro_instructions_);
4204 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004205 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004206 ITScope it_scope(this, &cond);
4207 stm(cond, rn, write_back, registers);
4208 }
4209 void Stm(Register rn, WriteBack write_back, RegisterList registers) {
4210 Stm(al, rn, write_back, registers);
4211 }
4212
4213 void Stmda(Condition cond,
4214 Register rn,
4215 WriteBack write_back,
4216 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004217 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4218 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004219 VIXL_ASSERT(allow_macro_instructions_);
4220 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004221 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004222 ITScope it_scope(this, &cond);
4223 stmda(cond, rn, write_back, registers);
4224 }
4225 void Stmda(Register rn, WriteBack write_back, RegisterList registers) {
4226 Stmda(al, rn, write_back, registers);
4227 }
4228
4229 void Stmdb(Condition cond,
4230 Register rn,
4231 WriteBack write_back,
4232 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004233 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4234 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004235 VIXL_ASSERT(allow_macro_instructions_);
4236 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004237 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004238 ITScope it_scope(this, &cond);
4239 stmdb(cond, rn, write_back, registers);
4240 }
4241 void Stmdb(Register rn, WriteBack write_back, RegisterList registers) {
4242 Stmdb(al, rn, write_back, registers);
4243 }
4244
4245 void Stmea(Condition cond,
4246 Register rn,
4247 WriteBack write_back,
4248 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004249 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4250 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004251 VIXL_ASSERT(allow_macro_instructions_);
4252 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004253 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004254 ITScope it_scope(this, &cond);
4255 stmea(cond, rn, write_back, registers);
4256 }
4257 void Stmea(Register rn, WriteBack write_back, RegisterList registers) {
4258 Stmea(al, rn, write_back, registers);
4259 }
4260
4261 void Stmed(Condition cond,
4262 Register rn,
4263 WriteBack write_back,
4264 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004265 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4266 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004267 VIXL_ASSERT(allow_macro_instructions_);
4268 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004269 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004270 ITScope it_scope(this, &cond);
4271 stmed(cond, rn, write_back, registers);
4272 }
4273 void Stmed(Register rn, WriteBack write_back, RegisterList registers) {
4274 Stmed(al, rn, write_back, registers);
4275 }
4276
4277 void Stmfa(Condition cond,
4278 Register rn,
4279 WriteBack write_back,
4280 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004281 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4282 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004283 VIXL_ASSERT(allow_macro_instructions_);
4284 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004285 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004286 ITScope it_scope(this, &cond);
4287 stmfa(cond, rn, write_back, registers);
4288 }
4289 void Stmfa(Register rn, WriteBack write_back, RegisterList registers) {
4290 Stmfa(al, rn, write_back, registers);
4291 }
4292
4293 void Stmfd(Condition cond,
4294 Register rn,
4295 WriteBack write_back,
4296 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004297 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4298 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004299 VIXL_ASSERT(allow_macro_instructions_);
4300 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004301 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004302 ITScope it_scope(this, &cond);
4303 stmfd(cond, rn, write_back, registers);
4304 }
4305 void Stmfd(Register rn, WriteBack write_back, RegisterList registers) {
4306 Stmfd(al, rn, write_back, registers);
4307 }
4308
4309 void Stmib(Condition cond,
4310 Register rn,
4311 WriteBack write_back,
4312 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004313 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4314 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004315 VIXL_ASSERT(allow_macro_instructions_);
4316 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004317 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004318 ITScope it_scope(this, &cond);
4319 stmib(cond, rn, write_back, registers);
4320 }
4321 void Stmib(Register rn, WriteBack write_back, RegisterList registers) {
4322 Stmib(al, rn, write_back, registers);
4323 }
4324
4325 void Str(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004326 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4327 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004328 VIXL_ASSERT(allow_macro_instructions_);
4329 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004330 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004331 bool can_use_it =
4332 // STR{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4333 (operand.IsImmediate() && rt.IsLow() &&
4334 operand.GetBaseRegister().IsLow() &&
4335 operand.IsOffsetImmediateWithinRange(0, 124, 4) &&
4336 (operand.GetAddrMode() == Offset)) ||
4337 // STR{<c>}{<q>} <Rt>, [SP{, #{+}<imm>}] ; T2
4338 (operand.IsImmediate() && rt.IsLow() &&
4339 operand.GetBaseRegister().IsSP() &&
4340 operand.IsOffsetImmediateWithinRange(0, 1020, 4) &&
4341 (operand.GetAddrMode() == Offset)) ||
4342 // STR{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4343 (operand.IsPlainRegister() && rt.IsLow() &&
4344 operand.GetBaseRegister().IsLow() &&
4345 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4346 (operand.GetAddrMode() == Offset));
4347 ITScope it_scope(this, &cond, can_use_it);
4348 str(cond, rt, operand);
4349 }
4350 void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); }
4351
4352 void Strb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004353 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4354 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004355 VIXL_ASSERT(allow_macro_instructions_);
4356 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004357 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004358 bool can_use_it =
4359 // STRB{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4360 (operand.IsImmediate() && rt.IsLow() &&
4361 operand.GetBaseRegister().IsLow() &&
4362 operand.IsOffsetImmediateWithinRange(0, 31) &&
4363 (operand.GetAddrMode() == Offset)) ||
4364 // STRB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4365 (operand.IsPlainRegister() && rt.IsLow() &&
4366 operand.GetBaseRegister().IsLow() &&
4367 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4368 (operand.GetAddrMode() == Offset));
4369 ITScope it_scope(this, &cond, can_use_it);
4370 strb(cond, rt, operand);
4371 }
4372 void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); }
4373
4374 void Strd(Condition cond,
4375 Register rt,
4376 Register rt2,
4377 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004378 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4379 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4380 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004381 VIXL_ASSERT(allow_macro_instructions_);
4382 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004383 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004384 ITScope it_scope(this, &cond);
4385 strd(cond, rt, rt2, operand);
4386 }
4387 void Strd(Register rt, Register rt2, const MemOperand& operand) {
4388 Strd(al, rt, rt2, operand);
4389 }
4390
4391 void Strex(Condition cond,
4392 Register rd,
4393 Register rt,
4394 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004395 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4396 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4397 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004398 VIXL_ASSERT(allow_macro_instructions_);
4399 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004400 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004401 ITScope it_scope(this, &cond);
4402 strex(cond, rd, rt, operand);
4403 }
4404 void Strex(Register rd, Register rt, const MemOperand& operand) {
4405 Strex(al, rd, rt, operand);
4406 }
4407
4408 void Strexb(Condition cond,
4409 Register rd,
4410 Register rt,
4411 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004412 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4413 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4414 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004415 VIXL_ASSERT(allow_macro_instructions_);
4416 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004417 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004418 ITScope it_scope(this, &cond);
4419 strexb(cond, rd, rt, operand);
4420 }
4421 void Strexb(Register rd, Register rt, const MemOperand& operand) {
4422 Strexb(al, rd, rt, operand);
4423 }
4424
4425 void Strexd(Condition cond,
4426 Register rd,
4427 Register rt,
4428 Register rt2,
4429 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004430 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4431 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4432 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4433 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004434 VIXL_ASSERT(allow_macro_instructions_);
4435 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004436 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004437 ITScope it_scope(this, &cond);
4438 strexd(cond, rd, rt, rt2, operand);
4439 }
4440 void Strexd(Register rd,
4441 Register rt,
4442 Register rt2,
4443 const MemOperand& operand) {
4444 Strexd(al, rd, rt, rt2, operand);
4445 }
4446
4447 void Strexh(Condition cond,
4448 Register rd,
4449 Register rt,
4450 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004451 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4452 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4453 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004454 VIXL_ASSERT(allow_macro_instructions_);
4455 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004456 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004457 ITScope it_scope(this, &cond);
4458 strexh(cond, rd, rt, operand);
4459 }
4460 void Strexh(Register rd, Register rt, const MemOperand& operand) {
4461 Strexh(al, rd, rt, operand);
4462 }
4463
4464 void Strh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004465 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4466 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004467 VIXL_ASSERT(allow_macro_instructions_);
4468 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004469 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004470 bool can_use_it =
4471 // STRH{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4472 (operand.IsImmediate() && rt.IsLow() &&
4473 operand.GetBaseRegister().IsLow() &&
4474 operand.IsOffsetImmediateWithinRange(0, 62, 2) &&
4475 (operand.GetAddrMode() == Offset)) ||
4476 // STRH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4477 (operand.IsPlainRegister() && rt.IsLow() &&
4478 operand.GetBaseRegister().IsLow() &&
4479 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4480 (operand.GetAddrMode() == Offset));
4481 ITScope it_scope(this, &cond, can_use_it);
4482 strh(cond, rt, operand);
4483 }
4484 void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); }
4485
4486 void Sub(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004487 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4488 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4489 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004490 VIXL_ASSERT(allow_macro_instructions_);
4491 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004492 MacroEmissionCheckScope guard(this);
Alexandre Rames628c5262016-09-21 11:52:30 +01004493 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
4494 uint32_t immediate = operand.GetImmediate();
4495 if (immediate == 0) {
4496 return;
4497 }
4498 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004499 bool can_use_it =
4500 // SUB<c>{<q>} <Rd>, <Rn>, #<imm3> ; T1
4501 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() &&
4502 rd.IsLow()) ||
4503 // SUB<c>{<q>} {<Rdn>,} <Rdn>, #<imm8> ; T2
4504 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
4505 rd.IsLow() && rn.Is(rd)) ||
4506 // SUB<c>{<q>} <Rd>, <Rn>, <Rm>
4507 (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
4508 operand.GetBaseRegister().IsLow());
4509 ITScope it_scope(this, &cond, can_use_it);
4510 sub(cond, rd, rn, operand);
4511 }
4512 void Sub(Register rd, Register rn, const Operand& operand) {
4513 Sub(al, rd, rn, operand);
4514 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004515 void Sub(FlagsUpdate flags,
4516 Condition cond,
4517 Register rd,
4518 Register rn,
4519 const Operand& operand) {
4520 switch (flags) {
4521 case LeaveFlags:
4522 Sub(cond, rd, rn, operand);
4523 break;
4524 case SetFlags:
4525 Subs(cond, rd, rn, operand);
4526 break;
4527 case DontCare:
4528 bool can_be_16bit_encoded =
4529 IsUsingT32() && cond.Is(al) &&
4530 ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
4531 operand.GetBaseRegister().IsLow()) ||
4532 (operand.IsImmediate() &&
4533 ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) ||
4534 (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256)))));
4535 if (can_be_16bit_encoded) {
4536 Subs(cond, rd, rn, operand);
4537 } else {
4538 Sub(cond, rd, rn, operand);
4539 }
4540 break;
4541 }
4542 }
4543 void Sub(FlagsUpdate flags,
4544 Register rd,
4545 Register rn,
4546 const Operand& operand) {
4547 Sub(flags, al, rd, rn, operand);
4548 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004549
4550 void Subs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004551 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4552 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4553 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004554 VIXL_ASSERT(allow_macro_instructions_);
4555 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004556 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004557 ITScope it_scope(this, &cond);
4558 subs(cond, rd, rn, operand);
4559 }
4560 void Subs(Register rd, Register rn, const Operand& operand) {
4561 Subs(al, rd, rn, operand);
4562 }
4563
Alexandre Ramesd3832962016-07-04 15:03:43 +01004564 void Svc(Condition cond, uint32_t imm) {
4565 VIXL_ASSERT(allow_macro_instructions_);
4566 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004567 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004568 ITScope it_scope(this, &cond);
4569 svc(cond, imm);
4570 }
4571 void Svc(uint32_t imm) { Svc(al, imm); }
4572
4573 void Sxtab(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004574 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4575 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4576 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004577 VIXL_ASSERT(allow_macro_instructions_);
4578 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004579 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004580 ITScope it_scope(this, &cond);
4581 sxtab(cond, rd, rn, operand);
4582 }
4583 void Sxtab(Register rd, Register rn, const Operand& operand) {
4584 Sxtab(al, rd, rn, operand);
4585 }
4586
4587 void Sxtab16(Condition cond,
4588 Register rd,
4589 Register rn,
4590 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004591 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4592 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4593 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004594 VIXL_ASSERT(allow_macro_instructions_);
4595 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004596 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004597 ITScope it_scope(this, &cond);
4598 sxtab16(cond, rd, rn, operand);
4599 }
4600 void Sxtab16(Register rd, Register rn, const Operand& operand) {
4601 Sxtab16(al, rd, rn, operand);
4602 }
4603
4604 void Sxtah(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004605 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4606 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4607 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004608 VIXL_ASSERT(allow_macro_instructions_);
4609 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004610 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004611 ITScope it_scope(this, &cond);
4612 sxtah(cond, rd, rn, operand);
4613 }
4614 void Sxtah(Register rd, Register rn, const Operand& operand) {
4615 Sxtah(al, rd, rn, operand);
4616 }
4617
4618 void Sxtb(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004619 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4620 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004621 VIXL_ASSERT(allow_macro_instructions_);
4622 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004623 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004624 ITScope it_scope(this, &cond);
4625 sxtb(cond, rd, operand);
4626 }
4627 void Sxtb(Register rd, const Operand& operand) { Sxtb(al, rd, operand); }
4628
4629 void Sxtb16(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004630 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4631 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004632 VIXL_ASSERT(allow_macro_instructions_);
4633 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004634 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004635 ITScope it_scope(this, &cond);
4636 sxtb16(cond, rd, operand);
4637 }
4638 void Sxtb16(Register rd, const Operand& operand) { Sxtb16(al, rd, operand); }
4639
4640 void Sxth(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004641 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4642 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004643 VIXL_ASSERT(allow_macro_instructions_);
4644 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004645 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004646 ITScope it_scope(this, &cond);
4647 sxth(cond, rd, operand);
4648 }
4649 void Sxth(Register rd, const Operand& operand) { Sxth(al, rd, operand); }
4650
Alexandre Ramesd3832962016-07-04 15:03:43 +01004651 void Teq(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004652 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4653 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004654 VIXL_ASSERT(allow_macro_instructions_);
4655 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004656 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004657 ITScope it_scope(this, &cond);
4658 teq(cond, rn, operand);
4659 }
4660 void Teq(Register rn, const Operand& operand) { Teq(al, rn, operand); }
4661
4662 void Tst(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004663 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4664 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004665 VIXL_ASSERT(allow_macro_instructions_);
4666 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004667 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004668 bool can_use_it =
4669 // TST{<c>}{<q>} <Rn>, <Rm> ; T1
4670 operand.IsPlainRegister() && rn.IsLow() &&
4671 operand.GetBaseRegister().IsLow();
4672 ITScope it_scope(this, &cond, can_use_it);
4673 tst(cond, rn, operand);
4674 }
4675 void Tst(Register rn, const Operand& operand) { Tst(al, rn, operand); }
4676
4677 void Uadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004678 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4679 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4680 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004681 VIXL_ASSERT(allow_macro_instructions_);
4682 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004683 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004684 ITScope it_scope(this, &cond);
4685 uadd16(cond, rd, rn, rm);
4686 }
4687 void Uadd16(Register rd, Register rn, Register rm) { Uadd16(al, rd, rn, rm); }
4688
4689 void Uadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004690 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4691 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004693 VIXL_ASSERT(allow_macro_instructions_);
4694 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004695 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004696 ITScope it_scope(this, &cond);
4697 uadd8(cond, rd, rn, rm);
4698 }
4699 void Uadd8(Register rd, Register rn, Register rm) { Uadd8(al, rd, rn, rm); }
4700
4701 void Uasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004702 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4703 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4704 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004705 VIXL_ASSERT(allow_macro_instructions_);
4706 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004707 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004708 ITScope it_scope(this, &cond);
4709 uasx(cond, rd, rn, rm);
4710 }
4711 void Uasx(Register rd, Register rn, Register rm) { Uasx(al, rd, rn, rm); }
4712
4713 void Ubfx(Condition cond,
4714 Register rd,
4715 Register rn,
4716 uint32_t lsb,
4717 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004718 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4719 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4720 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004721 VIXL_ASSERT(allow_macro_instructions_);
4722 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004723 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004724 ITScope it_scope(this, &cond);
4725 ubfx(cond, rd, rn, lsb, operand);
4726 }
4727 void Ubfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) {
4728 Ubfx(al, rd, rn, lsb, operand);
4729 }
4730
4731 void Udf(Condition cond, uint32_t imm) {
4732 VIXL_ASSERT(allow_macro_instructions_);
4733 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004734 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004735 ITScope it_scope(this, &cond);
4736 udf(cond, imm);
4737 }
4738 void Udf(uint32_t imm) { Udf(al, imm); }
4739
4740 void Udiv(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004741 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4742 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4743 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004744 VIXL_ASSERT(allow_macro_instructions_);
4745 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004746 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004747 ITScope it_scope(this, &cond);
4748 udiv(cond, rd, rn, rm);
4749 }
4750 void Udiv(Register rd, Register rn, Register rm) { Udiv(al, rd, rn, rm); }
4751
4752 void Uhadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004753 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4754 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4755 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004756 VIXL_ASSERT(allow_macro_instructions_);
4757 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004758 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004759 ITScope it_scope(this, &cond);
4760 uhadd16(cond, rd, rn, rm);
4761 }
4762 void Uhadd16(Register rd, Register rn, Register rm) {
4763 Uhadd16(al, rd, rn, rm);
4764 }
4765
4766 void Uhadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004767 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4768 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4769 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004770 VIXL_ASSERT(allow_macro_instructions_);
4771 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004772 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004773 ITScope it_scope(this, &cond);
4774 uhadd8(cond, rd, rn, rm);
4775 }
4776 void Uhadd8(Register rd, Register rn, Register rm) { Uhadd8(al, rd, rn, rm); }
4777
4778 void Uhasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004779 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4780 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4781 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004782 VIXL_ASSERT(allow_macro_instructions_);
4783 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004784 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004785 ITScope it_scope(this, &cond);
4786 uhasx(cond, rd, rn, rm);
4787 }
4788 void Uhasx(Register rd, Register rn, Register rm) { Uhasx(al, rd, rn, rm); }
4789
4790 void Uhsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004791 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4792 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4793 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004794 VIXL_ASSERT(allow_macro_instructions_);
4795 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004796 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004797 ITScope it_scope(this, &cond);
4798 uhsax(cond, rd, rn, rm);
4799 }
4800 void Uhsax(Register rd, Register rn, Register rm) { Uhsax(al, rd, rn, rm); }
4801
4802 void Uhsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004803 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4804 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4805 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004806 VIXL_ASSERT(allow_macro_instructions_);
4807 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004808 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004809 ITScope it_scope(this, &cond);
4810 uhsub16(cond, rd, rn, rm);
4811 }
4812 void Uhsub16(Register rd, Register rn, Register rm) {
4813 Uhsub16(al, rd, rn, rm);
4814 }
4815
4816 void Uhsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004817 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4818 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4819 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004820 VIXL_ASSERT(allow_macro_instructions_);
4821 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004822 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004823 ITScope it_scope(this, &cond);
4824 uhsub8(cond, rd, rn, rm);
4825 }
4826 void Uhsub8(Register rd, Register rn, Register rm) { Uhsub8(al, rd, rn, rm); }
4827
4828 void Umaal(
4829 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004830 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4831 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4832 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4833 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004834 VIXL_ASSERT(allow_macro_instructions_);
4835 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004836 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004837 ITScope it_scope(this, &cond);
4838 umaal(cond, rdlo, rdhi, rn, rm);
4839 }
4840 void Umaal(Register rdlo, Register rdhi, Register rn, Register rm) {
4841 Umaal(al, rdlo, rdhi, rn, rm);
4842 }
4843
4844 void Umlal(
4845 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004846 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4847 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4848 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4849 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004850 VIXL_ASSERT(allow_macro_instructions_);
4851 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004852 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004853 ITScope it_scope(this, &cond);
4854 umlal(cond, rdlo, rdhi, rn, rm);
4855 }
4856 void Umlal(Register rdlo, Register rdhi, Register rn, Register rm) {
4857 Umlal(al, rdlo, rdhi, rn, rm);
4858 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004859 void Umlal(FlagsUpdate flags,
4860 Condition cond,
4861 Register rdlo,
4862 Register rdhi,
4863 Register rn,
4864 Register rm) {
4865 switch (flags) {
4866 case LeaveFlags:
4867 Umlal(cond, rdlo, rdhi, rn, rm);
4868 break;
4869 case SetFlags:
4870 Umlals(cond, rdlo, rdhi, rn, rm);
4871 break;
4872 case DontCare:
4873 Umlal(cond, rdlo, rdhi, rn, rm);
4874 break;
4875 }
4876 }
4877 void Umlal(FlagsUpdate flags,
4878 Register rdlo,
4879 Register rdhi,
4880 Register rn,
4881 Register rm) {
4882 Umlal(flags, al, rdlo, rdhi, rn, rm);
4883 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004884
4885 void Umlals(
4886 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004887 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4888 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4889 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4890 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004891 VIXL_ASSERT(allow_macro_instructions_);
4892 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004893 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004894 ITScope it_scope(this, &cond);
4895 umlals(cond, rdlo, rdhi, rn, rm);
4896 }
4897 void Umlals(Register rdlo, Register rdhi, Register rn, Register rm) {
4898 Umlals(al, rdlo, rdhi, rn, rm);
4899 }
4900
4901 void Umull(
4902 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004903 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4904 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4905 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4906 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004907 VIXL_ASSERT(allow_macro_instructions_);
4908 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004909 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004910 ITScope it_scope(this, &cond);
4911 umull(cond, rdlo, rdhi, rn, rm);
4912 }
4913 void Umull(Register rdlo, Register rdhi, Register rn, Register rm) {
4914 Umull(al, rdlo, rdhi, rn, rm);
4915 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004916 void Umull(FlagsUpdate flags,
4917 Condition cond,
4918 Register rdlo,
4919 Register rdhi,
4920 Register rn,
4921 Register rm) {
4922 switch (flags) {
4923 case LeaveFlags:
4924 Umull(cond, rdlo, rdhi, rn, rm);
4925 break;
4926 case SetFlags:
4927 Umulls(cond, rdlo, rdhi, rn, rm);
4928 break;
4929 case DontCare:
4930 Umull(cond, rdlo, rdhi, rn, rm);
4931 break;
4932 }
4933 }
4934 void Umull(FlagsUpdate flags,
4935 Register rdlo,
4936 Register rdhi,
4937 Register rn,
4938 Register rm) {
4939 Umull(flags, al, rdlo, rdhi, rn, rm);
4940 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004941
4942 void Umulls(
4943 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4945 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4946 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4947 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004948 VIXL_ASSERT(allow_macro_instructions_);
4949 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004950 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004951 ITScope it_scope(this, &cond);
4952 umulls(cond, rdlo, rdhi, rn, rm);
4953 }
4954 void Umulls(Register rdlo, Register rdhi, Register rn, Register rm) {
4955 Umulls(al, rdlo, rdhi, rn, rm);
4956 }
4957
4958 void Uqadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004959 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4960 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4961 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004962 VIXL_ASSERT(allow_macro_instructions_);
4963 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004964 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004965 ITScope it_scope(this, &cond);
4966 uqadd16(cond, rd, rn, rm);
4967 }
4968 void Uqadd16(Register rd, Register rn, Register rm) {
4969 Uqadd16(al, rd, rn, rm);
4970 }
4971
4972 void Uqadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004973 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4974 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4975 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004976 VIXL_ASSERT(allow_macro_instructions_);
4977 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004978 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004979 ITScope it_scope(this, &cond);
4980 uqadd8(cond, rd, rn, rm);
4981 }
4982 void Uqadd8(Register rd, Register rn, Register rm) { Uqadd8(al, rd, rn, rm); }
4983
4984 void Uqasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004985 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4986 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4987 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004988 VIXL_ASSERT(allow_macro_instructions_);
4989 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004990 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004991 ITScope it_scope(this, &cond);
4992 uqasx(cond, rd, rn, rm);
4993 }
4994 void Uqasx(Register rd, Register rn, Register rm) { Uqasx(al, rd, rn, rm); }
4995
4996 void Uqsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004997 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4998 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4999 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005000 VIXL_ASSERT(allow_macro_instructions_);
5001 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005002 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005003 ITScope it_scope(this, &cond);
5004 uqsax(cond, rd, rn, rm);
5005 }
5006 void Uqsax(Register rd, Register rn, Register rm) { Uqsax(al, rd, rn, rm); }
5007
5008 void Uqsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005009 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5010 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5011 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005012 VIXL_ASSERT(allow_macro_instructions_);
5013 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005014 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005015 ITScope it_scope(this, &cond);
5016 uqsub16(cond, rd, rn, rm);
5017 }
5018 void Uqsub16(Register rd, Register rn, Register rm) {
5019 Uqsub16(al, rd, rn, rm);
5020 }
5021
5022 void Uqsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005023 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5024 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5025 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005026 VIXL_ASSERT(allow_macro_instructions_);
5027 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005028 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005029 ITScope it_scope(this, &cond);
5030 uqsub8(cond, rd, rn, rm);
5031 }
5032 void Uqsub8(Register rd, Register rn, Register rm) { Uqsub8(al, rd, rn, rm); }
5033
5034 void Usad8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005035 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5036 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5037 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005038 VIXL_ASSERT(allow_macro_instructions_);
5039 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005040 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005041 ITScope it_scope(this, &cond);
5042 usad8(cond, rd, rn, rm);
5043 }
5044 void Usad8(Register rd, Register rn, Register rm) { Usad8(al, rd, rn, rm); }
5045
5046 void Usada8(
5047 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005048 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5049 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5050 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5051 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005052 VIXL_ASSERT(allow_macro_instructions_);
5053 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005054 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005055 ITScope it_scope(this, &cond);
5056 usada8(cond, rd, rn, rm, ra);
5057 }
5058 void Usada8(Register rd, Register rn, Register rm, Register ra) {
5059 Usada8(al, rd, rn, rm, ra);
5060 }
5061
5062 void Usat(Condition cond, Register rd, uint32_t imm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005063 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5064 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005065 VIXL_ASSERT(allow_macro_instructions_);
5066 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005067 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005068 ITScope it_scope(this, &cond);
5069 usat(cond, rd, imm, operand);
5070 }
5071 void Usat(Register rd, uint32_t imm, const Operand& operand) {
5072 Usat(al, rd, imm, operand);
5073 }
5074
5075 void Usat16(Condition cond, Register rd, uint32_t imm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005076 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5077 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005078 VIXL_ASSERT(allow_macro_instructions_);
5079 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005080 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005081 ITScope it_scope(this, &cond);
5082 usat16(cond, rd, imm, rn);
5083 }
5084 void Usat16(Register rd, uint32_t imm, Register rn) {
5085 Usat16(al, rd, imm, rn);
5086 }
5087
5088 void Usax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005089 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5090 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5091 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005092 VIXL_ASSERT(allow_macro_instructions_);
5093 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005094 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005095 ITScope it_scope(this, &cond);
5096 usax(cond, rd, rn, rm);
5097 }
5098 void Usax(Register rd, Register rn, Register rm) { Usax(al, rd, rn, rm); }
5099
5100 void Usub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005101 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5102 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5103 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005104 VIXL_ASSERT(allow_macro_instructions_);
5105 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005106 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005107 ITScope it_scope(this, &cond);
5108 usub16(cond, rd, rn, rm);
5109 }
5110 void Usub16(Register rd, Register rn, Register rm) { Usub16(al, rd, rn, rm); }
5111
5112 void Usub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005113 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5114 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5115 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005116 VIXL_ASSERT(allow_macro_instructions_);
5117 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005118 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005119 ITScope it_scope(this, &cond);
5120 usub8(cond, rd, rn, rm);
5121 }
5122 void Usub8(Register rd, Register rn, Register rm) { Usub8(al, rd, rn, rm); }
5123
5124 void Uxtab(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005125 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5126 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5127 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005128 VIXL_ASSERT(allow_macro_instructions_);
5129 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005130 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005131 ITScope it_scope(this, &cond);
5132 uxtab(cond, rd, rn, operand);
5133 }
5134 void Uxtab(Register rd, Register rn, const Operand& operand) {
5135 Uxtab(al, rd, rn, operand);
5136 }
5137
5138 void Uxtab16(Condition cond,
5139 Register rd,
5140 Register rn,
5141 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005142 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5143 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5144 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005145 VIXL_ASSERT(allow_macro_instructions_);
5146 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005147 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005148 ITScope it_scope(this, &cond);
5149 uxtab16(cond, rd, rn, operand);
5150 }
5151 void Uxtab16(Register rd, Register rn, const Operand& operand) {
5152 Uxtab16(al, rd, rn, operand);
5153 }
5154
5155 void Uxtah(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005156 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5157 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5158 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005159 VIXL_ASSERT(allow_macro_instructions_);
5160 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005161 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005162 ITScope it_scope(this, &cond);
5163 uxtah(cond, rd, rn, operand);
5164 }
5165 void Uxtah(Register rd, Register rn, const Operand& operand) {
5166 Uxtah(al, rd, rn, operand);
5167 }
5168
5169 void Uxtb(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005170 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5171 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005172 VIXL_ASSERT(allow_macro_instructions_);
5173 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005174 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005175 ITScope it_scope(this, &cond);
5176 uxtb(cond, rd, operand);
5177 }
5178 void Uxtb(Register rd, const Operand& operand) { Uxtb(al, rd, operand); }
5179
5180 void Uxtb16(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005181 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5182 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005183 VIXL_ASSERT(allow_macro_instructions_);
5184 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005185 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005186 ITScope it_scope(this, &cond);
5187 uxtb16(cond, rd, operand);
5188 }
5189 void Uxtb16(Register rd, const Operand& operand) { Uxtb16(al, rd, operand); }
5190
5191 void Uxth(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005192 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5193 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005194 VIXL_ASSERT(allow_macro_instructions_);
5195 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005196 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005197 ITScope it_scope(this, &cond);
5198 uxth(cond, rd, operand);
5199 }
5200 void Uxth(Register rd, const Operand& operand) { Uxth(al, rd, operand); }
5201
5202 void Vaba(
5203 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005204 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5205 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5206 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005207 VIXL_ASSERT(allow_macro_instructions_);
5208 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005209 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005210 ITScope it_scope(this, &cond);
5211 vaba(cond, dt, rd, rn, rm);
5212 }
5213 void Vaba(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5214 Vaba(al, dt, rd, rn, rm);
5215 }
5216
5217 void Vaba(
5218 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005219 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5220 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5221 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005222 VIXL_ASSERT(allow_macro_instructions_);
5223 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005224 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005225 ITScope it_scope(this, &cond);
5226 vaba(cond, dt, rd, rn, rm);
5227 }
5228 void Vaba(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5229 Vaba(al, dt, rd, rn, rm);
5230 }
5231
5232 void Vabal(
5233 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005234 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5235 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5236 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005237 VIXL_ASSERT(allow_macro_instructions_);
5238 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005239 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005240 ITScope it_scope(this, &cond);
5241 vabal(cond, dt, rd, rn, rm);
5242 }
5243 void Vabal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5244 Vabal(al, dt, rd, rn, rm);
5245 }
5246
5247 void Vabd(
5248 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005249 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5250 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5251 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005252 VIXL_ASSERT(allow_macro_instructions_);
5253 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005254 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005255 ITScope it_scope(this, &cond);
5256 vabd(cond, dt, rd, rn, rm);
5257 }
5258 void Vabd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5259 Vabd(al, dt, rd, rn, rm);
5260 }
5261
5262 void Vabd(
5263 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005264 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5265 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5266 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005267 VIXL_ASSERT(allow_macro_instructions_);
5268 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005269 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005270 ITScope it_scope(this, &cond);
5271 vabd(cond, dt, rd, rn, rm);
5272 }
5273 void Vabd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5274 Vabd(al, dt, rd, rn, rm);
5275 }
5276
5277 void Vabdl(
5278 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005279 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5280 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5281 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005282 VIXL_ASSERT(allow_macro_instructions_);
5283 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005284 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005285 ITScope it_scope(this, &cond);
5286 vabdl(cond, dt, rd, rn, rm);
5287 }
5288 void Vabdl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5289 Vabdl(al, dt, rd, rn, rm);
5290 }
5291
5292 void Vabs(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005293 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5294 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005295 VIXL_ASSERT(allow_macro_instructions_);
5296 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005297 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005298 ITScope it_scope(this, &cond);
5299 vabs(cond, dt, rd, rm);
5300 }
5301 void Vabs(DataType dt, DRegister rd, DRegister rm) { Vabs(al, dt, rd, rm); }
5302
5303 void Vabs(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005304 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5305 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005306 VIXL_ASSERT(allow_macro_instructions_);
5307 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005308 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005309 ITScope it_scope(this, &cond);
5310 vabs(cond, dt, rd, rm);
5311 }
5312 void Vabs(DataType dt, QRegister rd, QRegister rm) { Vabs(al, dt, rd, rm); }
5313
5314 void Vabs(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005315 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5316 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005317 VIXL_ASSERT(allow_macro_instructions_);
5318 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005319 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005320 ITScope it_scope(this, &cond);
5321 vabs(cond, dt, rd, rm);
5322 }
5323 void Vabs(DataType dt, SRegister rd, SRegister rm) { Vabs(al, dt, rd, rm); }
5324
5325 void Vacge(
5326 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005327 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5328 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5329 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005330 VIXL_ASSERT(allow_macro_instructions_);
5331 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005332 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005333 ITScope it_scope(this, &cond);
5334 vacge(cond, dt, rd, rn, rm);
5335 }
5336 void Vacge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5337 Vacge(al, dt, rd, rn, rm);
5338 }
5339
5340 void Vacge(
5341 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005342 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5343 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5344 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005345 VIXL_ASSERT(allow_macro_instructions_);
5346 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005347 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005348 ITScope it_scope(this, &cond);
5349 vacge(cond, dt, rd, rn, rm);
5350 }
5351 void Vacge(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5352 Vacge(al, dt, rd, rn, rm);
5353 }
5354
5355 void Vacgt(
5356 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005357 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5358 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5359 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005360 VIXL_ASSERT(allow_macro_instructions_);
5361 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005362 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005363 ITScope it_scope(this, &cond);
5364 vacgt(cond, dt, rd, rn, rm);
5365 }
5366 void Vacgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5367 Vacgt(al, dt, rd, rn, rm);
5368 }
5369
5370 void Vacgt(
5371 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005372 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5373 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5374 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005375 VIXL_ASSERT(allow_macro_instructions_);
5376 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005377 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005378 ITScope it_scope(this, &cond);
5379 vacgt(cond, dt, rd, rn, rm);
5380 }
5381 void Vacgt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5382 Vacgt(al, dt, rd, rn, rm);
5383 }
5384
5385 void Vacle(
5386 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005387 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5388 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5389 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005390 VIXL_ASSERT(allow_macro_instructions_);
5391 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005392 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005393 ITScope it_scope(this, &cond);
5394 vacle(cond, dt, rd, rn, rm);
5395 }
5396 void Vacle(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5397 Vacle(al, dt, rd, rn, rm);
5398 }
5399
5400 void Vacle(
5401 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005402 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5403 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5404 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005405 VIXL_ASSERT(allow_macro_instructions_);
5406 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005407 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005408 ITScope it_scope(this, &cond);
5409 vacle(cond, dt, rd, rn, rm);
5410 }
5411 void Vacle(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5412 Vacle(al, dt, rd, rn, rm);
5413 }
5414
5415 void Vaclt(
5416 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005417 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5418 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5419 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005420 VIXL_ASSERT(allow_macro_instructions_);
5421 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005422 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005423 ITScope it_scope(this, &cond);
5424 vaclt(cond, dt, rd, rn, rm);
5425 }
5426 void Vaclt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5427 Vaclt(al, dt, rd, rn, rm);
5428 }
5429
5430 void Vaclt(
5431 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005432 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5433 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5434 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005435 VIXL_ASSERT(allow_macro_instructions_);
5436 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005437 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005438 ITScope it_scope(this, &cond);
5439 vaclt(cond, dt, rd, rn, rm);
5440 }
5441 void Vaclt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5442 Vaclt(al, dt, rd, rn, rm);
5443 }
5444
5445 void Vadd(
5446 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005447 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5448 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5449 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005450 VIXL_ASSERT(allow_macro_instructions_);
5451 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005452 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005453 ITScope it_scope(this, &cond);
5454 vadd(cond, dt, rd, rn, rm);
5455 }
5456 void Vadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5457 Vadd(al, dt, rd, rn, rm);
5458 }
5459
5460 void Vadd(
5461 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005462 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5463 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5464 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005465 VIXL_ASSERT(allow_macro_instructions_);
5466 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005467 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005468 ITScope it_scope(this, &cond);
5469 vadd(cond, dt, rd, rn, rm);
5470 }
5471 void Vadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5472 Vadd(al, dt, rd, rn, rm);
5473 }
5474
5475 void Vadd(
5476 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005477 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5478 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5479 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005480 VIXL_ASSERT(allow_macro_instructions_);
5481 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005482 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005483 ITScope it_scope(this, &cond);
5484 vadd(cond, dt, rd, rn, rm);
5485 }
5486 void Vadd(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
5487 Vadd(al, dt, rd, rn, rm);
5488 }
5489
5490 void Vaddhn(
5491 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005492 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5493 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5494 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005495 VIXL_ASSERT(allow_macro_instructions_);
5496 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005497 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005498 ITScope it_scope(this, &cond);
5499 vaddhn(cond, dt, rd, rn, rm);
5500 }
5501 void Vaddhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
5502 Vaddhn(al, dt, rd, rn, rm);
5503 }
5504
5505 void Vaddl(
5506 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005507 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5508 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5509 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005510 VIXL_ASSERT(allow_macro_instructions_);
5511 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005512 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005513 ITScope it_scope(this, &cond);
5514 vaddl(cond, dt, rd, rn, rm);
5515 }
5516 void Vaddl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5517 Vaddl(al, dt, rd, rn, rm);
5518 }
5519
5520 void Vaddw(
5521 Condition cond, DataType dt, QRegister rd, QRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005522 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5523 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5524 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005525 VIXL_ASSERT(allow_macro_instructions_);
5526 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005527 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005528 ITScope it_scope(this, &cond);
5529 vaddw(cond, dt, rd, rn, rm);
5530 }
5531 void Vaddw(DataType dt, QRegister rd, QRegister rn, DRegister rm) {
5532 Vaddw(al, dt, rd, rn, rm);
5533 }
5534
5535 void Vand(Condition cond,
5536 DataType dt,
5537 DRegister rd,
5538 DRegister rn,
5539 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005540 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5541 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5542 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005543 VIXL_ASSERT(allow_macro_instructions_);
5544 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005545 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005546 ITScope it_scope(this, &cond);
5547 vand(cond, dt, rd, rn, operand);
5548 }
5549 void Vand(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
5550 Vand(al, dt, rd, rn, operand);
5551 }
5552
5553 void Vand(Condition cond,
5554 DataType dt,
5555 QRegister rd,
5556 QRegister rn,
5557 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005558 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5559 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5560 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005561 VIXL_ASSERT(allow_macro_instructions_);
5562 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005563 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005564 ITScope it_scope(this, &cond);
5565 vand(cond, dt, rd, rn, operand);
5566 }
5567 void Vand(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
5568 Vand(al, dt, rd, rn, operand);
5569 }
5570
5571 void Vbic(Condition cond,
5572 DataType dt,
5573 DRegister rd,
5574 DRegister rn,
5575 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005576 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5577 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5578 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005579 VIXL_ASSERT(allow_macro_instructions_);
5580 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005581 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005582 ITScope it_scope(this, &cond);
5583 vbic(cond, dt, rd, rn, operand);
5584 }
5585 void Vbic(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
5586 Vbic(al, dt, rd, rn, operand);
5587 }
5588
5589 void Vbic(Condition cond,
5590 DataType dt,
5591 QRegister rd,
5592 QRegister rn,
5593 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005594 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5595 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5596 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005597 VIXL_ASSERT(allow_macro_instructions_);
5598 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005599 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005600 ITScope it_scope(this, &cond);
5601 vbic(cond, dt, rd, rn, operand);
5602 }
5603 void Vbic(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
5604 Vbic(al, dt, rd, rn, operand);
5605 }
5606
5607 void Vbif(
5608 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005609 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5610 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5611 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005612 VIXL_ASSERT(allow_macro_instructions_);
5613 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005614 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005615 ITScope it_scope(this, &cond);
5616 vbif(cond, dt, rd, rn, rm);
5617 }
5618 void Vbif(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5619 Vbif(al, dt, rd, rn, rm);
5620 }
5621 void Vbif(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5622 Vbif(cond, kDataTypeValueNone, rd, rn, rm);
5623 }
5624 void Vbif(DRegister rd, DRegister rn, DRegister rm) {
5625 Vbif(al, kDataTypeValueNone, rd, rn, rm);
5626 }
5627
5628 void Vbif(
5629 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005630 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5631 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5632 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005633 VIXL_ASSERT(allow_macro_instructions_);
5634 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005635 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005636 ITScope it_scope(this, &cond);
5637 vbif(cond, dt, rd, rn, rm);
5638 }
5639 void Vbif(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5640 Vbif(al, dt, rd, rn, rm);
5641 }
5642 void Vbif(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5643 Vbif(cond, kDataTypeValueNone, rd, rn, rm);
5644 }
5645 void Vbif(QRegister rd, QRegister rn, QRegister rm) {
5646 Vbif(al, kDataTypeValueNone, rd, rn, rm);
5647 }
5648
5649 void Vbit(
5650 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005651 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5652 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5653 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005654 VIXL_ASSERT(allow_macro_instructions_);
5655 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005656 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005657 ITScope it_scope(this, &cond);
5658 vbit(cond, dt, rd, rn, rm);
5659 }
5660 void Vbit(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5661 Vbit(al, dt, rd, rn, rm);
5662 }
5663 void Vbit(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5664 Vbit(cond, kDataTypeValueNone, rd, rn, rm);
5665 }
5666 void Vbit(DRegister rd, DRegister rn, DRegister rm) {
5667 Vbit(al, kDataTypeValueNone, rd, rn, rm);
5668 }
5669
5670 void Vbit(
5671 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005672 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5673 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5674 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005675 VIXL_ASSERT(allow_macro_instructions_);
5676 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005677 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005678 ITScope it_scope(this, &cond);
5679 vbit(cond, dt, rd, rn, rm);
5680 }
5681 void Vbit(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5682 Vbit(al, dt, rd, rn, rm);
5683 }
5684 void Vbit(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5685 Vbit(cond, kDataTypeValueNone, rd, rn, rm);
5686 }
5687 void Vbit(QRegister rd, QRegister rn, QRegister rm) {
5688 Vbit(al, kDataTypeValueNone, rd, rn, rm);
5689 }
5690
5691 void Vbsl(
5692 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005693 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5694 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005696 VIXL_ASSERT(allow_macro_instructions_);
5697 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005698 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005699 ITScope it_scope(this, &cond);
5700 vbsl(cond, dt, rd, rn, rm);
5701 }
5702 void Vbsl(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5703 Vbsl(al, dt, rd, rn, rm);
5704 }
5705 void Vbsl(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5706 Vbsl(cond, kDataTypeValueNone, rd, rn, rm);
5707 }
5708 void Vbsl(DRegister rd, DRegister rn, DRegister rm) {
5709 Vbsl(al, kDataTypeValueNone, rd, rn, rm);
5710 }
5711
5712 void Vbsl(
5713 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005714 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5715 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5716 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005717 VIXL_ASSERT(allow_macro_instructions_);
5718 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005719 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005720 ITScope it_scope(this, &cond);
5721 vbsl(cond, dt, rd, rn, rm);
5722 }
5723 void Vbsl(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5724 Vbsl(al, dt, rd, rn, rm);
5725 }
5726 void Vbsl(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5727 Vbsl(cond, kDataTypeValueNone, rd, rn, rm);
5728 }
5729 void Vbsl(QRegister rd, QRegister rn, QRegister rm) {
5730 Vbsl(al, kDataTypeValueNone, rd, rn, rm);
5731 }
5732
5733 void Vceq(Condition cond,
5734 DataType dt,
5735 DRegister rd,
5736 DRegister rm,
5737 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005738 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5739 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5740 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005741 VIXL_ASSERT(allow_macro_instructions_);
5742 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005743 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005744 ITScope it_scope(this, &cond);
5745 vceq(cond, dt, rd, rm, operand);
5746 }
5747 void Vceq(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5748 Vceq(al, dt, rd, rm, operand);
5749 }
5750
5751 void Vceq(Condition cond,
5752 DataType dt,
5753 QRegister rd,
5754 QRegister rm,
5755 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005756 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5757 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5758 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005759 VIXL_ASSERT(allow_macro_instructions_);
5760 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005761 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005762 ITScope it_scope(this, &cond);
5763 vceq(cond, dt, rd, rm, operand);
5764 }
5765 void Vceq(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5766 Vceq(al, dt, rd, rm, operand);
5767 }
5768
5769 void Vceq(
5770 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005771 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5772 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5773 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005774 VIXL_ASSERT(allow_macro_instructions_);
5775 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005776 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005777 ITScope it_scope(this, &cond);
5778 vceq(cond, dt, rd, rn, rm);
5779 }
5780 void Vceq(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5781 Vceq(al, dt, rd, rn, rm);
5782 }
5783
5784 void Vceq(
5785 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005786 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5787 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5788 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005789 VIXL_ASSERT(allow_macro_instructions_);
5790 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005791 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005792 ITScope it_scope(this, &cond);
5793 vceq(cond, dt, rd, rn, rm);
5794 }
5795 void Vceq(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5796 Vceq(al, dt, rd, rn, rm);
5797 }
5798
5799 void Vcge(Condition cond,
5800 DataType dt,
5801 DRegister rd,
5802 DRegister rm,
5803 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005804 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5805 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5806 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005807 VIXL_ASSERT(allow_macro_instructions_);
5808 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005809 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005810 ITScope it_scope(this, &cond);
5811 vcge(cond, dt, rd, rm, operand);
5812 }
5813 void Vcge(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5814 Vcge(al, dt, rd, rm, operand);
5815 }
5816
5817 void Vcge(Condition cond,
5818 DataType dt,
5819 QRegister rd,
5820 QRegister rm,
5821 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005822 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5823 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5824 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005825 VIXL_ASSERT(allow_macro_instructions_);
5826 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005827 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005828 ITScope it_scope(this, &cond);
5829 vcge(cond, dt, rd, rm, operand);
5830 }
5831 void Vcge(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5832 Vcge(al, dt, rd, rm, operand);
5833 }
5834
5835 void Vcge(
5836 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005837 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5838 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5839 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005840 VIXL_ASSERT(allow_macro_instructions_);
5841 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005842 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005843 ITScope it_scope(this, &cond);
5844 vcge(cond, dt, rd, rn, rm);
5845 }
5846 void Vcge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5847 Vcge(al, dt, rd, rn, rm);
5848 }
5849
5850 void Vcge(
5851 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005852 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5853 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5854 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005855 VIXL_ASSERT(allow_macro_instructions_);
5856 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005857 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005858 ITScope it_scope(this, &cond);
5859 vcge(cond, dt, rd, rn, rm);
5860 }
5861 void Vcge(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5862 Vcge(al, dt, rd, rn, rm);
5863 }
5864
5865 void Vcgt(Condition cond,
5866 DataType dt,
5867 DRegister rd,
5868 DRegister rm,
5869 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005870 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5871 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5872 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005873 VIXL_ASSERT(allow_macro_instructions_);
5874 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005875 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005876 ITScope it_scope(this, &cond);
5877 vcgt(cond, dt, rd, rm, operand);
5878 }
5879 void Vcgt(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5880 Vcgt(al, dt, rd, rm, operand);
5881 }
5882
5883 void Vcgt(Condition cond,
5884 DataType dt,
5885 QRegister rd,
5886 QRegister rm,
5887 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005888 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5889 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5890 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005891 VIXL_ASSERT(allow_macro_instructions_);
5892 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005893 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005894 ITScope it_scope(this, &cond);
5895 vcgt(cond, dt, rd, rm, operand);
5896 }
5897 void Vcgt(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5898 Vcgt(al, dt, rd, rm, operand);
5899 }
5900
5901 void Vcgt(
5902 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005903 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5904 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5905 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005906 VIXL_ASSERT(allow_macro_instructions_);
5907 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005908 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005909 ITScope it_scope(this, &cond);
5910 vcgt(cond, dt, rd, rn, rm);
5911 }
5912 void Vcgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5913 Vcgt(al, dt, rd, rn, rm);
5914 }
5915
5916 void Vcgt(
5917 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005918 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5919 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5920 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005921 VIXL_ASSERT(allow_macro_instructions_);
5922 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005923 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005924 ITScope it_scope(this, &cond);
5925 vcgt(cond, dt, rd, rn, rm);
5926 }
5927 void Vcgt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5928 Vcgt(al, dt, rd, rn, rm);
5929 }
5930
5931 void Vcle(Condition cond,
5932 DataType dt,
5933 DRegister rd,
5934 DRegister rm,
5935 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005936 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5937 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5938 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005939 VIXL_ASSERT(allow_macro_instructions_);
5940 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005941 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005942 ITScope it_scope(this, &cond);
5943 vcle(cond, dt, rd, rm, operand);
5944 }
5945 void Vcle(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5946 Vcle(al, dt, rd, rm, operand);
5947 }
5948
5949 void Vcle(Condition cond,
5950 DataType dt,
5951 QRegister rd,
5952 QRegister rm,
5953 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005954 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5955 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5956 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005957 VIXL_ASSERT(allow_macro_instructions_);
5958 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005959 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005960 ITScope it_scope(this, &cond);
5961 vcle(cond, dt, rd, rm, operand);
5962 }
5963 void Vcle(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5964 Vcle(al, dt, rd, rm, operand);
5965 }
5966
5967 void Vcle(
5968 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005969 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5970 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5971 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005972 VIXL_ASSERT(allow_macro_instructions_);
5973 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005974 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005975 ITScope it_scope(this, &cond);
5976 vcle(cond, dt, rd, rn, rm);
5977 }
5978 void Vcle(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5979 Vcle(al, dt, rd, rn, rm);
5980 }
5981
5982 void Vcle(
5983 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005984 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5985 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5986 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005987 VIXL_ASSERT(allow_macro_instructions_);
5988 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005989 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005990 ITScope it_scope(this, &cond);
5991 vcle(cond, dt, rd, rn, rm);
5992 }
5993 void Vcle(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5994 Vcle(al, dt, rd, rn, rm);
5995 }
5996
5997 void Vcls(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005998 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5999 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006000 VIXL_ASSERT(allow_macro_instructions_);
6001 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006002 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006003 ITScope it_scope(this, &cond);
6004 vcls(cond, dt, rd, rm);
6005 }
6006 void Vcls(DataType dt, DRegister rd, DRegister rm) { Vcls(al, dt, rd, rm); }
6007
6008 void Vcls(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006009 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6010 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006011 VIXL_ASSERT(allow_macro_instructions_);
6012 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006013 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006014 ITScope it_scope(this, &cond);
6015 vcls(cond, dt, rd, rm);
6016 }
6017 void Vcls(DataType dt, QRegister rd, QRegister rm) { Vcls(al, dt, rd, rm); }
6018
6019 void Vclt(Condition cond,
6020 DataType dt,
6021 DRegister rd,
6022 DRegister rm,
6023 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006024 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6025 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6026 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006027 VIXL_ASSERT(allow_macro_instructions_);
6028 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006029 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006030 ITScope it_scope(this, &cond);
6031 vclt(cond, dt, rd, rm, operand);
6032 }
6033 void Vclt(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
6034 Vclt(al, dt, rd, rm, operand);
6035 }
6036
6037 void Vclt(Condition cond,
6038 DataType dt,
6039 QRegister rd,
6040 QRegister rm,
6041 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006042 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6043 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6044 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006045 VIXL_ASSERT(allow_macro_instructions_);
6046 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006047 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006048 ITScope it_scope(this, &cond);
6049 vclt(cond, dt, rd, rm, operand);
6050 }
6051 void Vclt(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
6052 Vclt(al, dt, rd, rm, operand);
6053 }
6054
6055 void Vclt(
6056 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006057 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6058 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6059 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006060 VIXL_ASSERT(allow_macro_instructions_);
6061 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006062 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006063 ITScope it_scope(this, &cond);
6064 vclt(cond, dt, rd, rn, rm);
6065 }
6066 void Vclt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6067 Vclt(al, dt, rd, rn, rm);
6068 }
6069
6070 void Vclt(
6071 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006072 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6073 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6074 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006075 VIXL_ASSERT(allow_macro_instructions_);
6076 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006077 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006078 ITScope it_scope(this, &cond);
6079 vclt(cond, dt, rd, rn, rm);
6080 }
6081 void Vclt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6082 Vclt(al, dt, rd, rn, rm);
6083 }
6084
6085 void Vclz(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006086 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6087 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006088 VIXL_ASSERT(allow_macro_instructions_);
6089 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006090 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006091 ITScope it_scope(this, &cond);
6092 vclz(cond, dt, rd, rm);
6093 }
6094 void Vclz(DataType dt, DRegister rd, DRegister rm) { Vclz(al, dt, rd, rm); }
6095
6096 void Vclz(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006097 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6098 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006099 VIXL_ASSERT(allow_macro_instructions_);
6100 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006101 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006102 ITScope it_scope(this, &cond);
6103 vclz(cond, dt, rd, rm);
6104 }
6105 void Vclz(DataType dt, QRegister rd, QRegister rm) { Vclz(al, dt, rd, rm); }
6106
6107 void Vcmp(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006108 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6109 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006110 VIXL_ASSERT(allow_macro_instructions_);
6111 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006112 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006113 ITScope it_scope(this, &cond);
6114 vcmp(cond, dt, rd, rm);
6115 }
6116 void Vcmp(DataType dt, SRegister rd, SRegister rm) { Vcmp(al, dt, rd, rm); }
6117
6118 void Vcmp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006119 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6120 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006121 VIXL_ASSERT(allow_macro_instructions_);
6122 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006123 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006124 ITScope it_scope(this, &cond);
6125 vcmp(cond, dt, rd, rm);
6126 }
6127 void Vcmp(DataType dt, DRegister rd, DRegister rm) { Vcmp(al, dt, rd, rm); }
6128
6129 void Vcmp(Condition cond, DataType dt, SRegister rd, double imm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006130 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006131 VIXL_ASSERT(allow_macro_instructions_);
6132 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006133 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006134 ITScope it_scope(this, &cond);
6135 vcmp(cond, dt, rd, imm);
6136 }
6137 void Vcmp(DataType dt, SRegister rd, double imm) { Vcmp(al, dt, rd, imm); }
6138
6139 void Vcmp(Condition cond, DataType dt, DRegister rd, double imm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006140 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006141 VIXL_ASSERT(allow_macro_instructions_);
6142 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006143 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006144 ITScope it_scope(this, &cond);
6145 vcmp(cond, dt, rd, imm);
6146 }
6147 void Vcmp(DataType dt, DRegister rd, double imm) { Vcmp(al, dt, rd, imm); }
6148
6149 void Vcmpe(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006150 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6151 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006152 VIXL_ASSERT(allow_macro_instructions_);
6153 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006154 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006155 ITScope it_scope(this, &cond);
6156 vcmpe(cond, dt, rd, rm);
6157 }
6158 void Vcmpe(DataType dt, SRegister rd, SRegister rm) { Vcmpe(al, dt, rd, rm); }
6159
6160 void Vcmpe(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006161 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6162 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006163 VIXL_ASSERT(allow_macro_instructions_);
6164 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006165 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006166 ITScope it_scope(this, &cond);
6167 vcmpe(cond, dt, rd, rm);
6168 }
6169 void Vcmpe(DataType dt, DRegister rd, DRegister rm) { Vcmpe(al, dt, rd, rm); }
6170
6171 void Vcmpe(Condition cond, DataType dt, SRegister rd, double imm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006172 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006173 VIXL_ASSERT(allow_macro_instructions_);
6174 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006175 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006176 ITScope it_scope(this, &cond);
6177 vcmpe(cond, dt, rd, imm);
6178 }
6179 void Vcmpe(DataType dt, SRegister rd, double imm) { Vcmpe(al, dt, rd, imm); }
6180
6181 void Vcmpe(Condition cond, DataType dt, DRegister rd, double imm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006182 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006183 VIXL_ASSERT(allow_macro_instructions_);
6184 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006185 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006186 ITScope it_scope(this, &cond);
6187 vcmpe(cond, dt, rd, imm);
6188 }
6189 void Vcmpe(DataType dt, DRegister rd, double imm) { Vcmpe(al, dt, rd, imm); }
6190
6191 void Vcnt(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006192 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6193 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006194 VIXL_ASSERT(allow_macro_instructions_);
6195 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006196 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006197 ITScope it_scope(this, &cond);
6198 vcnt(cond, dt, rd, rm);
6199 }
6200 void Vcnt(DataType dt, DRegister rd, DRegister rm) { Vcnt(al, dt, rd, rm); }
6201
6202 void Vcnt(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006203 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6204 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006205 VIXL_ASSERT(allow_macro_instructions_);
6206 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006207 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006208 ITScope it_scope(this, &cond);
6209 vcnt(cond, dt, rd, rm);
6210 }
6211 void Vcnt(DataType dt, QRegister rd, QRegister rm) { Vcnt(al, dt, rd, rm); }
6212
6213 void Vcvt(
6214 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006215 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6216 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006217 VIXL_ASSERT(allow_macro_instructions_);
6218 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006219 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006220 ITScope it_scope(this, &cond);
6221 vcvt(cond, dt1, dt2, rd, rm);
6222 }
6223 void Vcvt(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6224 Vcvt(al, dt1, dt2, rd, rm);
6225 }
6226
6227 void Vcvt(
6228 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006229 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6230 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006231 VIXL_ASSERT(allow_macro_instructions_);
6232 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006233 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006234 ITScope it_scope(this, &cond);
6235 vcvt(cond, dt1, dt2, rd, rm);
6236 }
6237 void Vcvt(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6238 Vcvt(al, dt1, dt2, rd, rm);
6239 }
6240
6241 void Vcvt(Condition cond,
6242 DataType dt1,
6243 DataType dt2,
6244 DRegister rd,
6245 DRegister rm,
6246 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006247 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6248 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006249 VIXL_ASSERT(allow_macro_instructions_);
6250 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006251 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006252 ITScope it_scope(this, &cond);
6253 vcvt(cond, dt1, dt2, rd, rm, fbits);
6254 }
6255 void Vcvt(
6256 DataType dt1, DataType dt2, DRegister rd, DRegister rm, int32_t fbits) {
6257 Vcvt(al, dt1, dt2, rd, rm, fbits);
6258 }
6259
6260 void Vcvt(Condition cond,
6261 DataType dt1,
6262 DataType dt2,
6263 QRegister rd,
6264 QRegister rm,
6265 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006266 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6267 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006268 VIXL_ASSERT(allow_macro_instructions_);
6269 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006270 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006271 ITScope it_scope(this, &cond);
6272 vcvt(cond, dt1, dt2, rd, rm, fbits);
6273 }
6274 void Vcvt(
6275 DataType dt1, DataType dt2, QRegister rd, QRegister rm, int32_t fbits) {
6276 Vcvt(al, dt1, dt2, rd, rm, fbits);
6277 }
6278
6279 void Vcvt(Condition cond,
6280 DataType dt1,
6281 DataType dt2,
6282 SRegister rd,
6283 SRegister rm,
6284 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006285 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6286 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006287 VIXL_ASSERT(allow_macro_instructions_);
6288 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006289 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006290 ITScope it_scope(this, &cond);
6291 vcvt(cond, dt1, dt2, rd, rm, fbits);
6292 }
6293 void Vcvt(
6294 DataType dt1, DataType dt2, SRegister rd, SRegister rm, int32_t fbits) {
6295 Vcvt(al, dt1, dt2, rd, rm, fbits);
6296 }
6297
6298 void Vcvt(
6299 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006300 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6301 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006302 VIXL_ASSERT(allow_macro_instructions_);
6303 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006304 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006305 ITScope it_scope(this, &cond);
6306 vcvt(cond, dt1, dt2, rd, rm);
6307 }
6308 void Vcvt(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
6309 Vcvt(al, dt1, dt2, rd, rm);
6310 }
6311
6312 void Vcvt(
6313 Condition cond, DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006314 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6315 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006316 VIXL_ASSERT(allow_macro_instructions_);
6317 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006318 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006319 ITScope it_scope(this, &cond);
6320 vcvt(cond, dt1, dt2, rd, rm);
6321 }
6322 void Vcvt(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
6323 Vcvt(al, dt1, dt2, rd, rm);
6324 }
6325
6326 void Vcvt(
6327 Condition cond, DataType dt1, DataType dt2, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006328 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6329 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006330 VIXL_ASSERT(allow_macro_instructions_);
6331 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006332 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006333 ITScope it_scope(this, &cond);
6334 vcvt(cond, dt1, dt2, rd, rm);
6335 }
6336 void Vcvt(DataType dt1, DataType dt2, DRegister rd, QRegister rm) {
6337 Vcvt(al, dt1, dt2, rd, rm);
6338 }
6339
6340 void Vcvt(
6341 Condition cond, DataType dt1, DataType dt2, QRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006342 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6343 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006344 VIXL_ASSERT(allow_macro_instructions_);
6345 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006346 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006347 ITScope it_scope(this, &cond);
6348 vcvt(cond, dt1, dt2, rd, rm);
6349 }
6350 void Vcvt(DataType dt1, DataType dt2, QRegister rd, DRegister rm) {
6351 Vcvt(al, dt1, dt2, rd, rm);
6352 }
6353
6354 void Vcvt(
6355 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006356 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6357 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006358 VIXL_ASSERT(allow_macro_instructions_);
6359 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006360 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006361 ITScope it_scope(this, &cond);
6362 vcvt(cond, dt1, dt2, rd, rm);
6363 }
6364 void Vcvt(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6365 Vcvt(al, dt1, dt2, rd, rm);
6366 }
6367
6368 void Vcvta(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006369 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6370 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006371 VIXL_ASSERT(allow_macro_instructions_);
6372 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006373 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006374 vcvta(dt1, dt2, rd, rm);
6375 }
6376
6377 void Vcvta(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006378 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6379 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006380 VIXL_ASSERT(allow_macro_instructions_);
6381 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006382 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006383 vcvta(dt1, dt2, rd, rm);
6384 }
6385
6386 void Vcvta(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006387 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6388 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006389 VIXL_ASSERT(allow_macro_instructions_);
6390 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006391 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006392 vcvta(dt1, dt2, rd, rm);
6393 }
6394
6395 void Vcvta(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006396 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6397 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006398 VIXL_ASSERT(allow_macro_instructions_);
6399 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006400 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006401 vcvta(dt1, dt2, rd, rm);
6402 }
6403
6404 void Vcvtb(
6405 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006406 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6407 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006408 VIXL_ASSERT(allow_macro_instructions_);
6409 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006410 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006411 ITScope it_scope(this, &cond);
6412 vcvtb(cond, dt1, dt2, rd, rm);
6413 }
6414 void Vcvtb(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6415 Vcvtb(al, dt1, dt2, rd, rm);
6416 }
6417
6418 void Vcvtb(
6419 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006420 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6421 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006422 VIXL_ASSERT(allow_macro_instructions_);
6423 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006424 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006425 ITScope it_scope(this, &cond);
6426 vcvtb(cond, dt1, dt2, rd, rm);
6427 }
6428 void Vcvtb(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6429 Vcvtb(al, dt1, dt2, rd, rm);
6430 }
6431
6432 void Vcvtb(
6433 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006434 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6435 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006436 VIXL_ASSERT(allow_macro_instructions_);
6437 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006438 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006439 ITScope it_scope(this, &cond);
6440 vcvtb(cond, dt1, dt2, rd, rm);
6441 }
6442 void Vcvtb(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6443 Vcvtb(al, dt1, dt2, rd, rm);
6444 }
6445
6446 void Vcvtm(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006447 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6448 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006449 VIXL_ASSERT(allow_macro_instructions_);
6450 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006451 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006452 vcvtm(dt1, dt2, rd, rm);
6453 }
6454
6455 void Vcvtm(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006456 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6457 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006458 VIXL_ASSERT(allow_macro_instructions_);
6459 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006460 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006461 vcvtm(dt1, dt2, rd, rm);
6462 }
6463
6464 void Vcvtm(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006465 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6466 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006467 VIXL_ASSERT(allow_macro_instructions_);
6468 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006469 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006470 vcvtm(dt1, dt2, rd, rm);
6471 }
6472
6473 void Vcvtm(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006474 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6475 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006476 VIXL_ASSERT(allow_macro_instructions_);
6477 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006478 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006479 vcvtm(dt1, dt2, rd, rm);
6480 }
6481
6482 void Vcvtn(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006483 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006485 VIXL_ASSERT(allow_macro_instructions_);
6486 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006487 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006488 vcvtn(dt1, dt2, rd, rm);
6489 }
6490
6491 void Vcvtn(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006492 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6493 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006494 VIXL_ASSERT(allow_macro_instructions_);
6495 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006496 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006497 vcvtn(dt1, dt2, rd, rm);
6498 }
6499
6500 void Vcvtn(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006501 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6502 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006503 VIXL_ASSERT(allow_macro_instructions_);
6504 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006505 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006506 vcvtn(dt1, dt2, rd, rm);
6507 }
6508
6509 void Vcvtn(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006510 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6511 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006512 VIXL_ASSERT(allow_macro_instructions_);
6513 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006514 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006515 vcvtn(dt1, dt2, rd, rm);
6516 }
6517
6518 void Vcvtp(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006519 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6520 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006521 VIXL_ASSERT(allow_macro_instructions_);
6522 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006523 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006524 vcvtp(dt1, dt2, rd, rm);
6525 }
6526
6527 void Vcvtp(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006528 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6529 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006530 VIXL_ASSERT(allow_macro_instructions_);
6531 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006532 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006533 vcvtp(dt1, dt2, rd, rm);
6534 }
6535
6536 void Vcvtp(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006537 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6538 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006539 VIXL_ASSERT(allow_macro_instructions_);
6540 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006541 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006542 vcvtp(dt1, dt2, rd, rm);
6543 }
6544
6545 void Vcvtp(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006546 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6547 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006548 VIXL_ASSERT(allow_macro_instructions_);
6549 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006550 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006551 vcvtp(dt1, dt2, rd, rm);
6552 }
6553
6554 void Vcvtr(
6555 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006556 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6557 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006558 VIXL_ASSERT(allow_macro_instructions_);
6559 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006560 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006561 ITScope it_scope(this, &cond);
6562 vcvtr(cond, dt1, dt2, rd, rm);
6563 }
6564 void Vcvtr(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6565 Vcvtr(al, dt1, dt2, rd, rm);
6566 }
6567
6568 void Vcvtr(
6569 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006570 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6571 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006572 VIXL_ASSERT(allow_macro_instructions_);
6573 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006574 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006575 ITScope it_scope(this, &cond);
6576 vcvtr(cond, dt1, dt2, rd, rm);
6577 }
6578 void Vcvtr(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6579 Vcvtr(al, dt1, dt2, rd, rm);
6580 }
6581
6582 void Vcvtt(
6583 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006584 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6585 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006586 VIXL_ASSERT(allow_macro_instructions_);
6587 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006588 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006589 ITScope it_scope(this, &cond);
6590 vcvtt(cond, dt1, dt2, rd, rm);
6591 }
6592 void Vcvtt(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6593 Vcvtt(al, dt1, dt2, rd, rm);
6594 }
6595
6596 void Vcvtt(
6597 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006598 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6599 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006600 VIXL_ASSERT(allow_macro_instructions_);
6601 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006602 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006603 ITScope it_scope(this, &cond);
6604 vcvtt(cond, dt1, dt2, rd, rm);
6605 }
6606 void Vcvtt(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6607 Vcvtt(al, dt1, dt2, rd, rm);
6608 }
6609
6610 void Vcvtt(
6611 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006612 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6613 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006614 VIXL_ASSERT(allow_macro_instructions_);
6615 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006616 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006617 ITScope it_scope(this, &cond);
6618 vcvtt(cond, dt1, dt2, rd, rm);
6619 }
6620 void Vcvtt(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6621 Vcvtt(al, dt1, dt2, rd, rm);
6622 }
6623
6624 void Vdiv(
6625 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006626 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6627 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6628 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006629 VIXL_ASSERT(allow_macro_instructions_);
6630 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006631 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006632 ITScope it_scope(this, &cond);
6633 vdiv(cond, dt, rd, rn, rm);
6634 }
6635 void Vdiv(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6636 Vdiv(al, dt, rd, rn, rm);
6637 }
6638
6639 void Vdiv(
6640 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006641 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6642 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6643 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006644 VIXL_ASSERT(allow_macro_instructions_);
6645 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006646 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006647 ITScope it_scope(this, &cond);
6648 vdiv(cond, dt, rd, rn, rm);
6649 }
6650 void Vdiv(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6651 Vdiv(al, dt, rd, rn, rm);
6652 }
6653
6654 void Vdup(Condition cond, DataType dt, QRegister rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006655 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6656 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006657 VIXL_ASSERT(allow_macro_instructions_);
6658 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006659 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006660 ITScope it_scope(this, &cond);
6661 vdup(cond, dt, rd, rt);
6662 }
6663 void Vdup(DataType dt, QRegister rd, Register rt) { Vdup(al, dt, rd, rt); }
6664
6665 void Vdup(Condition cond, DataType dt, DRegister rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006666 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6667 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006668 VIXL_ASSERT(allow_macro_instructions_);
6669 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006670 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006671 ITScope it_scope(this, &cond);
6672 vdup(cond, dt, rd, rt);
6673 }
6674 void Vdup(DataType dt, DRegister rd, Register rt) { Vdup(al, dt, rd, rt); }
6675
6676 void Vdup(Condition cond, DataType dt, DRegister rd, DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006677 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6678 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006679 VIXL_ASSERT(allow_macro_instructions_);
6680 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006681 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006682 ITScope it_scope(this, &cond);
6683 vdup(cond, dt, rd, rm);
6684 }
6685 void Vdup(DataType dt, DRegister rd, DRegisterLane rm) {
6686 Vdup(al, dt, rd, rm);
6687 }
6688
6689 void Vdup(Condition cond, DataType dt, QRegister rd, DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006690 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6691 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006692 VIXL_ASSERT(allow_macro_instructions_);
6693 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006694 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006695 ITScope it_scope(this, &cond);
6696 vdup(cond, dt, rd, rm);
6697 }
6698 void Vdup(DataType dt, QRegister rd, DRegisterLane rm) {
6699 Vdup(al, dt, rd, rm);
6700 }
6701
6702 void Veor(
6703 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006704 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6705 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6706 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006707 VIXL_ASSERT(allow_macro_instructions_);
6708 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006709 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006710 ITScope it_scope(this, &cond);
6711 veor(cond, dt, rd, rn, rm);
6712 }
6713 void Veor(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6714 Veor(al, dt, rd, rn, rm);
6715 }
6716 void Veor(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
6717 Veor(cond, kDataTypeValueNone, rd, rn, rm);
6718 }
6719 void Veor(DRegister rd, DRegister rn, DRegister rm) {
6720 Veor(al, kDataTypeValueNone, rd, rn, rm);
6721 }
6722
6723 void Veor(
6724 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006725 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6726 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6727 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006728 VIXL_ASSERT(allow_macro_instructions_);
6729 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006730 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006731 ITScope it_scope(this, &cond);
6732 veor(cond, dt, rd, rn, rm);
6733 }
6734 void Veor(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6735 Veor(al, dt, rd, rn, rm);
6736 }
6737 void Veor(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
6738 Veor(cond, kDataTypeValueNone, rd, rn, rm);
6739 }
6740 void Veor(QRegister rd, QRegister rn, QRegister rm) {
6741 Veor(al, kDataTypeValueNone, rd, rn, rm);
6742 }
6743
6744 void Vext(Condition cond,
6745 DataType dt,
6746 DRegister rd,
6747 DRegister rn,
6748 DRegister rm,
6749 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006750 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6751 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6752 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6753 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006754 VIXL_ASSERT(allow_macro_instructions_);
6755 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006756 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006757 ITScope it_scope(this, &cond);
6758 vext(cond, dt, rd, rn, rm, operand);
6759 }
6760 void Vext(DataType dt,
6761 DRegister rd,
6762 DRegister rn,
6763 DRegister rm,
6764 const DOperand& operand) {
6765 Vext(al, dt, rd, rn, rm, operand);
6766 }
6767
6768 void Vext(Condition cond,
6769 DataType dt,
6770 QRegister rd,
6771 QRegister rn,
6772 QRegister rm,
6773 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006774 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6775 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6776 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6777 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006778 VIXL_ASSERT(allow_macro_instructions_);
6779 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006780 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006781 ITScope it_scope(this, &cond);
6782 vext(cond, dt, rd, rn, rm, operand);
6783 }
6784 void Vext(DataType dt,
6785 QRegister rd,
6786 QRegister rn,
6787 QRegister rm,
6788 const QOperand& operand) {
6789 Vext(al, dt, rd, rn, rm, operand);
6790 }
6791
6792 void Vfma(
6793 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006794 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6795 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6796 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006797 VIXL_ASSERT(allow_macro_instructions_);
6798 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006799 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006800 ITScope it_scope(this, &cond);
6801 vfma(cond, dt, rd, rn, rm);
6802 }
6803 void Vfma(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6804 Vfma(al, dt, rd, rn, rm);
6805 }
6806
6807 void Vfma(
6808 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006809 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6810 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6811 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006812 VIXL_ASSERT(allow_macro_instructions_);
6813 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006814 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006815 ITScope it_scope(this, &cond);
6816 vfma(cond, dt, rd, rn, rm);
6817 }
6818 void Vfma(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6819 Vfma(al, dt, rd, rn, rm);
6820 }
6821
6822 void Vfma(
6823 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006824 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6825 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6826 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006827 VIXL_ASSERT(allow_macro_instructions_);
6828 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006829 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006830 ITScope it_scope(this, &cond);
6831 vfma(cond, dt, rd, rn, rm);
6832 }
6833 void Vfma(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6834 Vfma(al, dt, rd, rn, rm);
6835 }
6836
6837 void Vfms(
6838 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006839 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6840 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6841 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006842 VIXL_ASSERT(allow_macro_instructions_);
6843 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006844 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006845 ITScope it_scope(this, &cond);
6846 vfms(cond, dt, rd, rn, rm);
6847 }
6848 void Vfms(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6849 Vfms(al, dt, rd, rn, rm);
6850 }
6851
6852 void Vfms(
6853 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006854 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6855 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6856 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006857 VIXL_ASSERT(allow_macro_instructions_);
6858 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006859 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006860 ITScope it_scope(this, &cond);
6861 vfms(cond, dt, rd, rn, rm);
6862 }
6863 void Vfms(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6864 Vfms(al, dt, rd, rn, rm);
6865 }
6866
6867 void Vfms(
6868 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006869 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6870 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6871 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006872 VIXL_ASSERT(allow_macro_instructions_);
6873 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006874 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006875 ITScope it_scope(this, &cond);
6876 vfms(cond, dt, rd, rn, rm);
6877 }
6878 void Vfms(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6879 Vfms(al, dt, rd, rn, rm);
6880 }
6881
6882 void Vfnma(
6883 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006884 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6885 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6886 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006887 VIXL_ASSERT(allow_macro_instructions_);
6888 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006889 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006890 ITScope it_scope(this, &cond);
6891 vfnma(cond, dt, rd, rn, rm);
6892 }
6893 void Vfnma(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6894 Vfnma(al, dt, rd, rn, rm);
6895 }
6896
6897 void Vfnma(
6898 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006899 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6900 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6901 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006902 VIXL_ASSERT(allow_macro_instructions_);
6903 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006904 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006905 ITScope it_scope(this, &cond);
6906 vfnma(cond, dt, rd, rn, rm);
6907 }
6908 void Vfnma(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6909 Vfnma(al, dt, rd, rn, rm);
6910 }
6911
6912 void Vfnms(
6913 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006914 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6915 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6916 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006917 VIXL_ASSERT(allow_macro_instructions_);
6918 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006919 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006920 ITScope it_scope(this, &cond);
6921 vfnms(cond, dt, rd, rn, rm);
6922 }
6923 void Vfnms(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6924 Vfnms(al, dt, rd, rn, rm);
6925 }
6926
6927 void Vfnms(
6928 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006929 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6930 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6931 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006932 VIXL_ASSERT(allow_macro_instructions_);
6933 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006934 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006935 ITScope it_scope(this, &cond);
6936 vfnms(cond, dt, rd, rn, rm);
6937 }
6938 void Vfnms(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6939 Vfnms(al, dt, rd, rn, rm);
6940 }
6941
6942 void Vhadd(
6943 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6945 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6946 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006947 VIXL_ASSERT(allow_macro_instructions_);
6948 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006949 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006950 ITScope it_scope(this, &cond);
6951 vhadd(cond, dt, rd, rn, rm);
6952 }
6953 void Vhadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6954 Vhadd(al, dt, rd, rn, rm);
6955 }
6956
6957 void Vhadd(
6958 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006959 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6960 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6961 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006962 VIXL_ASSERT(allow_macro_instructions_);
6963 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006964 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006965 ITScope it_scope(this, &cond);
6966 vhadd(cond, dt, rd, rn, rm);
6967 }
6968 void Vhadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6969 Vhadd(al, dt, rd, rn, rm);
6970 }
6971
6972 void Vhsub(
6973 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006974 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6975 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6976 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006977 VIXL_ASSERT(allow_macro_instructions_);
6978 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006979 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006980 ITScope it_scope(this, &cond);
6981 vhsub(cond, dt, rd, rn, rm);
6982 }
6983 void Vhsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6984 Vhsub(al, dt, rd, rn, rm);
6985 }
6986
6987 void Vhsub(
6988 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006989 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6990 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6991 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006992 VIXL_ASSERT(allow_macro_instructions_);
6993 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006994 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006995 ITScope it_scope(this, &cond);
6996 vhsub(cond, dt, rd, rn, rm);
6997 }
6998 void Vhsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6999 Vhsub(al, dt, rd, rn, rm);
7000 }
7001
7002 void Vld1(Condition cond,
7003 DataType dt,
7004 const NeonRegisterList& nreglist,
7005 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007006 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7007 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007008 VIXL_ASSERT(allow_macro_instructions_);
7009 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007010 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007011 ITScope it_scope(this, &cond);
7012 vld1(cond, dt, nreglist, operand);
7013 }
7014 void Vld1(DataType dt,
7015 const NeonRegisterList& nreglist,
7016 const AlignedMemOperand& operand) {
7017 Vld1(al, dt, nreglist, operand);
7018 }
7019
7020 void Vld2(Condition cond,
7021 DataType dt,
7022 const NeonRegisterList& nreglist,
7023 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007024 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7025 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007026 VIXL_ASSERT(allow_macro_instructions_);
7027 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007028 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007029 ITScope it_scope(this, &cond);
7030 vld2(cond, dt, nreglist, operand);
7031 }
7032 void Vld2(DataType dt,
7033 const NeonRegisterList& nreglist,
7034 const AlignedMemOperand& operand) {
7035 Vld2(al, dt, nreglist, operand);
7036 }
7037
7038 void Vld3(Condition cond,
7039 DataType dt,
7040 const NeonRegisterList& nreglist,
7041 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007042 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7043 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007044 VIXL_ASSERT(allow_macro_instructions_);
7045 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007046 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007047 ITScope it_scope(this, &cond);
7048 vld3(cond, dt, nreglist, operand);
7049 }
7050 void Vld3(DataType dt,
7051 const NeonRegisterList& nreglist,
7052 const AlignedMemOperand& operand) {
7053 Vld3(al, dt, nreglist, operand);
7054 }
7055
7056 void Vld3(Condition cond,
7057 DataType dt,
7058 const NeonRegisterList& nreglist,
7059 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007060 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7061 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007062 VIXL_ASSERT(allow_macro_instructions_);
7063 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007064 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007065 ITScope it_scope(this, &cond);
7066 vld3(cond, dt, nreglist, operand);
7067 }
7068 void Vld3(DataType dt,
7069 const NeonRegisterList& nreglist,
7070 const MemOperand& operand) {
7071 Vld3(al, dt, nreglist, operand);
7072 }
7073
7074 void Vld4(Condition cond,
7075 DataType dt,
7076 const NeonRegisterList& nreglist,
7077 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007078 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7079 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007080 VIXL_ASSERT(allow_macro_instructions_);
7081 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007082 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007083 ITScope it_scope(this, &cond);
7084 vld4(cond, dt, nreglist, operand);
7085 }
7086 void Vld4(DataType dt,
7087 const NeonRegisterList& nreglist,
7088 const AlignedMemOperand& operand) {
7089 Vld4(al, dt, nreglist, operand);
7090 }
7091
7092 void Vldm(Condition cond,
7093 DataType dt,
7094 Register rn,
7095 WriteBack write_back,
7096 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007097 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7098 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007099 VIXL_ASSERT(allow_macro_instructions_);
7100 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007101 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007102 ITScope it_scope(this, &cond);
7103 vldm(cond, dt, rn, write_back, dreglist);
7104 }
7105 void Vldm(DataType dt,
7106 Register rn,
7107 WriteBack write_back,
7108 DRegisterList dreglist) {
7109 Vldm(al, dt, rn, write_back, dreglist);
7110 }
7111 void Vldm(Condition cond,
7112 Register rn,
7113 WriteBack write_back,
7114 DRegisterList dreglist) {
7115 Vldm(cond, kDataTypeValueNone, rn, write_back, dreglist);
7116 }
7117 void Vldm(Register rn, WriteBack write_back, DRegisterList dreglist) {
7118 Vldm(al, kDataTypeValueNone, rn, write_back, dreglist);
7119 }
7120
7121 void Vldm(Condition cond,
7122 DataType dt,
7123 Register rn,
7124 WriteBack write_back,
7125 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007126 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7127 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007128 VIXL_ASSERT(allow_macro_instructions_);
7129 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007130 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007131 ITScope it_scope(this, &cond);
7132 vldm(cond, dt, rn, write_back, sreglist);
7133 }
7134 void Vldm(DataType dt,
7135 Register rn,
7136 WriteBack write_back,
7137 SRegisterList sreglist) {
7138 Vldm(al, dt, rn, write_back, sreglist);
7139 }
7140 void Vldm(Condition cond,
7141 Register rn,
7142 WriteBack write_back,
7143 SRegisterList sreglist) {
7144 Vldm(cond, kDataTypeValueNone, rn, write_back, sreglist);
7145 }
7146 void Vldm(Register rn, WriteBack write_back, SRegisterList sreglist) {
7147 Vldm(al, kDataTypeValueNone, rn, write_back, sreglist);
7148 }
7149
7150 void Vldmdb(Condition cond,
7151 DataType dt,
7152 Register rn,
7153 WriteBack write_back,
7154 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007155 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7156 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007157 VIXL_ASSERT(allow_macro_instructions_);
7158 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007159 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007160 ITScope it_scope(this, &cond);
7161 vldmdb(cond, dt, rn, write_back, dreglist);
7162 }
7163 void Vldmdb(DataType dt,
7164 Register rn,
7165 WriteBack write_back,
7166 DRegisterList dreglist) {
7167 Vldmdb(al, dt, rn, write_back, dreglist);
7168 }
7169 void Vldmdb(Condition cond,
7170 Register rn,
7171 WriteBack write_back,
7172 DRegisterList dreglist) {
7173 Vldmdb(cond, kDataTypeValueNone, rn, write_back, dreglist);
7174 }
7175 void Vldmdb(Register rn, WriteBack write_back, DRegisterList dreglist) {
7176 Vldmdb(al, kDataTypeValueNone, rn, write_back, dreglist);
7177 }
7178
7179 void Vldmdb(Condition cond,
7180 DataType dt,
7181 Register rn,
7182 WriteBack write_back,
7183 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007184 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7185 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007186 VIXL_ASSERT(allow_macro_instructions_);
7187 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007188 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007189 ITScope it_scope(this, &cond);
7190 vldmdb(cond, dt, rn, write_back, sreglist);
7191 }
7192 void Vldmdb(DataType dt,
7193 Register rn,
7194 WriteBack write_back,
7195 SRegisterList sreglist) {
7196 Vldmdb(al, dt, rn, write_back, sreglist);
7197 }
7198 void Vldmdb(Condition cond,
7199 Register rn,
7200 WriteBack write_back,
7201 SRegisterList sreglist) {
7202 Vldmdb(cond, kDataTypeValueNone, rn, write_back, sreglist);
7203 }
7204 void Vldmdb(Register rn, WriteBack write_back, SRegisterList sreglist) {
7205 Vldmdb(al, kDataTypeValueNone, rn, write_back, sreglist);
7206 }
7207
7208 void Vldmia(Condition cond,
7209 DataType dt,
7210 Register rn,
7211 WriteBack write_back,
7212 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007213 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7214 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007215 VIXL_ASSERT(allow_macro_instructions_);
7216 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007217 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007218 ITScope it_scope(this, &cond);
7219 vldmia(cond, dt, rn, write_back, dreglist);
7220 }
7221 void Vldmia(DataType dt,
7222 Register rn,
7223 WriteBack write_back,
7224 DRegisterList dreglist) {
7225 Vldmia(al, dt, rn, write_back, dreglist);
7226 }
7227 void Vldmia(Condition cond,
7228 Register rn,
7229 WriteBack write_back,
7230 DRegisterList dreglist) {
7231 Vldmia(cond, kDataTypeValueNone, rn, write_back, dreglist);
7232 }
7233 void Vldmia(Register rn, WriteBack write_back, DRegisterList dreglist) {
7234 Vldmia(al, kDataTypeValueNone, rn, write_back, dreglist);
7235 }
7236
7237 void Vldmia(Condition cond,
7238 DataType dt,
7239 Register rn,
7240 WriteBack write_back,
7241 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007242 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7243 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007244 VIXL_ASSERT(allow_macro_instructions_);
7245 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007246 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007247 ITScope it_scope(this, &cond);
7248 vldmia(cond, dt, rn, write_back, sreglist);
7249 }
7250 void Vldmia(DataType dt,
7251 Register rn,
7252 WriteBack write_back,
7253 SRegisterList sreglist) {
7254 Vldmia(al, dt, rn, write_back, sreglist);
7255 }
7256 void Vldmia(Condition cond,
7257 Register rn,
7258 WriteBack write_back,
7259 SRegisterList sreglist) {
7260 Vldmia(cond, kDataTypeValueNone, rn, write_back, sreglist);
7261 }
7262 void Vldmia(Register rn, WriteBack write_back, SRegisterList sreglist) {
7263 Vldmia(al, kDataTypeValueNone, rn, write_back, sreglist);
7264 }
7265
7266 void Vldr(Condition cond, DataType dt, DRegister rd, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007267 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007268 VIXL_ASSERT(allow_macro_instructions_);
7269 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007270 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007271 ITScope it_scope(this, &cond);
7272 vldr(cond, dt, rd, label);
7273 }
7274 void Vldr(DataType dt, DRegister rd, Label* label) {
7275 Vldr(al, dt, rd, label);
7276 }
7277 void Vldr(Condition cond, DRegister rd, Label* label) {
7278 Vldr(cond, Untyped64, rd, label);
7279 }
7280 void Vldr(DRegister rd, Label* label) { Vldr(al, Untyped64, rd, label); }
7281
7282 void Vldr(Condition cond,
7283 DataType dt,
7284 DRegister rd,
7285 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007286 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7287 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007288 VIXL_ASSERT(allow_macro_instructions_);
7289 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007290 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007291 ITScope it_scope(this, &cond);
7292 vldr(cond, dt, rd, operand);
7293 }
7294 void Vldr(DataType dt, DRegister rd, const MemOperand& operand) {
7295 Vldr(al, dt, rd, operand);
7296 }
7297 void Vldr(Condition cond, DRegister rd, const MemOperand& operand) {
7298 Vldr(cond, Untyped64, rd, operand);
7299 }
7300 void Vldr(DRegister rd, const MemOperand& operand) {
7301 Vldr(al, Untyped64, rd, operand);
7302 }
7303
7304 void Vldr(Condition cond, DataType dt, SRegister rd, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007305 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007306 VIXL_ASSERT(allow_macro_instructions_);
7307 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007308 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007309 ITScope it_scope(this, &cond);
7310 vldr(cond, dt, rd, label);
7311 }
7312 void Vldr(DataType dt, SRegister rd, Label* label) {
7313 Vldr(al, dt, rd, label);
7314 }
7315 void Vldr(Condition cond, SRegister rd, Label* label) {
7316 Vldr(cond, Untyped32, rd, label);
7317 }
7318 void Vldr(SRegister rd, Label* label) { Vldr(al, Untyped32, rd, label); }
7319
7320 void Vldr(Condition cond,
7321 DataType dt,
7322 SRegister rd,
7323 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007324 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7325 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007326 VIXL_ASSERT(allow_macro_instructions_);
7327 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007328 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007329 ITScope it_scope(this, &cond);
7330 vldr(cond, dt, rd, operand);
7331 }
7332 void Vldr(DataType dt, SRegister rd, const MemOperand& operand) {
7333 Vldr(al, dt, rd, operand);
7334 }
7335 void Vldr(Condition cond, SRegister rd, const MemOperand& operand) {
7336 Vldr(cond, Untyped32, rd, operand);
7337 }
7338 void Vldr(SRegister rd, const MemOperand& operand) {
7339 Vldr(al, Untyped32, rd, operand);
7340 }
7341
7342 void Vmax(
7343 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007344 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7345 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7346 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007347 VIXL_ASSERT(allow_macro_instructions_);
7348 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007349 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007350 ITScope it_scope(this, &cond);
7351 vmax(cond, dt, rd, rn, rm);
7352 }
7353 void Vmax(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7354 Vmax(al, dt, rd, rn, rm);
7355 }
7356
7357 void Vmax(
7358 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007359 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7360 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7361 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007362 VIXL_ASSERT(allow_macro_instructions_);
7363 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007364 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007365 ITScope it_scope(this, &cond);
7366 vmax(cond, dt, rd, rn, rm);
7367 }
7368 void Vmax(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7369 Vmax(al, dt, rd, rn, rm);
7370 }
7371
7372 void Vmaxnm(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007373 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7374 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7375 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007376 VIXL_ASSERT(allow_macro_instructions_);
7377 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007378 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007379 vmaxnm(dt, rd, rn, rm);
7380 }
7381
7382 void Vmaxnm(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007383 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7384 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7385 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007386 VIXL_ASSERT(allow_macro_instructions_);
7387 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007388 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007389 vmaxnm(dt, rd, rn, rm);
7390 }
7391
7392 void Vmaxnm(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007393 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7394 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7395 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007396 VIXL_ASSERT(allow_macro_instructions_);
7397 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007398 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007399 vmaxnm(dt, rd, rn, rm);
7400 }
7401
7402 void Vmin(
7403 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007404 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7405 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7406 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007407 VIXL_ASSERT(allow_macro_instructions_);
7408 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007409 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007410 ITScope it_scope(this, &cond);
7411 vmin(cond, dt, rd, rn, rm);
7412 }
7413 void Vmin(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7414 Vmin(al, dt, rd, rn, rm);
7415 }
7416
7417 void Vmin(
7418 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007419 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7420 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7421 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007422 VIXL_ASSERT(allow_macro_instructions_);
7423 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007424 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007425 ITScope it_scope(this, &cond);
7426 vmin(cond, dt, rd, rn, rm);
7427 }
7428 void Vmin(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7429 Vmin(al, dt, rd, rn, rm);
7430 }
7431
7432 void Vminnm(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007433 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7434 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7435 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007436 VIXL_ASSERT(allow_macro_instructions_);
7437 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007438 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007439 vminnm(dt, rd, rn, rm);
7440 }
7441
7442 void Vminnm(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007443 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7444 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7445 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007446 VIXL_ASSERT(allow_macro_instructions_);
7447 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007448 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007449 vminnm(dt, rd, rn, rm);
7450 }
7451
7452 void Vminnm(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007453 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7454 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7455 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007456 VIXL_ASSERT(allow_macro_instructions_);
7457 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007458 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007459 vminnm(dt, rd, rn, rm);
7460 }
7461
7462 void Vmla(Condition cond,
7463 DataType dt,
7464 DRegister rd,
7465 DRegister rn,
7466 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007467 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7468 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7469 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007470 VIXL_ASSERT(allow_macro_instructions_);
7471 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007472 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007473 ITScope it_scope(this, &cond);
7474 vmla(cond, dt, rd, rn, rm);
7475 }
7476 void Vmla(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
7477 Vmla(al, dt, rd, rn, rm);
7478 }
7479
7480 void Vmla(Condition cond,
7481 DataType dt,
7482 QRegister rd,
7483 QRegister rn,
7484 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007485 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7486 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7487 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007488 VIXL_ASSERT(allow_macro_instructions_);
7489 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007490 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007491 ITScope it_scope(this, &cond);
7492 vmla(cond, dt, rd, rn, rm);
7493 }
7494 void Vmla(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
7495 Vmla(al, dt, rd, rn, rm);
7496 }
7497
7498 void Vmla(
7499 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007500 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7501 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7502 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007503 VIXL_ASSERT(allow_macro_instructions_);
7504 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007505 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007506 ITScope it_scope(this, &cond);
7507 vmla(cond, dt, rd, rn, rm);
7508 }
7509 void Vmla(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7510 Vmla(al, dt, rd, rn, rm);
7511 }
7512
7513 void Vmla(
7514 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007515 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7516 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7517 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007518 VIXL_ASSERT(allow_macro_instructions_);
7519 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007520 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007521 ITScope it_scope(this, &cond);
7522 vmla(cond, dt, rd, rn, rm);
7523 }
7524 void Vmla(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7525 Vmla(al, dt, rd, rn, rm);
7526 }
7527
7528 void Vmla(
7529 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007530 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7531 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7532 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007533 VIXL_ASSERT(allow_macro_instructions_);
7534 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007535 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007536 ITScope it_scope(this, &cond);
7537 vmla(cond, dt, rd, rn, rm);
7538 }
7539 void Vmla(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7540 Vmla(al, dt, rd, rn, rm);
7541 }
7542
7543 void Vmlal(Condition cond,
7544 DataType dt,
7545 QRegister rd,
7546 DRegister rn,
7547 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007548 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7549 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7550 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007551 VIXL_ASSERT(allow_macro_instructions_);
7552 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007553 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007554 ITScope it_scope(this, &cond);
7555 vmlal(cond, dt, rd, rn, rm);
7556 }
7557 void Vmlal(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
7558 Vmlal(al, dt, rd, rn, rm);
7559 }
7560
7561 void Vmlal(
7562 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7564 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7565 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007566 VIXL_ASSERT(allow_macro_instructions_);
7567 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007568 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007569 ITScope it_scope(this, &cond);
7570 vmlal(cond, dt, rd, rn, rm);
7571 }
7572 void Vmlal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7573 Vmlal(al, dt, rd, rn, rm);
7574 }
7575
7576 void Vmls(Condition cond,
7577 DataType dt,
7578 DRegister rd,
7579 DRegister rn,
7580 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007581 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7582 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7583 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007584 VIXL_ASSERT(allow_macro_instructions_);
7585 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007586 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007587 ITScope it_scope(this, &cond);
7588 vmls(cond, dt, rd, rn, rm);
7589 }
7590 void Vmls(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
7591 Vmls(al, dt, rd, rn, rm);
7592 }
7593
7594 void Vmls(Condition cond,
7595 DataType dt,
7596 QRegister rd,
7597 QRegister rn,
7598 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007599 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7600 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7601 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007602 VIXL_ASSERT(allow_macro_instructions_);
7603 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007604 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007605 ITScope it_scope(this, &cond);
7606 vmls(cond, dt, rd, rn, rm);
7607 }
7608 void Vmls(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
7609 Vmls(al, dt, rd, rn, rm);
7610 }
7611
7612 void Vmls(
7613 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007614 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7615 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7616 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007617 VIXL_ASSERT(allow_macro_instructions_);
7618 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007619 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007620 ITScope it_scope(this, &cond);
7621 vmls(cond, dt, rd, rn, rm);
7622 }
7623 void Vmls(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7624 Vmls(al, dt, rd, rn, rm);
7625 }
7626
7627 void Vmls(
7628 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007629 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7630 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7631 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007632 VIXL_ASSERT(allow_macro_instructions_);
7633 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007634 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007635 ITScope it_scope(this, &cond);
7636 vmls(cond, dt, rd, rn, rm);
7637 }
7638 void Vmls(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7639 Vmls(al, dt, rd, rn, rm);
7640 }
7641
7642 void Vmls(
7643 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007644 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7645 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7646 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007647 VIXL_ASSERT(allow_macro_instructions_);
7648 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007649 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007650 ITScope it_scope(this, &cond);
7651 vmls(cond, dt, rd, rn, rm);
7652 }
7653 void Vmls(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7654 Vmls(al, dt, rd, rn, rm);
7655 }
7656
7657 void Vmlsl(Condition cond,
7658 DataType dt,
7659 QRegister rd,
7660 DRegister rn,
7661 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007662 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7663 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7664 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007665 VIXL_ASSERT(allow_macro_instructions_);
7666 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007667 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007668 ITScope it_scope(this, &cond);
7669 vmlsl(cond, dt, rd, rn, rm);
7670 }
7671 void Vmlsl(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
7672 Vmlsl(al, dt, rd, rn, rm);
7673 }
7674
7675 void Vmlsl(
7676 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007677 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7678 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7679 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007680 VIXL_ASSERT(allow_macro_instructions_);
7681 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007682 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007683 ITScope it_scope(this, &cond);
7684 vmlsl(cond, dt, rd, rn, rm);
7685 }
7686 void Vmlsl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7687 Vmlsl(al, dt, rd, rn, rm);
7688 }
7689
7690 void Vmov(Condition cond, Register rt, SRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007691 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007693 VIXL_ASSERT(allow_macro_instructions_);
7694 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007695 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007696 ITScope it_scope(this, &cond);
7697 vmov(cond, rt, rn);
7698 }
7699 void Vmov(Register rt, SRegister rn) { Vmov(al, rt, rn); }
7700
7701 void Vmov(Condition cond, SRegister rn, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007702 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7703 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007704 VIXL_ASSERT(allow_macro_instructions_);
7705 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007706 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007707 ITScope it_scope(this, &cond);
7708 vmov(cond, rn, rt);
7709 }
7710 void Vmov(SRegister rn, Register rt) { Vmov(al, rn, rt); }
7711
7712 void Vmov(Condition cond, Register rt, Register rt2, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007713 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7714 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
7715 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007716 VIXL_ASSERT(allow_macro_instructions_);
7717 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007718 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007719 ITScope it_scope(this, &cond);
7720 vmov(cond, rt, rt2, rm);
7721 }
7722 void Vmov(Register rt, Register rt2, DRegister rm) { Vmov(al, rt, rt2, rm); }
7723
7724 void Vmov(Condition cond, DRegister rm, Register rt, Register rt2) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007725 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7726 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7727 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007728 VIXL_ASSERT(allow_macro_instructions_);
7729 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007730 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007731 ITScope it_scope(this, &cond);
7732 vmov(cond, rm, rt, rt2);
7733 }
7734 void Vmov(DRegister rm, Register rt, Register rt2) { Vmov(al, rm, rt, rt2); }
7735
7736 void Vmov(
7737 Condition cond, Register rt, Register rt2, SRegister rm, SRegister rm1) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007738 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7739 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
7740 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7741 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm1));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007742 VIXL_ASSERT(allow_macro_instructions_);
7743 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007744 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007745 ITScope it_scope(this, &cond);
7746 vmov(cond, rt, rt2, rm, rm1);
7747 }
7748 void Vmov(Register rt, Register rt2, SRegister rm, SRegister rm1) {
7749 Vmov(al, rt, rt2, rm, rm1);
7750 }
7751
7752 void Vmov(
7753 Condition cond, SRegister rm, SRegister rm1, Register rt, Register rt2) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007754 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7755 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm1));
7756 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7757 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007758 VIXL_ASSERT(allow_macro_instructions_);
7759 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007760 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007761 ITScope it_scope(this, &cond);
7762 vmov(cond, rm, rm1, rt, rt2);
7763 }
7764 void Vmov(SRegister rm, SRegister rm1, Register rt, Register rt2) {
7765 Vmov(al, rm, rm1, rt, rt2);
7766 }
7767
7768 void Vmov(Condition cond, DataType dt, DRegisterLane rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007769 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7770 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007771 VIXL_ASSERT(allow_macro_instructions_);
7772 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007773 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007774 ITScope it_scope(this, &cond);
7775 vmov(cond, dt, rd, rt);
7776 }
7777 void Vmov(DataType dt, DRegisterLane rd, Register rt) {
7778 Vmov(al, dt, rd, rt);
7779 }
7780 void Vmov(Condition cond, DRegisterLane rd, Register rt) {
7781 Vmov(cond, kDataTypeValueNone, rd, rt);
7782 }
7783 void Vmov(DRegisterLane rd, Register rt) {
7784 Vmov(al, kDataTypeValueNone, rd, rt);
7785 }
7786
7787 void Vmov(Condition cond,
7788 DataType dt,
7789 DRegister rd,
7790 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007791 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7792 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007793 VIXL_ASSERT(allow_macro_instructions_);
7794 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007795 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007796 ITScope it_scope(this, &cond);
7797 vmov(cond, dt, rd, operand);
7798 }
7799 void Vmov(DataType dt, DRegister rd, const DOperand& operand) {
7800 Vmov(al, dt, rd, operand);
7801 }
7802
7803 void Vmov(Condition cond,
7804 DataType dt,
7805 QRegister rd,
7806 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007807 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7808 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007809 VIXL_ASSERT(allow_macro_instructions_);
7810 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007811 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007812 ITScope it_scope(this, &cond);
7813 vmov(cond, dt, rd, operand);
7814 }
7815 void Vmov(DataType dt, QRegister rd, const QOperand& operand) {
7816 Vmov(al, dt, rd, operand);
7817 }
7818
7819 void Vmov(Condition cond,
7820 DataType dt,
7821 SRegister rd,
7822 const SOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007823 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7824 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007825 VIXL_ASSERT(allow_macro_instructions_);
7826 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007827 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007828 ITScope it_scope(this, &cond);
7829 vmov(cond, dt, rd, operand);
7830 }
7831 void Vmov(DataType dt, SRegister rd, const SOperand& operand) {
7832 Vmov(al, dt, rd, operand);
7833 }
7834
7835 void Vmov(Condition cond, DataType dt, Register rt, DRegisterLane rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007836 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7837 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007838 VIXL_ASSERT(allow_macro_instructions_);
7839 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007840 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007841 ITScope it_scope(this, &cond);
7842 vmov(cond, dt, rt, rn);
7843 }
7844 void Vmov(DataType dt, Register rt, DRegisterLane rn) {
7845 Vmov(al, dt, rt, rn);
7846 }
7847 void Vmov(Condition cond, Register rt, DRegisterLane rn) {
7848 Vmov(cond, kDataTypeValueNone, rt, rn);
7849 }
7850 void Vmov(Register rt, DRegisterLane rn) {
7851 Vmov(al, kDataTypeValueNone, rt, rn);
7852 }
7853
7854 void Vmovl(Condition cond, DataType dt, QRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007855 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7856 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007857 VIXL_ASSERT(allow_macro_instructions_);
7858 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007859 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007860 ITScope it_scope(this, &cond);
7861 vmovl(cond, dt, rd, rm);
7862 }
7863 void Vmovl(DataType dt, QRegister rd, DRegister rm) { Vmovl(al, dt, rd, rm); }
7864
7865 void Vmovn(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007866 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7867 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007868 VIXL_ASSERT(allow_macro_instructions_);
7869 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007870 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007871 ITScope it_scope(this, &cond);
7872 vmovn(cond, dt, rd, rm);
7873 }
7874 void Vmovn(DataType dt, DRegister rd, QRegister rm) { Vmovn(al, dt, rd, rm); }
7875
7876 void Vmrs(Condition cond,
7877 RegisterOrAPSR_nzcv rt,
7878 SpecialFPRegister spec_reg) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007879 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007880 VIXL_ASSERT(allow_macro_instructions_);
7881 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007882 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007883 ITScope it_scope(this, &cond);
7884 vmrs(cond, rt, spec_reg);
7885 }
7886 void Vmrs(RegisterOrAPSR_nzcv rt, SpecialFPRegister spec_reg) {
7887 Vmrs(al, rt, spec_reg);
7888 }
7889
7890 void Vmsr(Condition cond, SpecialFPRegister spec_reg, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007891 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007892 VIXL_ASSERT(allow_macro_instructions_);
7893 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007894 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007895 ITScope it_scope(this, &cond);
7896 vmsr(cond, spec_reg, rt);
7897 }
7898 void Vmsr(SpecialFPRegister spec_reg, Register rt) { Vmsr(al, spec_reg, rt); }
7899
7900 void Vmul(Condition cond,
7901 DataType dt,
7902 DRegister rd,
7903 DRegister rn,
7904 DRegister dm,
7905 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007906 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7907 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7908 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007909 VIXL_ASSERT(allow_macro_instructions_);
7910 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007911 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007912 ITScope it_scope(this, &cond);
7913 vmul(cond, dt, rd, rn, dm, index);
7914 }
7915 void Vmul(
7916 DataType dt, DRegister rd, DRegister rn, DRegister dm, unsigned index) {
7917 Vmul(al, dt, rd, rn, dm, index);
7918 }
7919
7920 void Vmul(Condition cond,
7921 DataType dt,
7922 QRegister rd,
7923 QRegister rn,
7924 DRegister dm,
7925 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007926 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7927 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7928 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007929 VIXL_ASSERT(allow_macro_instructions_);
7930 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007931 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007932 ITScope it_scope(this, &cond);
7933 vmul(cond, dt, rd, rn, dm, index);
7934 }
7935 void Vmul(
7936 DataType dt, QRegister rd, QRegister rn, DRegister dm, unsigned index) {
7937 Vmul(al, dt, rd, rn, dm, index);
7938 }
7939
7940 void Vmul(
7941 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007942 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7943 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007945 VIXL_ASSERT(allow_macro_instructions_);
7946 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007947 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007948 ITScope it_scope(this, &cond);
7949 vmul(cond, dt, rd, rn, rm);
7950 }
7951 void Vmul(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7952 Vmul(al, dt, rd, rn, rm);
7953 }
7954
7955 void Vmul(
7956 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007957 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7958 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7959 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007960 VIXL_ASSERT(allow_macro_instructions_);
7961 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007962 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007963 ITScope it_scope(this, &cond);
7964 vmul(cond, dt, rd, rn, rm);
7965 }
7966 void Vmul(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7967 Vmul(al, dt, rd, rn, rm);
7968 }
7969
7970 void Vmul(
7971 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007972 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7973 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7974 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007975 VIXL_ASSERT(allow_macro_instructions_);
7976 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007977 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007978 ITScope it_scope(this, &cond);
7979 vmul(cond, dt, rd, rn, rm);
7980 }
7981 void Vmul(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7982 Vmul(al, dt, rd, rn, rm);
7983 }
7984
7985 void Vmull(Condition cond,
7986 DataType dt,
7987 QRegister rd,
7988 DRegister rn,
7989 DRegister dm,
7990 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007991 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7992 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7993 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007994 VIXL_ASSERT(allow_macro_instructions_);
7995 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007996 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007997 ITScope it_scope(this, &cond);
7998 vmull(cond, dt, rd, rn, dm, index);
7999 }
8000 void Vmull(
8001 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
8002 Vmull(al, dt, rd, rn, dm, index);
8003 }
8004
8005 void Vmull(
8006 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008007 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8008 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8009 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008010 VIXL_ASSERT(allow_macro_instructions_);
8011 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008012 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008013 ITScope it_scope(this, &cond);
8014 vmull(cond, dt, rd, rn, rm);
8015 }
8016 void Vmull(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8017 Vmull(al, dt, rd, rn, rm);
8018 }
8019
8020 void Vmvn(Condition cond,
8021 DataType dt,
8022 DRegister rd,
8023 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008024 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8025 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008026 VIXL_ASSERT(allow_macro_instructions_);
8027 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008028 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008029 ITScope it_scope(this, &cond);
8030 vmvn(cond, dt, rd, operand);
8031 }
8032 void Vmvn(DataType dt, DRegister rd, const DOperand& operand) {
8033 Vmvn(al, dt, rd, operand);
8034 }
8035
8036 void Vmvn(Condition cond,
8037 DataType dt,
8038 QRegister rd,
8039 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008040 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8041 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008042 VIXL_ASSERT(allow_macro_instructions_);
8043 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008044 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008045 ITScope it_scope(this, &cond);
8046 vmvn(cond, dt, rd, operand);
8047 }
8048 void Vmvn(DataType dt, QRegister rd, const QOperand& operand) {
8049 Vmvn(al, dt, rd, operand);
8050 }
8051
8052 void Vneg(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008053 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8054 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008055 VIXL_ASSERT(allow_macro_instructions_);
8056 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008057 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008058 ITScope it_scope(this, &cond);
8059 vneg(cond, dt, rd, rm);
8060 }
8061 void Vneg(DataType dt, DRegister rd, DRegister rm) { Vneg(al, dt, rd, rm); }
8062
8063 void Vneg(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008064 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8065 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008066 VIXL_ASSERT(allow_macro_instructions_);
8067 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008068 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008069 ITScope it_scope(this, &cond);
8070 vneg(cond, dt, rd, rm);
8071 }
8072 void Vneg(DataType dt, QRegister rd, QRegister rm) { Vneg(al, dt, rd, rm); }
8073
8074 void Vneg(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008075 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8076 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008077 VIXL_ASSERT(allow_macro_instructions_);
8078 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008079 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008080 ITScope it_scope(this, &cond);
8081 vneg(cond, dt, rd, rm);
8082 }
8083 void Vneg(DataType dt, SRegister rd, SRegister rm) { Vneg(al, dt, rd, rm); }
8084
8085 void Vnmla(
8086 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008087 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8088 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8089 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008090 VIXL_ASSERT(allow_macro_instructions_);
8091 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008092 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008093 ITScope it_scope(this, &cond);
8094 vnmla(cond, dt, rd, rn, rm);
8095 }
8096 void Vnmla(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8097 Vnmla(al, dt, rd, rn, rm);
8098 }
8099
8100 void Vnmla(
8101 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008102 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8103 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8104 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008105 VIXL_ASSERT(allow_macro_instructions_);
8106 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008107 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008108 ITScope it_scope(this, &cond);
8109 vnmla(cond, dt, rd, rn, rm);
8110 }
8111 void Vnmla(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8112 Vnmla(al, dt, rd, rn, rm);
8113 }
8114
8115 void Vnmls(
8116 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008117 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8118 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8119 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008120 VIXL_ASSERT(allow_macro_instructions_);
8121 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008122 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008123 ITScope it_scope(this, &cond);
8124 vnmls(cond, dt, rd, rn, rm);
8125 }
8126 void Vnmls(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8127 Vnmls(al, dt, rd, rn, rm);
8128 }
8129
8130 void Vnmls(
8131 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008132 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8133 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8134 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008135 VIXL_ASSERT(allow_macro_instructions_);
8136 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008137 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008138 ITScope it_scope(this, &cond);
8139 vnmls(cond, dt, rd, rn, rm);
8140 }
8141 void Vnmls(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8142 Vnmls(al, dt, rd, rn, rm);
8143 }
8144
8145 void Vnmul(
8146 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008147 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8148 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8149 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008150 VIXL_ASSERT(allow_macro_instructions_);
8151 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008152 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008153 ITScope it_scope(this, &cond);
8154 vnmul(cond, dt, rd, rn, rm);
8155 }
8156 void Vnmul(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8157 Vnmul(al, dt, rd, rn, rm);
8158 }
8159
8160 void Vnmul(
8161 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008162 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8163 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8164 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008165 VIXL_ASSERT(allow_macro_instructions_);
8166 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008167 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008168 ITScope it_scope(this, &cond);
8169 vnmul(cond, dt, rd, rn, rm);
8170 }
8171 void Vnmul(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8172 Vnmul(al, dt, rd, rn, rm);
8173 }
8174
8175 void Vorn(Condition cond,
8176 DataType dt,
8177 DRegister rd,
8178 DRegister rn,
8179 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008180 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8181 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8182 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008183 VIXL_ASSERT(allow_macro_instructions_);
8184 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008185 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008186 ITScope it_scope(this, &cond);
8187 vorn(cond, dt, rd, rn, operand);
8188 }
8189 void Vorn(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
8190 Vorn(al, dt, rd, rn, operand);
8191 }
8192
8193 void Vorn(Condition cond,
8194 DataType dt,
8195 QRegister rd,
8196 QRegister rn,
8197 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008198 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8199 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8200 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008201 VIXL_ASSERT(allow_macro_instructions_);
8202 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008203 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008204 ITScope it_scope(this, &cond);
8205 vorn(cond, dt, rd, rn, operand);
8206 }
8207 void Vorn(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
8208 Vorn(al, dt, rd, rn, operand);
8209 }
8210
8211 void Vorr(Condition cond,
8212 DataType dt,
8213 DRegister rd,
8214 DRegister rn,
8215 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008216 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8217 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8218 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008219 VIXL_ASSERT(allow_macro_instructions_);
8220 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008221 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008222 ITScope it_scope(this, &cond);
8223 vorr(cond, dt, rd, rn, operand);
8224 }
8225 void Vorr(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
8226 Vorr(al, dt, rd, rn, operand);
8227 }
8228 void Vorr(Condition cond,
8229 DRegister rd,
8230 DRegister rn,
8231 const DOperand& operand) {
8232 Vorr(cond, kDataTypeValueNone, rd, rn, operand);
8233 }
8234 void Vorr(DRegister rd, DRegister rn, const DOperand& operand) {
8235 Vorr(al, kDataTypeValueNone, rd, rn, operand);
8236 }
8237
8238 void Vorr(Condition cond,
8239 DataType dt,
8240 QRegister rd,
8241 QRegister rn,
8242 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008243 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8244 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8245 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008246 VIXL_ASSERT(allow_macro_instructions_);
8247 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008248 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008249 ITScope it_scope(this, &cond);
8250 vorr(cond, dt, rd, rn, operand);
8251 }
8252 void Vorr(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
8253 Vorr(al, dt, rd, rn, operand);
8254 }
8255 void Vorr(Condition cond,
8256 QRegister rd,
8257 QRegister rn,
8258 const QOperand& operand) {
8259 Vorr(cond, kDataTypeValueNone, rd, rn, operand);
8260 }
8261 void Vorr(QRegister rd, QRegister rn, const QOperand& operand) {
8262 Vorr(al, kDataTypeValueNone, rd, rn, operand);
8263 }
8264
8265 void Vpadal(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008266 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8267 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008268 VIXL_ASSERT(allow_macro_instructions_);
8269 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008270 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008271 ITScope it_scope(this, &cond);
8272 vpadal(cond, dt, rd, rm);
8273 }
8274 void Vpadal(DataType dt, DRegister rd, DRegister rm) {
8275 Vpadal(al, dt, rd, rm);
8276 }
8277
8278 void Vpadal(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008279 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8280 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008281 VIXL_ASSERT(allow_macro_instructions_);
8282 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008283 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008284 ITScope it_scope(this, &cond);
8285 vpadal(cond, dt, rd, rm);
8286 }
8287 void Vpadal(DataType dt, QRegister rd, QRegister rm) {
8288 Vpadal(al, dt, rd, rm);
8289 }
8290
8291 void Vpadd(
8292 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008293 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8294 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8295 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008296 VIXL_ASSERT(allow_macro_instructions_);
8297 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008298 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008299 ITScope it_scope(this, &cond);
8300 vpadd(cond, dt, rd, rn, rm);
8301 }
8302 void Vpadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8303 Vpadd(al, dt, rd, rn, rm);
8304 }
8305
8306 void Vpaddl(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008307 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8308 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008309 VIXL_ASSERT(allow_macro_instructions_);
8310 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008311 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008312 ITScope it_scope(this, &cond);
8313 vpaddl(cond, dt, rd, rm);
8314 }
8315 void Vpaddl(DataType dt, DRegister rd, DRegister rm) {
8316 Vpaddl(al, dt, rd, rm);
8317 }
8318
8319 void Vpaddl(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008320 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8321 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008322 VIXL_ASSERT(allow_macro_instructions_);
8323 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008324 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008325 ITScope it_scope(this, &cond);
8326 vpaddl(cond, dt, rd, rm);
8327 }
8328 void Vpaddl(DataType dt, QRegister rd, QRegister rm) {
8329 Vpaddl(al, dt, rd, rm);
8330 }
8331
8332 void Vpmax(
8333 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008334 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8335 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8336 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008337 VIXL_ASSERT(allow_macro_instructions_);
8338 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008339 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008340 ITScope it_scope(this, &cond);
8341 vpmax(cond, dt, rd, rn, rm);
8342 }
8343 void Vpmax(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8344 Vpmax(al, dt, rd, rn, rm);
8345 }
8346
8347 void Vpmin(
8348 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008349 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8350 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8351 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008352 VIXL_ASSERT(allow_macro_instructions_);
8353 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008354 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008355 ITScope it_scope(this, &cond);
8356 vpmin(cond, dt, rd, rn, rm);
8357 }
8358 void Vpmin(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8359 Vpmin(al, dt, rd, rn, rm);
8360 }
8361
8362 void Vpop(Condition cond, DataType dt, DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008363 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008364 VIXL_ASSERT(allow_macro_instructions_);
8365 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008366 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008367 ITScope it_scope(this, &cond);
8368 vpop(cond, dt, dreglist);
8369 }
8370 void Vpop(DataType dt, DRegisterList dreglist) { Vpop(al, dt, dreglist); }
8371 void Vpop(Condition cond, DRegisterList dreglist) {
8372 Vpop(cond, kDataTypeValueNone, dreglist);
8373 }
8374 void Vpop(DRegisterList dreglist) { Vpop(al, kDataTypeValueNone, dreglist); }
8375
8376 void Vpop(Condition cond, DataType dt, SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008377 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008378 VIXL_ASSERT(allow_macro_instructions_);
8379 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008380 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008381 ITScope it_scope(this, &cond);
8382 vpop(cond, dt, sreglist);
8383 }
8384 void Vpop(DataType dt, SRegisterList sreglist) { Vpop(al, dt, sreglist); }
8385 void Vpop(Condition cond, SRegisterList sreglist) {
8386 Vpop(cond, kDataTypeValueNone, sreglist);
8387 }
8388 void Vpop(SRegisterList sreglist) { Vpop(al, kDataTypeValueNone, sreglist); }
8389
8390 void Vpush(Condition cond, DataType dt, DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008391 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008392 VIXL_ASSERT(allow_macro_instructions_);
8393 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008394 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008395 ITScope it_scope(this, &cond);
8396 vpush(cond, dt, dreglist);
8397 }
8398 void Vpush(DataType dt, DRegisterList dreglist) { Vpush(al, dt, dreglist); }
8399 void Vpush(Condition cond, DRegisterList dreglist) {
8400 Vpush(cond, kDataTypeValueNone, dreglist);
8401 }
8402 void Vpush(DRegisterList dreglist) {
8403 Vpush(al, kDataTypeValueNone, dreglist);
8404 }
8405
8406 void Vpush(Condition cond, DataType dt, SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008407 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008408 VIXL_ASSERT(allow_macro_instructions_);
8409 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008410 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008411 ITScope it_scope(this, &cond);
8412 vpush(cond, dt, sreglist);
8413 }
8414 void Vpush(DataType dt, SRegisterList sreglist) { Vpush(al, dt, sreglist); }
8415 void Vpush(Condition cond, SRegisterList sreglist) {
8416 Vpush(cond, kDataTypeValueNone, sreglist);
8417 }
8418 void Vpush(SRegisterList sreglist) {
8419 Vpush(al, kDataTypeValueNone, sreglist);
8420 }
8421
8422 void Vqabs(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008423 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8424 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008425 VIXL_ASSERT(allow_macro_instructions_);
8426 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008427 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008428 ITScope it_scope(this, &cond);
8429 vqabs(cond, dt, rd, rm);
8430 }
8431 void Vqabs(DataType dt, DRegister rd, DRegister rm) { Vqabs(al, dt, rd, rm); }
8432
8433 void Vqabs(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008434 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8435 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008436 VIXL_ASSERT(allow_macro_instructions_);
8437 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008438 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008439 ITScope it_scope(this, &cond);
8440 vqabs(cond, dt, rd, rm);
8441 }
8442 void Vqabs(DataType dt, QRegister rd, QRegister rm) { Vqabs(al, dt, rd, rm); }
8443
8444 void Vqadd(
8445 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008446 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8447 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8448 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008449 VIXL_ASSERT(allow_macro_instructions_);
8450 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008451 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008452 ITScope it_scope(this, &cond);
8453 vqadd(cond, dt, rd, rn, rm);
8454 }
8455 void Vqadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8456 Vqadd(al, dt, rd, rn, rm);
8457 }
8458
8459 void Vqadd(
8460 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008461 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8462 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8463 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008464 VIXL_ASSERT(allow_macro_instructions_);
8465 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008466 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008467 ITScope it_scope(this, &cond);
8468 vqadd(cond, dt, rd, rn, rm);
8469 }
8470 void Vqadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8471 Vqadd(al, dt, rd, rn, rm);
8472 }
8473
8474 void Vqdmlal(
8475 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008476 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8477 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8478 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008479 VIXL_ASSERT(allow_macro_instructions_);
8480 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008481 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008482 ITScope it_scope(this, &cond);
8483 vqdmlal(cond, dt, rd, rn, rm);
8484 }
8485 void Vqdmlal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8486 Vqdmlal(al, dt, rd, rn, rm);
8487 }
8488
8489 void Vqdmlal(Condition cond,
8490 DataType dt,
8491 QRegister rd,
8492 DRegister rn,
8493 DRegister dm,
8494 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008495 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8496 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8497 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008498 VIXL_ASSERT(allow_macro_instructions_);
8499 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008500 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008501 ITScope it_scope(this, &cond);
8502 vqdmlal(cond, dt, rd, rn, dm, index);
8503 }
8504 void Vqdmlal(
8505 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
8506 Vqdmlal(al, dt, rd, rn, dm, index);
8507 }
8508
8509 void Vqdmlsl(
8510 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008511 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8512 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8513 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008514 VIXL_ASSERT(allow_macro_instructions_);
8515 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008516 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008517 ITScope it_scope(this, &cond);
8518 vqdmlsl(cond, dt, rd, rn, rm);
8519 }
8520 void Vqdmlsl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8521 Vqdmlsl(al, dt, rd, rn, rm);
8522 }
8523
8524 void Vqdmlsl(Condition cond,
8525 DataType dt,
8526 QRegister rd,
8527 DRegister rn,
8528 DRegister dm,
8529 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008530 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8531 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8532 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008533 VIXL_ASSERT(allow_macro_instructions_);
8534 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008535 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008536 ITScope it_scope(this, &cond);
8537 vqdmlsl(cond, dt, rd, rn, dm, index);
8538 }
8539 void Vqdmlsl(
8540 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
8541 Vqdmlsl(al, dt, rd, rn, dm, index);
8542 }
8543
8544 void Vqdmulh(
8545 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008546 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8547 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8548 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008549 VIXL_ASSERT(allow_macro_instructions_);
8550 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008551 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008552 ITScope it_scope(this, &cond);
8553 vqdmulh(cond, dt, rd, rn, rm);
8554 }
8555 void Vqdmulh(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8556 Vqdmulh(al, dt, rd, rn, rm);
8557 }
8558
8559 void Vqdmulh(
8560 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008561 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8562 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008564 VIXL_ASSERT(allow_macro_instructions_);
8565 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008566 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008567 ITScope it_scope(this, &cond);
8568 vqdmulh(cond, dt, rd, rn, rm);
8569 }
8570 void Vqdmulh(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8571 Vqdmulh(al, dt, rd, rn, rm);
8572 }
8573
8574 void Vqdmulh(Condition cond,
8575 DataType dt,
8576 DRegister rd,
8577 DRegister rn,
8578 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008579 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8580 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8581 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008582 VIXL_ASSERT(allow_macro_instructions_);
8583 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008584 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008585 ITScope it_scope(this, &cond);
8586 vqdmulh(cond, dt, rd, rn, rm);
8587 }
8588 void Vqdmulh(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
8589 Vqdmulh(al, dt, rd, rn, rm);
8590 }
8591
8592 void Vqdmulh(Condition cond,
8593 DataType dt,
8594 QRegister rd,
8595 QRegister rn,
8596 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008597 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8598 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8599 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008600 VIXL_ASSERT(allow_macro_instructions_);
8601 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008602 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008603 ITScope it_scope(this, &cond);
8604 vqdmulh(cond, dt, rd, rn, rm);
8605 }
8606 void Vqdmulh(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
8607 Vqdmulh(al, dt, rd, rn, rm);
8608 }
8609
8610 void Vqdmull(
8611 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008612 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8613 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8614 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008615 VIXL_ASSERT(allow_macro_instructions_);
8616 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008617 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008618 ITScope it_scope(this, &cond);
8619 vqdmull(cond, dt, rd, rn, rm);
8620 }
8621 void Vqdmull(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8622 Vqdmull(al, dt, rd, rn, rm);
8623 }
8624
8625 void Vqdmull(Condition cond,
8626 DataType dt,
8627 QRegister rd,
8628 DRegister rn,
8629 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008630 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8631 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8632 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008633 VIXL_ASSERT(allow_macro_instructions_);
8634 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008635 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008636 ITScope it_scope(this, &cond);
8637 vqdmull(cond, dt, rd, rn, rm);
8638 }
8639 void Vqdmull(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
8640 Vqdmull(al, dt, rd, rn, rm);
8641 }
8642
8643 void Vqmovn(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008644 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8645 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008646 VIXL_ASSERT(allow_macro_instructions_);
8647 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008648 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008649 ITScope it_scope(this, &cond);
8650 vqmovn(cond, dt, rd, rm);
8651 }
8652 void Vqmovn(DataType dt, DRegister rd, QRegister rm) {
8653 Vqmovn(al, dt, rd, rm);
8654 }
8655
8656 void Vqmovun(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008657 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8658 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008659 VIXL_ASSERT(allow_macro_instructions_);
8660 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008661 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008662 ITScope it_scope(this, &cond);
8663 vqmovun(cond, dt, rd, rm);
8664 }
8665 void Vqmovun(DataType dt, DRegister rd, QRegister rm) {
8666 Vqmovun(al, dt, rd, rm);
8667 }
8668
8669 void Vqneg(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008670 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8671 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008672 VIXL_ASSERT(allow_macro_instructions_);
8673 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008674 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008675 ITScope it_scope(this, &cond);
8676 vqneg(cond, dt, rd, rm);
8677 }
8678 void Vqneg(DataType dt, DRegister rd, DRegister rm) { Vqneg(al, dt, rd, rm); }
8679
8680 void Vqneg(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008681 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8682 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008683 VIXL_ASSERT(allow_macro_instructions_);
8684 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008685 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008686 ITScope it_scope(this, &cond);
8687 vqneg(cond, dt, rd, rm);
8688 }
8689 void Vqneg(DataType dt, QRegister rd, QRegister rm) { Vqneg(al, dt, rd, rm); }
8690
8691 void Vqrdmulh(
8692 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008693 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8694 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008696 VIXL_ASSERT(allow_macro_instructions_);
8697 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008698 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008699 ITScope it_scope(this, &cond);
8700 vqrdmulh(cond, dt, rd, rn, rm);
8701 }
8702 void Vqrdmulh(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8703 Vqrdmulh(al, dt, rd, rn, rm);
8704 }
8705
8706 void Vqrdmulh(
8707 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008708 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8709 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8710 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008711 VIXL_ASSERT(allow_macro_instructions_);
8712 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008713 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008714 ITScope it_scope(this, &cond);
8715 vqrdmulh(cond, dt, rd, rn, rm);
8716 }
8717 void Vqrdmulh(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8718 Vqrdmulh(al, dt, rd, rn, rm);
8719 }
8720
8721 void Vqrdmulh(Condition cond,
8722 DataType dt,
8723 DRegister rd,
8724 DRegister rn,
8725 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008726 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8727 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8728 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008729 VIXL_ASSERT(allow_macro_instructions_);
8730 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008731 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008732 ITScope it_scope(this, &cond);
8733 vqrdmulh(cond, dt, rd, rn, rm);
8734 }
8735 void Vqrdmulh(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
8736 Vqrdmulh(al, dt, rd, rn, rm);
8737 }
8738
8739 void Vqrdmulh(Condition cond,
8740 DataType dt,
8741 QRegister rd,
8742 QRegister rn,
8743 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008744 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8745 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8746 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008747 VIXL_ASSERT(allow_macro_instructions_);
8748 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008749 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008750 ITScope it_scope(this, &cond);
8751 vqrdmulh(cond, dt, rd, rn, rm);
8752 }
8753 void Vqrdmulh(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
8754 Vqrdmulh(al, dt, rd, rn, rm);
8755 }
8756
8757 void Vqrshl(
8758 Condition cond, DataType dt, DRegister rd, DRegister rm, DRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008759 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8760 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8761 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008762 VIXL_ASSERT(allow_macro_instructions_);
8763 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008764 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008765 ITScope it_scope(this, &cond);
8766 vqrshl(cond, dt, rd, rm, rn);
8767 }
8768 void Vqrshl(DataType dt, DRegister rd, DRegister rm, DRegister rn) {
8769 Vqrshl(al, dt, rd, rm, rn);
8770 }
8771
8772 void Vqrshl(
8773 Condition cond, DataType dt, QRegister rd, QRegister rm, QRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008774 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8775 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8776 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008777 VIXL_ASSERT(allow_macro_instructions_);
8778 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008779 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008780 ITScope it_scope(this, &cond);
8781 vqrshl(cond, dt, rd, rm, rn);
8782 }
8783 void Vqrshl(DataType dt, QRegister rd, QRegister rm, QRegister rn) {
8784 Vqrshl(al, dt, rd, rm, rn);
8785 }
8786
8787 void Vqrshrn(Condition cond,
8788 DataType dt,
8789 DRegister rd,
8790 QRegister rm,
8791 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008792 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8793 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8794 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008795 VIXL_ASSERT(allow_macro_instructions_);
8796 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008797 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008798 ITScope it_scope(this, &cond);
8799 vqrshrn(cond, dt, rd, rm, operand);
8800 }
8801 void Vqrshrn(DataType dt,
8802 DRegister rd,
8803 QRegister rm,
8804 const QOperand& operand) {
8805 Vqrshrn(al, dt, rd, rm, operand);
8806 }
8807
8808 void Vqrshrun(Condition cond,
8809 DataType dt,
8810 DRegister rd,
8811 QRegister rm,
8812 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008813 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8814 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8815 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008816 VIXL_ASSERT(allow_macro_instructions_);
8817 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008818 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008819 ITScope it_scope(this, &cond);
8820 vqrshrun(cond, dt, rd, rm, operand);
8821 }
8822 void Vqrshrun(DataType dt,
8823 DRegister rd,
8824 QRegister rm,
8825 const QOperand& operand) {
8826 Vqrshrun(al, dt, rd, rm, operand);
8827 }
8828
8829 void Vqshl(Condition cond,
8830 DataType dt,
8831 DRegister rd,
8832 DRegister rm,
8833 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008834 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8835 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8836 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008837 VIXL_ASSERT(allow_macro_instructions_);
8838 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008839 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008840 ITScope it_scope(this, &cond);
8841 vqshl(cond, dt, rd, rm, operand);
8842 }
8843 void Vqshl(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
8844 Vqshl(al, dt, rd, rm, operand);
8845 }
8846
8847 void Vqshl(Condition cond,
8848 DataType dt,
8849 QRegister rd,
8850 QRegister rm,
8851 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008852 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8853 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8854 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008855 VIXL_ASSERT(allow_macro_instructions_);
8856 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008857 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008858 ITScope it_scope(this, &cond);
8859 vqshl(cond, dt, rd, rm, operand);
8860 }
8861 void Vqshl(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
8862 Vqshl(al, dt, rd, rm, operand);
8863 }
8864
8865 void Vqshlu(Condition cond,
8866 DataType dt,
8867 DRegister rd,
8868 DRegister rm,
8869 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008870 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8871 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8872 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008873 VIXL_ASSERT(allow_macro_instructions_);
8874 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008875 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008876 ITScope it_scope(this, &cond);
8877 vqshlu(cond, dt, rd, rm, operand);
8878 }
8879 void Vqshlu(DataType dt,
8880 DRegister rd,
8881 DRegister rm,
8882 const DOperand& operand) {
8883 Vqshlu(al, dt, rd, rm, operand);
8884 }
8885
8886 void Vqshlu(Condition cond,
8887 DataType dt,
8888 QRegister rd,
8889 QRegister rm,
8890 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008891 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8892 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8893 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008894 VIXL_ASSERT(allow_macro_instructions_);
8895 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008896 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008897 ITScope it_scope(this, &cond);
8898 vqshlu(cond, dt, rd, rm, operand);
8899 }
8900 void Vqshlu(DataType dt,
8901 QRegister rd,
8902 QRegister rm,
8903 const QOperand& operand) {
8904 Vqshlu(al, dt, rd, rm, operand);
8905 }
8906
8907 void Vqshrn(Condition cond,
8908 DataType dt,
8909 DRegister rd,
8910 QRegister rm,
8911 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008912 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8913 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8914 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008915 VIXL_ASSERT(allow_macro_instructions_);
8916 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008917 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008918 ITScope it_scope(this, &cond);
8919 vqshrn(cond, dt, rd, rm, operand);
8920 }
8921 void Vqshrn(DataType dt,
8922 DRegister rd,
8923 QRegister rm,
8924 const QOperand& operand) {
8925 Vqshrn(al, dt, rd, rm, operand);
8926 }
8927
8928 void Vqshrun(Condition cond,
8929 DataType dt,
8930 DRegister rd,
8931 QRegister rm,
8932 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008933 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8934 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8935 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008936 VIXL_ASSERT(allow_macro_instructions_);
8937 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008938 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008939 ITScope it_scope(this, &cond);
8940 vqshrun(cond, dt, rd, rm, operand);
8941 }
8942 void Vqshrun(DataType dt,
8943 DRegister rd,
8944 QRegister rm,
8945 const QOperand& operand) {
8946 Vqshrun(al, dt, rd, rm, operand);
8947 }
8948
8949 void Vqsub(
8950 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008951 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8952 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8953 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008954 VIXL_ASSERT(allow_macro_instructions_);
8955 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008956 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008957 ITScope it_scope(this, &cond);
8958 vqsub(cond, dt, rd, rn, rm);
8959 }
8960 void Vqsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8961 Vqsub(al, dt, rd, rn, rm);
8962 }
8963
8964 void Vqsub(
8965 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008966 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8967 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8968 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008969 VIXL_ASSERT(allow_macro_instructions_);
8970 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008971 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008972 ITScope it_scope(this, &cond);
8973 vqsub(cond, dt, rd, rn, rm);
8974 }
8975 void Vqsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8976 Vqsub(al, dt, rd, rn, rm);
8977 }
8978
8979 void Vraddhn(
8980 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008981 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8982 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8983 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008984 VIXL_ASSERT(allow_macro_instructions_);
8985 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008986 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008987 ITScope it_scope(this, &cond);
8988 vraddhn(cond, dt, rd, rn, rm);
8989 }
8990 void Vraddhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
8991 Vraddhn(al, dt, rd, rn, rm);
8992 }
8993
8994 void Vrecpe(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008995 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8996 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008997 VIXL_ASSERT(allow_macro_instructions_);
8998 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008999 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009000 ITScope it_scope(this, &cond);
9001 vrecpe(cond, dt, rd, rm);
9002 }
9003 void Vrecpe(DataType dt, DRegister rd, DRegister rm) {
9004 Vrecpe(al, dt, rd, rm);
9005 }
9006
9007 void Vrecpe(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009008 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9009 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009010 VIXL_ASSERT(allow_macro_instructions_);
9011 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009012 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009013 ITScope it_scope(this, &cond);
9014 vrecpe(cond, dt, rd, rm);
9015 }
9016 void Vrecpe(DataType dt, QRegister rd, QRegister rm) {
9017 Vrecpe(al, dt, rd, rm);
9018 }
9019
9020 void Vrecps(
9021 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009022 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9023 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9024 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009025 VIXL_ASSERT(allow_macro_instructions_);
9026 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009027 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009028 ITScope it_scope(this, &cond);
9029 vrecps(cond, dt, rd, rn, rm);
9030 }
9031 void Vrecps(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9032 Vrecps(al, dt, rd, rn, rm);
9033 }
9034
9035 void Vrecps(
9036 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009037 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9038 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9039 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009040 VIXL_ASSERT(allow_macro_instructions_);
9041 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009042 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009043 ITScope it_scope(this, &cond);
9044 vrecps(cond, dt, rd, rn, rm);
9045 }
9046 void Vrecps(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9047 Vrecps(al, dt, rd, rn, rm);
9048 }
9049
9050 void Vrev16(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009051 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9052 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009053 VIXL_ASSERT(allow_macro_instructions_);
9054 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009055 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009056 ITScope it_scope(this, &cond);
9057 vrev16(cond, dt, rd, rm);
9058 }
9059 void Vrev16(DataType dt, DRegister rd, DRegister rm) {
9060 Vrev16(al, dt, rd, rm);
9061 }
9062
9063 void Vrev16(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009064 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9065 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009066 VIXL_ASSERT(allow_macro_instructions_);
9067 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009068 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009069 ITScope it_scope(this, &cond);
9070 vrev16(cond, dt, rd, rm);
9071 }
9072 void Vrev16(DataType dt, QRegister rd, QRegister rm) {
9073 Vrev16(al, dt, rd, rm);
9074 }
9075
9076 void Vrev32(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009077 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9078 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009079 VIXL_ASSERT(allow_macro_instructions_);
9080 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009081 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009082 ITScope it_scope(this, &cond);
9083 vrev32(cond, dt, rd, rm);
9084 }
9085 void Vrev32(DataType dt, DRegister rd, DRegister rm) {
9086 Vrev32(al, dt, rd, rm);
9087 }
9088
9089 void Vrev32(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009090 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9091 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009092 VIXL_ASSERT(allow_macro_instructions_);
9093 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009094 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009095 ITScope it_scope(this, &cond);
9096 vrev32(cond, dt, rd, rm);
9097 }
9098 void Vrev32(DataType dt, QRegister rd, QRegister rm) {
9099 Vrev32(al, dt, rd, rm);
9100 }
9101
9102 void Vrev64(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009103 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9104 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009105 VIXL_ASSERT(allow_macro_instructions_);
9106 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009107 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009108 ITScope it_scope(this, &cond);
9109 vrev64(cond, dt, rd, rm);
9110 }
9111 void Vrev64(DataType dt, DRegister rd, DRegister rm) {
9112 Vrev64(al, dt, rd, rm);
9113 }
9114
9115 void Vrev64(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009116 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9117 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009118 VIXL_ASSERT(allow_macro_instructions_);
9119 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009120 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009121 ITScope it_scope(this, &cond);
9122 vrev64(cond, dt, rd, rm);
9123 }
9124 void Vrev64(DataType dt, QRegister rd, QRegister rm) {
9125 Vrev64(al, dt, rd, rm);
9126 }
9127
9128 void Vrhadd(
9129 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009130 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9131 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9132 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009133 VIXL_ASSERT(allow_macro_instructions_);
9134 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009135 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009136 ITScope it_scope(this, &cond);
9137 vrhadd(cond, dt, rd, rn, rm);
9138 }
9139 void Vrhadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9140 Vrhadd(al, dt, rd, rn, rm);
9141 }
9142
9143 void Vrhadd(
9144 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009145 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9146 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9147 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009148 VIXL_ASSERT(allow_macro_instructions_);
9149 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009150 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009151 ITScope it_scope(this, &cond);
9152 vrhadd(cond, dt, rd, rn, rm);
9153 }
9154 void Vrhadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9155 Vrhadd(al, dt, rd, rn, rm);
9156 }
9157
9158 void Vrinta(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009159 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9160 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009161 VIXL_ASSERT(allow_macro_instructions_);
9162 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009163 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009164 vrinta(dt1, dt2, rd, rm);
9165 }
9166
9167 void Vrinta(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009168 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9169 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009170 VIXL_ASSERT(allow_macro_instructions_);
9171 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009172 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009173 vrinta(dt1, dt2, rd, rm);
9174 }
9175
9176 void Vrinta(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009177 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9178 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009179 VIXL_ASSERT(allow_macro_instructions_);
9180 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009181 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009182 vrinta(dt1, dt2, rd, rm);
9183 }
9184
9185 void Vrintm(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009186 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9187 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009188 VIXL_ASSERT(allow_macro_instructions_);
9189 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009190 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009191 vrintm(dt1, dt2, rd, rm);
9192 }
9193
9194 void Vrintm(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009195 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9196 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009197 VIXL_ASSERT(allow_macro_instructions_);
9198 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009199 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009200 vrintm(dt1, dt2, rd, rm);
9201 }
9202
9203 void Vrintm(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009204 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9205 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009206 VIXL_ASSERT(allow_macro_instructions_);
9207 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009208 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009209 vrintm(dt1, dt2, rd, rm);
9210 }
9211
9212 void Vrintn(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009213 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9214 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009215 VIXL_ASSERT(allow_macro_instructions_);
9216 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009217 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009218 vrintn(dt1, dt2, rd, rm);
9219 }
9220
9221 void Vrintn(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009222 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9223 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009224 VIXL_ASSERT(allow_macro_instructions_);
9225 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009226 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009227 vrintn(dt1, dt2, rd, rm);
9228 }
9229
9230 void Vrintn(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009231 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9232 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009233 VIXL_ASSERT(allow_macro_instructions_);
9234 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009235 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009236 vrintn(dt1, dt2, rd, rm);
9237 }
9238
9239 void Vrintp(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009240 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9241 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009242 VIXL_ASSERT(allow_macro_instructions_);
9243 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009244 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009245 vrintp(dt1, dt2, rd, rm);
9246 }
9247
9248 void Vrintp(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009249 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9250 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009251 VIXL_ASSERT(allow_macro_instructions_);
9252 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009253 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009254 vrintp(dt1, dt2, rd, rm);
9255 }
9256
9257 void Vrintp(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009258 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9259 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009260 VIXL_ASSERT(allow_macro_instructions_);
9261 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009262 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009263 vrintp(dt1, dt2, rd, rm);
9264 }
9265
9266 void Vrintr(
9267 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009268 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9269 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009270 VIXL_ASSERT(allow_macro_instructions_);
9271 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009272 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009273 ITScope it_scope(this, &cond);
9274 vrintr(cond, dt1, dt2, rd, rm);
9275 }
9276 void Vrintr(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
9277 Vrintr(al, dt1, dt2, rd, rm);
9278 }
9279
9280 void Vrintr(
9281 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009282 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9283 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009284 VIXL_ASSERT(allow_macro_instructions_);
9285 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009286 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009287 ITScope it_scope(this, &cond);
9288 vrintr(cond, dt1, dt2, rd, rm);
9289 }
9290 void Vrintr(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
9291 Vrintr(al, dt1, dt2, rd, rm);
9292 }
9293
9294 void Vrintx(
9295 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009296 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9297 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009298 VIXL_ASSERT(allow_macro_instructions_);
9299 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009300 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009301 ITScope it_scope(this, &cond);
9302 vrintx(cond, dt1, dt2, rd, rm);
9303 }
9304 void Vrintx(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
9305 Vrintx(al, dt1, dt2, rd, rm);
9306 }
9307
9308 void Vrintx(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009309 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9310 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009311 VIXL_ASSERT(allow_macro_instructions_);
9312 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009313 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009314 vrintx(dt1, dt2, rd, rm);
9315 }
9316
9317 void Vrintx(
9318 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009319 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9320 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009321 VIXL_ASSERT(allow_macro_instructions_);
9322 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009323 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009324 ITScope it_scope(this, &cond);
9325 vrintx(cond, dt1, dt2, rd, rm);
9326 }
9327 void Vrintx(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
9328 Vrintx(al, dt1, dt2, rd, rm);
9329 }
9330
9331 void Vrintz(
9332 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009333 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9334 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009335 VIXL_ASSERT(allow_macro_instructions_);
9336 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009337 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009338 ITScope it_scope(this, &cond);
9339 vrintz(cond, dt1, dt2, rd, rm);
9340 }
9341 void Vrintz(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
9342 Vrintz(al, dt1, dt2, rd, rm);
9343 }
9344
9345 void Vrintz(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009346 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9347 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009348 VIXL_ASSERT(allow_macro_instructions_);
9349 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009350 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009351 vrintz(dt1, dt2, rd, rm);
9352 }
9353
9354 void Vrintz(
9355 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009356 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9357 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009358 VIXL_ASSERT(allow_macro_instructions_);
9359 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009360 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009361 ITScope it_scope(this, &cond);
9362 vrintz(cond, dt1, dt2, rd, rm);
9363 }
9364 void Vrintz(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
9365 Vrintz(al, dt1, dt2, rd, rm);
9366 }
9367
9368 void Vrshl(
9369 Condition cond, DataType dt, DRegister rd, DRegister rm, DRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009370 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9371 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9372 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009373 VIXL_ASSERT(allow_macro_instructions_);
9374 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009375 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009376 ITScope it_scope(this, &cond);
9377 vrshl(cond, dt, rd, rm, rn);
9378 }
9379 void Vrshl(DataType dt, DRegister rd, DRegister rm, DRegister rn) {
9380 Vrshl(al, dt, rd, rm, rn);
9381 }
9382
9383 void Vrshl(
9384 Condition cond, DataType dt, QRegister rd, QRegister rm, QRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009385 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9386 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9387 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009388 VIXL_ASSERT(allow_macro_instructions_);
9389 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009390 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009391 ITScope it_scope(this, &cond);
9392 vrshl(cond, dt, rd, rm, rn);
9393 }
9394 void Vrshl(DataType dt, QRegister rd, QRegister rm, QRegister rn) {
9395 Vrshl(al, dt, rd, rm, rn);
9396 }
9397
9398 void Vrshr(Condition cond,
9399 DataType dt,
9400 DRegister rd,
9401 DRegister rm,
9402 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009403 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9404 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9405 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009406 VIXL_ASSERT(allow_macro_instructions_);
9407 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009408 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009409 ITScope it_scope(this, &cond);
9410 vrshr(cond, dt, rd, rm, operand);
9411 }
9412 void Vrshr(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9413 Vrshr(al, dt, rd, rm, operand);
9414 }
9415
9416 void Vrshr(Condition cond,
9417 DataType dt,
9418 QRegister rd,
9419 QRegister rm,
9420 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009421 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9422 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9423 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009424 VIXL_ASSERT(allow_macro_instructions_);
9425 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009426 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009427 ITScope it_scope(this, &cond);
9428 vrshr(cond, dt, rd, rm, operand);
9429 }
9430 void Vrshr(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9431 Vrshr(al, dt, rd, rm, operand);
9432 }
9433
9434 void Vrshrn(Condition cond,
9435 DataType dt,
9436 DRegister rd,
9437 QRegister rm,
9438 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009439 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9440 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9441 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009442 VIXL_ASSERT(allow_macro_instructions_);
9443 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009444 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009445 ITScope it_scope(this, &cond);
9446 vrshrn(cond, dt, rd, rm, operand);
9447 }
9448 void Vrshrn(DataType dt,
9449 DRegister rd,
9450 QRegister rm,
9451 const QOperand& operand) {
9452 Vrshrn(al, dt, rd, rm, operand);
9453 }
9454
9455 void Vrsqrte(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009456 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9457 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009458 VIXL_ASSERT(allow_macro_instructions_);
9459 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009460 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009461 ITScope it_scope(this, &cond);
9462 vrsqrte(cond, dt, rd, rm);
9463 }
9464 void Vrsqrte(DataType dt, DRegister rd, DRegister rm) {
9465 Vrsqrte(al, dt, rd, rm);
9466 }
9467
9468 void Vrsqrte(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009469 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9470 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009471 VIXL_ASSERT(allow_macro_instructions_);
9472 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009473 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009474 ITScope it_scope(this, &cond);
9475 vrsqrte(cond, dt, rd, rm);
9476 }
9477 void Vrsqrte(DataType dt, QRegister rd, QRegister rm) {
9478 Vrsqrte(al, dt, rd, rm);
9479 }
9480
9481 void Vrsqrts(
9482 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009483 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9485 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009486 VIXL_ASSERT(allow_macro_instructions_);
9487 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009488 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009489 ITScope it_scope(this, &cond);
9490 vrsqrts(cond, dt, rd, rn, rm);
9491 }
9492 void Vrsqrts(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9493 Vrsqrts(al, dt, rd, rn, rm);
9494 }
9495
9496 void Vrsqrts(
9497 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009498 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9499 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9500 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009501 VIXL_ASSERT(allow_macro_instructions_);
9502 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009503 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009504 ITScope it_scope(this, &cond);
9505 vrsqrts(cond, dt, rd, rn, rm);
9506 }
9507 void Vrsqrts(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9508 Vrsqrts(al, dt, rd, rn, rm);
9509 }
9510
9511 void Vrsra(Condition cond,
9512 DataType dt,
9513 DRegister rd,
9514 DRegister rm,
9515 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009516 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9517 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9518 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009519 VIXL_ASSERT(allow_macro_instructions_);
9520 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009521 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009522 ITScope it_scope(this, &cond);
9523 vrsra(cond, dt, rd, rm, operand);
9524 }
9525 void Vrsra(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9526 Vrsra(al, dt, rd, rm, operand);
9527 }
9528
9529 void Vrsra(Condition cond,
9530 DataType dt,
9531 QRegister rd,
9532 QRegister rm,
9533 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009534 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9535 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9536 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009537 VIXL_ASSERT(allow_macro_instructions_);
9538 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009539 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009540 ITScope it_scope(this, &cond);
9541 vrsra(cond, dt, rd, rm, operand);
9542 }
9543 void Vrsra(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9544 Vrsra(al, dt, rd, rm, operand);
9545 }
9546
9547 void Vrsubhn(
9548 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009549 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9550 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9551 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009552 VIXL_ASSERT(allow_macro_instructions_);
9553 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009554 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009555 ITScope it_scope(this, &cond);
9556 vrsubhn(cond, dt, rd, rn, rm);
9557 }
9558 void Vrsubhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
9559 Vrsubhn(al, dt, rd, rn, rm);
9560 }
9561
9562 void Vseleq(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9564 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9565 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009566 VIXL_ASSERT(allow_macro_instructions_);
9567 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009568 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009569 vseleq(dt, rd, rn, rm);
9570 }
9571
9572 void Vseleq(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009573 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9574 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9575 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009576 VIXL_ASSERT(allow_macro_instructions_);
9577 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009578 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009579 vseleq(dt, rd, rn, rm);
9580 }
9581
9582 void Vselge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009583 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9584 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9585 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009586 VIXL_ASSERT(allow_macro_instructions_);
9587 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009588 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009589 vselge(dt, rd, rn, rm);
9590 }
9591
9592 void Vselge(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009593 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9594 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9595 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009596 VIXL_ASSERT(allow_macro_instructions_);
9597 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009598 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009599 vselge(dt, rd, rn, rm);
9600 }
9601
9602 void Vselgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009603 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9604 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9605 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009606 VIXL_ASSERT(allow_macro_instructions_);
9607 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009608 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009609 vselgt(dt, rd, rn, rm);
9610 }
9611
9612 void Vselgt(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009613 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9614 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9615 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009616 VIXL_ASSERT(allow_macro_instructions_);
9617 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009618 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009619 vselgt(dt, rd, rn, rm);
9620 }
9621
9622 void Vselvs(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009623 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9624 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9625 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009626 VIXL_ASSERT(allow_macro_instructions_);
9627 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009628 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009629 vselvs(dt, rd, rn, rm);
9630 }
9631
9632 void Vselvs(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009633 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9634 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9635 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009636 VIXL_ASSERT(allow_macro_instructions_);
9637 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009638 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009639 vselvs(dt, rd, rn, rm);
9640 }
9641
9642 void Vshl(Condition cond,
9643 DataType dt,
9644 DRegister rd,
9645 DRegister rm,
9646 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009647 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9648 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9649 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009650 VIXL_ASSERT(allow_macro_instructions_);
9651 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009652 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009653 ITScope it_scope(this, &cond);
9654 vshl(cond, dt, rd, rm, operand);
9655 }
9656 void Vshl(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9657 Vshl(al, dt, rd, rm, operand);
9658 }
9659
9660 void Vshl(Condition cond,
9661 DataType dt,
9662 QRegister rd,
9663 QRegister rm,
9664 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009665 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9666 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9667 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009668 VIXL_ASSERT(allow_macro_instructions_);
9669 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009670 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009671 ITScope it_scope(this, &cond);
9672 vshl(cond, dt, rd, rm, operand);
9673 }
9674 void Vshl(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9675 Vshl(al, dt, rd, rm, operand);
9676 }
9677
9678 void Vshll(Condition cond,
9679 DataType dt,
9680 QRegister rd,
9681 DRegister rm,
9682 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009683 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9684 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9685 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009686 VIXL_ASSERT(allow_macro_instructions_);
9687 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009688 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009689 ITScope it_scope(this, &cond);
9690 vshll(cond, dt, rd, rm, operand);
9691 }
9692 void Vshll(DataType dt, QRegister rd, DRegister rm, const DOperand& operand) {
9693 Vshll(al, dt, rd, rm, operand);
9694 }
9695
9696 void Vshr(Condition cond,
9697 DataType dt,
9698 DRegister rd,
9699 DRegister rm,
9700 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009701 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9702 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9703 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009704 VIXL_ASSERT(allow_macro_instructions_);
9705 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009706 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009707 ITScope it_scope(this, &cond);
9708 vshr(cond, dt, rd, rm, operand);
9709 }
9710 void Vshr(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9711 Vshr(al, dt, rd, rm, operand);
9712 }
9713
9714 void Vshr(Condition cond,
9715 DataType dt,
9716 QRegister rd,
9717 QRegister rm,
9718 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009719 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9720 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9721 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009722 VIXL_ASSERT(allow_macro_instructions_);
9723 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009724 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009725 ITScope it_scope(this, &cond);
9726 vshr(cond, dt, rd, rm, operand);
9727 }
9728 void Vshr(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9729 Vshr(al, dt, rd, rm, operand);
9730 }
9731
9732 void Vshrn(Condition cond,
9733 DataType dt,
9734 DRegister rd,
9735 QRegister rm,
9736 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009737 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9738 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9739 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009740 VIXL_ASSERT(allow_macro_instructions_);
9741 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009742 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009743 ITScope it_scope(this, &cond);
9744 vshrn(cond, dt, rd, rm, operand);
9745 }
9746 void Vshrn(DataType dt, DRegister rd, QRegister rm, const QOperand& operand) {
9747 Vshrn(al, dt, rd, rm, operand);
9748 }
9749
9750 void Vsli(Condition cond,
9751 DataType dt,
9752 DRegister rd,
9753 DRegister rm,
9754 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009755 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9756 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9757 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009758 VIXL_ASSERT(allow_macro_instructions_);
9759 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009760 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009761 ITScope it_scope(this, &cond);
9762 vsli(cond, dt, rd, rm, operand);
9763 }
9764 void Vsli(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9765 Vsli(al, dt, rd, rm, operand);
9766 }
9767
9768 void Vsli(Condition cond,
9769 DataType dt,
9770 QRegister rd,
9771 QRegister rm,
9772 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009773 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9774 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9775 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009776 VIXL_ASSERT(allow_macro_instructions_);
9777 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009778 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009779 ITScope it_scope(this, &cond);
9780 vsli(cond, dt, rd, rm, operand);
9781 }
9782 void Vsli(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9783 Vsli(al, dt, rd, rm, operand);
9784 }
9785
9786 void Vsqrt(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009787 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9788 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009789 VIXL_ASSERT(allow_macro_instructions_);
9790 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009791 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009792 ITScope it_scope(this, &cond);
9793 vsqrt(cond, dt, rd, rm);
9794 }
9795 void Vsqrt(DataType dt, SRegister rd, SRegister rm) { Vsqrt(al, dt, rd, rm); }
9796
9797 void Vsqrt(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009798 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9799 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009800 VIXL_ASSERT(allow_macro_instructions_);
9801 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009802 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009803 ITScope it_scope(this, &cond);
9804 vsqrt(cond, dt, rd, rm);
9805 }
9806 void Vsqrt(DataType dt, DRegister rd, DRegister rm) { Vsqrt(al, dt, rd, rm); }
9807
9808 void Vsra(Condition cond,
9809 DataType dt,
9810 DRegister rd,
9811 DRegister rm,
9812 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009813 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9814 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9815 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009816 VIXL_ASSERT(allow_macro_instructions_);
9817 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009818 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009819 ITScope it_scope(this, &cond);
9820 vsra(cond, dt, rd, rm, operand);
9821 }
9822 void Vsra(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9823 Vsra(al, dt, rd, rm, operand);
9824 }
9825
9826 void Vsra(Condition cond,
9827 DataType dt,
9828 QRegister rd,
9829 QRegister rm,
9830 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009831 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9832 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9833 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009834 VIXL_ASSERT(allow_macro_instructions_);
9835 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009836 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009837 ITScope it_scope(this, &cond);
9838 vsra(cond, dt, rd, rm, operand);
9839 }
9840 void Vsra(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9841 Vsra(al, dt, rd, rm, operand);
9842 }
9843
9844 void Vsri(Condition cond,
9845 DataType dt,
9846 DRegister rd,
9847 DRegister rm,
9848 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009849 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9850 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9851 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009852 VIXL_ASSERT(allow_macro_instructions_);
9853 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009854 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009855 ITScope it_scope(this, &cond);
9856 vsri(cond, dt, rd, rm, operand);
9857 }
9858 void Vsri(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9859 Vsri(al, dt, rd, rm, operand);
9860 }
9861
9862 void Vsri(Condition cond,
9863 DataType dt,
9864 QRegister rd,
9865 QRegister rm,
9866 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009867 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9868 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9869 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009870 VIXL_ASSERT(allow_macro_instructions_);
9871 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009872 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009873 ITScope it_scope(this, &cond);
9874 vsri(cond, dt, rd, rm, operand);
9875 }
9876 void Vsri(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9877 Vsri(al, dt, rd, rm, operand);
9878 }
9879
9880 void Vst1(Condition cond,
9881 DataType dt,
9882 const NeonRegisterList& nreglist,
9883 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009884 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9885 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009886 VIXL_ASSERT(allow_macro_instructions_);
9887 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009888 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009889 ITScope it_scope(this, &cond);
9890 vst1(cond, dt, nreglist, operand);
9891 }
9892 void Vst1(DataType dt,
9893 const NeonRegisterList& nreglist,
9894 const AlignedMemOperand& operand) {
9895 Vst1(al, dt, nreglist, operand);
9896 }
9897
9898 void Vst2(Condition cond,
9899 DataType dt,
9900 const NeonRegisterList& nreglist,
9901 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009902 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9903 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009904 VIXL_ASSERT(allow_macro_instructions_);
9905 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009906 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009907 ITScope it_scope(this, &cond);
9908 vst2(cond, dt, nreglist, operand);
9909 }
9910 void Vst2(DataType dt,
9911 const NeonRegisterList& nreglist,
9912 const AlignedMemOperand& operand) {
9913 Vst2(al, dt, nreglist, operand);
9914 }
9915
9916 void Vst3(Condition cond,
9917 DataType dt,
9918 const NeonRegisterList& nreglist,
9919 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009920 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9921 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009922 VIXL_ASSERT(allow_macro_instructions_);
9923 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009924 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009925 ITScope it_scope(this, &cond);
9926 vst3(cond, dt, nreglist, operand);
9927 }
9928 void Vst3(DataType dt,
9929 const NeonRegisterList& nreglist,
9930 const AlignedMemOperand& operand) {
9931 Vst3(al, dt, nreglist, operand);
9932 }
9933
9934 void Vst3(Condition cond,
9935 DataType dt,
9936 const NeonRegisterList& nreglist,
9937 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009938 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9939 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009940 VIXL_ASSERT(allow_macro_instructions_);
9941 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009942 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009943 ITScope it_scope(this, &cond);
9944 vst3(cond, dt, nreglist, operand);
9945 }
9946 void Vst3(DataType dt,
9947 const NeonRegisterList& nreglist,
9948 const MemOperand& operand) {
9949 Vst3(al, dt, nreglist, operand);
9950 }
9951
9952 void Vst4(Condition cond,
9953 DataType dt,
9954 const NeonRegisterList& nreglist,
9955 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009956 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9957 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009958 VIXL_ASSERT(allow_macro_instructions_);
9959 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009960 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009961 ITScope it_scope(this, &cond);
9962 vst4(cond, dt, nreglist, operand);
9963 }
9964 void Vst4(DataType dt,
9965 const NeonRegisterList& nreglist,
9966 const AlignedMemOperand& operand) {
9967 Vst4(al, dt, nreglist, operand);
9968 }
9969
9970 void Vstm(Condition cond,
9971 DataType dt,
9972 Register rn,
9973 WriteBack write_back,
9974 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009975 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9976 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009977 VIXL_ASSERT(allow_macro_instructions_);
9978 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009979 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009980 ITScope it_scope(this, &cond);
9981 vstm(cond, dt, rn, write_back, dreglist);
9982 }
9983 void Vstm(DataType dt,
9984 Register rn,
9985 WriteBack write_back,
9986 DRegisterList dreglist) {
9987 Vstm(al, dt, rn, write_back, dreglist);
9988 }
9989 void Vstm(Condition cond,
9990 Register rn,
9991 WriteBack write_back,
9992 DRegisterList dreglist) {
9993 Vstm(cond, kDataTypeValueNone, rn, write_back, dreglist);
9994 }
9995 void Vstm(Register rn, WriteBack write_back, DRegisterList dreglist) {
9996 Vstm(al, kDataTypeValueNone, rn, write_back, dreglist);
9997 }
9998
9999 void Vstm(Condition cond,
10000 DataType dt,
10001 Register rn,
10002 WriteBack write_back,
10003 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010004 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10005 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010006 VIXL_ASSERT(allow_macro_instructions_);
10007 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010008 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010009 ITScope it_scope(this, &cond);
10010 vstm(cond, dt, rn, write_back, sreglist);
10011 }
10012 void Vstm(DataType dt,
10013 Register rn,
10014 WriteBack write_back,
10015 SRegisterList sreglist) {
10016 Vstm(al, dt, rn, write_back, sreglist);
10017 }
10018 void Vstm(Condition cond,
10019 Register rn,
10020 WriteBack write_back,
10021 SRegisterList sreglist) {
10022 Vstm(cond, kDataTypeValueNone, rn, write_back, sreglist);
10023 }
10024 void Vstm(Register rn, WriteBack write_back, SRegisterList sreglist) {
10025 Vstm(al, kDataTypeValueNone, rn, write_back, sreglist);
10026 }
10027
10028 void Vstmdb(Condition cond,
10029 DataType dt,
10030 Register rn,
10031 WriteBack write_back,
10032 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010033 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10034 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010035 VIXL_ASSERT(allow_macro_instructions_);
10036 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010037 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010038 ITScope it_scope(this, &cond);
10039 vstmdb(cond, dt, rn, write_back, dreglist);
10040 }
10041 void Vstmdb(DataType dt,
10042 Register rn,
10043 WriteBack write_back,
10044 DRegisterList dreglist) {
10045 Vstmdb(al, dt, rn, write_back, dreglist);
10046 }
10047 void Vstmdb(Condition cond,
10048 Register rn,
10049 WriteBack write_back,
10050 DRegisterList dreglist) {
10051 Vstmdb(cond, kDataTypeValueNone, rn, write_back, dreglist);
10052 }
10053 void Vstmdb(Register rn, WriteBack write_back, DRegisterList dreglist) {
10054 Vstmdb(al, kDataTypeValueNone, rn, write_back, dreglist);
10055 }
10056
10057 void Vstmdb(Condition cond,
10058 DataType dt,
10059 Register rn,
10060 WriteBack write_back,
10061 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010062 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10063 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010064 VIXL_ASSERT(allow_macro_instructions_);
10065 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010066 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010067 ITScope it_scope(this, &cond);
10068 vstmdb(cond, dt, rn, write_back, sreglist);
10069 }
10070 void Vstmdb(DataType dt,
10071 Register rn,
10072 WriteBack write_back,
10073 SRegisterList sreglist) {
10074 Vstmdb(al, dt, rn, write_back, sreglist);
10075 }
10076 void Vstmdb(Condition cond,
10077 Register rn,
10078 WriteBack write_back,
10079 SRegisterList sreglist) {
10080 Vstmdb(cond, kDataTypeValueNone, rn, write_back, sreglist);
10081 }
10082 void Vstmdb(Register rn, WriteBack write_back, SRegisterList sreglist) {
10083 Vstmdb(al, kDataTypeValueNone, rn, write_back, sreglist);
10084 }
10085
10086 void Vstmia(Condition cond,
10087 DataType dt,
10088 Register rn,
10089 WriteBack write_back,
10090 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010091 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10092 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010093 VIXL_ASSERT(allow_macro_instructions_);
10094 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010095 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010096 ITScope it_scope(this, &cond);
10097 vstmia(cond, dt, rn, write_back, dreglist);
10098 }
10099 void Vstmia(DataType dt,
10100 Register rn,
10101 WriteBack write_back,
10102 DRegisterList dreglist) {
10103 Vstmia(al, dt, rn, write_back, dreglist);
10104 }
10105 void Vstmia(Condition cond,
10106 Register rn,
10107 WriteBack write_back,
10108 DRegisterList dreglist) {
10109 Vstmia(cond, kDataTypeValueNone, rn, write_back, dreglist);
10110 }
10111 void Vstmia(Register rn, WriteBack write_back, DRegisterList dreglist) {
10112 Vstmia(al, kDataTypeValueNone, rn, write_back, dreglist);
10113 }
10114
10115 void Vstmia(Condition cond,
10116 DataType dt,
10117 Register rn,
10118 WriteBack write_back,
10119 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010120 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10121 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010122 VIXL_ASSERT(allow_macro_instructions_);
10123 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010124 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010125 ITScope it_scope(this, &cond);
10126 vstmia(cond, dt, rn, write_back, sreglist);
10127 }
10128 void Vstmia(DataType dt,
10129 Register rn,
10130 WriteBack write_back,
10131 SRegisterList sreglist) {
10132 Vstmia(al, dt, rn, write_back, sreglist);
10133 }
10134 void Vstmia(Condition cond,
10135 Register rn,
10136 WriteBack write_back,
10137 SRegisterList sreglist) {
10138 Vstmia(cond, kDataTypeValueNone, rn, write_back, sreglist);
10139 }
10140 void Vstmia(Register rn, WriteBack write_back, SRegisterList sreglist) {
10141 Vstmia(al, kDataTypeValueNone, rn, write_back, sreglist);
10142 }
10143
10144 void Vstr(Condition cond,
10145 DataType dt,
10146 DRegister rd,
10147 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010148 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10149 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010150 VIXL_ASSERT(allow_macro_instructions_);
10151 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010152 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010153 ITScope it_scope(this, &cond);
10154 vstr(cond, dt, rd, operand);
10155 }
10156 void Vstr(DataType dt, DRegister rd, const MemOperand& operand) {
10157 Vstr(al, dt, rd, operand);
10158 }
10159 void Vstr(Condition cond, DRegister rd, const MemOperand& operand) {
10160 Vstr(cond, Untyped64, rd, operand);
10161 }
10162 void Vstr(DRegister rd, const MemOperand& operand) {
10163 Vstr(al, Untyped64, rd, operand);
10164 }
10165
10166 void Vstr(Condition cond,
10167 DataType dt,
10168 SRegister rd,
10169 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010170 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10171 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010172 VIXL_ASSERT(allow_macro_instructions_);
10173 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010174 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010175 ITScope it_scope(this, &cond);
10176 vstr(cond, dt, rd, operand);
10177 }
10178 void Vstr(DataType dt, SRegister rd, const MemOperand& operand) {
10179 Vstr(al, dt, rd, operand);
10180 }
10181 void Vstr(Condition cond, SRegister rd, const MemOperand& operand) {
10182 Vstr(cond, Untyped32, rd, operand);
10183 }
10184 void Vstr(SRegister rd, const MemOperand& operand) {
10185 Vstr(al, Untyped32, rd, operand);
10186 }
10187
10188 void Vsub(
10189 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010190 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10191 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10192 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010193 VIXL_ASSERT(allow_macro_instructions_);
10194 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010195 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010196 ITScope it_scope(this, &cond);
10197 vsub(cond, dt, rd, rn, rm);
10198 }
10199 void Vsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
10200 Vsub(al, dt, rd, rn, rm);
10201 }
10202
10203 void Vsub(
10204 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010205 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10206 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10207 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010208 VIXL_ASSERT(allow_macro_instructions_);
10209 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010210 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010211 ITScope it_scope(this, &cond);
10212 vsub(cond, dt, rd, rn, rm);
10213 }
10214 void Vsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
10215 Vsub(al, dt, rd, rn, rm);
10216 }
10217
10218 void Vsub(
10219 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010220 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10221 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10222 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010223 VIXL_ASSERT(allow_macro_instructions_);
10224 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010225 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010226 ITScope it_scope(this, &cond);
10227 vsub(cond, dt, rd, rn, rm);
10228 }
10229 void Vsub(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
10230 Vsub(al, dt, rd, rn, rm);
10231 }
10232
10233 void Vsubhn(
10234 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010235 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10236 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10237 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010238 VIXL_ASSERT(allow_macro_instructions_);
10239 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010240 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010241 ITScope it_scope(this, &cond);
10242 vsubhn(cond, dt, rd, rn, rm);
10243 }
10244 void Vsubhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
10245 Vsubhn(al, dt, rd, rn, rm);
10246 }
10247
10248 void Vsubl(
10249 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010250 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10251 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10252 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010253 VIXL_ASSERT(allow_macro_instructions_);
10254 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010255 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010256 ITScope it_scope(this, &cond);
10257 vsubl(cond, dt, rd, rn, rm);
10258 }
10259 void Vsubl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
10260 Vsubl(al, dt, rd, rn, rm);
10261 }
10262
10263 void Vsubw(
10264 Condition cond, DataType dt, QRegister rd, QRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010265 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10266 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10267 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010268 VIXL_ASSERT(allow_macro_instructions_);
10269 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010270 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010271 ITScope it_scope(this, &cond);
10272 vsubw(cond, dt, rd, rn, rm);
10273 }
10274 void Vsubw(DataType dt, QRegister rd, QRegister rn, DRegister rm) {
10275 Vsubw(al, dt, rd, rn, rm);
10276 }
10277
10278 void Vswp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010279 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10280 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010281 VIXL_ASSERT(allow_macro_instructions_);
10282 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010283 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010284 ITScope it_scope(this, &cond);
10285 vswp(cond, dt, rd, rm);
10286 }
10287 void Vswp(DataType dt, DRegister rd, DRegister rm) { Vswp(al, dt, rd, rm); }
10288 void Vswp(Condition cond, DRegister rd, DRegister rm) {
10289 Vswp(cond, kDataTypeValueNone, rd, rm);
10290 }
10291 void Vswp(DRegister rd, DRegister rm) {
10292 Vswp(al, kDataTypeValueNone, rd, rm);
10293 }
10294
10295 void Vswp(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010296 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10297 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010298 VIXL_ASSERT(allow_macro_instructions_);
10299 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010300 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010301 ITScope it_scope(this, &cond);
10302 vswp(cond, dt, rd, rm);
10303 }
10304 void Vswp(DataType dt, QRegister rd, QRegister rm) { Vswp(al, dt, rd, rm); }
10305 void Vswp(Condition cond, QRegister rd, QRegister rm) {
10306 Vswp(cond, kDataTypeValueNone, rd, rm);
10307 }
10308 void Vswp(QRegister rd, QRegister rm) {
10309 Vswp(al, kDataTypeValueNone, rd, rm);
10310 }
10311
10312 void Vtbl(Condition cond,
10313 DataType dt,
10314 DRegister rd,
10315 const NeonRegisterList& nreglist,
10316 DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010317 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10318 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10319 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010320 VIXL_ASSERT(allow_macro_instructions_);
10321 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010322 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010323 ITScope it_scope(this, &cond);
10324 vtbl(cond, dt, rd, nreglist, rm);
10325 }
10326 void Vtbl(DataType dt,
10327 DRegister rd,
10328 const NeonRegisterList& nreglist,
10329 DRegister rm) {
10330 Vtbl(al, dt, rd, nreglist, rm);
10331 }
10332
10333 void Vtbx(Condition cond,
10334 DataType dt,
10335 DRegister rd,
10336 const NeonRegisterList& nreglist,
10337 DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010338 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10339 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10340 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010341 VIXL_ASSERT(allow_macro_instructions_);
10342 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010343 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010344 ITScope it_scope(this, &cond);
10345 vtbx(cond, dt, rd, nreglist, rm);
10346 }
10347 void Vtbx(DataType dt,
10348 DRegister rd,
10349 const NeonRegisterList& nreglist,
10350 DRegister rm) {
10351 Vtbx(al, dt, rd, nreglist, rm);
10352 }
10353
10354 void Vtrn(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010355 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10356 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010357 VIXL_ASSERT(allow_macro_instructions_);
10358 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010359 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010360 ITScope it_scope(this, &cond);
10361 vtrn(cond, dt, rd, rm);
10362 }
10363 void Vtrn(DataType dt, DRegister rd, DRegister rm) { Vtrn(al, dt, rd, rm); }
10364
10365 void Vtrn(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010366 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10367 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010368 VIXL_ASSERT(allow_macro_instructions_);
10369 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010370 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010371 ITScope it_scope(this, &cond);
10372 vtrn(cond, dt, rd, rm);
10373 }
10374 void Vtrn(DataType dt, QRegister rd, QRegister rm) { Vtrn(al, dt, rd, rm); }
10375
10376 void Vtst(
10377 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010378 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10379 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10380 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010381 VIXL_ASSERT(allow_macro_instructions_);
10382 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010383 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010384 ITScope it_scope(this, &cond);
10385 vtst(cond, dt, rd, rn, rm);
10386 }
10387 void Vtst(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
10388 Vtst(al, dt, rd, rn, rm);
10389 }
10390
10391 void Vtst(
10392 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010393 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10394 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10395 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010396 VIXL_ASSERT(allow_macro_instructions_);
10397 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010398 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010399 ITScope it_scope(this, &cond);
10400 vtst(cond, dt, rd, rn, rm);
10401 }
10402 void Vtst(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
10403 Vtst(al, dt, rd, rn, rm);
10404 }
10405
10406 void Vuzp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010407 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10408 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010409 VIXL_ASSERT(allow_macro_instructions_);
10410 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010411 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010412 ITScope it_scope(this, &cond);
10413 vuzp(cond, dt, rd, rm);
10414 }
10415 void Vuzp(DataType dt, DRegister rd, DRegister rm) { Vuzp(al, dt, rd, rm); }
10416
10417 void Vuzp(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010418 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10419 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010420 VIXL_ASSERT(allow_macro_instructions_);
10421 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010422 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010423 ITScope it_scope(this, &cond);
10424 vuzp(cond, dt, rd, rm);
10425 }
10426 void Vuzp(DataType dt, QRegister rd, QRegister rm) { Vuzp(al, dt, rd, rm); }
10427
10428 void Vzip(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010429 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10430 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010431 VIXL_ASSERT(allow_macro_instructions_);
10432 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010433 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010434 ITScope it_scope(this, &cond);
10435 vzip(cond, dt, rd, rm);
10436 }
10437 void Vzip(DataType dt, DRegister rd, DRegister rm) { Vzip(al, dt, rd, rm); }
10438
10439 void Vzip(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010440 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10441 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010442 VIXL_ASSERT(allow_macro_instructions_);
10443 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010444 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010445 ITScope it_scope(this, &cond);
10446 vzip(cond, dt, rd, rm);
10447 }
10448 void Vzip(DataType dt, QRegister rd, QRegister rm) { Vzip(al, dt, rd, rm); }
10449
10450 void Yield(Condition cond) {
10451 VIXL_ASSERT(allow_macro_instructions_);
10452 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010453 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010454 ITScope it_scope(this, &cond);
10455 yield(cond);
10456 }
10457 void Yield() { Yield(al); }
Vincent Belliardf6786182016-09-21 11:55:28 +010010458 void Vabs(Condition cond, VRegister rd, VRegister rm) {
10459 VIXL_ASSERT(rd.IsS() || rd.IsD());
10460 VIXL_ASSERT(rd.GetType() == rm.GetType());
10461 if (rd.IsS()) {
10462 Vabs(cond, F32, rd.S(), rm.S());
10463 } else {
10464 Vabs(cond, F64, rd.D(), rm.D());
10465 }
10466 }
10467 void Vabs(VRegister rd, VRegister rm) { Vabs(al, rd, rm); }
10468 void Vadd(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10469 VIXL_ASSERT(rd.IsS() || rd.IsD());
10470 VIXL_ASSERT(rd.GetType() == rn.GetType());
10471 VIXL_ASSERT(rd.GetType() == rm.GetType());
10472 if (rd.IsS()) {
10473 Vadd(cond, F32, rd.S(), rn.S(), rm.S());
10474 } else {
10475 Vadd(cond, F64, rd.D(), rn.D(), rm.D());
10476 }
10477 }
10478 void Vadd(VRegister rd, VRegister rn, VRegister rm) { Vadd(al, rd, rn, rm); }
10479 void Vcmp(Condition cond, VRegister rd, VRegister rm) {
10480 VIXL_ASSERT(rd.IsS() || rd.IsD());
10481 VIXL_ASSERT(rd.GetType() == rm.GetType());
10482 if (rd.IsS()) {
10483 Vcmp(cond, F32, rd.S(), rm.S());
10484 } else {
10485 Vcmp(cond, F64, rd.D(), rm.D());
10486 }
10487 }
10488 void Vcmp(VRegister rd, VRegister rm) { Vcmp(al, rd, rm); }
10489 void Vcmpe(Condition cond, VRegister rd, VRegister rm) {
10490 VIXL_ASSERT(rd.IsS() || rd.IsD());
10491 VIXL_ASSERT(rd.GetType() == rm.GetType());
10492 if (rd.IsS()) {
10493 Vcmpe(cond, F32, rd.S(), rm.S());
10494 } else {
10495 Vcmpe(cond, F64, rd.D(), rm.D());
10496 }
10497 }
10498 void Vcmpe(VRegister rd, VRegister rm) { Vcmpe(al, rd, rm); }
10499 void Vdiv(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10500 VIXL_ASSERT(rd.IsS() || rd.IsD());
10501 VIXL_ASSERT(rd.GetType() == rn.GetType());
10502 VIXL_ASSERT(rd.GetType() == rm.GetType());
10503 if (rd.IsS()) {
10504 Vdiv(cond, F32, rd.S(), rn.S(), rm.S());
10505 } else {
10506 Vdiv(cond, F64, rd.D(), rn.D(), rm.D());
10507 }
10508 }
10509 void Vdiv(VRegister rd, VRegister rn, VRegister rm) { Vdiv(al, rd, rn, rm); }
10510 void Vfma(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10511 VIXL_ASSERT(rd.IsS() || rd.IsD());
10512 VIXL_ASSERT(rd.GetType() == rn.GetType());
10513 VIXL_ASSERT(rd.GetType() == rm.GetType());
10514 if (rd.IsS()) {
10515 Vfma(cond, F32, rd.S(), rn.S(), rm.S());
10516 } else {
10517 Vfma(cond, F64, rd.D(), rn.D(), rm.D());
10518 }
10519 }
10520 void Vfma(VRegister rd, VRegister rn, VRegister rm) { Vfma(al, rd, rn, rm); }
10521 void Vfms(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10522 VIXL_ASSERT(rd.IsS() || rd.IsD());
10523 VIXL_ASSERT(rd.GetType() == rn.GetType());
10524 VIXL_ASSERT(rd.GetType() == rm.GetType());
10525 if (rd.IsS()) {
10526 Vfms(cond, F32, rd.S(), rn.S(), rm.S());
10527 } else {
10528 Vfms(cond, F64, rd.D(), rn.D(), rm.D());
10529 }
10530 }
10531 void Vfms(VRegister rd, VRegister rn, VRegister rm) { Vfms(al, rd, rn, rm); }
10532 void Vfnma(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10533 VIXL_ASSERT(rd.IsS() || rd.IsD());
10534 VIXL_ASSERT(rd.GetType() == rn.GetType());
10535 VIXL_ASSERT(rd.GetType() == rm.GetType());
10536 if (rd.IsS()) {
10537 Vfnma(cond, F32, rd.S(), rn.S(), rm.S());
10538 } else {
10539 Vfnma(cond, F64, rd.D(), rn.D(), rm.D());
10540 }
10541 }
10542 void Vfnma(VRegister rd, VRegister rn, VRegister rm) {
10543 Vfnma(al, rd, rn, rm);
10544 }
10545 void Vfnms(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10546 VIXL_ASSERT(rd.IsS() || rd.IsD());
10547 VIXL_ASSERT(rd.GetType() == rn.GetType());
10548 VIXL_ASSERT(rd.GetType() == rm.GetType());
10549 if (rd.IsS()) {
10550 Vfnms(cond, F32, rd.S(), rn.S(), rm.S());
10551 } else {
10552 Vfnms(cond, F64, rd.D(), rn.D(), rm.D());
10553 }
10554 }
10555 void Vfnms(VRegister rd, VRegister rn, VRegister rm) {
10556 Vfnms(al, rd, rn, rm);
10557 }
10558 void Vmaxnm(VRegister rd, VRegister rn, VRegister rm) {
10559 VIXL_ASSERT(rd.IsS() || rd.IsD());
10560 VIXL_ASSERT(rd.GetType() == rn.GetType());
10561 VIXL_ASSERT(rd.GetType() == rm.GetType());
10562 if (rd.IsS()) {
10563 Vmaxnm(F32, rd.S(), rn.S(), rm.S());
10564 } else {
10565 Vmaxnm(F64, rd.D(), rn.D(), rm.D());
10566 }
10567 }
10568 void Vminnm(VRegister rd, VRegister rn, VRegister rm) {
10569 VIXL_ASSERT(rd.IsS() || rd.IsD());
10570 VIXL_ASSERT(rd.GetType() == rn.GetType());
10571 VIXL_ASSERT(rd.GetType() == rm.GetType());
10572 if (rd.IsS()) {
10573 Vminnm(F32, rd.S(), rn.S(), rm.S());
10574 } else {
10575 Vminnm(F64, rd.D(), rn.D(), rm.D());
10576 }
10577 }
10578 void Vmla(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10579 VIXL_ASSERT(rd.IsS() || rd.IsD());
10580 VIXL_ASSERT(rd.GetType() == rn.GetType());
10581 VIXL_ASSERT(rd.GetType() == rm.GetType());
10582 if (rd.IsS()) {
10583 Vmla(cond, F32, rd.S(), rn.S(), rm.S());
10584 } else {
10585 Vmla(cond, F64, rd.D(), rn.D(), rm.D());
10586 }
10587 }
10588 void Vmla(VRegister rd, VRegister rn, VRegister rm) { Vmla(al, rd, rn, rm); }
10589 void Vmls(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10590 VIXL_ASSERT(rd.IsS() || rd.IsD());
10591 VIXL_ASSERT(rd.GetType() == rn.GetType());
10592 VIXL_ASSERT(rd.GetType() == rm.GetType());
10593 if (rd.IsS()) {
10594 Vmls(cond, F32, rd.S(), rn.S(), rm.S());
10595 } else {
10596 Vmls(cond, F64, rd.D(), rn.D(), rm.D());
10597 }
10598 }
10599 void Vmls(VRegister rd, VRegister rn, VRegister rm) { Vmls(al, rd, rn, rm); }
10600 void Vmov(Condition cond, VRegister rd, VRegister rm) {
10601 VIXL_ASSERT(rd.IsS() || rd.IsD());
10602 VIXL_ASSERT(rd.GetType() == rm.GetType());
10603 if (rd.IsS()) {
10604 Vmov(cond, F32, rd.S(), rm.S());
10605 } else {
10606 Vmov(cond, F64, rd.D(), rm.D());
10607 }
10608 }
10609 void Vmov(VRegister rd, VRegister rm) { Vmov(al, rd, rm); }
10610 void Vmul(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10611 VIXL_ASSERT(rd.IsS() || rd.IsD());
10612 VIXL_ASSERT(rd.GetType() == rn.GetType());
10613 VIXL_ASSERT(rd.GetType() == rm.GetType());
10614 if (rd.IsS()) {
10615 Vmul(cond, F32, rd.S(), rn.S(), rm.S());
10616 } else {
10617 Vmul(cond, F64, rd.D(), rn.D(), rm.D());
10618 }
10619 }
10620 void Vmul(VRegister rd, VRegister rn, VRegister rm) { Vmul(al, rd, rn, rm); }
10621 void Vneg(Condition cond, VRegister rd, VRegister rm) {
10622 VIXL_ASSERT(rd.IsS() || rd.IsD());
10623 VIXL_ASSERT(rd.GetType() == rm.GetType());
10624 if (rd.IsS()) {
10625 Vneg(cond, F32, rd.S(), rm.S());
10626 } else {
10627 Vneg(cond, F64, rd.D(), rm.D());
10628 }
10629 }
10630 void Vneg(VRegister rd, VRegister rm) { Vneg(al, rd, rm); }
10631 void Vnmla(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10632 VIXL_ASSERT(rd.IsS() || rd.IsD());
10633 VIXL_ASSERT(rd.GetType() == rn.GetType());
10634 VIXL_ASSERT(rd.GetType() == rm.GetType());
10635 if (rd.IsS()) {
10636 Vnmla(cond, F32, rd.S(), rn.S(), rm.S());
10637 } else {
10638 Vnmla(cond, F64, rd.D(), rn.D(), rm.D());
10639 }
10640 }
10641 void Vnmla(VRegister rd, VRegister rn, VRegister rm) {
10642 Vnmla(al, rd, rn, rm);
10643 }
10644 void Vnmls(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10645 VIXL_ASSERT(rd.IsS() || rd.IsD());
10646 VIXL_ASSERT(rd.GetType() == rn.GetType());
10647 VIXL_ASSERT(rd.GetType() == rm.GetType());
10648 if (rd.IsS()) {
10649 Vnmls(cond, F32, rd.S(), rn.S(), rm.S());
10650 } else {
10651 Vnmls(cond, F64, rd.D(), rn.D(), rm.D());
10652 }
10653 }
10654 void Vnmls(VRegister rd, VRegister rn, VRegister rm) {
10655 Vnmls(al, rd, rn, rm);
10656 }
10657 void Vnmul(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10658 VIXL_ASSERT(rd.IsS() || rd.IsD());
10659 VIXL_ASSERT(rd.GetType() == rn.GetType());
10660 VIXL_ASSERT(rd.GetType() == rm.GetType());
10661 if (rd.IsS()) {
10662 Vnmul(cond, F32, rd.S(), rn.S(), rm.S());
10663 } else {
10664 Vnmul(cond, F64, rd.D(), rn.D(), rm.D());
10665 }
10666 }
10667 void Vnmul(VRegister rd, VRegister rn, VRegister rm) {
10668 Vnmul(al, rd, rn, rm);
10669 }
10670 void Vseleq(VRegister rd, VRegister rn, VRegister rm) {
10671 VIXL_ASSERT(rd.IsS() || rd.IsD());
10672 VIXL_ASSERT(rd.GetType() == rn.GetType());
10673 VIXL_ASSERT(rd.GetType() == rm.GetType());
10674 if (rd.IsS()) {
10675 Vseleq(F32, rd.S(), rn.S(), rm.S());
10676 } else {
10677 Vseleq(F64, rd.D(), rn.D(), rm.D());
10678 }
10679 }
10680 void Vselge(VRegister rd, VRegister rn, VRegister rm) {
10681 VIXL_ASSERT(rd.IsS() || rd.IsD());
10682 VIXL_ASSERT(rd.GetType() == rn.GetType());
10683 VIXL_ASSERT(rd.GetType() == rm.GetType());
10684 if (rd.IsS()) {
10685 Vselge(F32, rd.S(), rn.S(), rm.S());
10686 } else {
10687 Vselge(F64, rd.D(), rn.D(), rm.D());
10688 }
10689 }
10690 void Vselgt(VRegister rd, VRegister rn, VRegister rm) {
10691 VIXL_ASSERT(rd.IsS() || rd.IsD());
10692 VIXL_ASSERT(rd.GetType() == rn.GetType());
10693 VIXL_ASSERT(rd.GetType() == rm.GetType());
10694 if (rd.IsS()) {
10695 Vselgt(F32, rd.S(), rn.S(), rm.S());
10696 } else {
10697 Vselgt(F64, rd.D(), rn.D(), rm.D());
10698 }
10699 }
10700 void Vselvs(VRegister rd, VRegister rn, VRegister rm) {
10701 VIXL_ASSERT(rd.IsS() || rd.IsD());
10702 VIXL_ASSERT(rd.GetType() == rn.GetType());
10703 VIXL_ASSERT(rd.GetType() == rm.GetType());
10704 if (rd.IsS()) {
10705 Vselvs(F32, rd.S(), rn.S(), rm.S());
10706 } else {
10707 Vselvs(F64, rd.D(), rn.D(), rm.D());
10708 }
10709 }
10710 void Vsqrt(Condition cond, VRegister rd, VRegister rm) {
10711 VIXL_ASSERT(rd.IsS() || rd.IsD());
10712 VIXL_ASSERT(rd.GetType() == rm.GetType());
10713 if (rd.IsS()) {
10714 Vsqrt(cond, F32, rd.S(), rm.S());
10715 } else {
10716 Vsqrt(cond, F64, rd.D(), rm.D());
10717 }
10718 }
10719 void Vsqrt(VRegister rd, VRegister rm) { Vsqrt(al, rd, rm); }
10720 void Vsub(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10721 VIXL_ASSERT(rd.IsS() || rd.IsD());
10722 VIXL_ASSERT(rd.GetType() == rn.GetType());
10723 VIXL_ASSERT(rd.GetType() == rm.GetType());
10724 if (rd.IsS()) {
10725 Vsub(cond, F32, rd.S(), rn.S(), rm.S());
10726 } else {
10727 Vsub(cond, F64, rd.D(), rn.D(), rm.D());
10728 }
10729 }
10730 void Vsub(VRegister rd, VRegister rn, VRegister rm) { Vsub(al, rd, rn, rm); }
Alexandre Ramesd3832962016-07-04 15:03:43 +010010731 // End of generated code.
Vincent Belliardd17e3482016-11-22 15:46:43 -080010732
10733 virtual bool AllowUnpredictable() VIXL_OVERRIDE {
10734 VIXL_ABORT_WITH_MSG("Unpredictable instruction.\n");
10735 return false;
10736 }
10737 virtual bool AllowStronglyDiscouraged() VIXL_OVERRIDE {
10738 VIXL_ABORT_WITH_MSG(
10739 "ARM strongly recommends to not use this instruction.\n");
10740 return false;
10741 }
10742
Alexandre Ramesd3832962016-07-04 15:03:43 +010010743 private:
10744 RegisterList available_;
10745 VRegisterList available_vfp_;
10746 MacroAssemblerContext context_;
10747 Label::Offset checkpoint_;
10748 LiteralPoolManager literal_pool_manager_;
10749 VeneerPoolManager veneer_pool_manager_;
Pierre Langlois1e85b7f2016-08-05 14:20:36 +010010750 bool generate_simulator_code_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010010751 bool allow_macro_instructions_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010010752};
10753
Alexandre Ramesd3832962016-07-04 15:03:43 +010010754// This scope utility allows scratch registers to be managed safely. The
10755// MacroAssembler's GetScratchRegisterList() is used as a pool of scratch
10756// registers. These registers can be allocated on demand, and will be returned
10757// at the end of the scope.
10758//
10759// When the scope ends, the MacroAssembler's lists will be restored to their
10760// original state, even if the lists were modified by some other means.
10761class UseScratchRegisterScope {
10762 public:
10763 // This constructor implicitly calls the `Open` function to initialise the
10764 // scope, so it is ready to use immediately after it has been constructed.
10765 explicit UseScratchRegisterScope(MacroAssembler* masm)
10766 : available_(NULL),
10767 available_vfp_(NULL),
10768 old_available_(0),
10769 old_available_vfp_(0) {
10770 Open(masm);
10771 }
10772 // This constructor allows deferred and optional initialisation of the scope.
10773 // The user is required to explicitly call the `Open` function before using
10774 // the scope.
10775 UseScratchRegisterScope()
10776 : available_(NULL),
10777 available_vfp_(NULL),
10778 old_available_(0),
10779 old_available_vfp_(0) {}
10780
10781 // This function performs the actual initialisation work.
10782 void Open(MacroAssembler* masm);
10783
10784 // The destructor always implicitly calls the `Close` function.
10785 ~UseScratchRegisterScope() { Close(); }
10786
10787 // This function performs the cleaning-up work. It must succeed even if the
10788 // scope has not been opened. It is safe to call multiple times.
10789 void Close();
10790
10791 bool IsAvailable(const Register& reg) const;
10792 bool IsAvailable(const VRegister& reg) const;
10793
10794 // Take a register from the temp list. It will be returned automatically when
10795 // the scope ends.
10796 Register Acquire();
10797 VRegister AcquireV(unsigned size_in_bits);
10798 QRegister AcquireQ();
10799 DRegister AcquireD();
10800 SRegister AcquireS();
10801
10802 // Explicitly release an acquired (or excluded) register, putting it back in
10803 // the temp list.
10804 void Release(const Register& reg);
10805 void Release(const VRegister& reg);
10806
10807 // Make the specified registers available as scratch registers for the
10808 // duration of this scope.
10809 void Include(const RegisterList& list);
10810 void Include(const Register& reg1,
10811 const Register& reg2 = NoReg,
10812 const Register& reg3 = NoReg,
10813 const Register& reg4 = NoReg) {
10814 Include(RegisterList(reg1, reg2, reg3, reg4));
10815 }
10816 void Include(const VRegisterList& list);
10817 void Include(const VRegister& reg1,
10818 const VRegister& reg2 = NoVReg,
10819 const VRegister& reg3 = NoVReg,
10820 const VRegister& reg4 = NoVReg) {
10821 Include(VRegisterList(reg1, reg2, reg3, reg4));
10822 }
10823
10824 // Make sure that the specified registers are not available in this scope.
10825 // This can be used to prevent helper functions from using sensitive
10826 // registers, for example.
10827 void Exclude(const RegisterList& list);
10828 void Exclude(const Register& reg1,
10829 const Register& reg2 = NoReg,
10830 const Register& reg3 = NoReg,
10831 const Register& reg4 = NoReg) {
10832 Exclude(RegisterList(reg1, reg2, reg3, reg4));
10833 }
10834 void Exclude(const VRegisterList& list);
10835 void Exclude(const VRegister& reg1,
10836 const VRegister& reg2 = NoVReg,
10837 const VRegister& reg3 = NoVReg,
10838 const VRegister& reg4 = NoVReg) {
10839 Exclude(VRegisterList(reg1, reg2, reg3, reg4));
10840 }
10841
Jacob Bramley9ee25b52016-12-02 10:58:09 +000010842 // A convenience helper to exclude any registers used by the operand.
10843 void Exclude(const Operand& operand);
10844
Alexandre Ramesd3832962016-07-04 15:03:43 +010010845 // Prevent any scratch registers from being used in this scope.
10846 void ExcludeAll();
10847
10848 private:
10849 // Available scratch registers.
10850 RegisterList* available_; // kRRegister
10851 VRegisterList* available_vfp_; // kVRegister
10852
10853 // The state of the available lists at the start of this scope.
10854 uint32_t old_available_; // kRRegister
10855 uint64_t old_available_vfp_; // kVRegister
10856
10857 VIXL_DEBUG_NO_RETURN UseScratchRegisterScope(const UseScratchRegisterScope&) {
10858 VIXL_UNREACHABLE();
10859 }
10860 VIXL_DEBUG_NO_RETURN void operator=(const UseScratchRegisterScope&) {
10861 VIXL_UNREACHABLE();
10862 }
10863};
10864
10865class JumpTableBase {
10866 protected:
10867 JumpTableBase(int len, int offset_size)
10868 : table_location_(Label::kMaxOffset),
10869 branch_location_(Label::kMaxOffset),
10870 length_(len),
10871 offset_shift_(WhichPowerOf2(offset_size)),
10872 presence_(length_) {
10873 VIXL_ASSERT((length_ >= 0) && (offset_size <= 4));
10874 }
10875 virtual ~JumpTableBase() {}
10876
10877 public:
10878 int GetTableSizeInBytes() const { return length_ * (1 << offset_shift_); }
10879 int GetOffsetShift() const { return offset_shift_; }
10880 int GetLength() const { return length_; }
10881 Label* GetDefaultLabel() { return &default_; }
10882 Label* GetEndLabel() { return &end_; }
10883 void SetBranchLocation(uint32_t branch_location) {
10884 branch_location_ = branch_location;
10885 }
10886 uint32_t GetBranchLocation() const { return branch_location_; }
10887 void BindTable(uint32_t location) { table_location_ = location; }
10888 virtual void Link(MacroAssembler* masm,
10889 int case_index,
10890 uint32_t location) = 0;
10891
10892 uint32_t GetLocationForCase(int i) {
10893 VIXL_ASSERT((i >= 0) && (i < length_));
10894 return table_location_ + (i * (1 << offset_shift_));
10895 }
10896 void SetPresenceBitForCase(int i) {
10897 VIXL_ASSERT((i >= 0) && (i < length_));
10898 presence_.Set(i);
10899 }
10900
10901 void Finalize(MacroAssembler* masm) {
10902 if (!default_.IsBound()) {
10903 masm->Bind(&default_);
10904 }
10905 masm->Bind(&end_);
10906
10907 presence_.ForEachBitNotSet(LinkIt(this, masm, default_.GetLocation()));
10908 }
10909
10910 private:
10911 uint32_t table_location_;
10912 uint32_t branch_location_;
10913 const int length_;
10914 const int offset_shift_;
10915 BitField presence_;
10916 Label default_;
10917 Label end_;
10918 struct LinkIt {
10919 JumpTableBase* table_;
10920 MacroAssembler* const masm_;
10921 const uint32_t location_;
10922 LinkIt(JumpTableBase* table, MacroAssembler* const masm, uint32_t location)
10923 : table_(table), masm_(masm), location_(location) {}
10924 bool execute(int id) const {
10925 VIXL_ASSERT(id < table_->GetLength());
10926 table_->Link(masm_, static_cast<int>(id), location_);
10927 return true;
10928 }
10929 };
10930};
10931
10932// JumpTable<T>(len): Helper to describe a jump table
10933// len here describes the number of possible case. Values in [0, n[ can have a
10934// jump offset. Any other value will assert.
10935template <typename T>
10936class JumpTable : public JumpTableBase {
10937 protected:
10938 explicit JumpTable(int length) : JumpTableBase(length, sizeof(T)) {}
10939
10940 public:
Pierre Langlois3fac43c2016-10-31 13:38:47 +000010941 virtual void Link(MacroAssembler* masm,
10942 int case_index,
10943 uint32_t location) VIXL_OVERRIDE {
Alexandre Ramesd3832962016-07-04 15:03:43 +010010944 uint32_t position_in_table = GetLocationForCase(case_index);
10945 uint32_t from = GetBranchLocation();
10946 int offset = location - from;
Alexandre Rames919e3fe2016-10-14 09:07:54 +010010947 T* case_offset = masm->GetBuffer()->GetOffsetAddress<T*>(position_in_table);
Jacob Bramley10dae1a2016-07-27 09:45:13 +010010948 if (masm->IsUsingT32()) {
Alexandre Ramesd3832962016-07-04 15:03:43 +010010949 *case_offset = offset >> 1;
10950 } else {
10951 *case_offset = offset >> 2;
10952 }
10953 }
10954};
10955
10956class JumpTable8bitOffset : public JumpTable<uint8_t> {
10957 public:
10958 explicit JumpTable8bitOffset(int length) : JumpTable<uint8_t>(length) {}
10959};
10960
10961class JumpTable16bitOffset : public JumpTable<uint16_t> {
10962 public:
10963 explicit JumpTable16bitOffset(int length) : JumpTable<uint16_t>(length) {}
10964};
10965
10966class JumpTable32bitOffset : public JumpTable<uint32_t> {
10967 public:
10968 explicit JumpTable32bitOffset(int length) : JumpTable<uint32_t>(length) {}
10969};
10970
10971} // namespace aarch32
10972} // namespace vixl
10973
10974#endif // VIXL_AARCH32_MACRO_ASSEMBLER_AARCH32_H_