blob: 50fa19c9bf20b57e52fec9b700cc694ac277fa45 [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) {
67 if (literal->GetPositionInPool() == Label::kMaxOffset) {
68 uint32_t position = GetSize();
69 literal->SetPositionInPool(position);
70 literals_.push_back(literal);
71 size_ += literal->GetAlignedSize();
72 }
Alexandre Ramesd3832962016-07-04 15:03:43 +010073 }
74
75 // First literal to be emitted.
76 RawLiteralListIterator GetFirst() { return literals_.begin(); }
77
78 // Mark the end of the literal container.
79 RawLiteralListIterator GetEnd() { return literals_.end(); }
80
81 // Remove all the literals from the container.
82 // If the literal's memory management has been delegated to the container
83 // it will be delete'd.
84 void Clear() {
85 for (RawLiteralListIterator literal_it = GetFirst(); literal_it != GetEnd();
86 literal_it++) {
87 RawLiteral* literal = *literal_it;
88 switch (literal->GetDeletionPolicy()) {
89 case RawLiteral::kDeletedOnPlacementByPool:
90 delete literal;
91 break;
92 case RawLiteral::kDeletedOnPoolDestruction:
93 keep_until_delete_.push_back(literal);
94 break;
95 case RawLiteral::kManuallyDeleted:
96 break;
97 }
98 }
99 literals_.clear();
100 size_ = 0;
101 }
102
103 private:
104 // Size (in bytes and including alignments) of the literal pool.
105 unsigned size_;
106
107 // Literal container.
108 std::list<RawLiteral*> literals_;
109 // Already bound Literal container the app requested this pool to keep.
110 std::list<RawLiteral*> keep_until_delete_;
111};
112
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000113
Alexandre Ramesd3832962016-07-04 15:03:43 +0100114// Macro assembler for aarch32 instruction set.
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000115class MacroAssembler : public Assembler, public MacroAssemblerInterface {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100116 public:
117 enum EmitOption { kBranchRequired, kNoBranchRequired };
118
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000119 virtual AssemblerBase* AsAssemblerBase() VIXL_OVERRIDE { return this; }
Vincent Belliard8885c172016-08-24 11:33:19 -0700120
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000121 virtual void BlockPools() VIXL_OVERRIDE {
122 literal_pool_manager_.Block();
123 veneer_pool_manager_.Block();
124 }
125 virtual void ReleasePools() VIXL_OVERRIDE {
126 literal_pool_manager_.Release();
127 veneer_pool_manager_.Release();
128 }
129 virtual void EnsureEmitPoolsFor(size_t size) VIXL_OVERRIDE {
130 // TODO: Optimise this. It also checks that there is space in the buffer,
131 // which we do not need to do here.
132 VIXL_ASSERT(IsUint32(size));
133 EnsureEmitFor(static_cast<uint32_t>(size));
134 }
135
136 private:
137 class MacroEmissionCheckScope : public EmissionCheckScope {
Vincent Belliard8885c172016-08-24 11:33:19 -0700138 public:
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000139 explicit MacroEmissionCheckScope(MacroAssemblerInterface* masm)
140 : EmissionCheckScope(masm, kTypicalMacroInstructionMaxSize) {}
141
142 private:
143 static const size_t kTypicalMacroInstructionMaxSize =
144 8 * kMaxInstructionSizeInBytes;
Vincent Belliard8885c172016-08-24 11:33:19 -0700145 };
146
Alexandre Ramesd3832962016-07-04 15:03:43 +0100147 class MacroAssemblerContext {
148 public:
149 MacroAssemblerContext() : count_(0) {}
150 ~MacroAssemblerContext() {}
151 unsigned GetRecursiveCount() const { return count_; }
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000152 void Up(const char* loc) {
153 location_stack_[count_] = loc;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100154 count_++;
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000155 if (count_ >= kMaxRecursion) {
156 printf(
157 "Recursion limit reached; unable to resolve macro assembler "
158 "call.\n");
159 printf("Macro assembler context stack:\n");
160 for (unsigned i = 0; i < kMaxRecursion; i++) {
161 printf("%10s %s\n", (i == 0) ? "oldest -> " : "", location_stack_[i]);
162 }
163 VIXL_ABORT();
164 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100165 }
166 void Down() {
167 VIXL_ASSERT((count_ > 0) && (count_ < kMaxRecursion));
168 count_--;
169 }
170
171 private:
172 unsigned count_;
173 static const uint32_t kMaxRecursion = 5;
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000174 const char* location_stack_[kMaxRecursion];
Alexandre Ramesd3832962016-07-04 15:03:43 +0100175 };
176
Vincent Belliard76887c12016-11-10 12:54:09 -0800177 // This scope is used at each Delegate entry to avoid infinite recursion of
178 // Delegate calls. The limit is defined by
179 // MacroAssemblerContext::kMaxRecursion.
Alexandre Ramesd3832962016-07-04 15:03:43 +0100180 class ContextScope {
181 public:
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000182 explicit ContextScope(MacroAssembler* const masm, const char* loc)
183 : masm_(masm) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100184 VIXL_ASSERT(masm_->AllowMacroInstructions());
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000185 masm_->GetContext()->Up(loc);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100186 }
187 ~ContextScope() { masm_->GetContext()->Down(); }
188
189 private:
190 MacroAssembler* const masm_;
191 };
192
193 MacroAssemblerContext* GetContext() { return &context_; }
194
195 class ITScope {
196 public:
197 ITScope(MacroAssembler* masm, Condition* cond, bool can_use_it = false)
198 : masm_(masm), cond_(*cond), can_use_it_(can_use_it) {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100199 if (!cond_.Is(al) && masm->IsUsingT32()) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100200 if (can_use_it_) {
201 // IT is not deprecated (that implies a 16 bit T32 instruction).
202 // We generate an IT instruction and a conditional instruction.
203 masm->it(cond_);
204 } else {
205 // The usage of IT is deprecated for the instruction.
206 // We generate a conditional branch and an unconditional instruction.
Jacob Bramleyaaac3972016-11-09 15:59:18 +0000207 // TODO: Use a scope utility with a size check. To do that, we'd need
208 // one with Open() and Close() implemented.
Alexandre Ramesd3832962016-07-04 15:03:43 +0100209 masm_->EnsureEmitFor(k16BitT32InstructionSizeInBytes +
210 kMaxT32MacroInstructionSizeInBytes);
211 // Generate the branch.
212 masm_->b(cond_.Negate(), Narrow, &label_);
213 // Tell the macro-assembler to generate unconditional instructions.
214 *cond = al;
215 }
216 }
217#ifdef VIXL_DEBUG
218 initial_cursor_offset_ = masm->GetCursorOffset();
Alexandre Ramesfd098172016-08-09 10:29:53 +0100219#else
220 USE(initial_cursor_offset_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100221#endif
222 }
223 ~ITScope() {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100224 if (!cond_.Is(al) && masm_->IsUsingT32() && !can_use_it_) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100225 VIXL_ASSERT(masm_->GetCursorOffset() - initial_cursor_offset_ <=
226 kMaxT32MacroInstructionSizeInBytes);
Vincent Belliarde42218c2016-10-19 13:24:28 -0700227 masm_->BindHelper(&label_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100228 }
229 }
230
231 private:
232 MacroAssembler* masm_;
233 Condition cond_;
234 Label label_;
235 bool can_use_it_;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100236 uint32_t initial_cursor_offset_;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100237 };
238
239 template <Assembler::InstructionCondDtDL asmfn>
240 class EmitLiteralCondDtDL {
241 public:
242 EmitLiteralCondDtDL(Condition cond, DataType dt, DRegister rt)
243 : cond_(cond), dt_(dt), rt_(rt) {}
244 void emit(MacroAssembler* const masm, RawLiteral* const literal) {
245 (masm->*asmfn)(cond_, dt_, rt_, literal);
246 }
247
248 private:
249 Condition cond_;
250 DataType dt_;
251 DRegister rt_;
252 };
253
254 template <Assembler::InstructionCondDtSL asmfn>
255 class EmitLiteralCondDtSL {
256 public:
257 EmitLiteralCondDtSL(Condition cond, DataType dt, SRegister rt)
258 : cond_(cond), dt_(dt), rt_(rt) {}
259 void emit(MacroAssembler* const masm, RawLiteral* const literal) {
260 (masm->*asmfn)(cond_, dt_, rt_, literal);
261 }
262
263 private:
264 Condition cond_;
265 DataType dt_;
266 SRegister rt_;
267 };
268
269 template <Assembler::InstructionCondRL asmfn>
270 class EmitLiteralCondRL {
271 public:
272 EmitLiteralCondRL(Condition cond, Register rt) : cond_(cond), rt_(rt) {}
273 void emit(MacroAssembler* const masm, RawLiteral* const literal) {
274 (masm->*asmfn)(cond_, rt_, literal);
275 }
276
277 private:
278 Condition cond_;
279 Register rt_;
280 };
281
282 template <Assembler::InstructionCondRRL asmfn>
283 class EmitLiteralCondRRL {
284 public:
285 EmitLiteralCondRRL(Condition cond, Register rt, Register rt2)
286 : cond_(cond), rt_(rt), rt2_(rt2) {}
287 void emit(MacroAssembler* const masm, RawLiteral* const literal) {
288 (masm->*asmfn)(cond_, rt_, rt2_, literal);
289 }
290
291 private:
292 Condition cond_;
293 Register rt_, rt2_;
294 };
295
296 class LiteralPoolManager {
297 public:
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000298 explicit LiteralPoolManager(MacroAssembler* const masm)
299 : masm_(masm), monitor_(0) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100300 ResetCheckpoint();
301 }
302
303 void ResetCheckpoint() { checkpoint_ = Label::kMaxOffset; }
304
305 LiteralPool* GetLiteralPool() { return &literal_pool_; }
306 Label::Offset GetCheckpoint() const {
307 // Make room for a branch over the pools.
308 return checkpoint_ - kMaxInstructionSizeInBytes;
309 }
310 size_t GetLiteralPoolSize() const { return literal_pool_.GetSize(); }
311
312 // Checks if the insertion of the literal will put the forward reference
313 // too far in the literal pool.
314 bool IsInsertTooFar(RawLiteral* literal, uint32_t from) const {
315 uint32_t checkpoint = from + literal->GetLastInsertForwardDistance();
316 checkpoint =
317 std::min(checkpoint, static_cast<uint32_t>(literal->GetCheckpoint()));
318 bool too_far = AlignDown(checkpoint, 4) < from + literal_pool_.GetSize() +
319 kMaxInstructionSizeInBytes;
320 return too_far;
321 }
322
323 // Set the different checkpoints where the literal pool has to be emited.
324 void UpdateCheckpoint(RawLiteral* literal) {
325 // The literal should have been placed somewhere in the literal pool
326 VIXL_ASSERT(literal->GetPositionInPool() != Label::kMaxOffset);
327 // TODO(all): Consider AddForwardRef as a virtual so the checkpoint is
328 // updated when inserted. Or move checkpoint_ into Label,
329 literal->UpdateCheckpoint();
330 Label::Offset tmp =
331 literal->GetAlignedCheckpoint(4) - literal->GetPositionInPool();
332 if (checkpoint_ > tmp) {
333 checkpoint_ = tmp;
334 masm_->ComputeCheckpoint();
335 }
336 }
337
Alexandre Rames4e6b4af2016-11-08 16:04:55 +0000338 bool IsEmpty() const { return GetLiteralPoolSize() == 0; }
339
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000340 void Block() { monitor_++; }
341 void Release() {
342 VIXL_ASSERT(IsBlocked());
343 if (--monitor_ == 0) {
344 // Ensure the pool has not been blocked for too long.
345 VIXL_ASSERT(masm_->GetCursorOffset() <= checkpoint_);
346 }
347 }
348 bool IsBlocked() const { return monitor_ != 0; }
349
Alexandre Ramesd3832962016-07-04 15:03:43 +0100350 private:
351 MacroAssembler* const masm_;
352 LiteralPool literal_pool_;
353
354 // Max offset in the code buffer where the literal needs to be
355 // emitted. A default value of Label::kMaxOffset means that the checkpoint
356 // is invalid.
357 Label::Offset checkpoint_;
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000358 // Indicates whether the emission of this pool is blocked.
359 int monitor_;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100360 };
361
Alexandre Ramesd3832962016-07-04 15:03:43 +0100362 void PerformEnsureEmit(Label::Offset target, uint32_t extra_size);
363
364 protected:
365 void HandleOutOfBoundsImmediate(Condition cond, Register tmp, uint32_t imm);
Vincent Belliardf8833fa2016-11-08 15:01:57 -0800366 void PadToMinimumBranchRange(Label* label);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100367
368 // Generate the instruction and if it's not possible revert the whole thing.
369 // emit the literal pool and regenerate the instruction.
370 // Note: The instruction is generated via
371 // void T::emit(MacroAssembler* const, RawLiteral* const)
372 template <typename T>
373 void GenerateInstruction(T instr_callback, RawLiteral* const literal) {
Pierre Langloisf5348ce2016-09-22 11:15:35 +0100374 int32_t cursor = GetCursorOffset();
Alexandre Ramesd3832962016-07-04 15:03:43 +0100375 uint32_t where = cursor + GetArchitectureStatePCOffset();
376 // Emit the instruction, via the assembler
Vincent Belliard8885c172016-08-24 11:33:19 -0700377 {
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000378 MacroEmissionCheckScope guard(this);
Vincent Belliard8885c172016-08-24 11:33:19 -0700379 instr_callback.emit(this, literal);
380 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700381 if (!literal->IsManuallyPlaced()) {
382 if (IsInsertTooFar(literal, where)) {
383 // The instruction's data is too far: revert the emission
Alexandre Rames919e3fe2016-10-14 09:07:54 +0100384 GetBuffer()->Rewind(cursor);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700385 literal->InvalidateLastForwardReference(RawLiteral::kNoUpdateNecessary);
386 EmitLiteralPool(kBranchRequired);
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000387 MacroEmissionCheckScope guard(this);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700388 instr_callback.emit(this, literal);
389 }
390 literal_pool_manager_.GetLiteralPool()->AddLiteral(literal);
391 literal_pool_manager_.UpdateCheckpoint(literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100392 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100393 }
394
395 public:
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100396 explicit MacroAssembler(InstructionSet isa = A32)
397 : Assembler(isa),
Alexandre Ramesd3832962016-07-04 15:03:43 +0100398 available_(r12),
399 checkpoint_(Label::kMaxOffset),
400 literal_pool_manager_(this),
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100401 veneer_pool_manager_(this),
402 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100403#ifdef VIXL_DEBUG
404 SetAllowMacroInstructions(true);
Alexandre Ramesfd098172016-08-09 10:29:53 +0100405#else
406 USE(literal_pool_manager_);
407 USE(allow_macro_instructions_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100408#endif
409 ComputeCheckpoint();
410 }
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100411 explicit MacroAssembler(size_t size, InstructionSet isa = A32)
412 : Assembler(size, isa),
413 available_(r12),
414 checkpoint_(Label::kMaxOffset),
415 literal_pool_manager_(this),
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100416 veneer_pool_manager_(this),
417 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE) {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100418#ifdef VIXL_DEBUG
419 SetAllowMacroInstructions(true);
420#endif
421 ComputeCheckpoint();
422 }
Alexandre Rames919e3fe2016-10-14 09:07:54 +0100423 MacroAssembler(byte* buffer, size_t size, InstructionSet isa = A32)
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100424 : Assembler(buffer, size, isa),
Alexandre Ramesd3832962016-07-04 15:03:43 +0100425 available_(r12),
426 checkpoint_(Label::kMaxOffset),
427 literal_pool_manager_(this),
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100428 veneer_pool_manager_(this),
429 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100430#ifdef VIXL_DEBUG
431 SetAllowMacroInstructions(true);
432#endif
433 ComputeCheckpoint();
434 }
435
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100436 bool GenerateSimulatorCode() const { return generate_simulator_code_; }
437
Alexandre Ramesd3832962016-07-04 15:03:43 +0100438#ifdef VIXL_DEBUG
439 // Tell whether any of the macro instruction can be used. When false the
440 // MacroAssembler will assert if a method which can emit a variable number
441 // of instructions is called.
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000442 void SetAllowMacroInstructions(bool value) VIXL_OVERRIDE {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100443 allow_macro_instructions_ = value;
444 }
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000445 bool AllowMacroInstructions() const VIXL_OVERRIDE {
446 return allow_macro_instructions_;
447 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100448#endif
449
450 void FinalizeCode() {
451 EmitLiteralPool(kNoBranchRequired);
452 Assembler::FinalizeCode();
453 }
454
455 RegisterList* GetScratchRegisterList() { return &available_; }
456 VRegisterList* GetScratchVRegisterList() { return &available_vfp_; }
457
458 // State and type helpers.
459 bool IsModifiedImmediate(uint32_t imm) {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100460 return (IsUsingT32() && ImmediateT32(imm).IsValid()) ||
Alexandre Ramesd3832962016-07-04 15:03:43 +0100461 ImmediateA32(imm).IsValid();
462 }
463
464 void Bind(Label* label) {
465 VIXL_ASSERT(allow_macro_instructions_);
Vincent Belliardf8833fa2016-11-08 15:01:57 -0800466 PadToMinimumBranchRange(label);
Vincent Belliarde42218c2016-10-19 13:24:28 -0700467 BindHelper(label);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100468 }
469
470 void AddBranchLabel(Label* label) {
471 if (label->IsBound()) return;
472 veneer_pool_manager_.AddLabel(label);
473 }
474
475 void Place(RawLiteral* literal) {
476 VIXL_ASSERT(allow_macro_instructions_);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700477 VIXL_ASSERT(literal->IsManuallyPlaced());
Alexandre Ramesfd7a00d2016-11-09 14:38:04 +0000478 // We have two calls to `GetBuffer()->Align()` below, that aligns on word
479 // (4 bytes) boundaries. Only one is taken into account in
480 // `GetAlignedSize()`.
481 static const size_t kMaxAlignSize = 3;
482 size_t size = literal->GetAlignedSize() + kMaxAlignSize;
483 VIXL_ASSERT(IsUint32(size));
484 // TODO: We should use a scope here to check the size of data emitted. We
485 // currently cannot because `aarch32::CodeBufferCheckScope` currently checks
486 // for pools, so that could lead to an infinite loop.
487 EnsureEmitFor(static_cast<uint32_t>(size));
488 // Literals must be emitted aligned on word (4 bytes) boundaries.
489 GetBuffer()->Align();
Vincent Belliarde42218c2016-10-19 13:24:28 -0700490 PlaceHelper(literal);
491 GetBuffer()->Align();
Alexandre Ramesd3832962016-07-04 15:03:43 +0100492 }
493
494 void ComputeCheckpoint();
495
Vincent Belliarddcffac42016-10-19 11:31:20 -0700496 int32_t GetMarginBeforeVeneerEmission() const {
497 return veneer_pool_manager_.GetCheckpoint() - GetCursorOffset();
498 }
499
Alexandre Rames0eb25b02016-11-22 16:35:55 +0000500 int32_t GetMarginBeforeLiteralEmission() const {
Vincent Belliarddcffac42016-10-19 11:31:20 -0700501 return literal_pool_manager_.GetCheckpoint() - GetCursorOffset();
502 }
503
Alexandre Rames4e6b4af2016-11-08 16:04:55 +0000504 bool VeneerPoolIsEmpty() const { return veneer_pool_manager_.IsEmpty(); }
505 bool LiteralPoolIsEmpty() const { return literal_pool_manager_.IsEmpty(); }
Vincent Belliarddcffac42016-10-19 11:31:20 -0700506
Alexandre Ramesd3832962016-07-04 15:03:43 +0100507 void EnsureEmitFor(uint32_t size) {
Alexandre Ramesfd7a00d2016-11-09 14:38:04 +0000508 Label::Offset target = GetCursorOffset() + size;
Vincent Belliard40b7e472016-11-09 09:46:30 -0800509 if (target <= checkpoint_) return;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100510 PerformEnsureEmit(target, size);
511 }
512
513 bool IsInsertTooFar(RawLiteral* literal, uint32_t where) {
514 return literal_pool_manager_.IsInsertTooFar(literal, where);
515 }
516
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000517 bool AliasesAvailableScratchRegister(Register reg) {
518 return GetScratchRegisterList()->Includes(reg);
519 }
520
Vincent Belliardadbb4a72016-11-22 14:24:54 -0800521 bool AliasesAvailableScratchRegister(RegisterOrAPSR_nzcv reg) {
522 if (reg.IsAPSR_nzcv()) return false;
523 return GetScratchRegisterList()->Includes(reg.AsRegister());
524 }
525
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000526 bool AliasesAvailableScratchRegister(VRegister reg) {
527 return GetScratchVRegisterList()->IncludesAliasOf(reg);
528 }
529
530 bool AliasesAvailableScratchRegister(const Operand& operand) {
531 if (operand.IsImmediate()) return false;
532 return AliasesAvailableScratchRegister(operand.GetBaseRegister()) ||
533 (operand.IsRegisterShiftedRegister() &&
534 AliasesAvailableScratchRegister(operand.GetShiftRegister()));
535 }
536
537 bool AliasesAvailableScratchRegister(const NeonOperand& operand) {
538 if (operand.IsImmediate()) return false;
539 return AliasesAvailableScratchRegister(operand.GetRegister());
540 }
541
542 bool AliasesAvailableScratchRegister(SRegisterList list) {
543 for (int n = 0; n < list.GetLength(); n++) {
544 if (AliasesAvailableScratchRegister(list.GetSRegister(n))) return true;
545 }
546 return false;
547 }
548
549 bool AliasesAvailableScratchRegister(DRegisterList list) {
550 for (int n = 0; n < list.GetLength(); n++) {
551 if (AliasesAvailableScratchRegister(list.GetDRegister(n))) return true;
552 }
553 return false;
554 }
555
556 bool AliasesAvailableScratchRegister(NeonRegisterList list) {
557 for (int n = 0; n < list.GetLength(); n++) {
558 if (AliasesAvailableScratchRegister(list.GetDRegister(n))) return true;
559 }
560 return false;
561 }
562
563 bool AliasesAvailableScratchRegister(RegisterList list) {
564 return GetScratchRegisterList()->Overlaps(list);
565 }
566
567 bool AliasesAvailableScratchRegister(const MemOperand& operand) {
568 return AliasesAvailableScratchRegister(operand.GetBaseRegister()) ||
569 (operand.IsShiftedRegister() &&
570 AliasesAvailableScratchRegister(operand.GetOffsetRegister()));
571 }
572
Alexandre Ramesd3832962016-07-04 15:03:43 +0100573 // Emit the literal pool in the code buffer.
574 // Every literal is placed on a 32bit boundary
575 // All the literals in the pool will be removed from the pool and potentially
576 // delete'd.
577 void EmitLiteralPool(LiteralPool* const literal_pool, EmitOption option) {
578 if (literal_pool->GetSize() > 0) {
579#ifdef VIXL_DEBUG
580 for (LiteralPool::RawLiteralListIterator literal_it =
581 literal_pool->GetFirst();
582 literal_it != literal_pool->GetEnd();
583 literal_it++) {
584 RawLiteral* literal = *literal_it;
Pierre Langloisf5348ce2016-09-22 11:15:35 +0100585 VIXL_ASSERT(GetCursorOffset() < literal->GetCheckpoint());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100586 }
587#endif
588 Label after_literal;
589 if (option == kBranchRequired) {
Alexandre Rames919e3fe2016-10-14 09:07:54 +0100590 GetBuffer()->EnsureSpaceFor(kMaxInstructionSizeInBytes);
Vincent Belliard8885c172016-08-24 11:33:19 -0700591#ifdef VIXL_DEBUG
Vincent Belliarddcffac42016-10-19 11:31:20 -0700592 bool save_assembler_state = AllowAssembler();
Vincent Belliard8885c172016-08-24 11:33:19 -0700593 SetAllowAssembler(true);
594#endif
Alexandre Ramesd3832962016-07-04 15:03:43 +0100595 b(&after_literal);
Vincent Belliard8885c172016-08-24 11:33:19 -0700596#ifdef VIXL_DEBUG
Vincent Belliarddcffac42016-10-19 11:31:20 -0700597 SetAllowAssembler(save_assembler_state);
Vincent Belliard8885c172016-08-24 11:33:19 -0700598#endif
Alexandre Ramesd3832962016-07-04 15:03:43 +0100599 }
Alexandre Rames919e3fe2016-10-14 09:07:54 +0100600 GetBuffer()->Align();
601 GetBuffer()->EnsureSpaceFor(literal_pool->GetSize());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100602 for (LiteralPool::RawLiteralListIterator it = literal_pool->GetFirst();
603 it != literal_pool->GetEnd();
604 it++) {
Vincent Belliarde42218c2016-10-19 13:24:28 -0700605 PlaceHelper(*it);
606 GetBuffer()->Align();
Alexandre Ramesd3832962016-07-04 15:03:43 +0100607 }
Vincent Belliarde42218c2016-10-19 13:24:28 -0700608 if (option == kBranchRequired) BindHelper(&after_literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100609 literal_pool->Clear();
610 }
611 }
612 void EmitLiteralPool(EmitOption option = kBranchRequired) {
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000613 VIXL_ASSERT(!literal_pool_manager_.IsBlocked());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100614 EmitLiteralPool(literal_pool_manager_.GetLiteralPool(), option);
615 literal_pool_manager_.ResetCheckpoint();
616 ComputeCheckpoint();
617 }
618
Pierre Langloisf5348ce2016-09-22 11:15:35 +0100619 size_t GetLiteralPoolSize() const {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100620 return literal_pool_manager_.GetLiteralPoolSize();
621 }
622
Pierre Langlois25e39872016-10-20 17:14:21 +0100623 // Adr with a literal already constructed. Add the literal to the pool if it
624 // is not already done.
625 void Adr(Condition cond, Register rd, RawLiteral* literal) {
626 EmitLiteralCondRL<&Assembler::adr> emit_helper(cond, rd);
627 GenerateInstruction(emit_helper, literal);
628 }
629 void Adr(Register rd, RawLiteral* literal) { Adr(al, rd, literal); }
630
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700631 // Loads with literals already constructed. Add the literal to the pool
632 // if it is not already done.
633 void Ldr(Condition cond, Register rt, RawLiteral* literal) {
634 EmitLiteralCondRL<&Assembler::ldr> emit_helper(cond, rt);
635 GenerateInstruction(emit_helper, literal);
636 }
637 void Ldr(Register rt, RawLiteral* literal) { Ldr(al, rt, literal); }
638
639 void Ldrb(Condition cond, Register rt, RawLiteral* literal) {
640 EmitLiteralCondRL<&Assembler::ldrb> emit_helper(cond, rt);
641 GenerateInstruction(emit_helper, literal);
642 }
643 void Ldrb(Register rt, RawLiteral* literal) { Ldrb(al, rt, literal); }
644
645 void Ldrd(Condition cond, Register rt, Register rt2, RawLiteral* literal) {
646 EmitLiteralCondRRL<&Assembler::ldrd> emit_helper(cond, rt, rt2);
647 GenerateInstruction(emit_helper, literal);
648 }
649 void Ldrd(Register rt, Register rt2, RawLiteral* literal) {
650 Ldrd(al, rt, rt2, literal);
651 }
652
653 void Ldrh(Condition cond, Register rt, RawLiteral* literal) {
654 EmitLiteralCondRL<&Assembler::ldrh> emit_helper(cond, rt);
655 GenerateInstruction(emit_helper, literal);
656 }
657 void Ldrh(Register rt, RawLiteral* literal) { Ldrh(al, rt, literal); }
658
659 void Ldrsb(Condition cond, Register rt, RawLiteral* literal) {
660 EmitLiteralCondRL<&Assembler::ldrsb> emit_helper(cond, rt);
661 GenerateInstruction(emit_helper, literal);
662 }
663 void Ldrsb(Register rt, RawLiteral* literal) { Ldrsb(al, rt, literal); }
664
665 void Ldrsh(Condition cond, Register rt, RawLiteral* literal) {
666 EmitLiteralCondRL<&Assembler::ldrsh> emit_helper(cond, rt);
667 GenerateInstruction(emit_helper, literal);
668 }
669 void Ldrsh(Register rt, RawLiteral* literal) { Ldrsh(al, rt, literal); }
670
671 void Vldr(Condition cond, DataType dt, DRegister rd, RawLiteral* literal) {
672 EmitLiteralCondDtDL<&Assembler::vldr> emit_helper(cond, dt, rd);
673 GenerateInstruction(emit_helper, literal);
674 }
675 void Vldr(DataType dt, DRegister rd, RawLiteral* literal) {
676 Vldr(al, dt, rd, literal);
677 }
678 void Vldr(Condition cond, DRegister rd, RawLiteral* literal) {
679 Vldr(cond, Untyped64, rd, literal);
680 }
681 void Vldr(DRegister rd, RawLiteral* literal) {
682 Vldr(al, Untyped64, rd, literal);
683 }
684
685 void Vldr(Condition cond, DataType dt, SRegister rd, RawLiteral* literal) {
686 EmitLiteralCondDtSL<&Assembler::vldr> emit_helper(cond, dt, rd);
687 GenerateInstruction(emit_helper, literal);
688 }
689 void Vldr(DataType dt, SRegister rd, RawLiteral* literal) {
690 Vldr(al, dt, rd, literal);
691 }
692 void Vldr(Condition cond, SRegister rd, RawLiteral* literal) {
693 Vldr(cond, Untyped32, rd, literal);
694 }
695 void Vldr(SRegister rd, RawLiteral* literal) {
696 Vldr(al, Untyped32, rd, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100697 }
698
699 // Generic Ldr(register, data)
700 void Ldr(Condition cond, Register rt, uint32_t v) {
701 RawLiteral* literal =
702 new Literal<uint32_t>(v, RawLiteral::kDeletedOnPlacementByPool);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100703 EmitLiteralCondRL<&Assembler::ldr> emit_helper(cond, rt);
704 GenerateInstruction(emit_helper, literal);
705 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100706 template <typename T>
707 void Ldr(Register rt, T v) {
708 Ldr(al, rt, v);
709 }
710
711 // Generic Ldrd(rt, rt2, data)
712 void Ldrd(Condition cond, Register rt, Register rt2, uint64_t v) {
713 RawLiteral* literal =
714 new Literal<uint64_t>(v, RawLiteral::kDeletedOnPlacementByPool);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100715 EmitLiteralCondRRL<&Assembler::ldrd> emit_helper(cond, rt, rt2);
716 GenerateInstruction(emit_helper, literal);
717 }
718 template <typename T>
719 void Ldrd(Register rt, Register rt2, T v) {
720 Ldrd(al, rt, rt2, v);
721 }
722
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700723 void Vldr(Condition cond, SRegister rd, float v) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100724 RawLiteral* literal =
725 new Literal<float>(v, RawLiteral::kDeletedOnPlacementByPool);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700726 EmitLiteralCondDtSL<&Assembler::vldr> emit_helper(cond, Untyped32, rd);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100727 GenerateInstruction(emit_helper, literal);
728 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700729 void Vldr(SRegister rd, float v) { Vldr(al, rd, v); }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100730
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700731 void Vldr(Condition cond, DRegister rd, double v) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100732 RawLiteral* literal =
733 new Literal<double>(v, RawLiteral::kDeletedOnPlacementByPool);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700734 EmitLiteralCondDtDL<&Assembler::vldr> emit_helper(cond, Untyped64, rd);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100735 GenerateInstruction(emit_helper, literal);
736 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700737 void Vldr(DRegister rd, double v) { Vldr(al, rd, v); }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100738
739 void Vmov(Condition cond, DRegister rt, double v) { Vmov(cond, F64, rt, v); }
740 void Vmov(DRegister rt, double v) { Vmov(al, F64, rt, v); }
741 void Vmov(Condition cond, SRegister rt, float v) { Vmov(cond, F32, rt, v); }
742 void Vmov(SRegister rt, float v) { Vmov(al, F32, rt, v); }
743
744 void Switch(Register reg, JumpTableBase* table);
Vincent Belliard8885c172016-08-24 11:33:19 -0700745 void GenerateSwitchTable(JumpTableBase* table, int table_size);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100746 void Case(JumpTableBase* table, int case_index);
747 void Break(JumpTableBase* table);
748 void Default(JumpTableBase* table);
749 void EndSwitch(JumpTableBase* table);
750
Alexandre Ramesad91cee2016-07-26 09:31:34 +0100751 // Claim memory on the stack.
752 // Note that the Claim, Drop, and Peek helpers below ensure that offsets used
753 // are multiples of 32 bits to help maintain 32-bit SP alignment.
754 // We could `Align{Up,Down}(size, 4)`, but that's potentially problematic:
Alexandre Ramesd3832962016-07-04 15:03:43 +0100755 // Claim(3)
756 // Claim(1)
757 // Drop(4)
758 // would seem correct, when in fact:
759 // Claim(3) -> sp = sp - 4
Alexandre Ramesad91cee2016-07-26 09:31:34 +0100760 // Claim(1) -> sp = sp - 4
Alexandre Ramesd3832962016-07-04 15:03:43 +0100761 // Drop(4) -> sp = sp + 4
762 //
763 void Claim(int32_t size) {
764 if (size == 0) return;
765 // The stack must be kept 32bit aligned.
766 VIXL_ASSERT((size > 0) && ((size % 4) == 0));
767 Sub(sp, sp, size);
768 }
769 // Release memory on the stack
770 void Drop(int32_t size) {
771 if (size == 0) return;
772 // The stack must be kept 32bit aligned.
773 VIXL_ASSERT((size > 0) && ((size % 4) == 0));
774 Add(sp, sp, size);
775 }
776 void Peek(Register dst, int32_t offset) {
777 VIXL_ASSERT((offset >= 0) && ((offset % 4) == 0));
778 Ldr(dst, MemOperand(sp, offset));
779 }
780 void Poke(Register src, int32_t offset) {
781 VIXL_ASSERT((offset >= 0) && ((offset % 4) == 0));
782 Str(src, MemOperand(sp, offset));
783 }
784 void Printf(const char* format,
785 CPURegister reg1 = NoReg,
786 CPURegister reg2 = NoReg,
787 CPURegister reg3 = NoReg,
788 CPURegister reg4 = NoReg);
789 // Functions used by Printf for generation.
790 void PushRegister(CPURegister reg);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100791 void PreparePrintfArgument(CPURegister reg,
792 int* core_count,
793 int* vfp_count,
794 uint32_t* printf_type);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100795 // Handlers for cases not handled by the assembler.
796 virtual void Delegate(InstructionType type,
797 InstructionCondROp instruction,
798 Condition cond,
799 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000800 const Operand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100801 virtual void Delegate(InstructionType type,
802 InstructionCondSizeROp instruction,
803 Condition cond,
804 EncodingSize size,
805 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000806 const Operand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100807 virtual void Delegate(InstructionType type,
808 InstructionCondRROp instruction,
809 Condition cond,
810 Register rd,
811 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000812 const Operand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100813 virtual void Delegate(InstructionType type,
814 InstructionCondSizeRROp instruction,
815 Condition cond,
816 EncodingSize size,
817 Register rd,
818 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000819 const Operand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100820 virtual void Delegate(InstructionType type,
821 InstructionRL instruction,
822 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000823 Label* label) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100824 virtual void Delegate(InstructionType type,
825 InstructionCondDtSSop instruction,
826 Condition cond,
827 DataType dt,
828 SRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000829 const SOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100830 virtual void Delegate(InstructionType type,
831 InstructionCondDtDDop instruction,
832 Condition cond,
833 DataType dt,
834 DRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000835 const DOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100836 virtual void Delegate(InstructionType type,
837 InstructionCondDtQQop instruction,
838 Condition cond,
839 DataType dt,
840 QRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000841 const QOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100842 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100843 InstructionCondSizeRMop instruction,
844 Condition cond,
845 EncodingSize size,
846 Register rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000847 const MemOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100848 virtual void Delegate(InstructionType type,
849 InstructionCondRRMop instruction,
850 Condition cond,
851 Register rt,
852 Register rt2,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000853 const MemOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100854 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100855 InstructionCondDtSMop instruction,
856 Condition cond,
857 DataType dt,
858 SRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000859 const MemOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100860 virtual void Delegate(InstructionType type,
861 InstructionCondDtDMop instruction,
862 Condition cond,
863 DataType dt,
864 DRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000865 const MemOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100866 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100867 InstructionCondMsrOp instruction,
868 Condition cond,
869 MaskedSpecialRegister spec_reg,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000870 const Operand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100871
872 // Start of generated code.
873
874 void Adc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000875 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
876 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
877 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +0100878 VIXL_ASSERT(allow_macro_instructions_);
879 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000880 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100881 bool can_use_it =
882 // ADC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
883 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) &&
884 operand.GetBaseRegister().IsLow();
885 ITScope it_scope(this, &cond, can_use_it);
886 adc(cond, rd, rn, operand);
887 }
888 void Adc(Register rd, Register rn, const Operand& operand) {
889 Adc(al, rd, rn, operand);
890 }
Vincent Belliard934696d2016-08-18 11:03:56 -0700891 void Adc(FlagsUpdate flags,
892 Condition cond,
893 Register rd,
894 Register rn,
895 const Operand& operand) {
896 switch (flags) {
897 case LeaveFlags:
898 Adc(cond, rd, rn, operand);
899 break;
900 case SetFlags:
901 Adcs(cond, rd, rn, operand);
902 break;
903 case DontCare:
904 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
905 rn.Is(rd) && operand.IsPlainRegister() &&
906 operand.GetBaseRegister().IsLow();
907 if (can_be_16bit_encoded) {
908 Adcs(cond, rd, rn, operand);
909 } else {
910 Adc(cond, rd, rn, operand);
911 }
912 break;
913 }
914 }
915 void Adc(FlagsUpdate flags,
916 Register rd,
917 Register rn,
918 const Operand& operand) {
919 Adc(flags, al, rd, rn, operand);
920 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100921
922 void Adcs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000923 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
924 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
925 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +0100926 VIXL_ASSERT(allow_macro_instructions_);
927 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000928 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100929 ITScope it_scope(this, &cond);
930 adcs(cond, rd, rn, operand);
931 }
932 void Adcs(Register rd, Register rn, const Operand& operand) {
933 Adcs(al, rd, rn, operand);
934 }
935
936 void Add(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000937 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
938 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
939 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +0100940 VIXL_ASSERT(allow_macro_instructions_);
941 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000942 MacroEmissionCheckScope guard(this);
Alexandre Rames628c5262016-09-21 11:52:30 +0100943 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
944 uint32_t immediate = operand.GetImmediate();
945 if (immediate == 0) {
946 return;
947 }
948 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100949 bool can_use_it =
950 // ADD<c>{<q>} <Rd>, <Rn>, #<imm3> ; T1
951 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() &&
952 rd.IsLow()) ||
953 // ADD<c>{<q>} {<Rdn>,} <Rdn>, #<imm8> ; T2
954 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
955 rd.IsLow() && rn.Is(rd)) ||
956 // ADD{<c>}{<q>} <Rd>, SP, #<imm8> ; T1
957 (operand.IsImmediate() && (operand.GetImmediate() <= 508) &&
958 ((operand.GetImmediate() & 0x3) == 0) && rd.IsLow() && rn.IsSP()) ||
959 // ADD<c>{<q>} <Rd>, <Rn>, <Rm>
960 (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
961 operand.GetBaseRegister().IsLow()) ||
962 // ADD<c>{<q>} <Rdn>, <Rm> ; T2
963 (operand.IsPlainRegister() && !rd.IsPC() && rn.Is(rd) &&
964 !operand.GetBaseRegister().IsSP() &&
965 !operand.GetBaseRegister().IsPC()) ||
966 // ADD{<c>}{<q>} {<Rdm>,} SP, <Rdm> ; T1
967 (operand.IsPlainRegister() && !rd.IsPC() && rn.IsSP() &&
968 operand.GetBaseRegister().Is(rd));
969 ITScope it_scope(this, &cond, can_use_it);
970 add(cond, rd, rn, operand);
971 }
972 void Add(Register rd, Register rn, const Operand& operand) {
973 Add(al, rd, rn, operand);
974 }
Vincent Belliard934696d2016-08-18 11:03:56 -0700975 void Add(FlagsUpdate flags,
976 Condition cond,
977 Register rd,
978 Register rn,
979 const Operand& operand) {
980 switch (flags) {
981 case LeaveFlags:
982 Add(cond, rd, rn, operand);
983 break;
984 case SetFlags:
985 Adds(cond, rd, rn, operand);
986 break;
987 case DontCare:
988 bool can_be_16bit_encoded =
989 IsUsingT32() && cond.Is(al) &&
990 ((operand.IsPlainRegister() &&
991 ((rd.IsLow() && rn.IsLow() &&
992 operand.GetBaseRegister().IsLow()) ||
993 rd.Is(rn))) ||
994 (operand.IsImmediate() &&
995 ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) ||
996 (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256)))));
997 if (can_be_16bit_encoded) {
998 Adds(cond, rd, rn, operand);
999 } else {
1000 Add(cond, rd, rn, operand);
1001 }
1002 break;
1003 }
1004 }
1005 void Add(FlagsUpdate flags,
1006 Register rd,
1007 Register rn,
1008 const Operand& operand) {
1009 Add(flags, al, rd, rn, operand);
1010 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001011
1012 void Adds(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001013 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1014 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1015 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001016 VIXL_ASSERT(allow_macro_instructions_);
1017 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001018 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001019 ITScope it_scope(this, &cond);
1020 adds(cond, rd, rn, operand);
1021 }
1022 void Adds(Register rd, Register rn, const Operand& operand) {
1023 Adds(al, rd, rn, operand);
1024 }
1025
Alexandre Ramesd3832962016-07-04 15:03:43 +01001026 void Adr(Condition cond, Register rd, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001027 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001028 VIXL_ASSERT(allow_macro_instructions_);
1029 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001030 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001031 ITScope it_scope(this, &cond);
1032 adr(cond, rd, label);
1033 }
1034 void Adr(Register rd, Label* label) { Adr(al, rd, label); }
1035
1036 void And(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001037 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1038 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1039 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001040 VIXL_ASSERT(allow_macro_instructions_);
1041 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001042 MacroEmissionCheckScope guard(this);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001043 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001044 uint32_t immediate = operand.GetImmediate();
1045 if (immediate == 0) {
1046 mov(rd, 0);
1047 return;
1048 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001049 if ((immediate == 0xffffffff) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001050 return;
1051 }
1052 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001053 bool can_use_it =
1054 // AND<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1055 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1056 operand.GetBaseRegister().IsLow();
1057 ITScope it_scope(this, &cond, can_use_it);
1058 and_(cond, rd, rn, operand);
1059 }
1060 void And(Register rd, Register rn, const Operand& operand) {
1061 And(al, rd, rn, operand);
1062 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001063 void And(FlagsUpdate flags,
1064 Condition cond,
1065 Register rd,
1066 Register rn,
1067 const Operand& operand) {
1068 switch (flags) {
1069 case LeaveFlags:
1070 And(cond, rd, rn, operand);
1071 break;
1072 case SetFlags:
1073 Ands(cond, rd, rn, operand);
1074 break;
1075 case DontCare:
1076 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1077 rn.Is(rd) && operand.IsPlainRegister() &&
1078 operand.GetBaseRegister().IsLow();
1079 if (can_be_16bit_encoded) {
1080 Ands(cond, rd, rn, operand);
1081 } else {
1082 And(cond, rd, rn, operand);
1083 }
1084 break;
1085 }
1086 }
1087 void And(FlagsUpdate flags,
1088 Register rd,
1089 Register rn,
1090 const Operand& operand) {
1091 And(flags, al, rd, rn, operand);
1092 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001093
1094 void Ands(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001095 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1096 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1097 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001098 VIXL_ASSERT(allow_macro_instructions_);
1099 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001100 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001101 ITScope it_scope(this, &cond);
1102 ands(cond, rd, rn, operand);
1103 }
1104 void Ands(Register rd, Register rn, const Operand& operand) {
1105 Ands(al, rd, rn, operand);
1106 }
1107
1108 void Asr(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001109 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1110 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
1111 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001112 VIXL_ASSERT(allow_macro_instructions_);
1113 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001114 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001115 bool can_use_it =
1116 // ASR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
1117 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
1118 (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) ||
1119 // ASR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
1120 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
1121 operand.GetBaseRegister().IsLow());
1122 ITScope it_scope(this, &cond, can_use_it);
1123 asr(cond, rd, rm, operand);
1124 }
1125 void Asr(Register rd, Register rm, const Operand& operand) {
1126 Asr(al, rd, rm, operand);
1127 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001128 void Asr(FlagsUpdate flags,
1129 Condition cond,
1130 Register rd,
1131 Register rm,
1132 const Operand& operand) {
1133 switch (flags) {
1134 case LeaveFlags:
1135 Asr(cond, rd, rm, operand);
1136 break;
1137 case SetFlags:
1138 Asrs(cond, rd, rm, operand);
1139 break;
1140 case DontCare:
1141 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1142 rm.IsLow() && operand.IsImmediate() &&
1143 (operand.GetImmediate() < 32);
1144 if (can_be_16bit_encoded) {
1145 Asrs(cond, rd, rm, operand);
1146 } else {
1147 Asr(cond, rd, rm, operand);
1148 }
1149 break;
1150 }
1151 }
1152 void Asr(FlagsUpdate flags,
1153 Register rd,
1154 Register rm,
1155 const Operand& operand) {
1156 Asr(flags, al, rd, rm, operand);
1157 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001158
1159 void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001160 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1161 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
1162 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001163 VIXL_ASSERT(allow_macro_instructions_);
1164 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001165 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001166 ITScope it_scope(this, &cond);
1167 asrs(cond, rd, rm, operand);
1168 }
1169 void Asrs(Register rd, Register rm, const Operand& operand) {
1170 Asrs(al, rd, rm, operand);
1171 }
1172
1173 void B(Condition cond, Label* label) {
1174 VIXL_ASSERT(allow_macro_instructions_);
1175 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001176 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001177 b(cond, label);
1178 AddBranchLabel(label);
1179 }
1180 void B(Label* label) { B(al, label); }
1181
1182 void Bfc(Condition cond, Register rd, uint32_t lsb, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001183 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1184 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001185 VIXL_ASSERT(allow_macro_instructions_);
1186 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001187 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001188 ITScope it_scope(this, &cond);
1189 bfc(cond, rd, lsb, operand);
1190 }
1191 void Bfc(Register rd, uint32_t lsb, const Operand& operand) {
1192 Bfc(al, rd, lsb, operand);
1193 }
1194
1195 void Bfi(Condition cond,
1196 Register rd,
1197 Register rn,
1198 uint32_t lsb,
1199 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001200 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1201 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1202 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001203 VIXL_ASSERT(allow_macro_instructions_);
1204 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001205 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001206 ITScope it_scope(this, &cond);
1207 bfi(cond, rd, rn, lsb, operand);
1208 }
1209 void Bfi(Register rd, Register rn, uint32_t lsb, const Operand& operand) {
1210 Bfi(al, rd, rn, lsb, operand);
1211 }
1212
1213 void Bic(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001214 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1215 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1216 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001217 VIXL_ASSERT(allow_macro_instructions_);
1218 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001219 MacroEmissionCheckScope guard(this);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001220 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001221 uint32_t immediate = operand.GetImmediate();
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001222 if ((immediate == 0) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001223 return;
1224 }
1225 if (immediate == 0xffffffff) {
1226 mov(rd, 0);
1227 return;
1228 }
1229 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001230 bool can_use_it =
1231 // BIC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1232 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1233 operand.GetBaseRegister().IsLow();
1234 ITScope it_scope(this, &cond, can_use_it);
1235 bic(cond, rd, rn, operand);
1236 }
1237 void Bic(Register rd, Register rn, const Operand& operand) {
1238 Bic(al, rd, rn, operand);
1239 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001240 void Bic(FlagsUpdate flags,
1241 Condition cond,
1242 Register rd,
1243 Register rn,
1244 const Operand& operand) {
1245 switch (flags) {
1246 case LeaveFlags:
1247 Bic(cond, rd, rn, operand);
1248 break;
1249 case SetFlags:
1250 Bics(cond, rd, rn, operand);
1251 break;
1252 case DontCare:
1253 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1254 rn.Is(rd) && operand.IsPlainRegister() &&
1255 operand.GetBaseRegister().IsLow();
1256 if (can_be_16bit_encoded) {
1257 Bics(cond, rd, rn, operand);
1258 } else {
1259 Bic(cond, rd, rn, operand);
1260 }
1261 break;
1262 }
1263 }
1264 void Bic(FlagsUpdate flags,
1265 Register rd,
1266 Register rn,
1267 const Operand& operand) {
1268 Bic(flags, al, rd, rn, operand);
1269 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001270
1271 void Bics(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001272 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1273 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1274 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001275 VIXL_ASSERT(allow_macro_instructions_);
1276 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001277 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001278 ITScope it_scope(this, &cond);
1279 bics(cond, rd, rn, operand);
1280 }
1281 void Bics(Register rd, Register rn, const Operand& operand) {
1282 Bics(al, rd, rn, operand);
1283 }
1284
1285 void Bkpt(Condition cond, uint32_t imm) {
1286 VIXL_ASSERT(allow_macro_instructions_);
1287 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001288 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001289 ITScope it_scope(this, &cond);
1290 bkpt(cond, imm);
1291 }
1292 void Bkpt(uint32_t imm) { Bkpt(al, imm); }
1293
1294 void Bl(Condition cond, Label* label) {
1295 VIXL_ASSERT(allow_macro_instructions_);
1296 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001297 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001298 ITScope it_scope(this, &cond);
1299 bl(cond, label);
1300 AddBranchLabel(label);
1301 }
1302 void Bl(Label* label) { Bl(al, label); }
1303
1304 void Blx(Condition cond, Label* label) {
1305 VIXL_ASSERT(allow_macro_instructions_);
1306 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001307 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001308 ITScope it_scope(this, &cond);
1309 blx(cond, label);
1310 AddBranchLabel(label);
1311 }
1312 void Blx(Label* label) { Blx(al, label); }
1313
1314 void Blx(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001315 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001316 VIXL_ASSERT(allow_macro_instructions_);
1317 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001318 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001319 bool can_use_it =
1320 // BLX{<c>}{<q>} <Rm> ; T1
1321 !rm.IsPC();
1322 ITScope it_scope(this, &cond, can_use_it);
1323 blx(cond, rm);
1324 }
1325 void Blx(Register rm) { Blx(al, rm); }
1326
1327 void Bx(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001328 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001329 VIXL_ASSERT(allow_macro_instructions_);
1330 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001331 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001332 bool can_use_it =
1333 // BX{<c>}{<q>} <Rm> ; T1
1334 !rm.IsPC();
1335 ITScope it_scope(this, &cond, can_use_it);
1336 bx(cond, rm);
1337 }
1338 void Bx(Register rm) { Bx(al, rm); }
1339
1340 void Bxj(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001341 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001342 VIXL_ASSERT(allow_macro_instructions_);
1343 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001344 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001345 ITScope it_scope(this, &cond);
1346 bxj(cond, rm);
1347 }
1348 void Bxj(Register rm) { Bxj(al, rm); }
1349
1350 void Cbnz(Register rn, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001351 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001352 VIXL_ASSERT(allow_macro_instructions_);
1353 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001354 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001355 cbnz(rn, label);
1356 AddBranchLabel(label);
1357 }
1358
1359 void Cbz(Register rn, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001360 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001361 VIXL_ASSERT(allow_macro_instructions_);
1362 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001363 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001364 cbz(rn, label);
1365 AddBranchLabel(label);
1366 }
1367
1368 void Clrex(Condition cond) {
1369 VIXL_ASSERT(allow_macro_instructions_);
1370 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001371 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001372 ITScope it_scope(this, &cond);
1373 clrex(cond);
1374 }
1375 void Clrex() { Clrex(al); }
1376
1377 void Clz(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001378 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1379 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001380 VIXL_ASSERT(allow_macro_instructions_);
1381 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001382 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001383 ITScope it_scope(this, &cond);
1384 clz(cond, rd, rm);
1385 }
1386 void Clz(Register rd, Register rm) { Clz(al, rd, rm); }
1387
1388 void Cmn(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001389 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1390 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001391 VIXL_ASSERT(allow_macro_instructions_);
1392 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001393 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001394 bool can_use_it =
1395 // CMN{<c>}{<q>} <Rn>, <Rm> ; T1
1396 operand.IsPlainRegister() && rn.IsLow() &&
1397 operand.GetBaseRegister().IsLow();
1398 ITScope it_scope(this, &cond, can_use_it);
1399 cmn(cond, rn, operand);
1400 }
1401 void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); }
1402
1403 void Cmp(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001404 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1405 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001406 VIXL_ASSERT(allow_macro_instructions_);
1407 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001408 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001409 bool can_use_it =
1410 // CMP{<c>}{<q>} <Rn>, #<imm8> ; T1
1411 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
1412 rn.IsLow()) ||
1413 // CMP{<c>}{<q>} <Rn>, <Rm> ; T1 T2
1414 (operand.IsPlainRegister() && !rn.IsPC() &&
1415 !operand.GetBaseRegister().IsPC());
1416 ITScope it_scope(this, &cond, can_use_it);
1417 cmp(cond, rn, operand);
1418 }
1419 void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); }
1420
1421 void Crc32b(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001422 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1423 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1424 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001425 VIXL_ASSERT(allow_macro_instructions_);
1426 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001427 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001428 ITScope it_scope(this, &cond);
1429 crc32b(cond, rd, rn, rm);
1430 }
1431 void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); }
1432
1433 void Crc32cb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001434 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1435 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1436 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
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 ITScope it_scope(this, &cond);
1441 crc32cb(cond, rd, rn, rm);
1442 }
1443 void Crc32cb(Register rd, Register rn, Register rm) {
1444 Crc32cb(al, rd, rn, rm);
1445 }
1446
1447 void Crc32ch(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001448 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1449 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1450 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001451 VIXL_ASSERT(allow_macro_instructions_);
1452 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001453 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001454 ITScope it_scope(this, &cond);
1455 crc32ch(cond, rd, rn, rm);
1456 }
1457 void Crc32ch(Register rd, Register rn, Register rm) {
1458 Crc32ch(al, rd, rn, rm);
1459 }
1460
1461 void Crc32cw(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001462 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1463 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1464 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001465 VIXL_ASSERT(allow_macro_instructions_);
1466 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001467 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001468 ITScope it_scope(this, &cond);
1469 crc32cw(cond, rd, rn, rm);
1470 }
1471 void Crc32cw(Register rd, Register rn, Register rm) {
1472 Crc32cw(al, rd, rn, rm);
1473 }
1474
1475 void Crc32h(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001476 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1477 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1478 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001479 VIXL_ASSERT(allow_macro_instructions_);
1480 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001481 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001482 ITScope it_scope(this, &cond);
1483 crc32h(cond, rd, rn, rm);
1484 }
1485 void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); }
1486
1487 void Crc32w(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001488 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1489 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1490 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001491 VIXL_ASSERT(allow_macro_instructions_);
1492 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001493 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001494 ITScope it_scope(this, &cond);
1495 crc32w(cond, rd, rn, rm);
1496 }
1497 void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); }
1498
1499 void Dmb(Condition cond, MemoryBarrier option) {
1500 VIXL_ASSERT(allow_macro_instructions_);
1501 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001502 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001503 ITScope it_scope(this, &cond);
1504 dmb(cond, option);
1505 }
1506 void Dmb(MemoryBarrier option) { Dmb(al, option); }
1507
1508 void Dsb(Condition cond, MemoryBarrier option) {
1509 VIXL_ASSERT(allow_macro_instructions_);
1510 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001511 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001512 ITScope it_scope(this, &cond);
1513 dsb(cond, option);
1514 }
1515 void Dsb(MemoryBarrier option) { Dsb(al, option); }
1516
1517 void Eor(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001518 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1519 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1520 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001521 VIXL_ASSERT(allow_macro_instructions_);
1522 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001523 MacroEmissionCheckScope guard(this);
Alexandre Rames628c5262016-09-21 11:52:30 +01001524 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
1525 uint32_t immediate = operand.GetImmediate();
1526 if (immediate == 0) {
1527 return;
1528 }
1529 if (immediate == 0xffffffff) {
1530 mvn(rd, rn);
1531 return;
1532 }
1533 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001534 bool can_use_it =
1535 // EOR<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1536 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1537 operand.GetBaseRegister().IsLow();
1538 ITScope it_scope(this, &cond, can_use_it);
1539 eor(cond, rd, rn, operand);
1540 }
1541 void Eor(Register rd, Register rn, const Operand& operand) {
1542 Eor(al, rd, rn, operand);
1543 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001544 void Eor(FlagsUpdate flags,
1545 Condition cond,
1546 Register rd,
1547 Register rn,
1548 const Operand& operand) {
1549 switch (flags) {
1550 case LeaveFlags:
1551 Eor(cond, rd, rn, operand);
1552 break;
1553 case SetFlags:
1554 Eors(cond, rd, rn, operand);
1555 break;
1556 case DontCare:
1557 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1558 rn.Is(rd) && operand.IsPlainRegister() &&
1559 operand.GetBaseRegister().IsLow();
1560 if (can_be_16bit_encoded) {
1561 Eors(cond, rd, rn, operand);
1562 } else {
1563 Eor(cond, rd, rn, operand);
1564 }
1565 break;
1566 }
1567 }
1568 void Eor(FlagsUpdate flags,
1569 Register rd,
1570 Register rn,
1571 const Operand& operand) {
1572 Eor(flags, al, rd, rn, operand);
1573 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001574
1575 void Eors(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001576 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1577 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1578 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001579 VIXL_ASSERT(allow_macro_instructions_);
1580 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001581 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001582 ITScope it_scope(this, &cond);
1583 eors(cond, rd, rn, operand);
1584 }
1585 void Eors(Register rd, Register rn, const Operand& operand) {
1586 Eors(al, rd, rn, operand);
1587 }
1588
1589 void Fldmdbx(Condition cond,
1590 Register rn,
1591 WriteBack write_back,
1592 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001593 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1594 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001595 VIXL_ASSERT(allow_macro_instructions_);
1596 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001597 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001598 ITScope it_scope(this, &cond);
1599 fldmdbx(cond, rn, write_back, dreglist);
1600 }
1601 void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) {
1602 Fldmdbx(al, rn, write_back, dreglist);
1603 }
1604
1605 void Fldmiax(Condition cond,
1606 Register rn,
1607 WriteBack write_back,
1608 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001609 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1610 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001611 VIXL_ASSERT(allow_macro_instructions_);
1612 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001613 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001614 ITScope it_scope(this, &cond);
1615 fldmiax(cond, rn, write_back, dreglist);
1616 }
1617 void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) {
1618 Fldmiax(al, rn, write_back, dreglist);
1619 }
1620
1621 void Fstmdbx(Condition cond,
1622 Register rn,
1623 WriteBack write_back,
1624 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001625 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1626 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001627 VIXL_ASSERT(allow_macro_instructions_);
1628 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001629 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001630 ITScope it_scope(this, &cond);
1631 fstmdbx(cond, rn, write_back, dreglist);
1632 }
1633 void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) {
1634 Fstmdbx(al, rn, write_back, dreglist);
1635 }
1636
1637 void Fstmiax(Condition cond,
1638 Register rn,
1639 WriteBack write_back,
1640 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001641 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1642 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001643 VIXL_ASSERT(allow_macro_instructions_);
1644 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001645 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001646 ITScope it_scope(this, &cond);
1647 fstmiax(cond, rn, write_back, dreglist);
1648 }
1649 void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) {
1650 Fstmiax(al, rn, write_back, dreglist);
1651 }
1652
1653 void Hlt(Condition cond, uint32_t imm) {
1654 VIXL_ASSERT(allow_macro_instructions_);
1655 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001656 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001657 ITScope it_scope(this, &cond);
1658 hlt(cond, imm);
1659 }
1660 void Hlt(uint32_t imm) { Hlt(al, imm); }
1661
1662 void Hvc(Condition cond, uint32_t imm) {
1663 VIXL_ASSERT(allow_macro_instructions_);
1664 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001665 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001666 ITScope it_scope(this, &cond);
1667 hvc(cond, imm);
1668 }
1669 void Hvc(uint32_t imm) { Hvc(al, imm); }
1670
1671 void Isb(Condition cond, MemoryBarrier option) {
1672 VIXL_ASSERT(allow_macro_instructions_);
1673 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001674 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001675 ITScope it_scope(this, &cond);
1676 isb(cond, option);
1677 }
1678 void Isb(MemoryBarrier option) { Isb(al, option); }
1679
Alexandre Rames628c5262016-09-21 11:52:30 +01001680
Alexandre Ramesd3832962016-07-04 15:03:43 +01001681 void Lda(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001682 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1683 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001684 VIXL_ASSERT(allow_macro_instructions_);
1685 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001686 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001687 ITScope it_scope(this, &cond);
1688 lda(cond, rt, operand);
1689 }
1690 void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); }
1691
1692 void Ldab(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001693 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1694 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001695 VIXL_ASSERT(allow_macro_instructions_);
1696 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001697 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001698 ITScope it_scope(this, &cond);
1699 ldab(cond, rt, operand);
1700 }
1701 void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); }
1702
1703 void Ldaex(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001704 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1705 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001706 VIXL_ASSERT(allow_macro_instructions_);
1707 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001708 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001709 ITScope it_scope(this, &cond);
1710 ldaex(cond, rt, operand);
1711 }
1712 void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); }
1713
1714 void Ldaexb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001715 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1716 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001717 VIXL_ASSERT(allow_macro_instructions_);
1718 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001719 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001720 ITScope it_scope(this, &cond);
1721 ldaexb(cond, rt, operand);
1722 }
1723 void Ldaexb(Register rt, const MemOperand& operand) {
1724 Ldaexb(al, rt, operand);
1725 }
1726
1727 void Ldaexd(Condition cond,
1728 Register rt,
1729 Register rt2,
1730 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001731 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1732 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
1733 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001734 VIXL_ASSERT(allow_macro_instructions_);
1735 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001736 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001737 ITScope it_scope(this, &cond);
1738 ldaexd(cond, rt, rt2, operand);
1739 }
1740 void Ldaexd(Register rt, Register rt2, const MemOperand& operand) {
1741 Ldaexd(al, rt, rt2, operand);
1742 }
1743
1744 void Ldaexh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001745 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1746 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001747 VIXL_ASSERT(allow_macro_instructions_);
1748 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001749 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001750 ITScope it_scope(this, &cond);
1751 ldaexh(cond, rt, operand);
1752 }
1753 void Ldaexh(Register rt, const MemOperand& operand) {
1754 Ldaexh(al, rt, operand);
1755 }
1756
1757 void Ldah(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001758 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1759 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001760 VIXL_ASSERT(allow_macro_instructions_);
1761 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001762 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001763 ITScope it_scope(this, &cond);
1764 ldah(cond, rt, operand);
1765 }
1766 void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); }
1767
1768 void Ldm(Condition cond,
1769 Register rn,
1770 WriteBack write_back,
1771 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001772 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1773 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001774 VIXL_ASSERT(allow_macro_instructions_);
1775 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001776 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001777 ITScope it_scope(this, &cond);
1778 ldm(cond, rn, write_back, registers);
1779 }
1780 void Ldm(Register rn, WriteBack write_back, RegisterList registers) {
1781 Ldm(al, rn, write_back, registers);
1782 }
1783
1784 void Ldmda(Condition cond,
1785 Register rn,
1786 WriteBack write_back,
1787 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001788 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1789 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001790 VIXL_ASSERT(allow_macro_instructions_);
1791 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001792 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001793 ITScope it_scope(this, &cond);
1794 ldmda(cond, rn, write_back, registers);
1795 }
1796 void Ldmda(Register rn, WriteBack write_back, RegisterList registers) {
1797 Ldmda(al, rn, write_back, registers);
1798 }
1799
1800 void Ldmdb(Condition cond,
1801 Register rn,
1802 WriteBack write_back,
1803 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001804 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1805 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
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 ldmdb(cond, rn, write_back, registers);
1811 }
1812 void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) {
1813 Ldmdb(al, rn, write_back, registers);
1814 }
1815
1816 void Ldmea(Condition cond,
1817 Register rn,
1818 WriteBack write_back,
1819 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001820 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1821 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001822 VIXL_ASSERT(allow_macro_instructions_);
1823 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001824 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001825 ITScope it_scope(this, &cond);
1826 ldmea(cond, rn, write_back, registers);
1827 }
1828 void Ldmea(Register rn, WriteBack write_back, RegisterList registers) {
1829 Ldmea(al, rn, write_back, registers);
1830 }
1831
1832 void Ldmed(Condition cond,
1833 Register rn,
1834 WriteBack write_back,
1835 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001836 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1837 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001838 VIXL_ASSERT(allow_macro_instructions_);
1839 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001840 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001841 ITScope it_scope(this, &cond);
1842 ldmed(cond, rn, write_back, registers);
1843 }
1844 void Ldmed(Register rn, WriteBack write_back, RegisterList registers) {
1845 Ldmed(al, rn, write_back, registers);
1846 }
1847
1848 void Ldmfa(Condition cond,
1849 Register rn,
1850 WriteBack write_back,
1851 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001852 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1853 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001854 VIXL_ASSERT(allow_macro_instructions_);
1855 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001856 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001857 ITScope it_scope(this, &cond);
1858 ldmfa(cond, rn, write_back, registers);
1859 }
1860 void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) {
1861 Ldmfa(al, rn, write_back, registers);
1862 }
1863
1864 void Ldmfd(Condition cond,
1865 Register rn,
1866 WriteBack write_back,
1867 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001868 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1869 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001870 VIXL_ASSERT(allow_macro_instructions_);
1871 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001872 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001873 ITScope it_scope(this, &cond);
1874 ldmfd(cond, rn, write_back, registers);
1875 }
1876 void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) {
1877 Ldmfd(al, rn, write_back, registers);
1878 }
1879
1880 void Ldmib(Condition cond,
1881 Register rn,
1882 WriteBack write_back,
1883 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001884 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1885 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001886 VIXL_ASSERT(allow_macro_instructions_);
1887 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001888 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001889 ITScope it_scope(this, &cond);
1890 ldmib(cond, rn, write_back, registers);
1891 }
1892 void Ldmib(Register rn, WriteBack write_back, RegisterList registers) {
1893 Ldmib(al, rn, write_back, registers);
1894 }
1895
1896 void Ldr(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001897 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1898 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001899 VIXL_ASSERT(allow_macro_instructions_);
1900 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001901 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001902 bool can_use_it =
1903 // LDR{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
1904 (operand.IsImmediate() && rt.IsLow() &&
1905 operand.GetBaseRegister().IsLow() &&
1906 operand.IsOffsetImmediateWithinRange(0, 124, 4) &&
1907 (operand.GetAddrMode() == Offset)) ||
1908 // LDR{<c>}{<q>} <Rt>, [SP{, #{+}<imm>}] ; T2
1909 (operand.IsImmediate() && rt.IsLow() &&
1910 operand.GetBaseRegister().IsSP() &&
1911 operand.IsOffsetImmediateWithinRange(0, 1020, 4) &&
1912 (operand.GetAddrMode() == Offset)) ||
1913 // LDR{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
1914 (operand.IsPlainRegister() && rt.IsLow() &&
1915 operand.GetBaseRegister().IsLow() &&
1916 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
1917 (operand.GetAddrMode() == Offset));
1918 ITScope it_scope(this, &cond, can_use_it);
1919 ldr(cond, rt, operand);
1920 }
1921 void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); }
1922
1923 void Ldr(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001924 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001925 VIXL_ASSERT(allow_macro_instructions_);
1926 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001927 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001928 ITScope it_scope(this, &cond);
1929 ldr(cond, rt, label);
1930 }
1931 void Ldr(Register rt, Label* label) { Ldr(al, rt, label); }
1932
1933 void Ldrb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001934 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1935 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001936 VIXL_ASSERT(allow_macro_instructions_);
1937 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001938 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001939 bool can_use_it =
1940 // LDRB{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
1941 (operand.IsImmediate() && rt.IsLow() &&
1942 operand.GetBaseRegister().IsLow() &&
1943 operand.IsOffsetImmediateWithinRange(0, 31) &&
1944 (operand.GetAddrMode() == Offset)) ||
1945 // LDRB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
1946 (operand.IsPlainRegister() && rt.IsLow() &&
1947 operand.GetBaseRegister().IsLow() &&
1948 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
1949 (operand.GetAddrMode() == Offset));
1950 ITScope it_scope(this, &cond, can_use_it);
1951 ldrb(cond, rt, operand);
1952 }
1953 void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); }
1954
1955 void Ldrb(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001956 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001957 VIXL_ASSERT(allow_macro_instructions_);
1958 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001959 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001960 ITScope it_scope(this, &cond);
1961 ldrb(cond, rt, label);
1962 }
1963 void Ldrb(Register rt, Label* label) { Ldrb(al, rt, label); }
1964
1965 void Ldrd(Condition cond,
1966 Register rt,
1967 Register rt2,
1968 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001969 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1970 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
1971 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001972 VIXL_ASSERT(allow_macro_instructions_);
1973 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001974 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001975 ITScope it_scope(this, &cond);
1976 ldrd(cond, rt, rt2, operand);
1977 }
1978 void Ldrd(Register rt, Register rt2, const MemOperand& operand) {
1979 Ldrd(al, rt, rt2, operand);
1980 }
1981
1982 void Ldrd(Condition cond, Register rt, Register rt2, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001983 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1984 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001985 VIXL_ASSERT(allow_macro_instructions_);
1986 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001987 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001988 ITScope it_scope(this, &cond);
1989 ldrd(cond, rt, rt2, label);
1990 }
1991 void Ldrd(Register rt, Register rt2, Label* label) {
1992 Ldrd(al, rt, rt2, label);
1993 }
1994
1995 void Ldrex(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001996 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1997 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001998 VIXL_ASSERT(allow_macro_instructions_);
1999 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002000 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002001 ITScope it_scope(this, &cond);
2002 ldrex(cond, rt, operand);
2003 }
2004 void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); }
2005
2006 void Ldrexb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002007 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2008 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002009 VIXL_ASSERT(allow_macro_instructions_);
2010 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002011 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002012 ITScope it_scope(this, &cond);
2013 ldrexb(cond, rt, operand);
2014 }
2015 void Ldrexb(Register rt, const MemOperand& operand) {
2016 Ldrexb(al, rt, operand);
2017 }
2018
2019 void Ldrexd(Condition cond,
2020 Register rt,
2021 Register rt2,
2022 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002023 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2024 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
2025 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002026 VIXL_ASSERT(allow_macro_instructions_);
2027 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002028 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002029 ITScope it_scope(this, &cond);
2030 ldrexd(cond, rt, rt2, operand);
2031 }
2032 void Ldrexd(Register rt, Register rt2, const MemOperand& operand) {
2033 Ldrexd(al, rt, rt2, operand);
2034 }
2035
2036 void Ldrexh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002037 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2038 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002039 VIXL_ASSERT(allow_macro_instructions_);
2040 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002041 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002042 ITScope it_scope(this, &cond);
2043 ldrexh(cond, rt, operand);
2044 }
2045 void Ldrexh(Register rt, const MemOperand& operand) {
2046 Ldrexh(al, rt, operand);
2047 }
2048
2049 void Ldrh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002050 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2051 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002052 VIXL_ASSERT(allow_macro_instructions_);
2053 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002054 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002055 bool can_use_it =
2056 // LDRH{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
2057 (operand.IsImmediate() && rt.IsLow() &&
2058 operand.GetBaseRegister().IsLow() &&
2059 operand.IsOffsetImmediateWithinRange(0, 62, 2) &&
2060 (operand.GetAddrMode() == Offset)) ||
2061 // LDRH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2062 (operand.IsPlainRegister() && rt.IsLow() &&
2063 operand.GetBaseRegister().IsLow() &&
2064 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2065 (operand.GetAddrMode() == Offset));
2066 ITScope it_scope(this, &cond, can_use_it);
2067 ldrh(cond, rt, operand);
2068 }
2069 void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); }
2070
2071 void Ldrh(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002072 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002073 VIXL_ASSERT(allow_macro_instructions_);
2074 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002075 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002076 ITScope it_scope(this, &cond);
2077 ldrh(cond, rt, label);
2078 }
2079 void Ldrh(Register rt, Label* label) { Ldrh(al, rt, label); }
2080
2081 void Ldrsb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002082 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2083 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002084 VIXL_ASSERT(allow_macro_instructions_);
2085 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002086 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002087 bool can_use_it =
2088 // LDRSB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2089 operand.IsPlainRegister() && rt.IsLow() &&
2090 operand.GetBaseRegister().IsLow() &&
2091 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2092 (operand.GetAddrMode() == Offset);
2093 ITScope it_scope(this, &cond, can_use_it);
2094 ldrsb(cond, rt, operand);
2095 }
2096 void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); }
2097
2098 void Ldrsb(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002099 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002100 VIXL_ASSERT(allow_macro_instructions_);
2101 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002102 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002103 ITScope it_scope(this, &cond);
2104 ldrsb(cond, rt, label);
2105 }
2106 void Ldrsb(Register rt, Label* label) { Ldrsb(al, rt, label); }
2107
2108 void Ldrsh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002109 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2110 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002111 VIXL_ASSERT(allow_macro_instructions_);
2112 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002113 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002114 bool can_use_it =
2115 // LDRSH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2116 operand.IsPlainRegister() && rt.IsLow() &&
2117 operand.GetBaseRegister().IsLow() &&
2118 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2119 (operand.GetAddrMode() == Offset);
2120 ITScope it_scope(this, &cond, can_use_it);
2121 ldrsh(cond, rt, operand);
2122 }
2123 void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); }
2124
2125 void Ldrsh(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002126 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002127 VIXL_ASSERT(allow_macro_instructions_);
2128 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002129 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002130 ITScope it_scope(this, &cond);
2131 ldrsh(cond, rt, label);
2132 }
2133 void Ldrsh(Register rt, Label* label) { Ldrsh(al, rt, label); }
2134
2135 void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002136 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2137 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2138 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002139 VIXL_ASSERT(allow_macro_instructions_);
2140 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002141 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002142 bool can_use_it =
2143 // LSL<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
2144 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2145 (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) ||
2146 // LSL<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
2147 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
2148 operand.GetBaseRegister().IsLow());
2149 ITScope it_scope(this, &cond, can_use_it);
2150 lsl(cond, rd, rm, operand);
2151 }
2152 void Lsl(Register rd, Register rm, const Operand& operand) {
2153 Lsl(al, rd, rm, operand);
2154 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002155 void Lsl(FlagsUpdate flags,
2156 Condition cond,
2157 Register rd,
2158 Register rm,
2159 const Operand& operand) {
2160 switch (flags) {
2161 case LeaveFlags:
2162 Lsl(cond, rd, rm, operand);
2163 break;
2164 case SetFlags:
2165 Lsls(cond, rd, rm, operand);
2166 break;
2167 case DontCare:
2168 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2169 rm.IsLow() && operand.IsImmediate() &&
2170 (operand.GetImmediate() < 32) &&
2171 (operand.GetImmediate() != 0);
2172 if (can_be_16bit_encoded) {
2173 Lsls(cond, rd, rm, operand);
2174 } else {
2175 Lsl(cond, rd, rm, operand);
2176 }
2177 break;
2178 }
2179 }
2180 void Lsl(FlagsUpdate flags,
2181 Register rd,
2182 Register rm,
2183 const Operand& operand) {
2184 Lsl(flags, al, rd, rm, operand);
2185 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002186
2187 void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002188 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2189 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2190 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002191 VIXL_ASSERT(allow_macro_instructions_);
2192 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002193 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002194 ITScope it_scope(this, &cond);
2195 lsls(cond, rd, rm, operand);
2196 }
2197 void Lsls(Register rd, Register rm, const Operand& operand) {
2198 Lsls(al, rd, rm, operand);
2199 }
2200
2201 void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002202 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2203 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2204 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002205 VIXL_ASSERT(allow_macro_instructions_);
2206 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002207 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002208 bool can_use_it =
2209 // LSR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
2210 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2211 (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) ||
2212 // LSR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
2213 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
2214 operand.GetBaseRegister().IsLow());
2215 ITScope it_scope(this, &cond, can_use_it);
2216 lsr(cond, rd, rm, operand);
2217 }
2218 void Lsr(Register rd, Register rm, const Operand& operand) {
2219 Lsr(al, rd, rm, operand);
2220 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002221 void Lsr(FlagsUpdate flags,
2222 Condition cond,
2223 Register rd,
2224 Register rm,
2225 const Operand& operand) {
2226 switch (flags) {
2227 case LeaveFlags:
2228 Lsr(cond, rd, rm, operand);
2229 break;
2230 case SetFlags:
2231 Lsrs(cond, rd, rm, operand);
2232 break;
2233 case DontCare:
2234 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2235 rm.IsLow() && operand.IsImmediate() &&
2236 (operand.GetImmediate() < 32);
2237 if (can_be_16bit_encoded) {
2238 Lsrs(cond, rd, rm, operand);
2239 } else {
2240 Lsr(cond, rd, rm, operand);
2241 }
2242 break;
2243 }
2244 }
2245 void Lsr(FlagsUpdate flags,
2246 Register rd,
2247 Register rm,
2248 const Operand& operand) {
2249 Lsr(flags, al, rd, rm, operand);
2250 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002251
2252 void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002253 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2254 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2255 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002256 VIXL_ASSERT(allow_macro_instructions_);
2257 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002258 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002259 ITScope it_scope(this, &cond);
2260 lsrs(cond, rd, rm, operand);
2261 }
2262 void Lsrs(Register rd, Register rm, const Operand& operand) {
2263 Lsrs(al, rd, rm, operand);
2264 }
2265
2266 void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002267 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2268 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2269 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2270 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002271 VIXL_ASSERT(allow_macro_instructions_);
2272 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002273 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002274 ITScope it_scope(this, &cond);
2275 mla(cond, rd, rn, rm, ra);
2276 }
2277 void Mla(Register rd, Register rn, Register rm, Register ra) {
2278 Mla(al, rd, rn, rm, ra);
2279 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002280 void Mla(FlagsUpdate flags,
2281 Condition cond,
2282 Register rd,
2283 Register rn,
2284 Register rm,
2285 Register ra) {
2286 switch (flags) {
2287 case LeaveFlags:
2288 Mla(cond, rd, rn, rm, ra);
2289 break;
2290 case SetFlags:
2291 Mlas(cond, rd, rn, rm, ra);
2292 break;
2293 case DontCare:
2294 Mla(cond, rd, rn, rm, ra);
2295 break;
2296 }
2297 }
2298 void Mla(
2299 FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) {
2300 Mla(flags, al, rd, rn, rm, ra);
2301 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002302
2303 void Mlas(
2304 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002305 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2306 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2307 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2308 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002309 VIXL_ASSERT(allow_macro_instructions_);
2310 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002311 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002312 ITScope it_scope(this, &cond);
2313 mlas(cond, rd, rn, rm, ra);
2314 }
2315 void Mlas(Register rd, Register rn, Register rm, Register ra) {
2316 Mlas(al, rd, rn, rm, ra);
2317 }
2318
2319 void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002320 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2321 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2322 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2323 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002324 VIXL_ASSERT(allow_macro_instructions_);
2325 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002326 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002327 ITScope it_scope(this, &cond);
2328 mls(cond, rd, rn, rm, ra);
2329 }
2330 void Mls(Register rd, Register rn, Register rm, Register ra) {
2331 Mls(al, rd, rn, rm, ra);
2332 }
2333
2334 void Mov(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002335 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2336 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002337 VIXL_ASSERT(allow_macro_instructions_);
2338 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002339 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002340 bool can_use_it =
2341 // MOV<c>{<q>} <Rd>, #<imm8> ; T1
2342 (operand.IsImmediate() && rd.IsLow() &&
2343 (operand.GetImmediate() <= 255)) ||
2344 // MOV{<c>}{<q>} <Rd>, <Rm> ; T1
2345 (operand.IsPlainRegister() && !rd.IsPC() &&
2346 !operand.GetBaseRegister().IsPC()) ||
2347 // MOV<c>{<q>} <Rd>, <Rm> {, <shift> #<amount>} ; T2
2348 (operand.IsImmediateShiftedRegister() && rd.IsLow() &&
2349 operand.GetBaseRegister().IsLow() &&
2350 (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) ||
2351 operand.GetShift().Is(ASR))) ||
2352 // MOV<c>{<q>} <Rdm>, <Rdm>, LSL <Rs> ; T1
2353 // MOV<c>{<q>} <Rdm>, <Rdm>, LSR <Rs> ; T1
2354 // MOV<c>{<q>} <Rdm>, <Rdm>, ASR <Rs> ; T1
2355 // MOV<c>{<q>} <Rdm>, <Rdm>, ROR <Rs> ; T1
2356 (operand.IsRegisterShiftedRegister() &&
2357 rd.Is(operand.GetBaseRegister()) && rd.IsLow() &&
2358 (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) ||
2359 operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) &&
2360 operand.GetShiftRegister().IsLow());
2361 ITScope it_scope(this, &cond, can_use_it);
2362 mov(cond, rd, operand);
2363 }
2364 void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002365 void Mov(FlagsUpdate flags,
2366 Condition cond,
2367 Register rd,
2368 const Operand& operand) {
2369 switch (flags) {
2370 case LeaveFlags:
2371 Mov(cond, rd, operand);
2372 break;
2373 case SetFlags:
2374 Movs(cond, rd, operand);
2375 break;
2376 case DontCare:
2377 bool can_be_16bit_encoded =
2378 IsUsingT32() && cond.Is(al) &&
2379 ((operand.IsImmediateShiftedRegister() && rd.IsLow() &&
2380 operand.GetBaseRegister().IsLow() &&
2381 (operand.GetShiftAmount() < 32) &&
2382 (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() ||
2383 operand.GetShift().IsASR())) ||
2384 (operand.IsRegisterShiftedRegister() && rd.IsLow() &&
2385 operand.GetBaseRegister().Is(rd) &&
2386 operand.GetShiftRegister().IsLow() &&
2387 (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() ||
2388 operand.GetShift().IsASR() || operand.GetShift().IsROR())) ||
2389 (operand.IsImmediate() && rd.IsLow() &&
2390 (operand.GetImmediate() < 256)));
2391 if (can_be_16bit_encoded) {
2392 Movs(cond, rd, operand);
2393 } else {
2394 Mov(cond, rd, operand);
2395 }
2396 break;
2397 }
2398 }
2399 void Mov(FlagsUpdate flags, Register rd, const Operand& operand) {
2400 Mov(flags, al, rd, operand);
2401 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002402
2403 void Movs(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002404 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2405 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002406 VIXL_ASSERT(allow_macro_instructions_);
2407 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002408 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002409 ITScope it_scope(this, &cond);
2410 movs(cond, rd, operand);
2411 }
2412 void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); }
2413
2414 void Movt(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002415 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2416 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002417 VIXL_ASSERT(allow_macro_instructions_);
2418 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002419 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002420 ITScope it_scope(this, &cond);
2421 movt(cond, rd, operand);
2422 }
2423 void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); }
2424
Alexandre Ramesd3832962016-07-04 15:03:43 +01002425 void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002426 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002427 VIXL_ASSERT(allow_macro_instructions_);
2428 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002429 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002430 ITScope it_scope(this, &cond);
2431 mrs(cond, rd, spec_reg);
2432 }
2433 void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); }
2434
2435 void Msr(Condition cond,
2436 MaskedSpecialRegister spec_reg,
2437 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002438 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002439 VIXL_ASSERT(allow_macro_instructions_);
2440 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002441 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002442 ITScope it_scope(this, &cond);
2443 msr(cond, spec_reg, operand);
2444 }
2445 void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) {
2446 Msr(al, spec_reg, operand);
2447 }
2448
2449 void Mul(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002450 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2451 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2452 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002453 VIXL_ASSERT(allow_macro_instructions_);
2454 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002455 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002456 bool can_use_it =
2457 // MUL<c>{<q>} <Rdm>, <Rn>{, <Rdm>} ; T1
2458 rd.Is(rm) && rn.IsLow() && rm.IsLow();
2459 ITScope it_scope(this, &cond, can_use_it);
2460 mul(cond, rd, rn, rm);
2461 }
2462 void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002463 void Mul(FlagsUpdate flags,
2464 Condition cond,
2465 Register rd,
2466 Register rn,
2467 Register rm) {
2468 switch (flags) {
2469 case LeaveFlags:
2470 Mul(cond, rd, rn, rm);
2471 break;
2472 case SetFlags:
2473 Muls(cond, rd, rn, rm);
2474 break;
2475 case DontCare:
2476 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2477 rn.IsLow() && rm.Is(rd);
2478 if (can_be_16bit_encoded) {
2479 Muls(cond, rd, rn, rm);
2480 } else {
2481 Mul(cond, rd, rn, rm);
2482 }
2483 break;
2484 }
2485 }
2486 void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) {
2487 Mul(flags, al, rd, rn, rm);
2488 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002489
2490 void Muls(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002491 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2492 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2493 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002494 VIXL_ASSERT(allow_macro_instructions_);
2495 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002496 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002497 ITScope it_scope(this, &cond);
2498 muls(cond, rd, rn, rm);
2499 }
2500 void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); }
2501
2502 void Mvn(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002503 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2504 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002505 VIXL_ASSERT(allow_macro_instructions_);
2506 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002507 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002508 bool can_use_it =
2509 // MVN<c>{<q>} <Rd>, <Rm> ; T1
2510 operand.IsPlainRegister() && rd.IsLow() &&
2511 operand.GetBaseRegister().IsLow();
2512 ITScope it_scope(this, &cond, can_use_it);
2513 mvn(cond, rd, operand);
2514 }
2515 void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002516 void Mvn(FlagsUpdate flags,
2517 Condition cond,
2518 Register rd,
2519 const Operand& operand) {
2520 switch (flags) {
2521 case LeaveFlags:
2522 Mvn(cond, rd, operand);
2523 break;
2524 case SetFlags:
2525 Mvns(cond, rd, operand);
2526 break;
2527 case DontCare:
2528 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2529 operand.IsPlainRegister() &&
2530 operand.GetBaseRegister().IsLow();
2531 if (can_be_16bit_encoded) {
2532 Mvns(cond, rd, operand);
2533 } else {
2534 Mvn(cond, rd, operand);
2535 }
2536 break;
2537 }
2538 }
2539 void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) {
2540 Mvn(flags, al, rd, operand);
2541 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002542
2543 void Mvns(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002544 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2545 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002546 VIXL_ASSERT(allow_macro_instructions_);
2547 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002548 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002549 ITScope it_scope(this, &cond);
2550 mvns(cond, rd, operand);
2551 }
2552 void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); }
2553
2554 void Nop(Condition cond) {
2555 VIXL_ASSERT(allow_macro_instructions_);
2556 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002557 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002558 ITScope it_scope(this, &cond);
2559 nop(cond);
2560 }
2561 void Nop() { Nop(al); }
2562
2563 void Orn(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002564 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2565 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2566 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002567 VIXL_ASSERT(allow_macro_instructions_);
2568 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002569 MacroEmissionCheckScope guard(this);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002570 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002571 uint32_t immediate = operand.GetImmediate();
2572 if (immediate == 0) {
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002573 mvn(rd, 0);
Alexandre Rames628c5262016-09-21 11:52:30 +01002574 return;
2575 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002576 if ((immediate == 0xffffffff) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002577 return;
2578 }
2579 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002580 ITScope it_scope(this, &cond);
2581 orn(cond, rd, rn, operand);
2582 }
2583 void Orn(Register rd, Register rn, const Operand& operand) {
2584 Orn(al, rd, rn, operand);
2585 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002586 void Orn(FlagsUpdate flags,
2587 Condition cond,
2588 Register rd,
2589 Register rn,
2590 const Operand& operand) {
2591 switch (flags) {
2592 case LeaveFlags:
2593 Orn(cond, rd, rn, operand);
2594 break;
2595 case SetFlags:
2596 Orns(cond, rd, rn, operand);
2597 break;
2598 case DontCare:
2599 Orn(cond, rd, rn, operand);
2600 break;
2601 }
2602 }
2603 void Orn(FlagsUpdate flags,
2604 Register rd,
2605 Register rn,
2606 const Operand& operand) {
2607 Orn(flags, al, rd, rn, operand);
2608 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002609
2610 void Orns(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002611 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2612 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2613 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002614 VIXL_ASSERT(allow_macro_instructions_);
2615 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002616 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002617 ITScope it_scope(this, &cond);
2618 orns(cond, rd, rn, operand);
2619 }
2620 void Orns(Register rd, Register rn, const Operand& operand) {
2621 Orns(al, rd, rn, operand);
2622 }
2623
2624 void Orr(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002625 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2626 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2627 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002628 VIXL_ASSERT(allow_macro_instructions_);
2629 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002630 MacroEmissionCheckScope guard(this);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002631 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002632 uint32_t immediate = operand.GetImmediate();
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002633 if ((immediate == 0) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002634 return;
2635 }
2636 if (immediate == 0xffffffff) {
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002637 mvn(rd, 0);
Alexandre Rames628c5262016-09-21 11:52:30 +01002638 return;
2639 }
2640 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002641 bool can_use_it =
2642 // ORR<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
2643 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
2644 operand.GetBaseRegister().IsLow();
2645 ITScope it_scope(this, &cond, can_use_it);
2646 orr(cond, rd, rn, operand);
2647 }
2648 void Orr(Register rd, Register rn, const Operand& operand) {
2649 Orr(al, rd, rn, operand);
2650 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002651 void Orr(FlagsUpdate flags,
2652 Condition cond,
2653 Register rd,
2654 Register rn,
2655 const Operand& operand) {
2656 switch (flags) {
2657 case LeaveFlags:
2658 Orr(cond, rd, rn, operand);
2659 break;
2660 case SetFlags:
2661 Orrs(cond, rd, rn, operand);
2662 break;
2663 case DontCare:
2664 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2665 rn.Is(rd) && operand.IsPlainRegister() &&
2666 operand.GetBaseRegister().IsLow();
2667 if (can_be_16bit_encoded) {
2668 Orrs(cond, rd, rn, operand);
2669 } else {
2670 Orr(cond, rd, rn, operand);
2671 }
2672 break;
2673 }
2674 }
2675 void Orr(FlagsUpdate flags,
2676 Register rd,
2677 Register rn,
2678 const Operand& operand) {
2679 Orr(flags, al, rd, rn, operand);
2680 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002681
2682 void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002683 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2684 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2685 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002686 VIXL_ASSERT(allow_macro_instructions_);
2687 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002688 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002689 ITScope it_scope(this, &cond);
2690 orrs(cond, rd, rn, operand);
2691 }
2692 void Orrs(Register rd, Register rn, const Operand& operand) {
2693 Orrs(al, rd, rn, operand);
2694 }
2695
2696 void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002697 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2698 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2699 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002700 VIXL_ASSERT(allow_macro_instructions_);
2701 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002702 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002703 ITScope it_scope(this, &cond);
2704 pkhbt(cond, rd, rn, operand);
2705 }
2706 void Pkhbt(Register rd, Register rn, const Operand& operand) {
2707 Pkhbt(al, rd, rn, operand);
2708 }
2709
2710 void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002711 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2712 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2713 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002714 VIXL_ASSERT(allow_macro_instructions_);
2715 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002716 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002717 ITScope it_scope(this, &cond);
2718 pkhtb(cond, rd, rn, operand);
2719 }
2720 void Pkhtb(Register rd, Register rn, const Operand& operand) {
2721 Pkhtb(al, rd, rn, operand);
2722 }
2723
2724 void Pld(Condition cond, Label* label) {
2725 VIXL_ASSERT(allow_macro_instructions_);
2726 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002727 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002728 ITScope it_scope(this, &cond);
2729 pld(cond, label);
2730 }
2731 void Pld(Label* label) { Pld(al, label); }
2732
2733 void Pld(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002734 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002735 VIXL_ASSERT(allow_macro_instructions_);
2736 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002737 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002738 ITScope it_scope(this, &cond);
2739 pld(cond, operand);
2740 }
2741 void Pld(const MemOperand& operand) { Pld(al, operand); }
2742
2743 void Pldw(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002744 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002745 VIXL_ASSERT(allow_macro_instructions_);
2746 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002747 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002748 ITScope it_scope(this, &cond);
2749 pldw(cond, operand);
2750 }
2751 void Pldw(const MemOperand& operand) { Pldw(al, operand); }
2752
2753 void Pli(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002754 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002755 VIXL_ASSERT(allow_macro_instructions_);
2756 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002757 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002758 ITScope it_scope(this, &cond);
2759 pli(cond, operand);
2760 }
2761 void Pli(const MemOperand& operand) { Pli(al, operand); }
2762
2763 void Pli(Condition cond, Label* label) {
2764 VIXL_ASSERT(allow_macro_instructions_);
2765 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002766 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002767 ITScope it_scope(this, &cond);
2768 pli(cond, label);
2769 }
2770 void Pli(Label* label) { Pli(al, label); }
2771
2772 void Pop(Condition cond, RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002773 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002774 VIXL_ASSERT(allow_macro_instructions_);
2775 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002776 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002777 ITScope it_scope(this, &cond);
2778 pop(cond, registers);
2779 }
2780 void Pop(RegisterList registers) { Pop(al, registers); }
2781
2782 void Pop(Condition cond, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002783 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002784 VIXL_ASSERT(allow_macro_instructions_);
2785 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002786 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002787 ITScope it_scope(this, &cond);
2788 pop(cond, rt);
2789 }
2790 void Pop(Register rt) { Pop(al, rt); }
2791
2792 void Push(Condition cond, RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002793 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002794 VIXL_ASSERT(allow_macro_instructions_);
2795 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002796 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002797 ITScope it_scope(this, &cond);
2798 push(cond, registers);
2799 }
2800 void Push(RegisterList registers) { Push(al, registers); }
2801
2802 void Push(Condition cond, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002803 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002804 VIXL_ASSERT(allow_macro_instructions_);
2805 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002806 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002807 ITScope it_scope(this, &cond);
2808 push(cond, rt);
2809 }
2810 void Push(Register rt) { Push(al, rt); }
2811
2812 void Qadd(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002813 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2814 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2815 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002816 VIXL_ASSERT(allow_macro_instructions_);
2817 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002818 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002819 ITScope it_scope(this, &cond);
2820 qadd(cond, rd, rm, rn);
2821 }
2822 void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); }
2823
2824 void Qadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002825 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2826 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2827 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002828 VIXL_ASSERT(allow_macro_instructions_);
2829 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002830 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002831 ITScope it_scope(this, &cond);
2832 qadd16(cond, rd, rn, rm);
2833 }
2834 void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); }
2835
2836 void Qadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002837 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2838 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2839 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
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 qadd8(cond, rd, rn, rm);
2845 }
2846 void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); }
2847
2848 void Qasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002849 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2850 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2851 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002852 VIXL_ASSERT(allow_macro_instructions_);
2853 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002854 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002855 ITScope it_scope(this, &cond);
2856 qasx(cond, rd, rn, rm);
2857 }
2858 void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); }
2859
2860 void Qdadd(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002861 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2862 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2863 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002864 VIXL_ASSERT(allow_macro_instructions_);
2865 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002866 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002867 ITScope it_scope(this, &cond);
2868 qdadd(cond, rd, rm, rn);
2869 }
2870 void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); }
2871
2872 void Qdsub(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002873 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2874 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2875 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002876 VIXL_ASSERT(allow_macro_instructions_);
2877 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002878 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002879 ITScope it_scope(this, &cond);
2880 qdsub(cond, rd, rm, rn);
2881 }
2882 void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); }
2883
2884 void Qsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002885 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2886 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2887 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002888 VIXL_ASSERT(allow_macro_instructions_);
2889 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002890 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002891 ITScope it_scope(this, &cond);
2892 qsax(cond, rd, rn, rm);
2893 }
2894 void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); }
2895
2896 void Qsub(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002897 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2898 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2899 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002900 VIXL_ASSERT(allow_macro_instructions_);
2901 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002902 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002903 ITScope it_scope(this, &cond);
2904 qsub(cond, rd, rm, rn);
2905 }
2906 void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); }
2907
2908 void Qsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002909 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2910 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2911 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002912 VIXL_ASSERT(allow_macro_instructions_);
2913 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002914 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002915 ITScope it_scope(this, &cond);
2916 qsub16(cond, rd, rn, rm);
2917 }
2918 void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); }
2919
2920 void Qsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002921 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2922 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2923 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002924 VIXL_ASSERT(allow_macro_instructions_);
2925 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002926 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002927 ITScope it_scope(this, &cond);
2928 qsub8(cond, rd, rn, rm);
2929 }
2930 void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); }
2931
2932 void Rbit(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002933 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2934 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002935 VIXL_ASSERT(allow_macro_instructions_);
2936 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002937 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002938 ITScope it_scope(this, &cond);
2939 rbit(cond, rd, rm);
2940 }
2941 void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); }
2942
2943 void Rev(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2945 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
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 rev(cond, rd, rm);
2951 }
2952 void Rev(Register rd, Register rm) { Rev(al, rd, rm); }
2953
2954 void Rev16(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002955 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2956 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002957 VIXL_ASSERT(allow_macro_instructions_);
2958 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002959 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002960 ITScope it_scope(this, &cond);
2961 rev16(cond, rd, rm);
2962 }
2963 void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); }
2964
2965 void Revsh(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002966 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2967 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002968 VIXL_ASSERT(allow_macro_instructions_);
2969 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002970 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002971 ITScope it_scope(this, &cond);
2972 revsh(cond, rd, rm);
2973 }
2974 void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); }
2975
2976 void Ror(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002977 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2978 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2979 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002980 VIXL_ASSERT(allow_macro_instructions_);
2981 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002982 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002983 bool can_use_it =
Alexandre Ramesd3832962016-07-04 15:03:43 +01002984 // ROR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
Georgia Kouvelie7a16902016-11-23 16:13:22 +00002985 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
2986 operand.GetBaseRegister().IsLow();
Alexandre Ramesd3832962016-07-04 15:03:43 +01002987 ITScope it_scope(this, &cond, can_use_it);
2988 ror(cond, rd, rm, operand);
2989 }
2990 void Ror(Register rd, Register rm, const Operand& operand) {
2991 Ror(al, rd, rm, operand);
2992 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002993 void Ror(FlagsUpdate flags,
2994 Condition cond,
2995 Register rd,
2996 Register rm,
2997 const Operand& operand) {
2998 switch (flags) {
2999 case LeaveFlags:
3000 Ror(cond, rd, rm, operand);
3001 break;
3002 case SetFlags:
3003 Rors(cond, rd, rm, operand);
3004 break;
3005 case DontCare:
3006 Ror(cond, rd, rm, operand);
3007 break;
3008 }
3009 }
3010 void Ror(FlagsUpdate flags,
3011 Register rd,
3012 Register rm,
3013 const Operand& operand) {
3014 Ror(flags, al, rd, rm, operand);
3015 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003016
3017 void Rors(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003018 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3019 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3020 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003021 VIXL_ASSERT(allow_macro_instructions_);
3022 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003023 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003024 ITScope it_scope(this, &cond);
3025 rors(cond, rd, rm, operand);
3026 }
3027 void Rors(Register rd, Register rm, const Operand& operand) {
3028 Rors(al, rd, rm, operand);
3029 }
3030
3031 void Rrx(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003032 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3033 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003034 VIXL_ASSERT(allow_macro_instructions_);
3035 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003036 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003037 ITScope it_scope(this, &cond);
3038 rrx(cond, rd, rm);
3039 }
3040 void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); }
Vincent Belliard934696d2016-08-18 11:03:56 -07003041 void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) {
3042 switch (flags) {
3043 case LeaveFlags:
3044 Rrx(cond, rd, rm);
3045 break;
3046 case SetFlags:
3047 Rrxs(cond, rd, rm);
3048 break;
3049 case DontCare:
3050 Rrx(cond, rd, rm);
3051 break;
3052 }
3053 }
3054 void Rrx(FlagsUpdate flags, Register rd, Register rm) {
3055 Rrx(flags, al, rd, rm);
3056 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003057
3058 void Rrxs(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003059 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3060 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003061 VIXL_ASSERT(allow_macro_instructions_);
3062 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003063 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003064 ITScope it_scope(this, &cond);
3065 rrxs(cond, rd, rm);
3066 }
3067 void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); }
3068
3069 void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003070 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3071 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3072 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003073 VIXL_ASSERT(allow_macro_instructions_);
3074 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003075 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003076 bool can_use_it =
3077 // RSB<c>{<q>} {<Rd>, }<Rn>, #0 ; T1
3078 operand.IsImmediate() && rd.IsLow() && rn.IsLow() &&
3079 (operand.GetImmediate() == 0);
3080 ITScope it_scope(this, &cond, can_use_it);
3081 rsb(cond, rd, rn, operand);
3082 }
3083 void Rsb(Register rd, Register rn, const Operand& operand) {
3084 Rsb(al, rd, rn, operand);
3085 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003086 void Rsb(FlagsUpdate flags,
3087 Condition cond,
3088 Register rd,
3089 Register rn,
3090 const Operand& operand) {
3091 switch (flags) {
3092 case LeaveFlags:
3093 Rsb(cond, rd, rn, operand);
3094 break;
3095 case SetFlags:
3096 Rsbs(cond, rd, rn, operand);
3097 break;
3098 case DontCare:
3099 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
3100 rn.IsLow() && operand.IsImmediate() &&
3101 (operand.GetImmediate() == 0);
3102 if (can_be_16bit_encoded) {
3103 Rsbs(cond, rd, rn, operand);
3104 } else {
3105 Rsb(cond, rd, rn, operand);
3106 }
3107 break;
3108 }
3109 }
3110 void Rsb(FlagsUpdate flags,
3111 Register rd,
3112 Register rn,
3113 const Operand& operand) {
3114 Rsb(flags, al, rd, rn, operand);
3115 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003116
3117 void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003118 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3119 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3120 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003121 VIXL_ASSERT(allow_macro_instructions_);
3122 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003123 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003124 ITScope it_scope(this, &cond);
3125 rsbs(cond, rd, rn, operand);
3126 }
3127 void Rsbs(Register rd, Register rn, const Operand& operand) {
3128 Rsbs(al, rd, rn, operand);
3129 }
3130
3131 void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003132 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3133 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3134 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003135 VIXL_ASSERT(allow_macro_instructions_);
3136 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003137 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003138 ITScope it_scope(this, &cond);
3139 rsc(cond, rd, rn, operand);
3140 }
3141 void Rsc(Register rd, Register rn, const Operand& operand) {
3142 Rsc(al, rd, rn, operand);
3143 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003144 void Rsc(FlagsUpdate flags,
3145 Condition cond,
3146 Register rd,
3147 Register rn,
3148 const Operand& operand) {
3149 switch (flags) {
3150 case LeaveFlags:
3151 Rsc(cond, rd, rn, operand);
3152 break;
3153 case SetFlags:
3154 Rscs(cond, rd, rn, operand);
3155 break;
3156 case DontCare:
3157 Rsc(cond, rd, rn, operand);
3158 break;
3159 }
3160 }
3161 void Rsc(FlagsUpdate flags,
3162 Register rd,
3163 Register rn,
3164 const Operand& operand) {
3165 Rsc(flags, al, rd, rn, operand);
3166 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003167
3168 void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003169 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3170 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3171 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003172 VIXL_ASSERT(allow_macro_instructions_);
3173 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003174 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003175 ITScope it_scope(this, &cond);
3176 rscs(cond, rd, rn, operand);
3177 }
3178 void Rscs(Register rd, Register rn, const Operand& operand) {
3179 Rscs(al, rd, rn, operand);
3180 }
3181
3182 void Sadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003183 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3184 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3185 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003186 VIXL_ASSERT(allow_macro_instructions_);
3187 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003188 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003189 ITScope it_scope(this, &cond);
3190 sadd16(cond, rd, rn, rm);
3191 }
3192 void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); }
3193
3194 void Sadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003195 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3196 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3197 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003198 VIXL_ASSERT(allow_macro_instructions_);
3199 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003200 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003201 ITScope it_scope(this, &cond);
3202 sadd8(cond, rd, rn, rm);
3203 }
3204 void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); }
3205
3206 void Sasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003207 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3208 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3209 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003210 VIXL_ASSERT(allow_macro_instructions_);
3211 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003212 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003213 ITScope it_scope(this, &cond);
3214 sasx(cond, rd, rn, rm);
3215 }
3216 void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); }
3217
3218 void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003219 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3220 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3221 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003222 VIXL_ASSERT(allow_macro_instructions_);
3223 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003224 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003225 bool can_use_it =
3226 // SBC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
3227 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) &&
3228 operand.GetBaseRegister().IsLow();
3229 ITScope it_scope(this, &cond, can_use_it);
3230 sbc(cond, rd, rn, operand);
3231 }
3232 void Sbc(Register rd, Register rn, const Operand& operand) {
3233 Sbc(al, rd, rn, operand);
3234 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003235 void Sbc(FlagsUpdate flags,
3236 Condition cond,
3237 Register rd,
3238 Register rn,
3239 const Operand& operand) {
3240 switch (flags) {
3241 case LeaveFlags:
3242 Sbc(cond, rd, rn, operand);
3243 break;
3244 case SetFlags:
3245 Sbcs(cond, rd, rn, operand);
3246 break;
3247 case DontCare:
3248 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
3249 rn.Is(rd) && operand.IsPlainRegister() &&
3250 operand.GetBaseRegister().IsLow();
3251 if (can_be_16bit_encoded) {
3252 Sbcs(cond, rd, rn, operand);
3253 } else {
3254 Sbc(cond, rd, rn, operand);
3255 }
3256 break;
3257 }
3258 }
3259 void Sbc(FlagsUpdate flags,
3260 Register rd,
3261 Register rn,
3262 const Operand& operand) {
3263 Sbc(flags, al, rd, rn, operand);
3264 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003265
3266 void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003267 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3268 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3269 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003270 VIXL_ASSERT(allow_macro_instructions_);
3271 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003272 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003273 ITScope it_scope(this, &cond);
3274 sbcs(cond, rd, rn, operand);
3275 }
3276 void Sbcs(Register rd, Register rn, const Operand& operand) {
3277 Sbcs(al, rd, rn, operand);
3278 }
3279
3280 void Sbfx(Condition cond,
3281 Register rd,
3282 Register rn,
3283 uint32_t lsb,
3284 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003285 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3286 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3287 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003288 VIXL_ASSERT(allow_macro_instructions_);
3289 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003290 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003291 ITScope it_scope(this, &cond);
3292 sbfx(cond, rd, rn, lsb, operand);
3293 }
3294 void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) {
3295 Sbfx(al, rd, rn, lsb, operand);
3296 }
3297
3298 void Sdiv(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003299 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3300 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3301 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003302 VIXL_ASSERT(allow_macro_instructions_);
3303 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003304 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003305 ITScope it_scope(this, &cond);
3306 sdiv(cond, rd, rn, rm);
3307 }
3308 void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); }
3309
3310 void Sel(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003311 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3312 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3313 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003314 VIXL_ASSERT(allow_macro_instructions_);
3315 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003316 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003317 ITScope it_scope(this, &cond);
3318 sel(cond, rd, rn, rm);
3319 }
3320 void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); }
3321
3322 void Shadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003323 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3324 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3325 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003326 VIXL_ASSERT(allow_macro_instructions_);
3327 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003328 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003329 ITScope it_scope(this, &cond);
3330 shadd16(cond, rd, rn, rm);
3331 }
3332 void Shadd16(Register rd, Register rn, Register rm) {
3333 Shadd16(al, rd, rn, rm);
3334 }
3335
3336 void Shadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003337 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3338 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3339 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003340 VIXL_ASSERT(allow_macro_instructions_);
3341 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003342 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003343 ITScope it_scope(this, &cond);
3344 shadd8(cond, rd, rn, rm);
3345 }
3346 void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); }
3347
3348 void Shasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003349 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3350 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3351 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003352 VIXL_ASSERT(allow_macro_instructions_);
3353 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003354 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003355 ITScope it_scope(this, &cond);
3356 shasx(cond, rd, rn, rm);
3357 }
3358 void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); }
3359
3360 void Shsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003361 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3362 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3363 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003364 VIXL_ASSERT(allow_macro_instructions_);
3365 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003366 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003367 ITScope it_scope(this, &cond);
3368 shsax(cond, rd, rn, rm);
3369 }
3370 void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); }
3371
3372 void Shsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003373 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3374 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3375 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003376 VIXL_ASSERT(allow_macro_instructions_);
3377 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003378 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003379 ITScope it_scope(this, &cond);
3380 shsub16(cond, rd, rn, rm);
3381 }
3382 void Shsub16(Register rd, Register rn, Register rm) {
3383 Shsub16(al, rd, rn, rm);
3384 }
3385
3386 void Shsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003387 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3388 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3389 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003390 VIXL_ASSERT(allow_macro_instructions_);
3391 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003392 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003393 ITScope it_scope(this, &cond);
3394 shsub8(cond, rd, rn, rm);
3395 }
3396 void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); }
3397
3398 void Smlabb(
3399 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003400 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3401 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3402 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3403 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003404 VIXL_ASSERT(allow_macro_instructions_);
3405 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003406 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003407 ITScope it_scope(this, &cond);
3408 smlabb(cond, rd, rn, rm, ra);
3409 }
3410 void Smlabb(Register rd, Register rn, Register rm, Register ra) {
3411 Smlabb(al, rd, rn, rm, ra);
3412 }
3413
3414 void Smlabt(
3415 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003416 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3417 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3418 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3419 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003420 VIXL_ASSERT(allow_macro_instructions_);
3421 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003422 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003423 ITScope it_scope(this, &cond);
3424 smlabt(cond, rd, rn, rm, ra);
3425 }
3426 void Smlabt(Register rd, Register rn, Register rm, Register ra) {
3427 Smlabt(al, rd, rn, rm, ra);
3428 }
3429
3430 void Smlad(
3431 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003432 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3433 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3434 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3435 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
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 smlad(cond, rd, rn, rm, ra);
3441 }
3442 void Smlad(Register rd, Register rn, Register rm, Register ra) {
3443 Smlad(al, rd, rn, rm, ra);
3444 }
3445
3446 void Smladx(
3447 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003448 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3449 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3450 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3451 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003452 VIXL_ASSERT(allow_macro_instructions_);
3453 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003454 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003455 ITScope it_scope(this, &cond);
3456 smladx(cond, rd, rn, rm, ra);
3457 }
3458 void Smladx(Register rd, Register rn, Register rm, Register ra) {
3459 Smladx(al, rd, rn, rm, ra);
3460 }
3461
3462 void Smlal(
3463 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003464 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3465 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3466 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3467 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003468 VIXL_ASSERT(allow_macro_instructions_);
3469 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003470 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003471 ITScope it_scope(this, &cond);
3472 smlal(cond, rdlo, rdhi, rn, rm);
3473 }
3474 void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) {
3475 Smlal(al, rdlo, rdhi, rn, rm);
3476 }
3477
3478 void Smlalbb(
3479 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003480 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3481 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3482 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3483 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003484 VIXL_ASSERT(allow_macro_instructions_);
3485 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003486 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003487 ITScope it_scope(this, &cond);
3488 smlalbb(cond, rdlo, rdhi, rn, rm);
3489 }
3490 void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) {
3491 Smlalbb(al, rdlo, rdhi, rn, rm);
3492 }
3493
3494 void Smlalbt(
3495 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003496 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3497 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3498 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3499 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003500 VIXL_ASSERT(allow_macro_instructions_);
3501 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003502 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003503 ITScope it_scope(this, &cond);
3504 smlalbt(cond, rdlo, rdhi, rn, rm);
3505 }
3506 void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) {
3507 Smlalbt(al, rdlo, rdhi, rn, rm);
3508 }
3509
3510 void Smlald(
3511 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003512 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3513 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3514 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3515 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003516 VIXL_ASSERT(allow_macro_instructions_);
3517 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003518 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003519 ITScope it_scope(this, &cond);
3520 smlald(cond, rdlo, rdhi, rn, rm);
3521 }
3522 void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) {
3523 Smlald(al, rdlo, rdhi, rn, rm);
3524 }
3525
3526 void Smlaldx(
3527 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003528 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3529 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3530 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3531 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003532 VIXL_ASSERT(allow_macro_instructions_);
3533 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003534 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003535 ITScope it_scope(this, &cond);
3536 smlaldx(cond, rdlo, rdhi, rn, rm);
3537 }
3538 void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) {
3539 Smlaldx(al, rdlo, rdhi, rn, rm);
3540 }
3541
3542 void Smlals(
3543 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003544 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3545 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3546 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3547 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003548 VIXL_ASSERT(allow_macro_instructions_);
3549 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003550 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003551 ITScope it_scope(this, &cond);
3552 smlals(cond, rdlo, rdhi, rn, rm);
3553 }
3554 void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) {
3555 Smlals(al, rdlo, rdhi, rn, rm);
3556 }
3557
3558 void Smlaltb(
3559 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003560 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3561 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3562 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003564 VIXL_ASSERT(allow_macro_instructions_);
3565 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003566 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003567 ITScope it_scope(this, &cond);
3568 smlaltb(cond, rdlo, rdhi, rn, rm);
3569 }
3570 void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) {
3571 Smlaltb(al, rdlo, rdhi, rn, rm);
3572 }
3573
3574 void Smlaltt(
3575 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003576 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3577 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3578 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3579 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003580 VIXL_ASSERT(allow_macro_instructions_);
3581 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003582 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003583 ITScope it_scope(this, &cond);
3584 smlaltt(cond, rdlo, rdhi, rn, rm);
3585 }
3586 void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) {
3587 Smlaltt(al, rdlo, rdhi, rn, rm);
3588 }
3589
3590 void Smlatb(
3591 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003592 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3593 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3594 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3595 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003596 VIXL_ASSERT(allow_macro_instructions_);
3597 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003598 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003599 ITScope it_scope(this, &cond);
3600 smlatb(cond, rd, rn, rm, ra);
3601 }
3602 void Smlatb(Register rd, Register rn, Register rm, Register ra) {
3603 Smlatb(al, rd, rn, rm, ra);
3604 }
3605
3606 void Smlatt(
3607 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003608 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3609 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3610 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3611 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003612 VIXL_ASSERT(allow_macro_instructions_);
3613 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003614 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003615 ITScope it_scope(this, &cond);
3616 smlatt(cond, rd, rn, rm, ra);
3617 }
3618 void Smlatt(Register rd, Register rn, Register rm, Register ra) {
3619 Smlatt(al, rd, rn, rm, ra);
3620 }
3621
3622 void Smlawb(
3623 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003624 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3625 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3626 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3627 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003628 VIXL_ASSERT(allow_macro_instructions_);
3629 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003630 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003631 ITScope it_scope(this, &cond);
3632 smlawb(cond, rd, rn, rm, ra);
3633 }
3634 void Smlawb(Register rd, Register rn, Register rm, Register ra) {
3635 Smlawb(al, rd, rn, rm, ra);
3636 }
3637
3638 void Smlawt(
3639 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003640 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3641 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3642 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3643 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003644 VIXL_ASSERT(allow_macro_instructions_);
3645 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003646 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003647 ITScope it_scope(this, &cond);
3648 smlawt(cond, rd, rn, rm, ra);
3649 }
3650 void Smlawt(Register rd, Register rn, Register rm, Register ra) {
3651 Smlawt(al, rd, rn, rm, ra);
3652 }
3653
3654 void Smlsd(
3655 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003656 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3657 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3658 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3659 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003660 VIXL_ASSERT(allow_macro_instructions_);
3661 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003662 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003663 ITScope it_scope(this, &cond);
3664 smlsd(cond, rd, rn, rm, ra);
3665 }
3666 void Smlsd(Register rd, Register rn, Register rm, Register ra) {
3667 Smlsd(al, rd, rn, rm, ra);
3668 }
3669
3670 void Smlsdx(
3671 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003672 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3673 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3674 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3675 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003676 VIXL_ASSERT(allow_macro_instructions_);
3677 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003678 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003679 ITScope it_scope(this, &cond);
3680 smlsdx(cond, rd, rn, rm, ra);
3681 }
3682 void Smlsdx(Register rd, Register rn, Register rm, Register ra) {
3683 Smlsdx(al, rd, rn, rm, ra);
3684 }
3685
3686 void Smlsld(
3687 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003688 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3689 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3690 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3691 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003692 VIXL_ASSERT(allow_macro_instructions_);
3693 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003694 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003695 ITScope it_scope(this, &cond);
3696 smlsld(cond, rdlo, rdhi, rn, rm);
3697 }
3698 void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) {
3699 Smlsld(al, rdlo, rdhi, rn, rm);
3700 }
3701
3702 void Smlsldx(
3703 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003704 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3705 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3706 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3707 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003708 VIXL_ASSERT(allow_macro_instructions_);
3709 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003710 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003711 ITScope it_scope(this, &cond);
3712 smlsldx(cond, rdlo, rdhi, rn, rm);
3713 }
3714 void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) {
3715 Smlsldx(al, rdlo, rdhi, rn, rm);
3716 }
3717
3718 void Smmla(
3719 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003720 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3721 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3722 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3723 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003724 VIXL_ASSERT(allow_macro_instructions_);
3725 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003726 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003727 ITScope it_scope(this, &cond);
3728 smmla(cond, rd, rn, rm, ra);
3729 }
3730 void Smmla(Register rd, Register rn, Register rm, Register ra) {
3731 Smmla(al, rd, rn, rm, ra);
3732 }
3733
3734 void Smmlar(
3735 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003736 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3737 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3738 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3739 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003740 VIXL_ASSERT(allow_macro_instructions_);
3741 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003742 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003743 ITScope it_scope(this, &cond);
3744 smmlar(cond, rd, rn, rm, ra);
3745 }
3746 void Smmlar(Register rd, Register rn, Register rm, Register ra) {
3747 Smmlar(al, rd, rn, rm, ra);
3748 }
3749
3750 void Smmls(
3751 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003752 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3753 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3754 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3755 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003756 VIXL_ASSERT(allow_macro_instructions_);
3757 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003758 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003759 ITScope it_scope(this, &cond);
3760 smmls(cond, rd, rn, rm, ra);
3761 }
3762 void Smmls(Register rd, Register rn, Register rm, Register ra) {
3763 Smmls(al, rd, rn, rm, ra);
3764 }
3765
3766 void Smmlsr(
3767 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003768 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3769 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3770 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3771 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003772 VIXL_ASSERT(allow_macro_instructions_);
3773 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003774 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003775 ITScope it_scope(this, &cond);
3776 smmlsr(cond, rd, rn, rm, ra);
3777 }
3778 void Smmlsr(Register rd, Register rn, Register rm, Register ra) {
3779 Smmlsr(al, rd, rn, rm, ra);
3780 }
3781
3782 void Smmul(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003783 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3784 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3785 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
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 smmul(cond, rd, rn, rm);
3791 }
3792 void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); }
3793
3794 void Smmulr(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003795 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3796 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3797 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003798 VIXL_ASSERT(allow_macro_instructions_);
3799 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003800 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003801 ITScope it_scope(this, &cond);
3802 smmulr(cond, rd, rn, rm);
3803 }
3804 void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); }
3805
3806 void Smuad(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003807 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3808 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3809 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003810 VIXL_ASSERT(allow_macro_instructions_);
3811 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003812 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003813 ITScope it_scope(this, &cond);
3814 smuad(cond, rd, rn, rm);
3815 }
3816 void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); }
3817
3818 void Smuadx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003819 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3820 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3821 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003822 VIXL_ASSERT(allow_macro_instructions_);
3823 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003824 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003825 ITScope it_scope(this, &cond);
3826 smuadx(cond, rd, rn, rm);
3827 }
3828 void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); }
3829
3830 void Smulbb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003831 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3832 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3833 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003834 VIXL_ASSERT(allow_macro_instructions_);
3835 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003836 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003837 ITScope it_scope(this, &cond);
3838 smulbb(cond, rd, rn, rm);
3839 }
3840 void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); }
3841
3842 void Smulbt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003843 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3844 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3845 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003846 VIXL_ASSERT(allow_macro_instructions_);
3847 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003848 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003849 ITScope it_scope(this, &cond);
3850 smulbt(cond, rd, rn, rm);
3851 }
3852 void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); }
3853
3854 void Smull(
3855 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003856 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3857 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3858 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3859 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003860 VIXL_ASSERT(allow_macro_instructions_);
3861 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003862 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003863 ITScope it_scope(this, &cond);
3864 smull(cond, rdlo, rdhi, rn, rm);
3865 }
3866 void Smull(Register rdlo, Register rdhi, Register rn, Register rm) {
3867 Smull(al, rdlo, rdhi, rn, rm);
3868 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003869 void Smull(FlagsUpdate flags,
3870 Condition cond,
3871 Register rdlo,
3872 Register rdhi,
3873 Register rn,
3874 Register rm) {
3875 switch (flags) {
3876 case LeaveFlags:
3877 Smull(cond, rdlo, rdhi, rn, rm);
3878 break;
3879 case SetFlags:
3880 Smulls(cond, rdlo, rdhi, rn, rm);
3881 break;
3882 case DontCare:
3883 Smull(cond, rdlo, rdhi, rn, rm);
3884 break;
3885 }
3886 }
3887 void Smull(FlagsUpdate flags,
3888 Register rdlo,
3889 Register rdhi,
3890 Register rn,
3891 Register rm) {
3892 Smull(flags, al, rdlo, rdhi, rn, rm);
3893 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003894
3895 void Smulls(
3896 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003897 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3898 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3899 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3900 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003901 VIXL_ASSERT(allow_macro_instructions_);
3902 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003903 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003904 ITScope it_scope(this, &cond);
3905 smulls(cond, rdlo, rdhi, rn, rm);
3906 }
3907 void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) {
3908 Smulls(al, rdlo, rdhi, rn, rm);
3909 }
3910
3911 void Smultb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003912 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3913 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3914 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003915 VIXL_ASSERT(allow_macro_instructions_);
3916 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003917 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003918 ITScope it_scope(this, &cond);
3919 smultb(cond, rd, rn, rm);
3920 }
3921 void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); }
3922
3923 void Smultt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003924 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3925 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3926 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003927 VIXL_ASSERT(allow_macro_instructions_);
3928 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003929 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003930 ITScope it_scope(this, &cond);
3931 smultt(cond, rd, rn, rm);
3932 }
3933 void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); }
3934
3935 void Smulwb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003936 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3937 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3938 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003939 VIXL_ASSERT(allow_macro_instructions_);
3940 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003941 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003942 ITScope it_scope(this, &cond);
3943 smulwb(cond, rd, rn, rm);
3944 }
3945 void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); }
3946
3947 void Smulwt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003948 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3949 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3950 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003951 VIXL_ASSERT(allow_macro_instructions_);
3952 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003953 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003954 ITScope it_scope(this, &cond);
3955 smulwt(cond, rd, rn, rm);
3956 }
3957 void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); }
3958
3959 void Smusd(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003960 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3961 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3962 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003963 VIXL_ASSERT(allow_macro_instructions_);
3964 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003965 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003966 ITScope it_scope(this, &cond);
3967 smusd(cond, rd, rn, rm);
3968 }
3969 void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); }
3970
3971 void Smusdx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003972 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3973 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3974 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003975 VIXL_ASSERT(allow_macro_instructions_);
3976 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003977 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003978 ITScope it_scope(this, &cond);
3979 smusdx(cond, rd, rn, rm);
3980 }
3981 void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); }
3982
3983 void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003984 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3985 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003986 VIXL_ASSERT(allow_macro_instructions_);
3987 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003988 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003989 ITScope it_scope(this, &cond);
3990 ssat(cond, rd, imm, operand);
3991 }
3992 void Ssat(Register rd, uint32_t imm, const Operand& operand) {
3993 Ssat(al, rd, imm, operand);
3994 }
3995
3996 void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003997 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3998 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003999 VIXL_ASSERT(allow_macro_instructions_);
4000 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004001 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004002 ITScope it_scope(this, &cond);
4003 ssat16(cond, rd, imm, rn);
4004 }
4005 void Ssat16(Register rd, uint32_t imm, Register rn) {
4006 Ssat16(al, rd, imm, rn);
4007 }
4008
4009 void Ssax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004010 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4011 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4012 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004013 VIXL_ASSERT(allow_macro_instructions_);
4014 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004015 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004016 ITScope it_scope(this, &cond);
4017 ssax(cond, rd, rn, rm);
4018 }
4019 void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); }
4020
4021 void Ssub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004022 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4023 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4024 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004025 VIXL_ASSERT(allow_macro_instructions_);
4026 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004027 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004028 ITScope it_scope(this, &cond);
4029 ssub16(cond, rd, rn, rm);
4030 }
4031 void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); }
4032
4033 void Ssub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004034 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4035 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4036 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004037 VIXL_ASSERT(allow_macro_instructions_);
4038 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004039 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004040 ITScope it_scope(this, &cond);
4041 ssub8(cond, rd, rn, rm);
4042 }
4043 void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); }
4044
4045 void Stl(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004046 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4047 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004048 VIXL_ASSERT(allow_macro_instructions_);
4049 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004050 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004051 ITScope it_scope(this, &cond);
4052 stl(cond, rt, operand);
4053 }
4054 void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); }
4055
4056 void Stlb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004057 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4058 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
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 stlb(cond, rt, operand);
4064 }
4065 void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); }
4066
4067 void Stlex(Condition cond,
4068 Register rd,
4069 Register rt,
4070 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004071 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4072 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4073 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004074 VIXL_ASSERT(allow_macro_instructions_);
4075 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004076 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004077 ITScope it_scope(this, &cond);
4078 stlex(cond, rd, rt, operand);
4079 }
4080 void Stlex(Register rd, Register rt, const MemOperand& operand) {
4081 Stlex(al, rd, rt, operand);
4082 }
4083
4084 void Stlexb(Condition cond,
4085 Register rd,
4086 Register rt,
4087 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004088 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4089 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4090 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004091 VIXL_ASSERT(allow_macro_instructions_);
4092 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004093 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004094 ITScope it_scope(this, &cond);
4095 stlexb(cond, rd, rt, operand);
4096 }
4097 void Stlexb(Register rd, Register rt, const MemOperand& operand) {
4098 Stlexb(al, rd, rt, operand);
4099 }
4100
4101 void Stlexd(Condition cond,
4102 Register rd,
4103 Register rt,
4104 Register rt2,
4105 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004106 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4107 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4108 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4109 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004110 VIXL_ASSERT(allow_macro_instructions_);
4111 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004112 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004113 ITScope it_scope(this, &cond);
4114 stlexd(cond, rd, rt, rt2, operand);
4115 }
4116 void Stlexd(Register rd,
4117 Register rt,
4118 Register rt2,
4119 const MemOperand& operand) {
4120 Stlexd(al, rd, rt, rt2, operand);
4121 }
4122
4123 void Stlexh(Condition cond,
4124 Register rd,
4125 Register rt,
4126 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004127 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4128 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4129 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004130 VIXL_ASSERT(allow_macro_instructions_);
4131 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004132 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004133 ITScope it_scope(this, &cond);
4134 stlexh(cond, rd, rt, operand);
4135 }
4136 void Stlexh(Register rd, Register rt, const MemOperand& operand) {
4137 Stlexh(al, rd, rt, operand);
4138 }
4139
4140 void Stlh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004141 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4142 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004143 VIXL_ASSERT(allow_macro_instructions_);
4144 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004145 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004146 ITScope it_scope(this, &cond);
4147 stlh(cond, rt, operand);
4148 }
4149 void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); }
4150
4151 void Stm(Condition cond,
4152 Register rn,
4153 WriteBack write_back,
4154 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004155 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4156 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004157 VIXL_ASSERT(allow_macro_instructions_);
4158 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004159 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004160 ITScope it_scope(this, &cond);
4161 stm(cond, rn, write_back, registers);
4162 }
4163 void Stm(Register rn, WriteBack write_back, RegisterList registers) {
4164 Stm(al, rn, write_back, registers);
4165 }
4166
4167 void Stmda(Condition cond,
4168 Register rn,
4169 WriteBack write_back,
4170 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004171 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4172 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004173 VIXL_ASSERT(allow_macro_instructions_);
4174 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004175 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004176 ITScope it_scope(this, &cond);
4177 stmda(cond, rn, write_back, registers);
4178 }
4179 void Stmda(Register rn, WriteBack write_back, RegisterList registers) {
4180 Stmda(al, rn, write_back, registers);
4181 }
4182
4183 void Stmdb(Condition cond,
4184 Register rn,
4185 WriteBack write_back,
4186 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004187 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4188 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
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 stmdb(cond, rn, write_back, registers);
4194 }
4195 void Stmdb(Register rn, WriteBack write_back, RegisterList registers) {
4196 Stmdb(al, rn, write_back, registers);
4197 }
4198
4199 void Stmea(Condition cond,
4200 Register rn,
4201 WriteBack write_back,
4202 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004203 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4204 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004205 VIXL_ASSERT(allow_macro_instructions_);
4206 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004207 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004208 ITScope it_scope(this, &cond);
4209 stmea(cond, rn, write_back, registers);
4210 }
4211 void Stmea(Register rn, WriteBack write_back, RegisterList registers) {
4212 Stmea(al, rn, write_back, registers);
4213 }
4214
4215 void Stmed(Condition cond,
4216 Register rn,
4217 WriteBack write_back,
4218 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004219 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4220 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004221 VIXL_ASSERT(allow_macro_instructions_);
4222 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004223 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004224 ITScope it_scope(this, &cond);
4225 stmed(cond, rn, write_back, registers);
4226 }
4227 void Stmed(Register rn, WriteBack write_back, RegisterList registers) {
4228 Stmed(al, rn, write_back, registers);
4229 }
4230
4231 void Stmfa(Condition cond,
4232 Register rn,
4233 WriteBack write_back,
4234 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004235 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4236 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004237 VIXL_ASSERT(allow_macro_instructions_);
4238 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004239 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004240 ITScope it_scope(this, &cond);
4241 stmfa(cond, rn, write_back, registers);
4242 }
4243 void Stmfa(Register rn, WriteBack write_back, RegisterList registers) {
4244 Stmfa(al, rn, write_back, registers);
4245 }
4246
4247 void Stmfd(Condition cond,
4248 Register rn,
4249 WriteBack write_back,
4250 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004251 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4252 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004253 VIXL_ASSERT(allow_macro_instructions_);
4254 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004255 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004256 ITScope it_scope(this, &cond);
4257 stmfd(cond, rn, write_back, registers);
4258 }
4259 void Stmfd(Register rn, WriteBack write_back, RegisterList registers) {
4260 Stmfd(al, rn, write_back, registers);
4261 }
4262
4263 void Stmib(Condition cond,
4264 Register rn,
4265 WriteBack write_back,
4266 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004267 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4268 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004269 VIXL_ASSERT(allow_macro_instructions_);
4270 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004271 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004272 ITScope it_scope(this, &cond);
4273 stmib(cond, rn, write_back, registers);
4274 }
4275 void Stmib(Register rn, WriteBack write_back, RegisterList registers) {
4276 Stmib(al, rn, write_back, registers);
4277 }
4278
4279 void Str(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004280 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4281 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004282 VIXL_ASSERT(allow_macro_instructions_);
4283 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004284 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004285 bool can_use_it =
4286 // STR{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4287 (operand.IsImmediate() && rt.IsLow() &&
4288 operand.GetBaseRegister().IsLow() &&
4289 operand.IsOffsetImmediateWithinRange(0, 124, 4) &&
4290 (operand.GetAddrMode() == Offset)) ||
4291 // STR{<c>}{<q>} <Rt>, [SP{, #{+}<imm>}] ; T2
4292 (operand.IsImmediate() && rt.IsLow() &&
4293 operand.GetBaseRegister().IsSP() &&
4294 operand.IsOffsetImmediateWithinRange(0, 1020, 4) &&
4295 (operand.GetAddrMode() == Offset)) ||
4296 // STR{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4297 (operand.IsPlainRegister() && rt.IsLow() &&
4298 operand.GetBaseRegister().IsLow() &&
4299 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4300 (operand.GetAddrMode() == Offset));
4301 ITScope it_scope(this, &cond, can_use_it);
4302 str(cond, rt, operand);
4303 }
4304 void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); }
4305
4306 void Strb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004307 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4308 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004309 VIXL_ASSERT(allow_macro_instructions_);
4310 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004311 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004312 bool can_use_it =
4313 // STRB{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4314 (operand.IsImmediate() && rt.IsLow() &&
4315 operand.GetBaseRegister().IsLow() &&
4316 operand.IsOffsetImmediateWithinRange(0, 31) &&
4317 (operand.GetAddrMode() == Offset)) ||
4318 // STRB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4319 (operand.IsPlainRegister() && rt.IsLow() &&
4320 operand.GetBaseRegister().IsLow() &&
4321 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4322 (operand.GetAddrMode() == Offset));
4323 ITScope it_scope(this, &cond, can_use_it);
4324 strb(cond, rt, operand);
4325 }
4326 void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); }
4327
4328 void Strd(Condition cond,
4329 Register rt,
4330 Register rt2,
4331 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004332 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4333 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4334 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004335 VIXL_ASSERT(allow_macro_instructions_);
4336 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004337 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004338 ITScope it_scope(this, &cond);
4339 strd(cond, rt, rt2, operand);
4340 }
4341 void Strd(Register rt, Register rt2, const MemOperand& operand) {
4342 Strd(al, rt, rt2, operand);
4343 }
4344
4345 void Strex(Condition cond,
4346 Register rd,
4347 Register rt,
4348 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004349 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4350 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4351 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004352 VIXL_ASSERT(allow_macro_instructions_);
4353 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004354 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004355 ITScope it_scope(this, &cond);
4356 strex(cond, rd, rt, operand);
4357 }
4358 void Strex(Register rd, Register rt, const MemOperand& operand) {
4359 Strex(al, rd, rt, operand);
4360 }
4361
4362 void Strexb(Condition cond,
4363 Register rd,
4364 Register rt,
4365 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004366 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4367 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4368 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004369 VIXL_ASSERT(allow_macro_instructions_);
4370 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004371 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004372 ITScope it_scope(this, &cond);
4373 strexb(cond, rd, rt, operand);
4374 }
4375 void Strexb(Register rd, Register rt, const MemOperand& operand) {
4376 Strexb(al, rd, rt, operand);
4377 }
4378
4379 void Strexd(Condition cond,
4380 Register rd,
4381 Register rt,
4382 Register rt2,
4383 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004384 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4385 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4386 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4387 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004388 VIXL_ASSERT(allow_macro_instructions_);
4389 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004390 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004391 ITScope it_scope(this, &cond);
4392 strexd(cond, rd, rt, rt2, operand);
4393 }
4394 void Strexd(Register rd,
4395 Register rt,
4396 Register rt2,
4397 const MemOperand& operand) {
4398 Strexd(al, rd, rt, rt2, operand);
4399 }
4400
4401 void Strexh(Condition cond,
4402 Register rd,
4403 Register rt,
4404 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004405 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4406 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4407 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004408 VIXL_ASSERT(allow_macro_instructions_);
4409 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004410 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004411 ITScope it_scope(this, &cond);
4412 strexh(cond, rd, rt, operand);
4413 }
4414 void Strexh(Register rd, Register rt, const MemOperand& operand) {
4415 Strexh(al, rd, rt, operand);
4416 }
4417
4418 void Strh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004419 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4420 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004421 VIXL_ASSERT(allow_macro_instructions_);
4422 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004423 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004424 bool can_use_it =
4425 // STRH{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4426 (operand.IsImmediate() && rt.IsLow() &&
4427 operand.GetBaseRegister().IsLow() &&
4428 operand.IsOffsetImmediateWithinRange(0, 62, 2) &&
4429 (operand.GetAddrMode() == Offset)) ||
4430 // STRH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4431 (operand.IsPlainRegister() && rt.IsLow() &&
4432 operand.GetBaseRegister().IsLow() &&
4433 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4434 (operand.GetAddrMode() == Offset));
4435 ITScope it_scope(this, &cond, can_use_it);
4436 strh(cond, rt, operand);
4437 }
4438 void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); }
4439
4440 void Sub(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004441 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4442 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4443 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004444 VIXL_ASSERT(allow_macro_instructions_);
4445 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004446 MacroEmissionCheckScope guard(this);
Alexandre Rames628c5262016-09-21 11:52:30 +01004447 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
4448 uint32_t immediate = operand.GetImmediate();
4449 if (immediate == 0) {
4450 return;
4451 }
4452 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004453 bool can_use_it =
4454 // SUB<c>{<q>} <Rd>, <Rn>, #<imm3> ; T1
4455 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() &&
4456 rd.IsLow()) ||
4457 // SUB<c>{<q>} {<Rdn>,} <Rdn>, #<imm8> ; T2
4458 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
4459 rd.IsLow() && rn.Is(rd)) ||
4460 // SUB<c>{<q>} <Rd>, <Rn>, <Rm>
4461 (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
4462 operand.GetBaseRegister().IsLow());
4463 ITScope it_scope(this, &cond, can_use_it);
4464 sub(cond, rd, rn, operand);
4465 }
4466 void Sub(Register rd, Register rn, const Operand& operand) {
4467 Sub(al, rd, rn, operand);
4468 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004469 void Sub(FlagsUpdate flags,
4470 Condition cond,
4471 Register rd,
4472 Register rn,
4473 const Operand& operand) {
4474 switch (flags) {
4475 case LeaveFlags:
4476 Sub(cond, rd, rn, operand);
4477 break;
4478 case SetFlags:
4479 Subs(cond, rd, rn, operand);
4480 break;
4481 case DontCare:
4482 bool can_be_16bit_encoded =
4483 IsUsingT32() && cond.Is(al) &&
4484 ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
4485 operand.GetBaseRegister().IsLow()) ||
4486 (operand.IsImmediate() &&
4487 ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) ||
4488 (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256)))));
4489 if (can_be_16bit_encoded) {
4490 Subs(cond, rd, rn, operand);
4491 } else {
4492 Sub(cond, rd, rn, operand);
4493 }
4494 break;
4495 }
4496 }
4497 void Sub(FlagsUpdate flags,
4498 Register rd,
4499 Register rn,
4500 const Operand& operand) {
4501 Sub(flags, al, rd, rn, operand);
4502 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004503
4504 void Subs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004505 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4506 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4507 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004508 VIXL_ASSERT(allow_macro_instructions_);
4509 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004510 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004511 ITScope it_scope(this, &cond);
4512 subs(cond, rd, rn, operand);
4513 }
4514 void Subs(Register rd, Register rn, const Operand& operand) {
4515 Subs(al, rd, rn, operand);
4516 }
4517
Alexandre Ramesd3832962016-07-04 15:03:43 +01004518 void Svc(Condition cond, uint32_t imm) {
4519 VIXL_ASSERT(allow_macro_instructions_);
4520 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004521 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004522 ITScope it_scope(this, &cond);
4523 svc(cond, imm);
4524 }
4525 void Svc(uint32_t imm) { Svc(al, imm); }
4526
4527 void Sxtab(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004528 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4529 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4530 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004531 VIXL_ASSERT(allow_macro_instructions_);
4532 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004533 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004534 ITScope it_scope(this, &cond);
4535 sxtab(cond, rd, rn, operand);
4536 }
4537 void Sxtab(Register rd, Register rn, const Operand& operand) {
4538 Sxtab(al, rd, rn, operand);
4539 }
4540
4541 void Sxtab16(Condition cond,
4542 Register rd,
4543 Register rn,
4544 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004545 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4546 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4547 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004548 VIXL_ASSERT(allow_macro_instructions_);
4549 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004550 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004551 ITScope it_scope(this, &cond);
4552 sxtab16(cond, rd, rn, operand);
4553 }
4554 void Sxtab16(Register rd, Register rn, const Operand& operand) {
4555 Sxtab16(al, rd, rn, operand);
4556 }
4557
4558 void Sxtah(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004559 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4560 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4561 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004562 VIXL_ASSERT(allow_macro_instructions_);
4563 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004564 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004565 ITScope it_scope(this, &cond);
4566 sxtah(cond, rd, rn, operand);
4567 }
4568 void Sxtah(Register rd, Register rn, const Operand& operand) {
4569 Sxtah(al, rd, rn, operand);
4570 }
4571
4572 void Sxtb(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004573 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4574 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004575 VIXL_ASSERT(allow_macro_instructions_);
4576 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004577 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004578 ITScope it_scope(this, &cond);
4579 sxtb(cond, rd, operand);
4580 }
4581 void Sxtb(Register rd, const Operand& operand) { Sxtb(al, rd, operand); }
4582
4583 void Sxtb16(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004584 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4585 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004586 VIXL_ASSERT(allow_macro_instructions_);
4587 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004588 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004589 ITScope it_scope(this, &cond);
4590 sxtb16(cond, rd, operand);
4591 }
4592 void Sxtb16(Register rd, const Operand& operand) { Sxtb16(al, rd, operand); }
4593
4594 void Sxth(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004595 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4596 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004597 VIXL_ASSERT(allow_macro_instructions_);
4598 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004599 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004600 ITScope it_scope(this, &cond);
4601 sxth(cond, rd, operand);
4602 }
4603 void Sxth(Register rd, const Operand& operand) { Sxth(al, rd, operand); }
4604
Alexandre Ramesd3832962016-07-04 15:03:43 +01004605 void Teq(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004606 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 teq(cond, rn, operand);
4613 }
4614 void Teq(Register rn, const Operand& operand) { Teq(al, rn, operand); }
4615
4616 void Tst(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004617 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4618 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004619 VIXL_ASSERT(allow_macro_instructions_);
4620 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004621 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004622 bool can_use_it =
4623 // TST{<c>}{<q>} <Rn>, <Rm> ; T1
4624 operand.IsPlainRegister() && rn.IsLow() &&
4625 operand.GetBaseRegister().IsLow();
4626 ITScope it_scope(this, &cond, can_use_it);
4627 tst(cond, rn, operand);
4628 }
4629 void Tst(Register rn, const Operand& operand) { Tst(al, rn, operand); }
4630
4631 void Uadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004632 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4633 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4634 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004635 VIXL_ASSERT(allow_macro_instructions_);
4636 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004637 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004638 ITScope it_scope(this, &cond);
4639 uadd16(cond, rd, rn, rm);
4640 }
4641 void Uadd16(Register rd, Register rn, Register rm) { Uadd16(al, rd, rn, rm); }
4642
4643 void Uadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004644 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4645 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4646 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004647 VIXL_ASSERT(allow_macro_instructions_);
4648 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004649 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004650 ITScope it_scope(this, &cond);
4651 uadd8(cond, rd, rn, rm);
4652 }
4653 void Uadd8(Register rd, Register rn, Register rm) { Uadd8(al, rd, rn, rm); }
4654
4655 void Uasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004656 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4657 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4658 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004659 VIXL_ASSERT(allow_macro_instructions_);
4660 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004661 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004662 ITScope it_scope(this, &cond);
4663 uasx(cond, rd, rn, rm);
4664 }
4665 void Uasx(Register rd, Register rn, Register rm) { Uasx(al, rd, rn, rm); }
4666
4667 void Ubfx(Condition cond,
4668 Register rd,
4669 Register rn,
4670 uint32_t lsb,
4671 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004672 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4673 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4674 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004675 VIXL_ASSERT(allow_macro_instructions_);
4676 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004677 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004678 ITScope it_scope(this, &cond);
4679 ubfx(cond, rd, rn, lsb, operand);
4680 }
4681 void Ubfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) {
4682 Ubfx(al, rd, rn, lsb, operand);
4683 }
4684
4685 void Udf(Condition cond, uint32_t imm) {
4686 VIXL_ASSERT(allow_macro_instructions_);
4687 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004688 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004689 ITScope it_scope(this, &cond);
4690 udf(cond, imm);
4691 }
4692 void Udf(uint32_t imm) { Udf(al, imm); }
4693
4694 void Udiv(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4696 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4697 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004698 VIXL_ASSERT(allow_macro_instructions_);
4699 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004700 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004701 ITScope it_scope(this, &cond);
4702 udiv(cond, rd, rn, rm);
4703 }
4704 void Udiv(Register rd, Register rn, Register rm) { Udiv(al, rd, rn, rm); }
4705
4706 void Uhadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004707 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4708 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4709 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004710 VIXL_ASSERT(allow_macro_instructions_);
4711 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004712 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004713 ITScope it_scope(this, &cond);
4714 uhadd16(cond, rd, rn, rm);
4715 }
4716 void Uhadd16(Register rd, Register rn, Register rm) {
4717 Uhadd16(al, rd, rn, rm);
4718 }
4719
4720 void Uhadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004721 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4722 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4723 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004724 VIXL_ASSERT(allow_macro_instructions_);
4725 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004726 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004727 ITScope it_scope(this, &cond);
4728 uhadd8(cond, rd, rn, rm);
4729 }
4730 void Uhadd8(Register rd, Register rn, Register rm) { Uhadd8(al, rd, rn, rm); }
4731
4732 void Uhasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004733 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4734 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4735 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004736 VIXL_ASSERT(allow_macro_instructions_);
4737 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004738 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004739 ITScope it_scope(this, &cond);
4740 uhasx(cond, rd, rn, rm);
4741 }
4742 void Uhasx(Register rd, Register rn, Register rm) { Uhasx(al, rd, rn, rm); }
4743
4744 void Uhsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004745 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4746 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4747 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004748 VIXL_ASSERT(allow_macro_instructions_);
4749 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004750 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004751 ITScope it_scope(this, &cond);
4752 uhsax(cond, rd, rn, rm);
4753 }
4754 void Uhsax(Register rd, Register rn, Register rm) { Uhsax(al, rd, rn, rm); }
4755
4756 void Uhsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004757 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4758 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4759 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004760 VIXL_ASSERT(allow_macro_instructions_);
4761 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004762 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004763 ITScope it_scope(this, &cond);
4764 uhsub16(cond, rd, rn, rm);
4765 }
4766 void Uhsub16(Register rd, Register rn, Register rm) {
4767 Uhsub16(al, rd, rn, rm);
4768 }
4769
4770 void Uhsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004771 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4772 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4773 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004774 VIXL_ASSERT(allow_macro_instructions_);
4775 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004776 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004777 ITScope it_scope(this, &cond);
4778 uhsub8(cond, rd, rn, rm);
4779 }
4780 void Uhsub8(Register rd, Register rn, Register rm) { Uhsub8(al, rd, rn, rm); }
4781
4782 void Umaal(
4783 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004784 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4785 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4786 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4787 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004788 VIXL_ASSERT(allow_macro_instructions_);
4789 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004790 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004791 ITScope it_scope(this, &cond);
4792 umaal(cond, rdlo, rdhi, rn, rm);
4793 }
4794 void Umaal(Register rdlo, Register rdhi, Register rn, Register rm) {
4795 Umaal(al, rdlo, rdhi, rn, rm);
4796 }
4797
4798 void Umlal(
4799 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004800 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4801 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4802 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4803 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004804 VIXL_ASSERT(allow_macro_instructions_);
4805 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004806 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004807 ITScope it_scope(this, &cond);
4808 umlal(cond, rdlo, rdhi, rn, rm);
4809 }
4810 void Umlal(Register rdlo, Register rdhi, Register rn, Register rm) {
4811 Umlal(al, rdlo, rdhi, rn, rm);
4812 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004813 void Umlal(FlagsUpdate flags,
4814 Condition cond,
4815 Register rdlo,
4816 Register rdhi,
4817 Register rn,
4818 Register rm) {
4819 switch (flags) {
4820 case LeaveFlags:
4821 Umlal(cond, rdlo, rdhi, rn, rm);
4822 break;
4823 case SetFlags:
4824 Umlals(cond, rdlo, rdhi, rn, rm);
4825 break;
4826 case DontCare:
4827 Umlal(cond, rdlo, rdhi, rn, rm);
4828 break;
4829 }
4830 }
4831 void Umlal(FlagsUpdate flags,
4832 Register rdlo,
4833 Register rdhi,
4834 Register rn,
4835 Register rm) {
4836 Umlal(flags, al, rdlo, rdhi, rn, rm);
4837 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004838
4839 void Umlals(
4840 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004841 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4842 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4843 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4844 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004845 VIXL_ASSERT(allow_macro_instructions_);
4846 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004847 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004848 ITScope it_scope(this, &cond);
4849 umlals(cond, rdlo, rdhi, rn, rm);
4850 }
4851 void Umlals(Register rdlo, Register rdhi, Register rn, Register rm) {
4852 Umlals(al, rdlo, rdhi, rn, rm);
4853 }
4854
4855 void Umull(
4856 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004857 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4858 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4859 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4860 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004861 VIXL_ASSERT(allow_macro_instructions_);
4862 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004863 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004864 ITScope it_scope(this, &cond);
4865 umull(cond, rdlo, rdhi, rn, rm);
4866 }
4867 void Umull(Register rdlo, Register rdhi, Register rn, Register rm) {
4868 Umull(al, rdlo, rdhi, rn, rm);
4869 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004870 void Umull(FlagsUpdate flags,
4871 Condition cond,
4872 Register rdlo,
4873 Register rdhi,
4874 Register rn,
4875 Register rm) {
4876 switch (flags) {
4877 case LeaveFlags:
4878 Umull(cond, rdlo, rdhi, rn, rm);
4879 break;
4880 case SetFlags:
4881 Umulls(cond, rdlo, rdhi, rn, rm);
4882 break;
4883 case DontCare:
4884 Umull(cond, rdlo, rdhi, rn, rm);
4885 break;
4886 }
4887 }
4888 void Umull(FlagsUpdate flags,
4889 Register rdlo,
4890 Register rdhi,
4891 Register rn,
4892 Register rm) {
4893 Umull(flags, al, rdlo, rdhi, rn, rm);
4894 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004895
4896 void Umulls(
4897 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004898 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4899 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4900 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4901 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004902 VIXL_ASSERT(allow_macro_instructions_);
4903 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004904 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004905 ITScope it_scope(this, &cond);
4906 umulls(cond, rdlo, rdhi, rn, rm);
4907 }
4908 void Umulls(Register rdlo, Register rdhi, Register rn, Register rm) {
4909 Umulls(al, rdlo, rdhi, rn, rm);
4910 }
4911
4912 void Uqadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004913 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4914 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4915 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004916 VIXL_ASSERT(allow_macro_instructions_);
4917 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004918 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004919 ITScope it_scope(this, &cond);
4920 uqadd16(cond, rd, rn, rm);
4921 }
4922 void Uqadd16(Register rd, Register rn, Register rm) {
4923 Uqadd16(al, rd, rn, rm);
4924 }
4925
4926 void Uqadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004927 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4928 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4929 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004930 VIXL_ASSERT(allow_macro_instructions_);
4931 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004932 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004933 ITScope it_scope(this, &cond);
4934 uqadd8(cond, rd, rn, rm);
4935 }
4936 void Uqadd8(Register rd, Register rn, Register rm) { Uqadd8(al, rd, rn, rm); }
4937
4938 void Uqasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004939 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4940 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4941 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004942 VIXL_ASSERT(allow_macro_instructions_);
4943 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004944 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004945 ITScope it_scope(this, &cond);
4946 uqasx(cond, rd, rn, rm);
4947 }
4948 void Uqasx(Register rd, Register rn, Register rm) { Uqasx(al, rd, rn, rm); }
4949
4950 void Uqsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004951 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4952 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4953 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004954 VIXL_ASSERT(allow_macro_instructions_);
4955 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004956 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004957 ITScope it_scope(this, &cond);
4958 uqsax(cond, rd, rn, rm);
4959 }
4960 void Uqsax(Register rd, Register rn, Register rm) { Uqsax(al, rd, rn, rm); }
4961
4962 void Uqsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004963 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4964 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4965 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004966 VIXL_ASSERT(allow_macro_instructions_);
4967 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004968 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004969 ITScope it_scope(this, &cond);
4970 uqsub16(cond, rd, rn, rm);
4971 }
4972 void Uqsub16(Register rd, Register rn, Register rm) {
4973 Uqsub16(al, rd, rn, rm);
4974 }
4975
4976 void Uqsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004977 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4978 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4979 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004980 VIXL_ASSERT(allow_macro_instructions_);
4981 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004982 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004983 ITScope it_scope(this, &cond);
4984 uqsub8(cond, rd, rn, rm);
4985 }
4986 void Uqsub8(Register rd, Register rn, Register rm) { Uqsub8(al, rd, rn, rm); }
4987
4988 void Usad8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004989 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4990 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4991 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004992 VIXL_ASSERT(allow_macro_instructions_);
4993 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004994 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004995 ITScope it_scope(this, &cond);
4996 usad8(cond, rd, rn, rm);
4997 }
4998 void Usad8(Register rd, Register rn, Register rm) { Usad8(al, rd, rn, rm); }
4999
5000 void Usada8(
5001 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005002 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5003 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5004 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5005 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005006 VIXL_ASSERT(allow_macro_instructions_);
5007 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005008 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005009 ITScope it_scope(this, &cond);
5010 usada8(cond, rd, rn, rm, ra);
5011 }
5012 void Usada8(Register rd, Register rn, Register rm, Register ra) {
5013 Usada8(al, rd, rn, rm, ra);
5014 }
5015
5016 void Usat(Condition cond, Register rd, uint32_t imm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005017 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5018 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005019 VIXL_ASSERT(allow_macro_instructions_);
5020 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005021 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005022 ITScope it_scope(this, &cond);
5023 usat(cond, rd, imm, operand);
5024 }
5025 void Usat(Register rd, uint32_t imm, const Operand& operand) {
5026 Usat(al, rd, imm, operand);
5027 }
5028
5029 void Usat16(Condition cond, Register rd, uint32_t imm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005030 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5031 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005032 VIXL_ASSERT(allow_macro_instructions_);
5033 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005034 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005035 ITScope it_scope(this, &cond);
5036 usat16(cond, rd, imm, rn);
5037 }
5038 void Usat16(Register rd, uint32_t imm, Register rn) {
5039 Usat16(al, rd, imm, rn);
5040 }
5041
5042 void Usax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005043 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5044 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5045 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005046 VIXL_ASSERT(allow_macro_instructions_);
5047 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005048 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005049 ITScope it_scope(this, &cond);
5050 usax(cond, rd, rn, rm);
5051 }
5052 void Usax(Register rd, Register rn, Register rm) { Usax(al, rd, rn, rm); }
5053
5054 void Usub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005055 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5056 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5057 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005058 VIXL_ASSERT(allow_macro_instructions_);
5059 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005060 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005061 ITScope it_scope(this, &cond);
5062 usub16(cond, rd, rn, rm);
5063 }
5064 void Usub16(Register rd, Register rn, Register rm) { Usub16(al, rd, rn, rm); }
5065
5066 void Usub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005067 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5068 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5069 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005070 VIXL_ASSERT(allow_macro_instructions_);
5071 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005072 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005073 ITScope it_scope(this, &cond);
5074 usub8(cond, rd, rn, rm);
5075 }
5076 void Usub8(Register rd, Register rn, Register rm) { Usub8(al, rd, rn, rm); }
5077
5078 void Uxtab(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005079 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5080 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5081 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005082 VIXL_ASSERT(allow_macro_instructions_);
5083 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005084 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005085 ITScope it_scope(this, &cond);
5086 uxtab(cond, rd, rn, operand);
5087 }
5088 void Uxtab(Register rd, Register rn, const Operand& operand) {
5089 Uxtab(al, rd, rn, operand);
5090 }
5091
5092 void Uxtab16(Condition cond,
5093 Register rd,
5094 Register rn,
5095 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005096 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5097 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5098 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005099 VIXL_ASSERT(allow_macro_instructions_);
5100 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005101 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005102 ITScope it_scope(this, &cond);
5103 uxtab16(cond, rd, rn, operand);
5104 }
5105 void Uxtab16(Register rd, Register rn, const Operand& operand) {
5106 Uxtab16(al, rd, rn, operand);
5107 }
5108
5109 void Uxtah(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005110 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5111 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5112 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005113 VIXL_ASSERT(allow_macro_instructions_);
5114 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005115 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005116 ITScope it_scope(this, &cond);
5117 uxtah(cond, rd, rn, operand);
5118 }
5119 void Uxtah(Register rd, Register rn, const Operand& operand) {
5120 Uxtah(al, rd, rn, operand);
5121 }
5122
5123 void Uxtb(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005124 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5125 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005126 VIXL_ASSERT(allow_macro_instructions_);
5127 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005128 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005129 ITScope it_scope(this, &cond);
5130 uxtb(cond, rd, operand);
5131 }
5132 void Uxtb(Register rd, const Operand& operand) { Uxtb(al, rd, operand); }
5133
5134 void Uxtb16(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005135 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5136 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005137 VIXL_ASSERT(allow_macro_instructions_);
5138 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005139 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005140 ITScope it_scope(this, &cond);
5141 uxtb16(cond, rd, operand);
5142 }
5143 void Uxtb16(Register rd, const Operand& operand) { Uxtb16(al, rd, operand); }
5144
5145 void Uxth(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005146 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5147 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005148 VIXL_ASSERT(allow_macro_instructions_);
5149 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005150 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005151 ITScope it_scope(this, &cond);
5152 uxth(cond, rd, operand);
5153 }
5154 void Uxth(Register rd, const Operand& operand) { Uxth(al, rd, operand); }
5155
5156 void Vaba(
5157 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005158 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5159 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5160 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005161 VIXL_ASSERT(allow_macro_instructions_);
5162 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005163 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005164 ITScope it_scope(this, &cond);
5165 vaba(cond, dt, rd, rn, rm);
5166 }
5167 void Vaba(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5168 Vaba(al, dt, rd, rn, rm);
5169 }
5170
5171 void Vaba(
5172 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005173 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5174 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5175 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005176 VIXL_ASSERT(allow_macro_instructions_);
5177 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005178 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005179 ITScope it_scope(this, &cond);
5180 vaba(cond, dt, rd, rn, rm);
5181 }
5182 void Vaba(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5183 Vaba(al, dt, rd, rn, rm);
5184 }
5185
5186 void Vabal(
5187 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005188 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5189 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5190 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005191 VIXL_ASSERT(allow_macro_instructions_);
5192 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005193 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005194 ITScope it_scope(this, &cond);
5195 vabal(cond, dt, rd, rn, rm);
5196 }
5197 void Vabal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5198 Vabal(al, dt, rd, rn, rm);
5199 }
5200
5201 void Vabd(
5202 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005203 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5204 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5205 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005206 VIXL_ASSERT(allow_macro_instructions_);
5207 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005208 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005209 ITScope it_scope(this, &cond);
5210 vabd(cond, dt, rd, rn, rm);
5211 }
5212 void Vabd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5213 Vabd(al, dt, rd, rn, rm);
5214 }
5215
5216 void Vabd(
5217 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005218 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5219 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5220 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005221 VIXL_ASSERT(allow_macro_instructions_);
5222 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005223 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005224 ITScope it_scope(this, &cond);
5225 vabd(cond, dt, rd, rn, rm);
5226 }
5227 void Vabd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5228 Vabd(al, dt, rd, rn, rm);
5229 }
5230
5231 void Vabdl(
5232 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005233 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5234 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5235 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005236 VIXL_ASSERT(allow_macro_instructions_);
5237 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005238 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005239 ITScope it_scope(this, &cond);
5240 vabdl(cond, dt, rd, rn, rm);
5241 }
5242 void Vabdl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5243 Vabdl(al, dt, rd, rn, rm);
5244 }
5245
5246 void Vabs(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005247 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5248 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005249 VIXL_ASSERT(allow_macro_instructions_);
5250 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005251 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005252 ITScope it_scope(this, &cond);
5253 vabs(cond, dt, rd, rm);
5254 }
5255 void Vabs(DataType dt, DRegister rd, DRegister rm) { Vabs(al, dt, rd, rm); }
5256
5257 void Vabs(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005258 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5259 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005260 VIXL_ASSERT(allow_macro_instructions_);
5261 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005262 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005263 ITScope it_scope(this, &cond);
5264 vabs(cond, dt, rd, rm);
5265 }
5266 void Vabs(DataType dt, QRegister rd, QRegister rm) { Vabs(al, dt, rd, rm); }
5267
5268 void Vabs(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005269 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5270 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005271 VIXL_ASSERT(allow_macro_instructions_);
5272 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005273 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005274 ITScope it_scope(this, &cond);
5275 vabs(cond, dt, rd, rm);
5276 }
5277 void Vabs(DataType dt, SRegister rd, SRegister rm) { Vabs(al, dt, rd, rm); }
5278
5279 void Vacge(
5280 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005281 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5282 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5283 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005284 VIXL_ASSERT(allow_macro_instructions_);
5285 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005286 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005287 ITScope it_scope(this, &cond);
5288 vacge(cond, dt, rd, rn, rm);
5289 }
5290 void Vacge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5291 Vacge(al, dt, rd, rn, rm);
5292 }
5293
5294 void Vacge(
5295 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005296 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5297 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5298 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005299 VIXL_ASSERT(allow_macro_instructions_);
5300 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005301 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005302 ITScope it_scope(this, &cond);
5303 vacge(cond, dt, rd, rn, rm);
5304 }
5305 void Vacge(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5306 Vacge(al, dt, rd, rn, rm);
5307 }
5308
5309 void Vacgt(
5310 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005311 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5312 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5313 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005314 VIXL_ASSERT(allow_macro_instructions_);
5315 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005316 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005317 ITScope it_scope(this, &cond);
5318 vacgt(cond, dt, rd, rn, rm);
5319 }
5320 void Vacgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5321 Vacgt(al, dt, rd, rn, rm);
5322 }
5323
5324 void Vacgt(
5325 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005326 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5327 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5328 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005329 VIXL_ASSERT(allow_macro_instructions_);
5330 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005331 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005332 ITScope it_scope(this, &cond);
5333 vacgt(cond, dt, rd, rn, rm);
5334 }
5335 void Vacgt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5336 Vacgt(al, dt, rd, rn, rm);
5337 }
5338
5339 void Vacle(
5340 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005341 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5342 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5343 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005344 VIXL_ASSERT(allow_macro_instructions_);
5345 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005346 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005347 ITScope it_scope(this, &cond);
5348 vacle(cond, dt, rd, rn, rm);
5349 }
5350 void Vacle(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5351 Vacle(al, dt, rd, rn, rm);
5352 }
5353
5354 void Vacle(
5355 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005356 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5357 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5358 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005359 VIXL_ASSERT(allow_macro_instructions_);
5360 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005361 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005362 ITScope it_scope(this, &cond);
5363 vacle(cond, dt, rd, rn, rm);
5364 }
5365 void Vacle(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5366 Vacle(al, dt, rd, rn, rm);
5367 }
5368
5369 void Vaclt(
5370 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005371 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5372 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5373 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005374 VIXL_ASSERT(allow_macro_instructions_);
5375 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005376 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005377 ITScope it_scope(this, &cond);
5378 vaclt(cond, dt, rd, rn, rm);
5379 }
5380 void Vaclt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5381 Vaclt(al, dt, rd, rn, rm);
5382 }
5383
5384 void Vaclt(
5385 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005386 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5387 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5388 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005389 VIXL_ASSERT(allow_macro_instructions_);
5390 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005391 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005392 ITScope it_scope(this, &cond);
5393 vaclt(cond, dt, rd, rn, rm);
5394 }
5395 void Vaclt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5396 Vaclt(al, dt, rd, rn, rm);
5397 }
5398
5399 void Vadd(
5400 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005401 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5402 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5403 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005404 VIXL_ASSERT(allow_macro_instructions_);
5405 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005406 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005407 ITScope it_scope(this, &cond);
5408 vadd(cond, dt, rd, rn, rm);
5409 }
5410 void Vadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5411 Vadd(al, dt, rd, rn, rm);
5412 }
5413
5414 void Vadd(
5415 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005416 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5417 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5418 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005419 VIXL_ASSERT(allow_macro_instructions_);
5420 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005421 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005422 ITScope it_scope(this, &cond);
5423 vadd(cond, dt, rd, rn, rm);
5424 }
5425 void Vadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5426 Vadd(al, dt, rd, rn, rm);
5427 }
5428
5429 void Vadd(
5430 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005431 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5432 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5433 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005434 VIXL_ASSERT(allow_macro_instructions_);
5435 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005436 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005437 ITScope it_scope(this, &cond);
5438 vadd(cond, dt, rd, rn, rm);
5439 }
5440 void Vadd(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
5441 Vadd(al, dt, rd, rn, rm);
5442 }
5443
5444 void Vaddhn(
5445 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005446 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5447 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5448 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005449 VIXL_ASSERT(allow_macro_instructions_);
5450 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005451 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005452 ITScope it_scope(this, &cond);
5453 vaddhn(cond, dt, rd, rn, rm);
5454 }
5455 void Vaddhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
5456 Vaddhn(al, dt, rd, rn, rm);
5457 }
5458
5459 void Vaddl(
5460 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005461 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5462 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5463 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005464 VIXL_ASSERT(allow_macro_instructions_);
5465 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005466 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005467 ITScope it_scope(this, &cond);
5468 vaddl(cond, dt, rd, rn, rm);
5469 }
5470 void Vaddl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5471 Vaddl(al, dt, rd, rn, rm);
5472 }
5473
5474 void Vaddw(
5475 Condition cond, DataType dt, QRegister rd, QRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005476 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5477 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5478 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005479 VIXL_ASSERT(allow_macro_instructions_);
5480 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005481 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005482 ITScope it_scope(this, &cond);
5483 vaddw(cond, dt, rd, rn, rm);
5484 }
5485 void Vaddw(DataType dt, QRegister rd, QRegister rn, DRegister rm) {
5486 Vaddw(al, dt, rd, rn, rm);
5487 }
5488
5489 void Vand(Condition cond,
5490 DataType dt,
5491 DRegister rd,
5492 DRegister rn,
5493 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005494 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5495 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5496 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005497 VIXL_ASSERT(allow_macro_instructions_);
5498 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005499 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005500 ITScope it_scope(this, &cond);
5501 vand(cond, dt, rd, rn, operand);
5502 }
5503 void Vand(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
5504 Vand(al, dt, rd, rn, operand);
5505 }
5506
5507 void Vand(Condition cond,
5508 DataType dt,
5509 QRegister rd,
5510 QRegister rn,
5511 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005512 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5513 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5514 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005515 VIXL_ASSERT(allow_macro_instructions_);
5516 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005517 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005518 ITScope it_scope(this, &cond);
5519 vand(cond, dt, rd, rn, operand);
5520 }
5521 void Vand(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
5522 Vand(al, dt, rd, rn, operand);
5523 }
5524
5525 void Vbic(Condition cond,
5526 DataType dt,
5527 DRegister rd,
5528 DRegister rn,
5529 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005530 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5531 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5532 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005533 VIXL_ASSERT(allow_macro_instructions_);
5534 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005535 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005536 ITScope it_scope(this, &cond);
5537 vbic(cond, dt, rd, rn, operand);
5538 }
5539 void Vbic(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
5540 Vbic(al, dt, rd, rn, operand);
5541 }
5542
5543 void Vbic(Condition cond,
5544 DataType dt,
5545 QRegister rd,
5546 QRegister rn,
5547 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005548 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5549 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5550 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005551 VIXL_ASSERT(allow_macro_instructions_);
5552 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005553 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005554 ITScope it_scope(this, &cond);
5555 vbic(cond, dt, rd, rn, operand);
5556 }
5557 void Vbic(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
5558 Vbic(al, dt, rd, rn, operand);
5559 }
5560
5561 void Vbif(
5562 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5564 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5565 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005566 VIXL_ASSERT(allow_macro_instructions_);
5567 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005568 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005569 ITScope it_scope(this, &cond);
5570 vbif(cond, dt, rd, rn, rm);
5571 }
5572 void Vbif(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5573 Vbif(al, dt, rd, rn, rm);
5574 }
5575 void Vbif(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5576 Vbif(cond, kDataTypeValueNone, rd, rn, rm);
5577 }
5578 void Vbif(DRegister rd, DRegister rn, DRegister rm) {
5579 Vbif(al, kDataTypeValueNone, rd, rn, rm);
5580 }
5581
5582 void Vbif(
5583 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005584 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5585 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5586 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005587 VIXL_ASSERT(allow_macro_instructions_);
5588 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005589 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005590 ITScope it_scope(this, &cond);
5591 vbif(cond, dt, rd, rn, rm);
5592 }
5593 void Vbif(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5594 Vbif(al, dt, rd, rn, rm);
5595 }
5596 void Vbif(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5597 Vbif(cond, kDataTypeValueNone, rd, rn, rm);
5598 }
5599 void Vbif(QRegister rd, QRegister rn, QRegister rm) {
5600 Vbif(al, kDataTypeValueNone, rd, rn, rm);
5601 }
5602
5603 void Vbit(
5604 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005605 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5606 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5607 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005608 VIXL_ASSERT(allow_macro_instructions_);
5609 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005610 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005611 ITScope it_scope(this, &cond);
5612 vbit(cond, dt, rd, rn, rm);
5613 }
5614 void Vbit(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5615 Vbit(al, dt, rd, rn, rm);
5616 }
5617 void Vbit(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5618 Vbit(cond, kDataTypeValueNone, rd, rn, rm);
5619 }
5620 void Vbit(DRegister rd, DRegister rn, DRegister rm) {
5621 Vbit(al, kDataTypeValueNone, rd, rn, rm);
5622 }
5623
5624 void Vbit(
5625 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005626 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5627 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5628 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005629 VIXL_ASSERT(allow_macro_instructions_);
5630 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005631 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005632 ITScope it_scope(this, &cond);
5633 vbit(cond, dt, rd, rn, rm);
5634 }
5635 void Vbit(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5636 Vbit(al, dt, rd, rn, rm);
5637 }
5638 void Vbit(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5639 Vbit(cond, kDataTypeValueNone, rd, rn, rm);
5640 }
5641 void Vbit(QRegister rd, QRegister rn, QRegister rm) {
5642 Vbit(al, kDataTypeValueNone, rd, rn, rm);
5643 }
5644
5645 void Vbsl(
5646 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005647 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5648 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5649 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005650 VIXL_ASSERT(allow_macro_instructions_);
5651 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005652 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005653 ITScope it_scope(this, &cond);
5654 vbsl(cond, dt, rd, rn, rm);
5655 }
5656 void Vbsl(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5657 Vbsl(al, dt, rd, rn, rm);
5658 }
5659 void Vbsl(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5660 Vbsl(cond, kDataTypeValueNone, rd, rn, rm);
5661 }
5662 void Vbsl(DRegister rd, DRegister rn, DRegister rm) {
5663 Vbsl(al, kDataTypeValueNone, rd, rn, rm);
5664 }
5665
5666 void Vbsl(
5667 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005668 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5669 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5670 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005671 VIXL_ASSERT(allow_macro_instructions_);
5672 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005673 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005674 ITScope it_scope(this, &cond);
5675 vbsl(cond, dt, rd, rn, rm);
5676 }
5677 void Vbsl(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5678 Vbsl(al, dt, rd, rn, rm);
5679 }
5680 void Vbsl(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5681 Vbsl(cond, kDataTypeValueNone, rd, rn, rm);
5682 }
5683 void Vbsl(QRegister rd, QRegister rn, QRegister rm) {
5684 Vbsl(al, kDataTypeValueNone, rd, rn, rm);
5685 }
5686
5687 void Vceq(Condition cond,
5688 DataType dt,
5689 DRegister rd,
5690 DRegister rm,
5691 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5693 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5694 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005695 VIXL_ASSERT(allow_macro_instructions_);
5696 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005697 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005698 ITScope it_scope(this, &cond);
5699 vceq(cond, dt, rd, rm, operand);
5700 }
5701 void Vceq(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5702 Vceq(al, dt, rd, rm, operand);
5703 }
5704
5705 void Vceq(Condition cond,
5706 DataType dt,
5707 QRegister rd,
5708 QRegister rm,
5709 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005710 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5711 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5712 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005713 VIXL_ASSERT(allow_macro_instructions_);
5714 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005715 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005716 ITScope it_scope(this, &cond);
5717 vceq(cond, dt, rd, rm, operand);
5718 }
5719 void Vceq(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5720 Vceq(al, dt, rd, rm, operand);
5721 }
5722
5723 void Vceq(
5724 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005725 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5726 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5727 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005728 VIXL_ASSERT(allow_macro_instructions_);
5729 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005730 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005731 ITScope it_scope(this, &cond);
5732 vceq(cond, dt, rd, rn, rm);
5733 }
5734 void Vceq(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5735 Vceq(al, dt, rd, rn, rm);
5736 }
5737
5738 void Vceq(
5739 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005740 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5741 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5742 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005743 VIXL_ASSERT(allow_macro_instructions_);
5744 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005745 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005746 ITScope it_scope(this, &cond);
5747 vceq(cond, dt, rd, rn, rm);
5748 }
5749 void Vceq(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5750 Vceq(al, dt, rd, rn, rm);
5751 }
5752
5753 void Vcge(Condition cond,
5754 DataType dt,
5755 DRegister rd,
5756 DRegister rm,
5757 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005758 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5759 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5760 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005761 VIXL_ASSERT(allow_macro_instructions_);
5762 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005763 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005764 ITScope it_scope(this, &cond);
5765 vcge(cond, dt, rd, rm, operand);
5766 }
5767 void Vcge(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5768 Vcge(al, dt, rd, rm, operand);
5769 }
5770
5771 void Vcge(Condition cond,
5772 DataType dt,
5773 QRegister rd,
5774 QRegister rm,
5775 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005776 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5777 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5778 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005779 VIXL_ASSERT(allow_macro_instructions_);
5780 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005781 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005782 ITScope it_scope(this, &cond);
5783 vcge(cond, dt, rd, rm, operand);
5784 }
5785 void Vcge(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5786 Vcge(al, dt, rd, rm, operand);
5787 }
5788
5789 void Vcge(
5790 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005791 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5792 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5793 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005794 VIXL_ASSERT(allow_macro_instructions_);
5795 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005796 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005797 ITScope it_scope(this, &cond);
5798 vcge(cond, dt, rd, rn, rm);
5799 }
5800 void Vcge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5801 Vcge(al, dt, rd, rn, rm);
5802 }
5803
5804 void Vcge(
5805 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005806 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5807 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5808 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005809 VIXL_ASSERT(allow_macro_instructions_);
5810 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005811 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005812 ITScope it_scope(this, &cond);
5813 vcge(cond, dt, rd, rn, rm);
5814 }
5815 void Vcge(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5816 Vcge(al, dt, rd, rn, rm);
5817 }
5818
5819 void Vcgt(Condition cond,
5820 DataType dt,
5821 DRegister rd,
5822 DRegister rm,
5823 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005824 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5825 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5826 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005827 VIXL_ASSERT(allow_macro_instructions_);
5828 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005829 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005830 ITScope it_scope(this, &cond);
5831 vcgt(cond, dt, rd, rm, operand);
5832 }
5833 void Vcgt(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5834 Vcgt(al, dt, rd, rm, operand);
5835 }
5836
5837 void Vcgt(Condition cond,
5838 DataType dt,
5839 QRegister rd,
5840 QRegister rm,
5841 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005842 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5843 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5844 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005845 VIXL_ASSERT(allow_macro_instructions_);
5846 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005847 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005848 ITScope it_scope(this, &cond);
5849 vcgt(cond, dt, rd, rm, operand);
5850 }
5851 void Vcgt(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5852 Vcgt(al, dt, rd, rm, operand);
5853 }
5854
5855 void Vcgt(
5856 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005857 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5858 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5859 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005860 VIXL_ASSERT(allow_macro_instructions_);
5861 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005862 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005863 ITScope it_scope(this, &cond);
5864 vcgt(cond, dt, rd, rn, rm);
5865 }
5866 void Vcgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5867 Vcgt(al, dt, rd, rn, rm);
5868 }
5869
5870 void Vcgt(
5871 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005872 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5873 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5874 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005875 VIXL_ASSERT(allow_macro_instructions_);
5876 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005877 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005878 ITScope it_scope(this, &cond);
5879 vcgt(cond, dt, rd, rn, rm);
5880 }
5881 void Vcgt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5882 Vcgt(al, dt, rd, rn, rm);
5883 }
5884
5885 void Vcle(Condition cond,
5886 DataType dt,
5887 DRegister rd,
5888 DRegister rm,
5889 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005890 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5891 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5892 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005893 VIXL_ASSERT(allow_macro_instructions_);
5894 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005895 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005896 ITScope it_scope(this, &cond);
5897 vcle(cond, dt, rd, rm, operand);
5898 }
5899 void Vcle(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5900 Vcle(al, dt, rd, rm, operand);
5901 }
5902
5903 void Vcle(Condition cond,
5904 DataType dt,
5905 QRegister rd,
5906 QRegister rm,
5907 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005908 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5909 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5910 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005911 VIXL_ASSERT(allow_macro_instructions_);
5912 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005913 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005914 ITScope it_scope(this, &cond);
5915 vcle(cond, dt, rd, rm, operand);
5916 }
5917 void Vcle(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5918 Vcle(al, dt, rd, rm, operand);
5919 }
5920
5921 void Vcle(
5922 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005923 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5924 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5925 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005926 VIXL_ASSERT(allow_macro_instructions_);
5927 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005928 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005929 ITScope it_scope(this, &cond);
5930 vcle(cond, dt, rd, rn, rm);
5931 }
5932 void Vcle(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5933 Vcle(al, dt, rd, rn, rm);
5934 }
5935
5936 void Vcle(
5937 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005938 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5939 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5940 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005941 VIXL_ASSERT(allow_macro_instructions_);
5942 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005943 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005944 ITScope it_scope(this, &cond);
5945 vcle(cond, dt, rd, rn, rm);
5946 }
5947 void Vcle(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5948 Vcle(al, dt, rd, rn, rm);
5949 }
5950
5951 void Vcls(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005952 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5953 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005954 VIXL_ASSERT(allow_macro_instructions_);
5955 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005956 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005957 ITScope it_scope(this, &cond);
5958 vcls(cond, dt, rd, rm);
5959 }
5960 void Vcls(DataType dt, DRegister rd, DRegister rm) { Vcls(al, dt, rd, rm); }
5961
5962 void Vcls(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005963 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5964 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005965 VIXL_ASSERT(allow_macro_instructions_);
5966 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005967 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005968 ITScope it_scope(this, &cond);
5969 vcls(cond, dt, rd, rm);
5970 }
5971 void Vcls(DataType dt, QRegister rd, QRegister rm) { Vcls(al, dt, rd, rm); }
5972
5973 void Vclt(Condition cond,
5974 DataType dt,
5975 DRegister rd,
5976 DRegister rm,
5977 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005978 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5979 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5980 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005981 VIXL_ASSERT(allow_macro_instructions_);
5982 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005983 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005984 ITScope it_scope(this, &cond);
5985 vclt(cond, dt, rd, rm, operand);
5986 }
5987 void Vclt(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5988 Vclt(al, dt, rd, rm, operand);
5989 }
5990
5991 void Vclt(Condition cond,
5992 DataType dt,
5993 QRegister rd,
5994 QRegister rm,
5995 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005996 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5997 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5998 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005999 VIXL_ASSERT(allow_macro_instructions_);
6000 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006001 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006002 ITScope it_scope(this, &cond);
6003 vclt(cond, dt, rd, rm, operand);
6004 }
6005 void Vclt(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
6006 Vclt(al, dt, rd, rm, operand);
6007 }
6008
6009 void Vclt(
6010 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006011 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6012 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6013 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006014 VIXL_ASSERT(allow_macro_instructions_);
6015 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006016 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006017 ITScope it_scope(this, &cond);
6018 vclt(cond, dt, rd, rn, rm);
6019 }
6020 void Vclt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6021 Vclt(al, dt, rd, rn, rm);
6022 }
6023
6024 void Vclt(
6025 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006026 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6027 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6028 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006029 VIXL_ASSERT(allow_macro_instructions_);
6030 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006031 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006032 ITScope it_scope(this, &cond);
6033 vclt(cond, dt, rd, rn, rm);
6034 }
6035 void Vclt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6036 Vclt(al, dt, rd, rn, rm);
6037 }
6038
6039 void Vclz(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006040 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6041 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006042 VIXL_ASSERT(allow_macro_instructions_);
6043 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006044 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006045 ITScope it_scope(this, &cond);
6046 vclz(cond, dt, rd, rm);
6047 }
6048 void Vclz(DataType dt, DRegister rd, DRegister rm) { Vclz(al, dt, rd, rm); }
6049
6050 void Vclz(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006051 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6052 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006053 VIXL_ASSERT(allow_macro_instructions_);
6054 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006055 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006056 ITScope it_scope(this, &cond);
6057 vclz(cond, dt, rd, rm);
6058 }
6059 void Vclz(DataType dt, QRegister rd, QRegister rm) { Vclz(al, dt, rd, rm); }
6060
6061 void Vcmp(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006062 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6063 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006064 VIXL_ASSERT(allow_macro_instructions_);
6065 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006066 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006067 ITScope it_scope(this, &cond);
6068 vcmp(cond, dt, rd, rm);
6069 }
6070 void Vcmp(DataType dt, SRegister rd, SRegister rm) { Vcmp(al, dt, rd, rm); }
6071
6072 void Vcmp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006073 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
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 vcmp(cond, dt, rd, rm);
6080 }
6081 void Vcmp(DataType dt, DRegister rd, DRegister rm) { Vcmp(al, dt, rd, rm); }
6082
6083 void Vcmp(Condition cond, DataType dt, SRegister rd, double imm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006084 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006085 VIXL_ASSERT(allow_macro_instructions_);
6086 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006087 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006088 ITScope it_scope(this, &cond);
6089 vcmp(cond, dt, rd, imm);
6090 }
6091 void Vcmp(DataType dt, SRegister rd, double imm) { Vcmp(al, dt, rd, imm); }
6092
6093 void Vcmp(Condition cond, DataType dt, DRegister rd, double imm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006094 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006095 VIXL_ASSERT(allow_macro_instructions_);
6096 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006097 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006098 ITScope it_scope(this, &cond);
6099 vcmp(cond, dt, rd, imm);
6100 }
6101 void Vcmp(DataType dt, DRegister rd, double imm) { Vcmp(al, dt, rd, imm); }
6102
6103 void Vcmpe(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006104 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6105 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006106 VIXL_ASSERT(allow_macro_instructions_);
6107 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006108 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006109 ITScope it_scope(this, &cond);
6110 vcmpe(cond, dt, rd, rm);
6111 }
6112 void Vcmpe(DataType dt, SRegister rd, SRegister rm) { Vcmpe(al, dt, rd, rm); }
6113
6114 void Vcmpe(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006115 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6116 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006117 VIXL_ASSERT(allow_macro_instructions_);
6118 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006119 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006120 ITScope it_scope(this, &cond);
6121 vcmpe(cond, dt, rd, rm);
6122 }
6123 void Vcmpe(DataType dt, DRegister rd, DRegister rm) { Vcmpe(al, dt, rd, rm); }
6124
6125 void Vcmpe(Condition cond, DataType dt, SRegister rd, double imm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006126 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006127 VIXL_ASSERT(allow_macro_instructions_);
6128 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006129 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006130 ITScope it_scope(this, &cond);
6131 vcmpe(cond, dt, rd, imm);
6132 }
6133 void Vcmpe(DataType dt, SRegister rd, double imm) { Vcmpe(al, dt, rd, imm); }
6134
6135 void Vcmpe(Condition cond, DataType dt, DRegister rd, double imm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006136 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006137 VIXL_ASSERT(allow_macro_instructions_);
6138 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006139 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006140 ITScope it_scope(this, &cond);
6141 vcmpe(cond, dt, rd, imm);
6142 }
6143 void Vcmpe(DataType dt, DRegister rd, double imm) { Vcmpe(al, dt, rd, imm); }
6144
6145 void Vcnt(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006146 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6147 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006148 VIXL_ASSERT(allow_macro_instructions_);
6149 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006150 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006151 ITScope it_scope(this, &cond);
6152 vcnt(cond, dt, rd, rm);
6153 }
6154 void Vcnt(DataType dt, DRegister rd, DRegister rm) { Vcnt(al, dt, rd, rm); }
6155
6156 void Vcnt(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006157 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6158 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006159 VIXL_ASSERT(allow_macro_instructions_);
6160 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006161 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006162 ITScope it_scope(this, &cond);
6163 vcnt(cond, dt, rd, rm);
6164 }
6165 void Vcnt(DataType dt, QRegister rd, QRegister rm) { Vcnt(al, dt, rd, rm); }
6166
6167 void Vcvt(
6168 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006169 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6170 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006171 VIXL_ASSERT(allow_macro_instructions_);
6172 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006173 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006174 ITScope it_scope(this, &cond);
6175 vcvt(cond, dt1, dt2, rd, rm);
6176 }
6177 void Vcvt(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6178 Vcvt(al, dt1, dt2, rd, rm);
6179 }
6180
6181 void Vcvt(
6182 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006183 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6184 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006185 VIXL_ASSERT(allow_macro_instructions_);
6186 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006187 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006188 ITScope it_scope(this, &cond);
6189 vcvt(cond, dt1, dt2, rd, rm);
6190 }
6191 void Vcvt(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6192 Vcvt(al, dt1, dt2, rd, rm);
6193 }
6194
6195 void Vcvt(Condition cond,
6196 DataType dt1,
6197 DataType dt2,
6198 DRegister rd,
6199 DRegister rm,
6200 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006201 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6202 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006203 VIXL_ASSERT(allow_macro_instructions_);
6204 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006205 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006206 ITScope it_scope(this, &cond);
6207 vcvt(cond, dt1, dt2, rd, rm, fbits);
6208 }
6209 void Vcvt(
6210 DataType dt1, DataType dt2, DRegister rd, DRegister rm, int32_t fbits) {
6211 Vcvt(al, dt1, dt2, rd, rm, fbits);
6212 }
6213
6214 void Vcvt(Condition cond,
6215 DataType dt1,
6216 DataType dt2,
6217 QRegister rd,
6218 QRegister rm,
6219 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006220 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6221 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006222 VIXL_ASSERT(allow_macro_instructions_);
6223 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006224 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006225 ITScope it_scope(this, &cond);
6226 vcvt(cond, dt1, dt2, rd, rm, fbits);
6227 }
6228 void Vcvt(
6229 DataType dt1, DataType dt2, QRegister rd, QRegister rm, int32_t fbits) {
6230 Vcvt(al, dt1, dt2, rd, rm, fbits);
6231 }
6232
6233 void Vcvt(Condition cond,
6234 DataType dt1,
6235 DataType dt2,
6236 SRegister rd,
6237 SRegister rm,
6238 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006239 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6240 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006241 VIXL_ASSERT(allow_macro_instructions_);
6242 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006243 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006244 ITScope it_scope(this, &cond);
6245 vcvt(cond, dt1, dt2, rd, rm, fbits);
6246 }
6247 void Vcvt(
6248 DataType dt1, DataType dt2, SRegister rd, SRegister rm, int32_t fbits) {
6249 Vcvt(al, dt1, dt2, rd, rm, fbits);
6250 }
6251
6252 void Vcvt(
6253 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006254 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6255 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006256 VIXL_ASSERT(allow_macro_instructions_);
6257 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006258 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006259 ITScope it_scope(this, &cond);
6260 vcvt(cond, dt1, dt2, rd, rm);
6261 }
6262 void Vcvt(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
6263 Vcvt(al, dt1, dt2, rd, rm);
6264 }
6265
6266 void Vcvt(
6267 Condition cond, DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006268 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6269 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006270 VIXL_ASSERT(allow_macro_instructions_);
6271 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006272 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006273 ITScope it_scope(this, &cond);
6274 vcvt(cond, dt1, dt2, rd, rm);
6275 }
6276 void Vcvt(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
6277 Vcvt(al, dt1, dt2, rd, rm);
6278 }
6279
6280 void Vcvt(
6281 Condition cond, DataType dt1, DataType dt2, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006282 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6283 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006284 VIXL_ASSERT(allow_macro_instructions_);
6285 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006286 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006287 ITScope it_scope(this, &cond);
6288 vcvt(cond, dt1, dt2, rd, rm);
6289 }
6290 void Vcvt(DataType dt1, DataType dt2, DRegister rd, QRegister rm) {
6291 Vcvt(al, dt1, dt2, rd, rm);
6292 }
6293
6294 void Vcvt(
6295 Condition cond, DataType dt1, DataType dt2, QRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006296 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6297 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006298 VIXL_ASSERT(allow_macro_instructions_);
6299 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006300 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006301 ITScope it_scope(this, &cond);
6302 vcvt(cond, dt1, dt2, rd, rm);
6303 }
6304 void Vcvt(DataType dt1, DataType dt2, QRegister rd, DRegister rm) {
6305 Vcvt(al, dt1, dt2, rd, rm);
6306 }
6307
6308 void Vcvt(
6309 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006310 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6311 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006312 VIXL_ASSERT(allow_macro_instructions_);
6313 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006314 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006315 ITScope it_scope(this, &cond);
6316 vcvt(cond, dt1, dt2, rd, rm);
6317 }
6318 void Vcvt(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6319 Vcvt(al, dt1, dt2, rd, rm);
6320 }
6321
6322 void Vcvta(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006323 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6324 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006325 VIXL_ASSERT(allow_macro_instructions_);
6326 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006327 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006328 vcvta(dt1, dt2, rd, rm);
6329 }
6330
6331 void Vcvta(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006332 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6333 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006334 VIXL_ASSERT(allow_macro_instructions_);
6335 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006336 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006337 vcvta(dt1, dt2, rd, rm);
6338 }
6339
6340 void Vcvta(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006341 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6342 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006343 VIXL_ASSERT(allow_macro_instructions_);
6344 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006345 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006346 vcvta(dt1, dt2, rd, rm);
6347 }
6348
6349 void Vcvta(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006350 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6351 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006352 VIXL_ASSERT(allow_macro_instructions_);
6353 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006354 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006355 vcvta(dt1, dt2, rd, rm);
6356 }
6357
6358 void Vcvtb(
6359 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006360 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6361 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006362 VIXL_ASSERT(allow_macro_instructions_);
6363 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006364 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006365 ITScope it_scope(this, &cond);
6366 vcvtb(cond, dt1, dt2, rd, rm);
6367 }
6368 void Vcvtb(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6369 Vcvtb(al, dt1, dt2, rd, rm);
6370 }
6371
6372 void Vcvtb(
6373 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006374 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6375 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006376 VIXL_ASSERT(allow_macro_instructions_);
6377 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006378 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006379 ITScope it_scope(this, &cond);
6380 vcvtb(cond, dt1, dt2, rd, rm);
6381 }
6382 void Vcvtb(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6383 Vcvtb(al, dt1, dt2, rd, rm);
6384 }
6385
6386 void Vcvtb(
6387 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006388 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6389 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006390 VIXL_ASSERT(allow_macro_instructions_);
6391 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006392 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006393 ITScope it_scope(this, &cond);
6394 vcvtb(cond, dt1, dt2, rd, rm);
6395 }
6396 void Vcvtb(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6397 Vcvtb(al, dt1, dt2, rd, rm);
6398 }
6399
6400 void Vcvtm(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006401 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6402 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006403 VIXL_ASSERT(allow_macro_instructions_);
6404 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006405 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006406 vcvtm(dt1, dt2, rd, rm);
6407 }
6408
6409 void Vcvtm(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006410 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6411 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006412 VIXL_ASSERT(allow_macro_instructions_);
6413 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006414 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006415 vcvtm(dt1, dt2, rd, rm);
6416 }
6417
6418 void Vcvtm(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006419 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6420 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006421 VIXL_ASSERT(allow_macro_instructions_);
6422 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006423 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006424 vcvtm(dt1, dt2, rd, rm);
6425 }
6426
6427 void Vcvtm(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006428 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6429 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006430 VIXL_ASSERT(allow_macro_instructions_);
6431 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006432 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006433 vcvtm(dt1, dt2, rd, rm);
6434 }
6435
6436 void Vcvtn(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006437 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6438 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006439 VIXL_ASSERT(allow_macro_instructions_);
6440 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006441 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006442 vcvtn(dt1, dt2, rd, rm);
6443 }
6444
6445 void Vcvtn(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006446 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6447 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006448 VIXL_ASSERT(allow_macro_instructions_);
6449 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006450 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006451 vcvtn(dt1, dt2, rd, rm);
6452 }
6453
6454 void Vcvtn(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006455 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6456 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006457 VIXL_ASSERT(allow_macro_instructions_);
6458 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006459 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006460 vcvtn(dt1, dt2, rd, rm);
6461 }
6462
6463 void Vcvtn(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006464 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6465 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006466 VIXL_ASSERT(allow_macro_instructions_);
6467 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006468 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006469 vcvtn(dt1, dt2, rd, rm);
6470 }
6471
6472 void Vcvtp(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006473 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6474 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006475 VIXL_ASSERT(allow_macro_instructions_);
6476 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006477 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006478 vcvtp(dt1, dt2, rd, rm);
6479 }
6480
6481 void Vcvtp(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006482 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6483 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006484 VIXL_ASSERT(allow_macro_instructions_);
6485 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006486 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006487 vcvtp(dt1, dt2, rd, rm);
6488 }
6489
6490 void Vcvtp(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006491 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6492 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006493 VIXL_ASSERT(allow_macro_instructions_);
6494 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006495 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006496 vcvtp(dt1, dt2, rd, rm);
6497 }
6498
6499 void Vcvtp(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006500 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6501 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006502 VIXL_ASSERT(allow_macro_instructions_);
6503 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006504 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006505 vcvtp(dt1, dt2, rd, rm);
6506 }
6507
6508 void Vcvtr(
6509 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister 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 ITScope it_scope(this, &cond);
6516 vcvtr(cond, dt1, dt2, rd, rm);
6517 }
6518 void Vcvtr(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6519 Vcvtr(al, dt1, dt2, rd, rm);
6520 }
6521
6522 void Vcvtr(
6523 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006524 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6525 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006526 VIXL_ASSERT(allow_macro_instructions_);
6527 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006528 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006529 ITScope it_scope(this, &cond);
6530 vcvtr(cond, dt1, dt2, rd, rm);
6531 }
6532 void Vcvtr(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6533 Vcvtr(al, dt1, dt2, rd, rm);
6534 }
6535
6536 void Vcvtt(
6537 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006538 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6539 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006540 VIXL_ASSERT(allow_macro_instructions_);
6541 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006542 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006543 ITScope it_scope(this, &cond);
6544 vcvtt(cond, dt1, dt2, rd, rm);
6545 }
6546 void Vcvtt(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6547 Vcvtt(al, dt1, dt2, rd, rm);
6548 }
6549
6550 void Vcvtt(
6551 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006552 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6553 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006554 VIXL_ASSERT(allow_macro_instructions_);
6555 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006556 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006557 ITScope it_scope(this, &cond);
6558 vcvtt(cond, dt1, dt2, rd, rm);
6559 }
6560 void Vcvtt(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6561 Vcvtt(al, dt1, dt2, rd, rm);
6562 }
6563
6564 void Vcvtt(
6565 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006566 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6567 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006568 VIXL_ASSERT(allow_macro_instructions_);
6569 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006570 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006571 ITScope it_scope(this, &cond);
6572 vcvtt(cond, dt1, dt2, rd, rm);
6573 }
6574 void Vcvtt(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6575 Vcvtt(al, dt1, dt2, rd, rm);
6576 }
6577
6578 void Vdiv(
6579 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006580 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6581 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6582 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006583 VIXL_ASSERT(allow_macro_instructions_);
6584 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006585 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006586 ITScope it_scope(this, &cond);
6587 vdiv(cond, dt, rd, rn, rm);
6588 }
6589 void Vdiv(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6590 Vdiv(al, dt, rd, rn, rm);
6591 }
6592
6593 void Vdiv(
6594 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006595 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6596 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6597 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006598 VIXL_ASSERT(allow_macro_instructions_);
6599 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006600 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006601 ITScope it_scope(this, &cond);
6602 vdiv(cond, dt, rd, rn, rm);
6603 }
6604 void Vdiv(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6605 Vdiv(al, dt, rd, rn, rm);
6606 }
6607
6608 void Vdup(Condition cond, DataType dt, QRegister rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006609 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6610 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006611 VIXL_ASSERT(allow_macro_instructions_);
6612 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006613 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006614 ITScope it_scope(this, &cond);
6615 vdup(cond, dt, rd, rt);
6616 }
6617 void Vdup(DataType dt, QRegister rd, Register rt) { Vdup(al, dt, rd, rt); }
6618
6619 void Vdup(Condition cond, DataType dt, DRegister rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006620 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6621 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006622 VIXL_ASSERT(allow_macro_instructions_);
6623 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006624 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006625 ITScope it_scope(this, &cond);
6626 vdup(cond, dt, rd, rt);
6627 }
6628 void Vdup(DataType dt, DRegister rd, Register rt) { Vdup(al, dt, rd, rt); }
6629
6630 void Vdup(Condition cond, DataType dt, DRegister rd, DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006631 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6632 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006633 VIXL_ASSERT(allow_macro_instructions_);
6634 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006635 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006636 ITScope it_scope(this, &cond);
6637 vdup(cond, dt, rd, rm);
6638 }
6639 void Vdup(DataType dt, DRegister rd, DRegisterLane rm) {
6640 Vdup(al, dt, rd, rm);
6641 }
6642
6643 void Vdup(Condition cond, DataType dt, QRegister rd, DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006644 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6645 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006646 VIXL_ASSERT(allow_macro_instructions_);
6647 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006648 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006649 ITScope it_scope(this, &cond);
6650 vdup(cond, dt, rd, rm);
6651 }
6652 void Vdup(DataType dt, QRegister rd, DRegisterLane rm) {
6653 Vdup(al, dt, rd, rm);
6654 }
6655
6656 void Veor(
6657 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006658 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6659 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6660 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006661 VIXL_ASSERT(allow_macro_instructions_);
6662 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006663 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006664 ITScope it_scope(this, &cond);
6665 veor(cond, dt, rd, rn, rm);
6666 }
6667 void Veor(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6668 Veor(al, dt, rd, rn, rm);
6669 }
6670 void Veor(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
6671 Veor(cond, kDataTypeValueNone, rd, rn, rm);
6672 }
6673 void Veor(DRegister rd, DRegister rn, DRegister rm) {
6674 Veor(al, kDataTypeValueNone, rd, rn, rm);
6675 }
6676
6677 void Veor(
6678 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006679 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6680 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6681 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006682 VIXL_ASSERT(allow_macro_instructions_);
6683 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006684 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006685 ITScope it_scope(this, &cond);
6686 veor(cond, dt, rd, rn, rm);
6687 }
6688 void Veor(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6689 Veor(al, dt, rd, rn, rm);
6690 }
6691 void Veor(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
6692 Veor(cond, kDataTypeValueNone, rd, rn, rm);
6693 }
6694 void Veor(QRegister rd, QRegister rn, QRegister rm) {
6695 Veor(al, kDataTypeValueNone, rd, rn, rm);
6696 }
6697
6698 void Vext(Condition cond,
6699 DataType dt,
6700 DRegister rd,
6701 DRegister rn,
6702 DRegister rm,
6703 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006704 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6705 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6706 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6707 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006708 VIXL_ASSERT(allow_macro_instructions_);
6709 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006710 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006711 ITScope it_scope(this, &cond);
6712 vext(cond, dt, rd, rn, rm, operand);
6713 }
6714 void Vext(DataType dt,
6715 DRegister rd,
6716 DRegister rn,
6717 DRegister rm,
6718 const DOperand& operand) {
6719 Vext(al, dt, rd, rn, rm, operand);
6720 }
6721
6722 void Vext(Condition cond,
6723 DataType dt,
6724 QRegister rd,
6725 QRegister rn,
6726 QRegister rm,
6727 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006728 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6729 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6730 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6731 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006732 VIXL_ASSERT(allow_macro_instructions_);
6733 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006734 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006735 ITScope it_scope(this, &cond);
6736 vext(cond, dt, rd, rn, rm, operand);
6737 }
6738 void Vext(DataType dt,
6739 QRegister rd,
6740 QRegister rn,
6741 QRegister rm,
6742 const QOperand& operand) {
6743 Vext(al, dt, rd, rn, rm, operand);
6744 }
6745
6746 void Vfma(
6747 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006748 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6749 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6750 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006751 VIXL_ASSERT(allow_macro_instructions_);
6752 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006753 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006754 ITScope it_scope(this, &cond);
6755 vfma(cond, dt, rd, rn, rm);
6756 }
6757 void Vfma(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6758 Vfma(al, dt, rd, rn, rm);
6759 }
6760
6761 void Vfma(
6762 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006763 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6764 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6765 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006766 VIXL_ASSERT(allow_macro_instructions_);
6767 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006768 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006769 ITScope it_scope(this, &cond);
6770 vfma(cond, dt, rd, rn, rm);
6771 }
6772 void Vfma(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6773 Vfma(al, dt, rd, rn, rm);
6774 }
6775
6776 void Vfma(
6777 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006778 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6779 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6780 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006781 VIXL_ASSERT(allow_macro_instructions_);
6782 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006783 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006784 ITScope it_scope(this, &cond);
6785 vfma(cond, dt, rd, rn, rm);
6786 }
6787 void Vfma(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6788 Vfma(al, dt, rd, rn, rm);
6789 }
6790
6791 void Vfms(
6792 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006793 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6794 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6795 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006796 VIXL_ASSERT(allow_macro_instructions_);
6797 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006798 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006799 ITScope it_scope(this, &cond);
6800 vfms(cond, dt, rd, rn, rm);
6801 }
6802 void Vfms(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6803 Vfms(al, dt, rd, rn, rm);
6804 }
6805
6806 void Vfms(
6807 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006808 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6809 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6810 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006811 VIXL_ASSERT(allow_macro_instructions_);
6812 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006813 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006814 ITScope it_scope(this, &cond);
6815 vfms(cond, dt, rd, rn, rm);
6816 }
6817 void Vfms(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6818 Vfms(al, dt, rd, rn, rm);
6819 }
6820
6821 void Vfms(
6822 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006823 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6824 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6825 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006826 VIXL_ASSERT(allow_macro_instructions_);
6827 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006828 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006829 ITScope it_scope(this, &cond);
6830 vfms(cond, dt, rd, rn, rm);
6831 }
6832 void Vfms(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6833 Vfms(al, dt, rd, rn, rm);
6834 }
6835
6836 void Vfnma(
6837 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006838 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6839 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6840 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006841 VIXL_ASSERT(allow_macro_instructions_);
6842 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006843 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006844 ITScope it_scope(this, &cond);
6845 vfnma(cond, dt, rd, rn, rm);
6846 }
6847 void Vfnma(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6848 Vfnma(al, dt, rd, rn, rm);
6849 }
6850
6851 void Vfnma(
6852 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006853 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6854 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6855 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006856 VIXL_ASSERT(allow_macro_instructions_);
6857 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006858 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006859 ITScope it_scope(this, &cond);
6860 vfnma(cond, dt, rd, rn, rm);
6861 }
6862 void Vfnma(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6863 Vfnma(al, dt, rd, rn, rm);
6864 }
6865
6866 void Vfnms(
6867 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006868 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6869 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6870 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006871 VIXL_ASSERT(allow_macro_instructions_);
6872 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006873 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006874 ITScope it_scope(this, &cond);
6875 vfnms(cond, dt, rd, rn, rm);
6876 }
6877 void Vfnms(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6878 Vfnms(al, dt, rd, rn, rm);
6879 }
6880
6881 void Vfnms(
6882 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006883 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6884 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6885 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006886 VIXL_ASSERT(allow_macro_instructions_);
6887 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006888 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006889 ITScope it_scope(this, &cond);
6890 vfnms(cond, dt, rd, rn, rm);
6891 }
6892 void Vfnms(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6893 Vfnms(al, dt, rd, rn, rm);
6894 }
6895
6896 void Vhadd(
6897 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006898 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6899 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6900 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006901 VIXL_ASSERT(allow_macro_instructions_);
6902 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006903 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006904 ITScope it_scope(this, &cond);
6905 vhadd(cond, dt, rd, rn, rm);
6906 }
6907 void Vhadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6908 Vhadd(al, dt, rd, rn, rm);
6909 }
6910
6911 void Vhadd(
6912 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006913 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6914 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6915 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006916 VIXL_ASSERT(allow_macro_instructions_);
6917 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006918 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006919 ITScope it_scope(this, &cond);
6920 vhadd(cond, dt, rd, rn, rm);
6921 }
6922 void Vhadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6923 Vhadd(al, dt, rd, rn, rm);
6924 }
6925
6926 void Vhsub(
6927 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006928 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6929 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6930 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006931 VIXL_ASSERT(allow_macro_instructions_);
6932 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006933 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006934 ITScope it_scope(this, &cond);
6935 vhsub(cond, dt, rd, rn, rm);
6936 }
6937 void Vhsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6938 Vhsub(al, dt, rd, rn, rm);
6939 }
6940
6941 void Vhsub(
6942 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006943 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6945 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006946 VIXL_ASSERT(allow_macro_instructions_);
6947 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006948 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006949 ITScope it_scope(this, &cond);
6950 vhsub(cond, dt, rd, rn, rm);
6951 }
6952 void Vhsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6953 Vhsub(al, dt, rd, rn, rm);
6954 }
6955
6956 void Vld1(Condition cond,
6957 DataType dt,
6958 const NeonRegisterList& nreglist,
6959 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006960 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
6961 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
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 vld1(cond, dt, nreglist, operand);
6967 }
6968 void Vld1(DataType dt,
6969 const NeonRegisterList& nreglist,
6970 const AlignedMemOperand& operand) {
6971 Vld1(al, dt, nreglist, operand);
6972 }
6973
6974 void Vld2(Condition cond,
6975 DataType dt,
6976 const NeonRegisterList& nreglist,
6977 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006978 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
6979 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006980 VIXL_ASSERT(allow_macro_instructions_);
6981 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006982 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006983 ITScope it_scope(this, &cond);
6984 vld2(cond, dt, nreglist, operand);
6985 }
6986 void Vld2(DataType dt,
6987 const NeonRegisterList& nreglist,
6988 const AlignedMemOperand& operand) {
6989 Vld2(al, dt, nreglist, operand);
6990 }
6991
6992 void Vld3(Condition cond,
6993 DataType dt,
6994 const NeonRegisterList& nreglist,
6995 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006996 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
6997 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006998 VIXL_ASSERT(allow_macro_instructions_);
6999 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007000 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007001 ITScope it_scope(this, &cond);
7002 vld3(cond, dt, nreglist, operand);
7003 }
7004 void Vld3(DataType dt,
7005 const NeonRegisterList& nreglist,
7006 const AlignedMemOperand& operand) {
7007 Vld3(al, dt, nreglist, operand);
7008 }
7009
7010 void Vld3(Condition cond,
7011 DataType dt,
7012 const NeonRegisterList& nreglist,
7013 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007014 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7015 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007016 VIXL_ASSERT(allow_macro_instructions_);
7017 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007018 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007019 ITScope it_scope(this, &cond);
7020 vld3(cond, dt, nreglist, operand);
7021 }
7022 void Vld3(DataType dt,
7023 const NeonRegisterList& nreglist,
7024 const MemOperand& operand) {
7025 Vld3(al, dt, nreglist, operand);
7026 }
7027
7028 void Vld4(Condition cond,
7029 DataType dt,
7030 const NeonRegisterList& nreglist,
7031 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007032 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7033 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007034 VIXL_ASSERT(allow_macro_instructions_);
7035 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007036 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007037 ITScope it_scope(this, &cond);
7038 vld4(cond, dt, nreglist, operand);
7039 }
7040 void Vld4(DataType dt,
7041 const NeonRegisterList& nreglist,
7042 const AlignedMemOperand& operand) {
7043 Vld4(al, dt, nreglist, operand);
7044 }
7045
7046 void Vldm(Condition cond,
7047 DataType dt,
7048 Register rn,
7049 WriteBack write_back,
7050 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007051 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7052 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007053 VIXL_ASSERT(allow_macro_instructions_);
7054 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007055 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007056 ITScope it_scope(this, &cond);
7057 vldm(cond, dt, rn, write_back, dreglist);
7058 }
7059 void Vldm(DataType dt,
7060 Register rn,
7061 WriteBack write_back,
7062 DRegisterList dreglist) {
7063 Vldm(al, dt, rn, write_back, dreglist);
7064 }
7065 void Vldm(Condition cond,
7066 Register rn,
7067 WriteBack write_back,
7068 DRegisterList dreglist) {
7069 Vldm(cond, kDataTypeValueNone, rn, write_back, dreglist);
7070 }
7071 void Vldm(Register rn, WriteBack write_back, DRegisterList dreglist) {
7072 Vldm(al, kDataTypeValueNone, rn, write_back, dreglist);
7073 }
7074
7075 void Vldm(Condition cond,
7076 DataType dt,
7077 Register rn,
7078 WriteBack write_back,
7079 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007080 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7081 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007082 VIXL_ASSERT(allow_macro_instructions_);
7083 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007084 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007085 ITScope it_scope(this, &cond);
7086 vldm(cond, dt, rn, write_back, sreglist);
7087 }
7088 void Vldm(DataType dt,
7089 Register rn,
7090 WriteBack write_back,
7091 SRegisterList sreglist) {
7092 Vldm(al, dt, rn, write_back, sreglist);
7093 }
7094 void Vldm(Condition cond,
7095 Register rn,
7096 WriteBack write_back,
7097 SRegisterList sreglist) {
7098 Vldm(cond, kDataTypeValueNone, rn, write_back, sreglist);
7099 }
7100 void Vldm(Register rn, WriteBack write_back, SRegisterList sreglist) {
7101 Vldm(al, kDataTypeValueNone, rn, write_back, sreglist);
7102 }
7103
7104 void Vldmdb(Condition cond,
7105 DataType dt,
7106 Register rn,
7107 WriteBack write_back,
7108 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007109 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7110 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007111 VIXL_ASSERT(allow_macro_instructions_);
7112 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007113 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007114 ITScope it_scope(this, &cond);
7115 vldmdb(cond, dt, rn, write_back, dreglist);
7116 }
7117 void Vldmdb(DataType dt,
7118 Register rn,
7119 WriteBack write_back,
7120 DRegisterList dreglist) {
7121 Vldmdb(al, dt, rn, write_back, dreglist);
7122 }
7123 void Vldmdb(Condition cond,
7124 Register rn,
7125 WriteBack write_back,
7126 DRegisterList dreglist) {
7127 Vldmdb(cond, kDataTypeValueNone, rn, write_back, dreglist);
7128 }
7129 void Vldmdb(Register rn, WriteBack write_back, DRegisterList dreglist) {
7130 Vldmdb(al, kDataTypeValueNone, rn, write_back, dreglist);
7131 }
7132
7133 void Vldmdb(Condition cond,
7134 DataType dt,
7135 Register rn,
7136 WriteBack write_back,
7137 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007138 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7139 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007140 VIXL_ASSERT(allow_macro_instructions_);
7141 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007142 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007143 ITScope it_scope(this, &cond);
7144 vldmdb(cond, dt, rn, write_back, sreglist);
7145 }
7146 void Vldmdb(DataType dt,
7147 Register rn,
7148 WriteBack write_back,
7149 SRegisterList sreglist) {
7150 Vldmdb(al, dt, rn, write_back, sreglist);
7151 }
7152 void Vldmdb(Condition cond,
7153 Register rn,
7154 WriteBack write_back,
7155 SRegisterList sreglist) {
7156 Vldmdb(cond, kDataTypeValueNone, rn, write_back, sreglist);
7157 }
7158 void Vldmdb(Register rn, WriteBack write_back, SRegisterList sreglist) {
7159 Vldmdb(al, kDataTypeValueNone, rn, write_back, sreglist);
7160 }
7161
7162 void Vldmia(Condition cond,
7163 DataType dt,
7164 Register rn,
7165 WriteBack write_back,
7166 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007167 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7168 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007169 VIXL_ASSERT(allow_macro_instructions_);
7170 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007171 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007172 ITScope it_scope(this, &cond);
7173 vldmia(cond, dt, rn, write_back, dreglist);
7174 }
7175 void Vldmia(DataType dt,
7176 Register rn,
7177 WriteBack write_back,
7178 DRegisterList dreglist) {
7179 Vldmia(al, dt, rn, write_back, dreglist);
7180 }
7181 void Vldmia(Condition cond,
7182 Register rn,
7183 WriteBack write_back,
7184 DRegisterList dreglist) {
7185 Vldmia(cond, kDataTypeValueNone, rn, write_back, dreglist);
7186 }
7187 void Vldmia(Register rn, WriteBack write_back, DRegisterList dreglist) {
7188 Vldmia(al, kDataTypeValueNone, rn, write_back, dreglist);
7189 }
7190
7191 void Vldmia(Condition cond,
7192 DataType dt,
7193 Register rn,
7194 WriteBack write_back,
7195 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007196 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7197 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007198 VIXL_ASSERT(allow_macro_instructions_);
7199 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007200 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007201 ITScope it_scope(this, &cond);
7202 vldmia(cond, dt, rn, write_back, sreglist);
7203 }
7204 void Vldmia(DataType dt,
7205 Register rn,
7206 WriteBack write_back,
7207 SRegisterList sreglist) {
7208 Vldmia(al, dt, rn, write_back, sreglist);
7209 }
7210 void Vldmia(Condition cond,
7211 Register rn,
7212 WriteBack write_back,
7213 SRegisterList sreglist) {
7214 Vldmia(cond, kDataTypeValueNone, rn, write_back, sreglist);
7215 }
7216 void Vldmia(Register rn, WriteBack write_back, SRegisterList sreglist) {
7217 Vldmia(al, kDataTypeValueNone, rn, write_back, sreglist);
7218 }
7219
7220 void Vldr(Condition cond, DataType dt, DRegister rd, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007221 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007222 VIXL_ASSERT(allow_macro_instructions_);
7223 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007224 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007225 ITScope it_scope(this, &cond);
7226 vldr(cond, dt, rd, label);
7227 }
7228 void Vldr(DataType dt, DRegister rd, Label* label) {
7229 Vldr(al, dt, rd, label);
7230 }
7231 void Vldr(Condition cond, DRegister rd, Label* label) {
7232 Vldr(cond, Untyped64, rd, label);
7233 }
7234 void Vldr(DRegister rd, Label* label) { Vldr(al, Untyped64, rd, label); }
7235
7236 void Vldr(Condition cond,
7237 DataType dt,
7238 DRegister rd,
7239 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007240 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7241 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007242 VIXL_ASSERT(allow_macro_instructions_);
7243 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007244 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007245 ITScope it_scope(this, &cond);
7246 vldr(cond, dt, rd, operand);
7247 }
7248 void Vldr(DataType dt, DRegister rd, const MemOperand& operand) {
7249 Vldr(al, dt, rd, operand);
7250 }
7251 void Vldr(Condition cond, DRegister rd, const MemOperand& operand) {
7252 Vldr(cond, Untyped64, rd, operand);
7253 }
7254 void Vldr(DRegister rd, const MemOperand& operand) {
7255 Vldr(al, Untyped64, rd, operand);
7256 }
7257
7258 void Vldr(Condition cond, DataType dt, SRegister rd, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007259 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007260 VIXL_ASSERT(allow_macro_instructions_);
7261 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007262 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007263 ITScope it_scope(this, &cond);
7264 vldr(cond, dt, rd, label);
7265 }
7266 void Vldr(DataType dt, SRegister rd, Label* label) {
7267 Vldr(al, dt, rd, label);
7268 }
7269 void Vldr(Condition cond, SRegister rd, Label* label) {
7270 Vldr(cond, Untyped32, rd, label);
7271 }
7272 void Vldr(SRegister rd, Label* label) { Vldr(al, Untyped32, rd, label); }
7273
7274 void Vldr(Condition cond,
7275 DataType dt,
7276 SRegister rd,
7277 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007278 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7279 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007280 VIXL_ASSERT(allow_macro_instructions_);
7281 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007282 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007283 ITScope it_scope(this, &cond);
7284 vldr(cond, dt, rd, operand);
7285 }
7286 void Vldr(DataType dt, SRegister rd, const MemOperand& operand) {
7287 Vldr(al, dt, rd, operand);
7288 }
7289 void Vldr(Condition cond, SRegister rd, const MemOperand& operand) {
7290 Vldr(cond, Untyped32, rd, operand);
7291 }
7292 void Vldr(SRegister rd, const MemOperand& operand) {
7293 Vldr(al, Untyped32, rd, operand);
7294 }
7295
7296 void Vmax(
7297 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007298 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7299 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7300 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007301 VIXL_ASSERT(allow_macro_instructions_);
7302 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007303 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007304 ITScope it_scope(this, &cond);
7305 vmax(cond, dt, rd, rn, rm);
7306 }
7307 void Vmax(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7308 Vmax(al, dt, rd, rn, rm);
7309 }
7310
7311 void Vmax(
7312 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007313 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7314 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7315 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007316 VIXL_ASSERT(allow_macro_instructions_);
7317 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007318 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007319 ITScope it_scope(this, &cond);
7320 vmax(cond, dt, rd, rn, rm);
7321 }
7322 void Vmax(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7323 Vmax(al, dt, rd, rn, rm);
7324 }
7325
7326 void Vmaxnm(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007327 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7328 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7329 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007330 VIXL_ASSERT(allow_macro_instructions_);
7331 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007332 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007333 vmaxnm(dt, rd, rn, rm);
7334 }
7335
7336 void Vmaxnm(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007337 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7338 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7339 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007340 VIXL_ASSERT(allow_macro_instructions_);
7341 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007342 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007343 vmaxnm(dt, rd, rn, rm);
7344 }
7345
7346 void Vmaxnm(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007347 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7348 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7349 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007350 VIXL_ASSERT(allow_macro_instructions_);
7351 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007352 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007353 vmaxnm(dt, rd, rn, rm);
7354 }
7355
7356 void Vmin(
7357 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007358 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7359 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7360 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007361 VIXL_ASSERT(allow_macro_instructions_);
7362 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007363 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007364 ITScope it_scope(this, &cond);
7365 vmin(cond, dt, rd, rn, rm);
7366 }
7367 void Vmin(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7368 Vmin(al, dt, rd, rn, rm);
7369 }
7370
7371 void Vmin(
7372 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister 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 ITScope it_scope(this, &cond);
7380 vmin(cond, dt, rd, rn, rm);
7381 }
7382 void Vmin(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7383 Vmin(al, dt, rd, rn, rm);
7384 }
7385
7386 void Vminnm(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007387 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7388 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7389 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007390 VIXL_ASSERT(allow_macro_instructions_);
7391 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007392 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007393 vminnm(dt, rd, rn, rm);
7394 }
7395
7396 void Vminnm(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007397 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7398 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7399 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007400 VIXL_ASSERT(allow_macro_instructions_);
7401 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007402 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007403 vminnm(dt, rd, rn, rm);
7404 }
7405
7406 void Vminnm(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007407 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7408 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7409 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007410 VIXL_ASSERT(allow_macro_instructions_);
7411 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007412 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007413 vminnm(dt, rd, rn, rm);
7414 }
7415
7416 void Vmla(Condition cond,
7417 DataType dt,
7418 DRegister rd,
7419 DRegister rn,
7420 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007421 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7422 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7423 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007424 VIXL_ASSERT(allow_macro_instructions_);
7425 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007426 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007427 ITScope it_scope(this, &cond);
7428 vmla(cond, dt, rd, rn, rm);
7429 }
7430 void Vmla(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
7431 Vmla(al, dt, rd, rn, rm);
7432 }
7433
7434 void Vmla(Condition cond,
7435 DataType dt,
7436 QRegister rd,
7437 QRegister rn,
7438 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007439 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7440 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7441 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007442 VIXL_ASSERT(allow_macro_instructions_);
7443 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007444 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007445 ITScope it_scope(this, &cond);
7446 vmla(cond, dt, rd, rn, rm);
7447 }
7448 void Vmla(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
7449 Vmla(al, dt, rd, rn, rm);
7450 }
7451
7452 void Vmla(
7453 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007454 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7455 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7456 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007457 VIXL_ASSERT(allow_macro_instructions_);
7458 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007459 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007460 ITScope it_scope(this, &cond);
7461 vmla(cond, dt, rd, rn, rm);
7462 }
7463 void Vmla(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7464 Vmla(al, dt, rd, rn, rm);
7465 }
7466
7467 void Vmla(
7468 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007469 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7470 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7471 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007472 VIXL_ASSERT(allow_macro_instructions_);
7473 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007474 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007475 ITScope it_scope(this, &cond);
7476 vmla(cond, dt, rd, rn, rm);
7477 }
7478 void Vmla(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7479 Vmla(al, dt, rd, rn, rm);
7480 }
7481
7482 void Vmla(
7483 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7485 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7486 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007487 VIXL_ASSERT(allow_macro_instructions_);
7488 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007489 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007490 ITScope it_scope(this, &cond);
7491 vmla(cond, dt, rd, rn, rm);
7492 }
7493 void Vmla(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7494 Vmla(al, dt, rd, rn, rm);
7495 }
7496
7497 void Vmlal(Condition cond,
7498 DataType dt,
7499 QRegister rd,
7500 DRegister rn,
7501 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007502 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7503 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7504 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007505 VIXL_ASSERT(allow_macro_instructions_);
7506 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007507 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007508 ITScope it_scope(this, &cond);
7509 vmlal(cond, dt, rd, rn, rm);
7510 }
7511 void Vmlal(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
7512 Vmlal(al, dt, rd, rn, rm);
7513 }
7514
7515 void Vmlal(
7516 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007517 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7518 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7519 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007520 VIXL_ASSERT(allow_macro_instructions_);
7521 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007522 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007523 ITScope it_scope(this, &cond);
7524 vmlal(cond, dt, rd, rn, rm);
7525 }
7526 void Vmlal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7527 Vmlal(al, dt, rd, rn, rm);
7528 }
7529
7530 void Vmls(Condition cond,
7531 DataType dt,
7532 DRegister rd,
7533 DRegister rn,
7534 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007535 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7536 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7537 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007538 VIXL_ASSERT(allow_macro_instructions_);
7539 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007540 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007541 ITScope it_scope(this, &cond);
7542 vmls(cond, dt, rd, rn, rm);
7543 }
7544 void Vmls(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
7545 Vmls(al, dt, rd, rn, rm);
7546 }
7547
7548 void Vmls(Condition cond,
7549 DataType dt,
7550 QRegister rd,
7551 QRegister rn,
7552 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007553 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7554 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7555 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007556 VIXL_ASSERT(allow_macro_instructions_);
7557 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007558 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007559 ITScope it_scope(this, &cond);
7560 vmls(cond, dt, rd, rn, rm);
7561 }
7562 void Vmls(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
7563 Vmls(al, dt, rd, rn, rm);
7564 }
7565
7566 void Vmls(
7567 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007568 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7569 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7570 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007571 VIXL_ASSERT(allow_macro_instructions_);
7572 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007573 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007574 ITScope it_scope(this, &cond);
7575 vmls(cond, dt, rd, rn, rm);
7576 }
7577 void Vmls(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7578 Vmls(al, dt, rd, rn, rm);
7579 }
7580
7581 void Vmls(
7582 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007583 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7584 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7585 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007586 VIXL_ASSERT(allow_macro_instructions_);
7587 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007588 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007589 ITScope it_scope(this, &cond);
7590 vmls(cond, dt, rd, rn, rm);
7591 }
7592 void Vmls(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7593 Vmls(al, dt, rd, rn, rm);
7594 }
7595
7596 void Vmls(
7597 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007598 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7599 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7600 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007601 VIXL_ASSERT(allow_macro_instructions_);
7602 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007603 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007604 ITScope it_scope(this, &cond);
7605 vmls(cond, dt, rd, rn, rm);
7606 }
7607 void Vmls(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7608 Vmls(al, dt, rd, rn, rm);
7609 }
7610
7611 void Vmlsl(Condition cond,
7612 DataType dt,
7613 QRegister rd,
7614 DRegister rn,
7615 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007616 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7617 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7618 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007619 VIXL_ASSERT(allow_macro_instructions_);
7620 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007621 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007622 ITScope it_scope(this, &cond);
7623 vmlsl(cond, dt, rd, rn, rm);
7624 }
7625 void Vmlsl(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
7626 Vmlsl(al, dt, rd, rn, rm);
7627 }
7628
7629 void Vmlsl(
7630 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007631 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7632 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7633 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007634 VIXL_ASSERT(allow_macro_instructions_);
7635 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007636 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007637 ITScope it_scope(this, &cond);
7638 vmlsl(cond, dt, rd, rn, rm);
7639 }
7640 void Vmlsl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7641 Vmlsl(al, dt, rd, rn, rm);
7642 }
7643
7644 void Vmov(Condition cond, Register rt, SRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007645 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7646 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
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 vmov(cond, rt, rn);
7652 }
7653 void Vmov(Register rt, SRegister rn) { Vmov(al, rt, rn); }
7654
7655 void Vmov(Condition cond, SRegister rn, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007656 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7657 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007658 VIXL_ASSERT(allow_macro_instructions_);
7659 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007660 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007661 ITScope it_scope(this, &cond);
7662 vmov(cond, rn, rt);
7663 }
7664 void Vmov(SRegister rn, Register rt) { Vmov(al, rn, rt); }
7665
7666 void Vmov(Condition cond, Register rt, Register rt2, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007667 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7668 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
7669 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007670 VIXL_ASSERT(allow_macro_instructions_);
7671 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007672 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007673 ITScope it_scope(this, &cond);
7674 vmov(cond, rt, rt2, rm);
7675 }
7676 void Vmov(Register rt, Register rt2, DRegister rm) { Vmov(al, rt, rt2, rm); }
7677
7678 void Vmov(Condition cond, DRegister rm, Register rt, Register rt2) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007679 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7680 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7681 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007682 VIXL_ASSERT(allow_macro_instructions_);
7683 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007684 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007685 ITScope it_scope(this, &cond);
7686 vmov(cond, rm, rt, rt2);
7687 }
7688 void Vmov(DRegister rm, Register rt, Register rt2) { Vmov(al, rm, rt, rt2); }
7689
7690 void Vmov(
7691 Condition cond, Register rt, Register rt2, SRegister rm, SRegister rm1) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7693 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
7694 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm1));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007696 VIXL_ASSERT(allow_macro_instructions_);
7697 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007698 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007699 ITScope it_scope(this, &cond);
7700 vmov(cond, rt, rt2, rm, rm1);
7701 }
7702 void Vmov(Register rt, Register rt2, SRegister rm, SRegister rm1) {
7703 Vmov(al, rt, rt2, rm, rm1);
7704 }
7705
7706 void Vmov(
7707 Condition cond, SRegister rm, SRegister rm1, Register rt, Register rt2) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007708 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7709 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm1));
7710 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7711 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007712 VIXL_ASSERT(allow_macro_instructions_);
7713 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007714 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007715 ITScope it_scope(this, &cond);
7716 vmov(cond, rm, rm1, rt, rt2);
7717 }
7718 void Vmov(SRegister rm, SRegister rm1, Register rt, Register rt2) {
7719 Vmov(al, rm, rm1, rt, rt2);
7720 }
7721
7722 void Vmov(Condition cond, DataType dt, DRegisterLane rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007723 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7724 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007725 VIXL_ASSERT(allow_macro_instructions_);
7726 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007727 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007728 ITScope it_scope(this, &cond);
7729 vmov(cond, dt, rd, rt);
7730 }
7731 void Vmov(DataType dt, DRegisterLane rd, Register rt) {
7732 Vmov(al, dt, rd, rt);
7733 }
7734 void Vmov(Condition cond, DRegisterLane rd, Register rt) {
7735 Vmov(cond, kDataTypeValueNone, rd, rt);
7736 }
7737 void Vmov(DRegisterLane rd, Register rt) {
7738 Vmov(al, kDataTypeValueNone, rd, rt);
7739 }
7740
7741 void Vmov(Condition cond,
7742 DataType dt,
7743 DRegister rd,
7744 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007745 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7746 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007747 VIXL_ASSERT(allow_macro_instructions_);
7748 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007749 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007750 ITScope it_scope(this, &cond);
7751 vmov(cond, dt, rd, operand);
7752 }
7753 void Vmov(DataType dt, DRegister rd, const DOperand& operand) {
7754 Vmov(al, dt, rd, operand);
7755 }
7756
7757 void Vmov(Condition cond,
7758 DataType dt,
7759 QRegister rd,
7760 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007761 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7762 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007763 VIXL_ASSERT(allow_macro_instructions_);
7764 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007765 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007766 ITScope it_scope(this, &cond);
7767 vmov(cond, dt, rd, operand);
7768 }
7769 void Vmov(DataType dt, QRegister rd, const QOperand& operand) {
7770 Vmov(al, dt, rd, operand);
7771 }
7772
7773 void Vmov(Condition cond,
7774 DataType dt,
7775 SRegister rd,
7776 const SOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007777 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7778 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007779 VIXL_ASSERT(allow_macro_instructions_);
7780 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007781 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007782 ITScope it_scope(this, &cond);
7783 vmov(cond, dt, rd, operand);
7784 }
7785 void Vmov(DataType dt, SRegister rd, const SOperand& operand) {
7786 Vmov(al, dt, rd, operand);
7787 }
7788
7789 void Vmov(Condition cond, DataType dt, Register rt, DRegisterLane rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007790 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7791 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007792 VIXL_ASSERT(allow_macro_instructions_);
7793 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007794 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007795 ITScope it_scope(this, &cond);
7796 vmov(cond, dt, rt, rn);
7797 }
7798 void Vmov(DataType dt, Register rt, DRegisterLane rn) {
7799 Vmov(al, dt, rt, rn);
7800 }
7801 void Vmov(Condition cond, Register rt, DRegisterLane rn) {
7802 Vmov(cond, kDataTypeValueNone, rt, rn);
7803 }
7804 void Vmov(Register rt, DRegisterLane rn) {
7805 Vmov(al, kDataTypeValueNone, rt, rn);
7806 }
7807
7808 void Vmovl(Condition cond, DataType dt, QRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007809 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7810 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007811 VIXL_ASSERT(allow_macro_instructions_);
7812 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007813 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007814 ITScope it_scope(this, &cond);
7815 vmovl(cond, dt, rd, rm);
7816 }
7817 void Vmovl(DataType dt, QRegister rd, DRegister rm) { Vmovl(al, dt, rd, rm); }
7818
7819 void Vmovn(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007820 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7821 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007822 VIXL_ASSERT(allow_macro_instructions_);
7823 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007824 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007825 ITScope it_scope(this, &cond);
7826 vmovn(cond, dt, rd, rm);
7827 }
7828 void Vmovn(DataType dt, DRegister rd, QRegister rm) { Vmovn(al, dt, rd, rm); }
7829
7830 void Vmrs(Condition cond,
7831 RegisterOrAPSR_nzcv rt,
7832 SpecialFPRegister spec_reg) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007833 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007834 VIXL_ASSERT(allow_macro_instructions_);
7835 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007836 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007837 ITScope it_scope(this, &cond);
7838 vmrs(cond, rt, spec_reg);
7839 }
7840 void Vmrs(RegisterOrAPSR_nzcv rt, SpecialFPRegister spec_reg) {
7841 Vmrs(al, rt, spec_reg);
7842 }
7843
7844 void Vmsr(Condition cond, SpecialFPRegister spec_reg, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007845 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007846 VIXL_ASSERT(allow_macro_instructions_);
7847 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007848 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007849 ITScope it_scope(this, &cond);
7850 vmsr(cond, spec_reg, rt);
7851 }
7852 void Vmsr(SpecialFPRegister spec_reg, Register rt) { Vmsr(al, spec_reg, rt); }
7853
7854 void Vmul(Condition cond,
7855 DataType dt,
7856 DRegister rd,
7857 DRegister rn,
7858 DRegister dm,
7859 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007860 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7861 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7862 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007863 VIXL_ASSERT(allow_macro_instructions_);
7864 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007865 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007866 ITScope it_scope(this, &cond);
7867 vmul(cond, dt, rd, rn, dm, index);
7868 }
7869 void Vmul(
7870 DataType dt, DRegister rd, DRegister rn, DRegister dm, unsigned index) {
7871 Vmul(al, dt, rd, rn, dm, index);
7872 }
7873
7874 void Vmul(Condition cond,
7875 DataType dt,
7876 QRegister rd,
7877 QRegister rn,
7878 DRegister dm,
7879 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007880 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7881 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7882 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007883 VIXL_ASSERT(allow_macro_instructions_);
7884 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007885 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007886 ITScope it_scope(this, &cond);
7887 vmul(cond, dt, rd, rn, dm, index);
7888 }
7889 void Vmul(
7890 DataType dt, QRegister rd, QRegister rn, DRegister dm, unsigned index) {
7891 Vmul(al, dt, rd, rn, dm, index);
7892 }
7893
7894 void Vmul(
7895 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007896 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7897 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7898 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007899 VIXL_ASSERT(allow_macro_instructions_);
7900 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007901 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007902 ITScope it_scope(this, &cond);
7903 vmul(cond, dt, rd, rn, rm);
7904 }
7905 void Vmul(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7906 Vmul(al, dt, rd, rn, rm);
7907 }
7908
7909 void Vmul(
7910 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007911 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7912 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7913 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007914 VIXL_ASSERT(allow_macro_instructions_);
7915 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007916 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007917 ITScope it_scope(this, &cond);
7918 vmul(cond, dt, rd, rn, rm);
7919 }
7920 void Vmul(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7921 Vmul(al, dt, rd, rn, rm);
7922 }
7923
7924 void Vmul(
7925 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007926 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7927 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7928 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
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, rm);
7934 }
7935 void Vmul(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7936 Vmul(al, dt, rd, rn, rm);
7937 }
7938
7939 void Vmull(Condition cond,
7940 DataType dt,
7941 QRegister rd,
7942 DRegister rn,
7943 DRegister dm,
7944 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007945 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7946 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7947 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007948 VIXL_ASSERT(allow_macro_instructions_);
7949 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007950 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007951 ITScope it_scope(this, &cond);
7952 vmull(cond, dt, rd, rn, dm, index);
7953 }
7954 void Vmull(
7955 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
7956 Vmull(al, dt, rd, rn, dm, index);
7957 }
7958
7959 void Vmull(
7960 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007961 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7962 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7963 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007964 VIXL_ASSERT(allow_macro_instructions_);
7965 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007966 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007967 ITScope it_scope(this, &cond);
7968 vmull(cond, dt, rd, rn, rm);
7969 }
7970 void Vmull(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7971 Vmull(al, dt, rd, rn, rm);
7972 }
7973
7974 void Vmvn(Condition cond,
7975 DataType dt,
7976 DRegister rd,
7977 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007978 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7979 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007980 VIXL_ASSERT(allow_macro_instructions_);
7981 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007982 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007983 ITScope it_scope(this, &cond);
7984 vmvn(cond, dt, rd, operand);
7985 }
7986 void Vmvn(DataType dt, DRegister rd, const DOperand& operand) {
7987 Vmvn(al, dt, rd, operand);
7988 }
7989
7990 void Vmvn(Condition cond,
7991 DataType dt,
7992 QRegister rd,
7993 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007994 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7995 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007996 VIXL_ASSERT(allow_macro_instructions_);
7997 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007998 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007999 ITScope it_scope(this, &cond);
8000 vmvn(cond, dt, rd, operand);
8001 }
8002 void Vmvn(DataType dt, QRegister rd, const QOperand& operand) {
8003 Vmvn(al, dt, rd, operand);
8004 }
8005
8006 void Vneg(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008007 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8008 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008009 VIXL_ASSERT(allow_macro_instructions_);
8010 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008011 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008012 ITScope it_scope(this, &cond);
8013 vneg(cond, dt, rd, rm);
8014 }
8015 void Vneg(DataType dt, DRegister rd, DRegister rm) { Vneg(al, dt, rd, rm); }
8016
8017 void Vneg(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008018 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8019 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008020 VIXL_ASSERT(allow_macro_instructions_);
8021 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008022 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008023 ITScope it_scope(this, &cond);
8024 vneg(cond, dt, rd, rm);
8025 }
8026 void Vneg(DataType dt, QRegister rd, QRegister rm) { Vneg(al, dt, rd, rm); }
8027
8028 void Vneg(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008029 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8030 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008031 VIXL_ASSERT(allow_macro_instructions_);
8032 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008033 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008034 ITScope it_scope(this, &cond);
8035 vneg(cond, dt, rd, rm);
8036 }
8037 void Vneg(DataType dt, SRegister rd, SRegister rm) { Vneg(al, dt, rd, rm); }
8038
8039 void Vnmla(
8040 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008041 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8042 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8043 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008044 VIXL_ASSERT(allow_macro_instructions_);
8045 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008046 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008047 ITScope it_scope(this, &cond);
8048 vnmla(cond, dt, rd, rn, rm);
8049 }
8050 void Vnmla(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8051 Vnmla(al, dt, rd, rn, rm);
8052 }
8053
8054 void Vnmla(
8055 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008056 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8057 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8058 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008059 VIXL_ASSERT(allow_macro_instructions_);
8060 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008061 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008062 ITScope it_scope(this, &cond);
8063 vnmla(cond, dt, rd, rn, rm);
8064 }
8065 void Vnmla(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8066 Vnmla(al, dt, rd, rn, rm);
8067 }
8068
8069 void Vnmls(
8070 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008071 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8072 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8073 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008074 VIXL_ASSERT(allow_macro_instructions_);
8075 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008076 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008077 ITScope it_scope(this, &cond);
8078 vnmls(cond, dt, rd, rn, rm);
8079 }
8080 void Vnmls(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8081 Vnmls(al, dt, rd, rn, rm);
8082 }
8083
8084 void Vnmls(
8085 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008086 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8087 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8088 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008089 VIXL_ASSERT(allow_macro_instructions_);
8090 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008091 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008092 ITScope it_scope(this, &cond);
8093 vnmls(cond, dt, rd, rn, rm);
8094 }
8095 void Vnmls(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8096 Vnmls(al, dt, rd, rn, rm);
8097 }
8098
8099 void Vnmul(
8100 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008101 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8102 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8103 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008104 VIXL_ASSERT(allow_macro_instructions_);
8105 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008106 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008107 ITScope it_scope(this, &cond);
8108 vnmul(cond, dt, rd, rn, rm);
8109 }
8110 void Vnmul(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8111 Vnmul(al, dt, rd, rn, rm);
8112 }
8113
8114 void Vnmul(
8115 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008116 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8117 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8118 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008119 VIXL_ASSERT(allow_macro_instructions_);
8120 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008121 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008122 ITScope it_scope(this, &cond);
8123 vnmul(cond, dt, rd, rn, rm);
8124 }
8125 void Vnmul(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8126 Vnmul(al, dt, rd, rn, rm);
8127 }
8128
8129 void Vorn(Condition cond,
8130 DataType dt,
8131 DRegister rd,
8132 DRegister rn,
8133 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008134 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8135 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8136 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008137 VIXL_ASSERT(allow_macro_instructions_);
8138 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008139 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008140 ITScope it_scope(this, &cond);
8141 vorn(cond, dt, rd, rn, operand);
8142 }
8143 void Vorn(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
8144 Vorn(al, dt, rd, rn, operand);
8145 }
8146
8147 void Vorn(Condition cond,
8148 DataType dt,
8149 QRegister rd,
8150 QRegister rn,
8151 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008152 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8153 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8154 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008155 VIXL_ASSERT(allow_macro_instructions_);
8156 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008157 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008158 ITScope it_scope(this, &cond);
8159 vorn(cond, dt, rd, rn, operand);
8160 }
8161 void Vorn(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
8162 Vorn(al, dt, rd, rn, operand);
8163 }
8164
8165 void Vorr(Condition cond,
8166 DataType dt,
8167 DRegister rd,
8168 DRegister rn,
8169 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008170 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8171 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8172 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008173 VIXL_ASSERT(allow_macro_instructions_);
8174 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008175 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008176 ITScope it_scope(this, &cond);
8177 vorr(cond, dt, rd, rn, operand);
8178 }
8179 void Vorr(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
8180 Vorr(al, dt, rd, rn, operand);
8181 }
8182 void Vorr(Condition cond,
8183 DRegister rd,
8184 DRegister rn,
8185 const DOperand& operand) {
8186 Vorr(cond, kDataTypeValueNone, rd, rn, operand);
8187 }
8188 void Vorr(DRegister rd, DRegister rn, const DOperand& operand) {
8189 Vorr(al, kDataTypeValueNone, rd, rn, operand);
8190 }
8191
8192 void Vorr(Condition cond,
8193 DataType dt,
8194 QRegister rd,
8195 QRegister rn,
8196 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008197 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8198 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8199 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008200 VIXL_ASSERT(allow_macro_instructions_);
8201 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008202 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008203 ITScope it_scope(this, &cond);
8204 vorr(cond, dt, rd, rn, operand);
8205 }
8206 void Vorr(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
8207 Vorr(al, dt, rd, rn, operand);
8208 }
8209 void Vorr(Condition cond,
8210 QRegister rd,
8211 QRegister rn,
8212 const QOperand& operand) {
8213 Vorr(cond, kDataTypeValueNone, rd, rn, operand);
8214 }
8215 void Vorr(QRegister rd, QRegister rn, const QOperand& operand) {
8216 Vorr(al, kDataTypeValueNone, rd, rn, operand);
8217 }
8218
8219 void Vpadal(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008220 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8221 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008222 VIXL_ASSERT(allow_macro_instructions_);
8223 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008224 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008225 ITScope it_scope(this, &cond);
8226 vpadal(cond, dt, rd, rm);
8227 }
8228 void Vpadal(DataType dt, DRegister rd, DRegister rm) {
8229 Vpadal(al, dt, rd, rm);
8230 }
8231
8232 void Vpadal(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008233 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8234 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008235 VIXL_ASSERT(allow_macro_instructions_);
8236 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008237 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008238 ITScope it_scope(this, &cond);
8239 vpadal(cond, dt, rd, rm);
8240 }
8241 void Vpadal(DataType dt, QRegister rd, QRegister rm) {
8242 Vpadal(al, dt, rd, rm);
8243 }
8244
8245 void Vpadd(
8246 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008247 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8248 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8249 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008250 VIXL_ASSERT(allow_macro_instructions_);
8251 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008252 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008253 ITScope it_scope(this, &cond);
8254 vpadd(cond, dt, rd, rn, rm);
8255 }
8256 void Vpadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8257 Vpadd(al, dt, rd, rn, rm);
8258 }
8259
8260 void Vpaddl(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008261 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8262 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008263 VIXL_ASSERT(allow_macro_instructions_);
8264 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008265 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008266 ITScope it_scope(this, &cond);
8267 vpaddl(cond, dt, rd, rm);
8268 }
8269 void Vpaddl(DataType dt, DRegister rd, DRegister rm) {
8270 Vpaddl(al, dt, rd, rm);
8271 }
8272
8273 void Vpaddl(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008274 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8275 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008276 VIXL_ASSERT(allow_macro_instructions_);
8277 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008278 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008279 ITScope it_scope(this, &cond);
8280 vpaddl(cond, dt, rd, rm);
8281 }
8282 void Vpaddl(DataType dt, QRegister rd, QRegister rm) {
8283 Vpaddl(al, dt, rd, rm);
8284 }
8285
8286 void Vpmax(
8287 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008288 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8289 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8290 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008291 VIXL_ASSERT(allow_macro_instructions_);
8292 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008293 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008294 ITScope it_scope(this, &cond);
8295 vpmax(cond, dt, rd, rn, rm);
8296 }
8297 void Vpmax(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8298 Vpmax(al, dt, rd, rn, rm);
8299 }
8300
8301 void Vpmin(
8302 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008303 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8304 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8305 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008306 VIXL_ASSERT(allow_macro_instructions_);
8307 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008308 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008309 ITScope it_scope(this, &cond);
8310 vpmin(cond, dt, rd, rn, rm);
8311 }
8312 void Vpmin(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8313 Vpmin(al, dt, rd, rn, rm);
8314 }
8315
8316 void Vpop(Condition cond, DataType dt, DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008317 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008318 VIXL_ASSERT(allow_macro_instructions_);
8319 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008320 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008321 ITScope it_scope(this, &cond);
8322 vpop(cond, dt, dreglist);
8323 }
8324 void Vpop(DataType dt, DRegisterList dreglist) { Vpop(al, dt, dreglist); }
8325 void Vpop(Condition cond, DRegisterList dreglist) {
8326 Vpop(cond, kDataTypeValueNone, dreglist);
8327 }
8328 void Vpop(DRegisterList dreglist) { Vpop(al, kDataTypeValueNone, dreglist); }
8329
8330 void Vpop(Condition cond, DataType dt, SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008331 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008332 VIXL_ASSERT(allow_macro_instructions_);
8333 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008334 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008335 ITScope it_scope(this, &cond);
8336 vpop(cond, dt, sreglist);
8337 }
8338 void Vpop(DataType dt, SRegisterList sreglist) { Vpop(al, dt, sreglist); }
8339 void Vpop(Condition cond, SRegisterList sreglist) {
8340 Vpop(cond, kDataTypeValueNone, sreglist);
8341 }
8342 void Vpop(SRegisterList sreglist) { Vpop(al, kDataTypeValueNone, sreglist); }
8343
8344 void Vpush(Condition cond, DataType dt, DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008345 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008346 VIXL_ASSERT(allow_macro_instructions_);
8347 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008348 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008349 ITScope it_scope(this, &cond);
8350 vpush(cond, dt, dreglist);
8351 }
8352 void Vpush(DataType dt, DRegisterList dreglist) { Vpush(al, dt, dreglist); }
8353 void Vpush(Condition cond, DRegisterList dreglist) {
8354 Vpush(cond, kDataTypeValueNone, dreglist);
8355 }
8356 void Vpush(DRegisterList dreglist) {
8357 Vpush(al, kDataTypeValueNone, dreglist);
8358 }
8359
8360 void Vpush(Condition cond, DataType dt, SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008361 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008362 VIXL_ASSERT(allow_macro_instructions_);
8363 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008364 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008365 ITScope it_scope(this, &cond);
8366 vpush(cond, dt, sreglist);
8367 }
8368 void Vpush(DataType dt, SRegisterList sreglist) { Vpush(al, dt, sreglist); }
8369 void Vpush(Condition cond, SRegisterList sreglist) {
8370 Vpush(cond, kDataTypeValueNone, sreglist);
8371 }
8372 void Vpush(SRegisterList sreglist) {
8373 Vpush(al, kDataTypeValueNone, sreglist);
8374 }
8375
8376 void Vqabs(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008377 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8378 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008379 VIXL_ASSERT(allow_macro_instructions_);
8380 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008381 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008382 ITScope it_scope(this, &cond);
8383 vqabs(cond, dt, rd, rm);
8384 }
8385 void Vqabs(DataType dt, DRegister rd, DRegister rm) { Vqabs(al, dt, rd, rm); }
8386
8387 void Vqabs(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008388 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8389 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008390 VIXL_ASSERT(allow_macro_instructions_);
8391 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008392 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008393 ITScope it_scope(this, &cond);
8394 vqabs(cond, dt, rd, rm);
8395 }
8396 void Vqabs(DataType dt, QRegister rd, QRegister rm) { Vqabs(al, dt, rd, rm); }
8397
8398 void Vqadd(
8399 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008400 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8401 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8402 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008403 VIXL_ASSERT(allow_macro_instructions_);
8404 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008405 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008406 ITScope it_scope(this, &cond);
8407 vqadd(cond, dt, rd, rn, rm);
8408 }
8409 void Vqadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8410 Vqadd(al, dt, rd, rn, rm);
8411 }
8412
8413 void Vqadd(
8414 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008415 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8416 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8417 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008418 VIXL_ASSERT(allow_macro_instructions_);
8419 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008420 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008421 ITScope it_scope(this, &cond);
8422 vqadd(cond, dt, rd, rn, rm);
8423 }
8424 void Vqadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8425 Vqadd(al, dt, rd, rn, rm);
8426 }
8427
8428 void Vqdmlal(
8429 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008430 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8431 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8432 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008433 VIXL_ASSERT(allow_macro_instructions_);
8434 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008435 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008436 ITScope it_scope(this, &cond);
8437 vqdmlal(cond, dt, rd, rn, rm);
8438 }
8439 void Vqdmlal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8440 Vqdmlal(al, dt, rd, rn, rm);
8441 }
8442
8443 void Vqdmlal(Condition cond,
8444 DataType dt,
8445 QRegister rd,
8446 DRegister rn,
8447 DRegister dm,
8448 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008449 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8450 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8451 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008452 VIXL_ASSERT(allow_macro_instructions_);
8453 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008454 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008455 ITScope it_scope(this, &cond);
8456 vqdmlal(cond, dt, rd, rn, dm, index);
8457 }
8458 void Vqdmlal(
8459 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
8460 Vqdmlal(al, dt, rd, rn, dm, index);
8461 }
8462
8463 void Vqdmlsl(
8464 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008465 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8466 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8467 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008468 VIXL_ASSERT(allow_macro_instructions_);
8469 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008470 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008471 ITScope it_scope(this, &cond);
8472 vqdmlsl(cond, dt, rd, rn, rm);
8473 }
8474 void Vqdmlsl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8475 Vqdmlsl(al, dt, rd, rn, rm);
8476 }
8477
8478 void Vqdmlsl(Condition cond,
8479 DataType dt,
8480 QRegister rd,
8481 DRegister rn,
8482 DRegister dm,
8483 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8485 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8486 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008487 VIXL_ASSERT(allow_macro_instructions_);
8488 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008489 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008490 ITScope it_scope(this, &cond);
8491 vqdmlsl(cond, dt, rd, rn, dm, index);
8492 }
8493 void Vqdmlsl(
8494 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
8495 Vqdmlsl(al, dt, rd, rn, dm, index);
8496 }
8497
8498 void Vqdmulh(
8499 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008500 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8501 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8502 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008503 VIXL_ASSERT(allow_macro_instructions_);
8504 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008505 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008506 ITScope it_scope(this, &cond);
8507 vqdmulh(cond, dt, rd, rn, rm);
8508 }
8509 void Vqdmulh(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8510 Vqdmulh(al, dt, rd, rn, rm);
8511 }
8512
8513 void Vqdmulh(
8514 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008515 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8516 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8517 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008518 VIXL_ASSERT(allow_macro_instructions_);
8519 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008520 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008521 ITScope it_scope(this, &cond);
8522 vqdmulh(cond, dt, rd, rn, rm);
8523 }
8524 void Vqdmulh(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8525 Vqdmulh(al, dt, rd, rn, rm);
8526 }
8527
8528 void Vqdmulh(Condition cond,
8529 DataType dt,
8530 DRegister rd,
8531 DRegister rn,
8532 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008533 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8534 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8535 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008536 VIXL_ASSERT(allow_macro_instructions_);
8537 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008538 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008539 ITScope it_scope(this, &cond);
8540 vqdmulh(cond, dt, rd, rn, rm);
8541 }
8542 void Vqdmulh(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
8543 Vqdmulh(al, dt, rd, rn, rm);
8544 }
8545
8546 void Vqdmulh(Condition cond,
8547 DataType dt,
8548 QRegister rd,
8549 QRegister rn,
8550 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008551 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8552 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8553 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008554 VIXL_ASSERT(allow_macro_instructions_);
8555 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008556 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008557 ITScope it_scope(this, &cond);
8558 vqdmulh(cond, dt, rd, rn, rm);
8559 }
8560 void Vqdmulh(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
8561 Vqdmulh(al, dt, rd, rn, rm);
8562 }
8563
8564 void Vqdmull(
8565 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008566 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8567 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8568 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008569 VIXL_ASSERT(allow_macro_instructions_);
8570 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008571 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008572 ITScope it_scope(this, &cond);
8573 vqdmull(cond, dt, rd, rn, rm);
8574 }
8575 void Vqdmull(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8576 Vqdmull(al, dt, rd, rn, rm);
8577 }
8578
8579 void Vqdmull(Condition cond,
8580 DataType dt,
8581 QRegister rd,
8582 DRegister rn,
8583 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008584 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8585 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8586 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008587 VIXL_ASSERT(allow_macro_instructions_);
8588 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008589 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008590 ITScope it_scope(this, &cond);
8591 vqdmull(cond, dt, rd, rn, rm);
8592 }
8593 void Vqdmull(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
8594 Vqdmull(al, dt, rd, rn, rm);
8595 }
8596
8597 void Vqmovn(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008598 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
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 vqmovn(cond, dt, rd, rm);
8605 }
8606 void Vqmovn(DataType dt, DRegister rd, QRegister rm) {
8607 Vqmovn(al, dt, rd, rm);
8608 }
8609
8610 void Vqmovun(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008611 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8612 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008613 VIXL_ASSERT(allow_macro_instructions_);
8614 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008615 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008616 ITScope it_scope(this, &cond);
8617 vqmovun(cond, dt, rd, rm);
8618 }
8619 void Vqmovun(DataType dt, DRegister rd, QRegister rm) {
8620 Vqmovun(al, dt, rd, rm);
8621 }
8622
8623 void Vqneg(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008624 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8625 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008626 VIXL_ASSERT(allow_macro_instructions_);
8627 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008628 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008629 ITScope it_scope(this, &cond);
8630 vqneg(cond, dt, rd, rm);
8631 }
8632 void Vqneg(DataType dt, DRegister rd, DRegister rm) { Vqneg(al, dt, rd, rm); }
8633
8634 void Vqneg(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008635 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8636 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008637 VIXL_ASSERT(allow_macro_instructions_);
8638 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008639 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008640 ITScope it_scope(this, &cond);
8641 vqneg(cond, dt, rd, rm);
8642 }
8643 void Vqneg(DataType dt, QRegister rd, QRegister rm) { Vqneg(al, dt, rd, rm); }
8644
8645 void Vqrdmulh(
8646 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008647 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8648 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8649 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008650 VIXL_ASSERT(allow_macro_instructions_);
8651 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008652 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008653 ITScope it_scope(this, &cond);
8654 vqrdmulh(cond, dt, rd, rn, rm);
8655 }
8656 void Vqrdmulh(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8657 Vqrdmulh(al, dt, rd, rn, rm);
8658 }
8659
8660 void Vqrdmulh(
8661 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008662 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8663 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8664 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008665 VIXL_ASSERT(allow_macro_instructions_);
8666 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008667 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008668 ITScope it_scope(this, &cond);
8669 vqrdmulh(cond, dt, rd, rn, rm);
8670 }
8671 void Vqrdmulh(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8672 Vqrdmulh(al, dt, rd, rn, rm);
8673 }
8674
8675 void Vqrdmulh(Condition cond,
8676 DataType dt,
8677 DRegister rd,
8678 DRegister rn,
8679 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008680 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8681 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
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 vqrdmulh(cond, dt, rd, rn, rm);
8688 }
8689 void Vqrdmulh(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
8690 Vqrdmulh(al, dt, rd, rn, rm);
8691 }
8692
8693 void Vqrdmulh(Condition cond,
8694 DataType dt,
8695 QRegister rd,
8696 QRegister rn,
8697 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008698 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8699 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8700 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008701 VIXL_ASSERT(allow_macro_instructions_);
8702 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008703 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008704 ITScope it_scope(this, &cond);
8705 vqrdmulh(cond, dt, rd, rn, rm);
8706 }
8707 void Vqrdmulh(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
8708 Vqrdmulh(al, dt, rd, rn, rm);
8709 }
8710
8711 void Vqrshl(
8712 Condition cond, DataType dt, DRegister rd, DRegister rm, DRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008713 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8714 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8715 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008716 VIXL_ASSERT(allow_macro_instructions_);
8717 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008718 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008719 ITScope it_scope(this, &cond);
8720 vqrshl(cond, dt, rd, rm, rn);
8721 }
8722 void Vqrshl(DataType dt, DRegister rd, DRegister rm, DRegister rn) {
8723 Vqrshl(al, dt, rd, rm, rn);
8724 }
8725
8726 void Vqrshl(
8727 Condition cond, DataType dt, QRegister rd, QRegister rm, QRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008728 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8729 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8730 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008731 VIXL_ASSERT(allow_macro_instructions_);
8732 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008733 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008734 ITScope it_scope(this, &cond);
8735 vqrshl(cond, dt, rd, rm, rn);
8736 }
8737 void Vqrshl(DataType dt, QRegister rd, QRegister rm, QRegister rn) {
8738 Vqrshl(al, dt, rd, rm, rn);
8739 }
8740
8741 void Vqrshrn(Condition cond,
8742 DataType dt,
8743 DRegister rd,
8744 QRegister rm,
8745 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008746 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8747 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8748 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008749 VIXL_ASSERT(allow_macro_instructions_);
8750 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008751 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008752 ITScope it_scope(this, &cond);
8753 vqrshrn(cond, dt, rd, rm, operand);
8754 }
8755 void Vqrshrn(DataType dt,
8756 DRegister rd,
8757 QRegister rm,
8758 const QOperand& operand) {
8759 Vqrshrn(al, dt, rd, rm, operand);
8760 }
8761
8762 void Vqrshrun(Condition cond,
8763 DataType dt,
8764 DRegister rd,
8765 QRegister rm,
8766 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008767 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8768 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8769 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008770 VIXL_ASSERT(allow_macro_instructions_);
8771 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008772 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008773 ITScope it_scope(this, &cond);
8774 vqrshrun(cond, dt, rd, rm, operand);
8775 }
8776 void Vqrshrun(DataType dt,
8777 DRegister rd,
8778 QRegister rm,
8779 const QOperand& operand) {
8780 Vqrshrun(al, dt, rd, rm, operand);
8781 }
8782
8783 void Vqshl(Condition cond,
8784 DataType dt,
8785 DRegister rd,
8786 DRegister rm,
8787 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008788 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8789 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8790 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008791 VIXL_ASSERT(allow_macro_instructions_);
8792 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008793 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008794 ITScope it_scope(this, &cond);
8795 vqshl(cond, dt, rd, rm, operand);
8796 }
8797 void Vqshl(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
8798 Vqshl(al, dt, rd, rm, operand);
8799 }
8800
8801 void Vqshl(Condition cond,
8802 DataType dt,
8803 QRegister rd,
8804 QRegister rm,
8805 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008806 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8807 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8808 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008809 VIXL_ASSERT(allow_macro_instructions_);
8810 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008811 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008812 ITScope it_scope(this, &cond);
8813 vqshl(cond, dt, rd, rm, operand);
8814 }
8815 void Vqshl(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
8816 Vqshl(al, dt, rd, rm, operand);
8817 }
8818
8819 void Vqshlu(Condition cond,
8820 DataType dt,
8821 DRegister rd,
8822 DRegister rm,
8823 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008824 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8825 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8826 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008827 VIXL_ASSERT(allow_macro_instructions_);
8828 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008829 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008830 ITScope it_scope(this, &cond);
8831 vqshlu(cond, dt, rd, rm, operand);
8832 }
8833 void Vqshlu(DataType dt,
8834 DRegister rd,
8835 DRegister rm,
8836 const DOperand& operand) {
8837 Vqshlu(al, dt, rd, rm, operand);
8838 }
8839
8840 void Vqshlu(Condition cond,
8841 DataType dt,
8842 QRegister rd,
8843 QRegister rm,
8844 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008845 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8846 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8847 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008848 VIXL_ASSERT(allow_macro_instructions_);
8849 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008850 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008851 ITScope it_scope(this, &cond);
8852 vqshlu(cond, dt, rd, rm, operand);
8853 }
8854 void Vqshlu(DataType dt,
8855 QRegister rd,
8856 QRegister rm,
8857 const QOperand& operand) {
8858 Vqshlu(al, dt, rd, rm, operand);
8859 }
8860
8861 void Vqshrn(Condition cond,
8862 DataType dt,
8863 DRegister rd,
8864 QRegister rm,
8865 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008866 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8867 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8868 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008869 VIXL_ASSERT(allow_macro_instructions_);
8870 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008871 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008872 ITScope it_scope(this, &cond);
8873 vqshrn(cond, dt, rd, rm, operand);
8874 }
8875 void Vqshrn(DataType dt,
8876 DRegister rd,
8877 QRegister rm,
8878 const QOperand& operand) {
8879 Vqshrn(al, dt, rd, rm, operand);
8880 }
8881
8882 void Vqshrun(Condition cond,
8883 DataType dt,
8884 DRegister rd,
8885 QRegister rm,
8886 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008887 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8888 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8889 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008890 VIXL_ASSERT(allow_macro_instructions_);
8891 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008892 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008893 ITScope it_scope(this, &cond);
8894 vqshrun(cond, dt, rd, rm, operand);
8895 }
8896 void Vqshrun(DataType dt,
8897 DRegister rd,
8898 QRegister rm,
8899 const QOperand& operand) {
8900 Vqshrun(al, dt, rd, rm, operand);
8901 }
8902
8903 void Vqsub(
8904 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008905 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8906 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8907 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008908 VIXL_ASSERT(allow_macro_instructions_);
8909 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008910 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008911 ITScope it_scope(this, &cond);
8912 vqsub(cond, dt, rd, rn, rm);
8913 }
8914 void Vqsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8915 Vqsub(al, dt, rd, rn, rm);
8916 }
8917
8918 void Vqsub(
8919 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008920 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8921 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8922 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008923 VIXL_ASSERT(allow_macro_instructions_);
8924 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008925 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008926 ITScope it_scope(this, &cond);
8927 vqsub(cond, dt, rd, rn, rm);
8928 }
8929 void Vqsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8930 Vqsub(al, dt, rd, rn, rm);
8931 }
8932
8933 void Vraddhn(
8934 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008935 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8936 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8937 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008938 VIXL_ASSERT(allow_macro_instructions_);
8939 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008940 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008941 ITScope it_scope(this, &cond);
8942 vraddhn(cond, dt, rd, rn, rm);
8943 }
8944 void Vraddhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
8945 Vraddhn(al, dt, rd, rn, rm);
8946 }
8947
8948 void Vrecpe(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008949 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8950 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008951 VIXL_ASSERT(allow_macro_instructions_);
8952 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008953 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008954 ITScope it_scope(this, &cond);
8955 vrecpe(cond, dt, rd, rm);
8956 }
8957 void Vrecpe(DataType dt, DRegister rd, DRegister rm) {
8958 Vrecpe(al, dt, rd, rm);
8959 }
8960
8961 void Vrecpe(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008962 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8963 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008964 VIXL_ASSERT(allow_macro_instructions_);
8965 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008966 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008967 ITScope it_scope(this, &cond);
8968 vrecpe(cond, dt, rd, rm);
8969 }
8970 void Vrecpe(DataType dt, QRegister rd, QRegister rm) {
8971 Vrecpe(al, dt, rd, rm);
8972 }
8973
8974 void Vrecps(
8975 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008976 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8977 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8978 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008979 VIXL_ASSERT(allow_macro_instructions_);
8980 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008981 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008982 ITScope it_scope(this, &cond);
8983 vrecps(cond, dt, rd, rn, rm);
8984 }
8985 void Vrecps(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8986 Vrecps(al, dt, rd, rn, rm);
8987 }
8988
8989 void Vrecps(
8990 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008991 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8992 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8993 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008994 VIXL_ASSERT(allow_macro_instructions_);
8995 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008996 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008997 ITScope it_scope(this, &cond);
8998 vrecps(cond, dt, rd, rn, rm);
8999 }
9000 void Vrecps(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9001 Vrecps(al, dt, rd, rn, rm);
9002 }
9003
9004 void Vrev16(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009005 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9006 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009007 VIXL_ASSERT(allow_macro_instructions_);
9008 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009009 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009010 ITScope it_scope(this, &cond);
9011 vrev16(cond, dt, rd, rm);
9012 }
9013 void Vrev16(DataType dt, DRegister rd, DRegister rm) {
9014 Vrev16(al, dt, rd, rm);
9015 }
9016
9017 void Vrev16(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009018 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9019 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009020 VIXL_ASSERT(allow_macro_instructions_);
9021 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009022 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009023 ITScope it_scope(this, &cond);
9024 vrev16(cond, dt, rd, rm);
9025 }
9026 void Vrev16(DataType dt, QRegister rd, QRegister rm) {
9027 Vrev16(al, dt, rd, rm);
9028 }
9029
9030 void Vrev32(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009031 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9032 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009033 VIXL_ASSERT(allow_macro_instructions_);
9034 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009035 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009036 ITScope it_scope(this, &cond);
9037 vrev32(cond, dt, rd, rm);
9038 }
9039 void Vrev32(DataType dt, DRegister rd, DRegister rm) {
9040 Vrev32(al, dt, rd, rm);
9041 }
9042
9043 void Vrev32(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009044 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9045 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009046 VIXL_ASSERT(allow_macro_instructions_);
9047 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009048 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009049 ITScope it_scope(this, &cond);
9050 vrev32(cond, dt, rd, rm);
9051 }
9052 void Vrev32(DataType dt, QRegister rd, QRegister rm) {
9053 Vrev32(al, dt, rd, rm);
9054 }
9055
9056 void Vrev64(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009057 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9058 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009059 VIXL_ASSERT(allow_macro_instructions_);
9060 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009061 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009062 ITScope it_scope(this, &cond);
9063 vrev64(cond, dt, rd, rm);
9064 }
9065 void Vrev64(DataType dt, DRegister rd, DRegister rm) {
9066 Vrev64(al, dt, rd, rm);
9067 }
9068
9069 void Vrev64(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009070 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9071 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009072 VIXL_ASSERT(allow_macro_instructions_);
9073 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009074 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009075 ITScope it_scope(this, &cond);
9076 vrev64(cond, dt, rd, rm);
9077 }
9078 void Vrev64(DataType dt, QRegister rd, QRegister rm) {
9079 Vrev64(al, dt, rd, rm);
9080 }
9081
9082 void Vrhadd(
9083 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009084 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9085 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9086 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009087 VIXL_ASSERT(allow_macro_instructions_);
9088 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009089 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009090 ITScope it_scope(this, &cond);
9091 vrhadd(cond, dt, rd, rn, rm);
9092 }
9093 void Vrhadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9094 Vrhadd(al, dt, rd, rn, rm);
9095 }
9096
9097 void Vrhadd(
9098 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009099 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9100 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9101 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009102 VIXL_ASSERT(allow_macro_instructions_);
9103 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009104 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009105 ITScope it_scope(this, &cond);
9106 vrhadd(cond, dt, rd, rn, rm);
9107 }
9108 void Vrhadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9109 Vrhadd(al, dt, rd, rn, rm);
9110 }
9111
9112 void Vrinta(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009113 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9114 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009115 VIXL_ASSERT(allow_macro_instructions_);
9116 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009117 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009118 vrinta(dt1, dt2, rd, rm);
9119 }
9120
9121 void Vrinta(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009122 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9123 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009124 VIXL_ASSERT(allow_macro_instructions_);
9125 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009126 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009127 vrinta(dt1, dt2, rd, rm);
9128 }
9129
9130 void Vrinta(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009131 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
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 vrinta(dt1, dt2, rd, rm);
9137 }
9138
9139 void Vrintm(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009140 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9141 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009142 VIXL_ASSERT(allow_macro_instructions_);
9143 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009144 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009145 vrintm(dt1, dt2, rd, rm);
9146 }
9147
9148 void Vrintm(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009149 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9150 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009151 VIXL_ASSERT(allow_macro_instructions_);
9152 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009153 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009154 vrintm(dt1, dt2, rd, rm);
9155 }
9156
9157 void Vrintm(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009158 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9159 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009160 VIXL_ASSERT(allow_macro_instructions_);
9161 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009162 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009163 vrintm(dt1, dt2, rd, rm);
9164 }
9165
9166 void Vrintn(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009167 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9168 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009169 VIXL_ASSERT(allow_macro_instructions_);
9170 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009171 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009172 vrintn(dt1, dt2, rd, rm);
9173 }
9174
9175 void Vrintn(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009176 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9177 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009178 VIXL_ASSERT(allow_macro_instructions_);
9179 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009180 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009181 vrintn(dt1, dt2, rd, rm);
9182 }
9183
9184 void Vrintn(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009185 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9186 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009187 VIXL_ASSERT(allow_macro_instructions_);
9188 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009189 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009190 vrintn(dt1, dt2, rd, rm);
9191 }
9192
9193 void Vrintp(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009194 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9195 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009196 VIXL_ASSERT(allow_macro_instructions_);
9197 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009198 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009199 vrintp(dt1, dt2, rd, rm);
9200 }
9201
9202 void Vrintp(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009203 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9204 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009205 VIXL_ASSERT(allow_macro_instructions_);
9206 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009207 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009208 vrintp(dt1, dt2, rd, rm);
9209 }
9210
9211 void Vrintp(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009212 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9213 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009214 VIXL_ASSERT(allow_macro_instructions_);
9215 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009216 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009217 vrintp(dt1, dt2, rd, rm);
9218 }
9219
9220 void Vrintr(
9221 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister 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 ITScope it_scope(this, &cond);
9228 vrintr(cond, dt1, dt2, rd, rm);
9229 }
9230 void Vrintr(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
9231 Vrintr(al, dt1, dt2, rd, rm);
9232 }
9233
9234 void Vrintr(
9235 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009236 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9237 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009238 VIXL_ASSERT(allow_macro_instructions_);
9239 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009240 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009241 ITScope it_scope(this, &cond);
9242 vrintr(cond, dt1, dt2, rd, rm);
9243 }
9244 void Vrintr(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
9245 Vrintr(al, dt1, dt2, rd, rm);
9246 }
9247
9248 void Vrintx(
9249 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009250 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9251 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009252 VIXL_ASSERT(allow_macro_instructions_);
9253 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009254 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009255 ITScope it_scope(this, &cond);
9256 vrintx(cond, dt1, dt2, rd, rm);
9257 }
9258 void Vrintx(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
9259 Vrintx(al, dt1, dt2, rd, rm);
9260 }
9261
9262 void Vrintx(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009263 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9264 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009265 VIXL_ASSERT(allow_macro_instructions_);
9266 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009267 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009268 vrintx(dt1, dt2, rd, rm);
9269 }
9270
9271 void Vrintx(
9272 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009273 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9274 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009275 VIXL_ASSERT(allow_macro_instructions_);
9276 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009277 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009278 ITScope it_scope(this, &cond);
9279 vrintx(cond, dt1, dt2, rd, rm);
9280 }
9281 void Vrintx(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
9282 Vrintx(al, dt1, dt2, rd, rm);
9283 }
9284
9285 void Vrintz(
9286 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009287 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9288 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009289 VIXL_ASSERT(allow_macro_instructions_);
9290 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009291 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009292 ITScope it_scope(this, &cond);
9293 vrintz(cond, dt1, dt2, rd, rm);
9294 }
9295 void Vrintz(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
9296 Vrintz(al, dt1, dt2, rd, rm);
9297 }
9298
9299 void Vrintz(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009300 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9301 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009302 VIXL_ASSERT(allow_macro_instructions_);
9303 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009304 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009305 vrintz(dt1, dt2, rd, rm);
9306 }
9307
9308 void Vrintz(
9309 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009310 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9311 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009312 VIXL_ASSERT(allow_macro_instructions_);
9313 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009314 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009315 ITScope it_scope(this, &cond);
9316 vrintz(cond, dt1, dt2, rd, rm);
9317 }
9318 void Vrintz(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
9319 Vrintz(al, dt1, dt2, rd, rm);
9320 }
9321
9322 void Vrshl(
9323 Condition cond, DataType dt, DRegister rd, DRegister rm, DRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009324 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9325 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9326 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009327 VIXL_ASSERT(allow_macro_instructions_);
9328 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009329 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009330 ITScope it_scope(this, &cond);
9331 vrshl(cond, dt, rd, rm, rn);
9332 }
9333 void Vrshl(DataType dt, DRegister rd, DRegister rm, DRegister rn) {
9334 Vrshl(al, dt, rd, rm, rn);
9335 }
9336
9337 void Vrshl(
9338 Condition cond, DataType dt, QRegister rd, QRegister rm, QRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009339 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9340 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9341 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009342 VIXL_ASSERT(allow_macro_instructions_);
9343 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009344 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009345 ITScope it_scope(this, &cond);
9346 vrshl(cond, dt, rd, rm, rn);
9347 }
9348 void Vrshl(DataType dt, QRegister rd, QRegister rm, QRegister rn) {
9349 Vrshl(al, dt, rd, rm, rn);
9350 }
9351
9352 void Vrshr(Condition cond,
9353 DataType dt,
9354 DRegister rd,
9355 DRegister rm,
9356 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009357 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9358 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9359 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009360 VIXL_ASSERT(allow_macro_instructions_);
9361 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009362 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009363 ITScope it_scope(this, &cond);
9364 vrshr(cond, dt, rd, rm, operand);
9365 }
9366 void Vrshr(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9367 Vrshr(al, dt, rd, rm, operand);
9368 }
9369
9370 void Vrshr(Condition cond,
9371 DataType dt,
9372 QRegister rd,
9373 QRegister rm,
9374 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009375 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9376 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9377 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009378 VIXL_ASSERT(allow_macro_instructions_);
9379 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009380 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009381 ITScope it_scope(this, &cond);
9382 vrshr(cond, dt, rd, rm, operand);
9383 }
9384 void Vrshr(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9385 Vrshr(al, dt, rd, rm, operand);
9386 }
9387
9388 void Vrshrn(Condition cond,
9389 DataType dt,
9390 DRegister rd,
9391 QRegister rm,
9392 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009393 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9394 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9395 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009396 VIXL_ASSERT(allow_macro_instructions_);
9397 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009398 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009399 ITScope it_scope(this, &cond);
9400 vrshrn(cond, dt, rd, rm, operand);
9401 }
9402 void Vrshrn(DataType dt,
9403 DRegister rd,
9404 QRegister rm,
9405 const QOperand& operand) {
9406 Vrshrn(al, dt, rd, rm, operand);
9407 }
9408
9409 void Vrsqrte(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009410 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9411 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009412 VIXL_ASSERT(allow_macro_instructions_);
9413 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009414 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009415 ITScope it_scope(this, &cond);
9416 vrsqrte(cond, dt, rd, rm);
9417 }
9418 void Vrsqrte(DataType dt, DRegister rd, DRegister rm) {
9419 Vrsqrte(al, dt, rd, rm);
9420 }
9421
9422 void Vrsqrte(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009423 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9424 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009425 VIXL_ASSERT(allow_macro_instructions_);
9426 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009427 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009428 ITScope it_scope(this, &cond);
9429 vrsqrte(cond, dt, rd, rm);
9430 }
9431 void Vrsqrte(DataType dt, QRegister rd, QRegister rm) {
9432 Vrsqrte(al, dt, rd, rm);
9433 }
9434
9435 void Vrsqrts(
9436 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009437 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9438 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9439 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009440 VIXL_ASSERT(allow_macro_instructions_);
9441 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009442 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009443 ITScope it_scope(this, &cond);
9444 vrsqrts(cond, dt, rd, rn, rm);
9445 }
9446 void Vrsqrts(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9447 Vrsqrts(al, dt, rd, rn, rm);
9448 }
9449
9450 void Vrsqrts(
9451 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009452 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9453 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9454 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009455 VIXL_ASSERT(allow_macro_instructions_);
9456 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009457 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009458 ITScope it_scope(this, &cond);
9459 vrsqrts(cond, dt, rd, rn, rm);
9460 }
9461 void Vrsqrts(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9462 Vrsqrts(al, dt, rd, rn, rm);
9463 }
9464
9465 void Vrsra(Condition cond,
9466 DataType dt,
9467 DRegister rd,
9468 DRegister rm,
9469 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009470 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9471 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9472 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009473 VIXL_ASSERT(allow_macro_instructions_);
9474 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009475 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009476 ITScope it_scope(this, &cond);
9477 vrsra(cond, dt, rd, rm, operand);
9478 }
9479 void Vrsra(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9480 Vrsra(al, dt, rd, rm, operand);
9481 }
9482
9483 void Vrsra(Condition cond,
9484 DataType dt,
9485 QRegister rd,
9486 QRegister rm,
9487 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009488 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9489 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9490 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009491 VIXL_ASSERT(allow_macro_instructions_);
9492 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009493 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009494 ITScope it_scope(this, &cond);
9495 vrsra(cond, dt, rd, rm, operand);
9496 }
9497 void Vrsra(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9498 Vrsra(al, dt, rd, rm, operand);
9499 }
9500
9501 void Vrsubhn(
9502 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009503 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9504 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9505 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009506 VIXL_ASSERT(allow_macro_instructions_);
9507 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009508 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009509 ITScope it_scope(this, &cond);
9510 vrsubhn(cond, dt, rd, rn, rm);
9511 }
9512 void Vrsubhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
9513 Vrsubhn(al, dt, rd, rn, rm);
9514 }
9515
9516 void Vseleq(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009517 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9518 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9519 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009520 VIXL_ASSERT(allow_macro_instructions_);
9521 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009522 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009523 vseleq(dt, rd, rn, rm);
9524 }
9525
9526 void Vseleq(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009527 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9528 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9529 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009530 VIXL_ASSERT(allow_macro_instructions_);
9531 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009532 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009533 vseleq(dt, rd, rn, rm);
9534 }
9535
9536 void Vselge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009537 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9538 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9539 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009540 VIXL_ASSERT(allow_macro_instructions_);
9541 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009542 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009543 vselge(dt, rd, rn, rm);
9544 }
9545
9546 void Vselge(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009547 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9548 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9549 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009550 VIXL_ASSERT(allow_macro_instructions_);
9551 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009552 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009553 vselge(dt, rd, rn, rm);
9554 }
9555
9556 void Vselgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009557 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9558 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9559 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009560 VIXL_ASSERT(allow_macro_instructions_);
9561 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009562 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009563 vselgt(dt, rd, rn, rm);
9564 }
9565
9566 void Vselgt(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009567 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9568 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9569 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009570 VIXL_ASSERT(allow_macro_instructions_);
9571 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009572 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009573 vselgt(dt, rd, rn, rm);
9574 }
9575
9576 void Vselvs(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009577 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9578 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9579 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009580 VIXL_ASSERT(allow_macro_instructions_);
9581 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009582 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009583 vselvs(dt, rd, rn, rm);
9584 }
9585
9586 void Vselvs(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009587 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9588 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9589 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009590 VIXL_ASSERT(allow_macro_instructions_);
9591 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009592 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009593 vselvs(dt, rd, rn, rm);
9594 }
9595
9596 void Vshl(Condition cond,
9597 DataType dt,
9598 DRegister rd,
9599 DRegister rm,
9600 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009601 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9602 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9603 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009604 VIXL_ASSERT(allow_macro_instructions_);
9605 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009606 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009607 ITScope it_scope(this, &cond);
9608 vshl(cond, dt, rd, rm, operand);
9609 }
9610 void Vshl(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9611 Vshl(al, dt, rd, rm, operand);
9612 }
9613
9614 void Vshl(Condition cond,
9615 DataType dt,
9616 QRegister rd,
9617 QRegister rm,
9618 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009619 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9620 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9621 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009622 VIXL_ASSERT(allow_macro_instructions_);
9623 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009624 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009625 ITScope it_scope(this, &cond);
9626 vshl(cond, dt, rd, rm, operand);
9627 }
9628 void Vshl(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9629 Vshl(al, dt, rd, rm, operand);
9630 }
9631
9632 void Vshll(Condition cond,
9633 DataType dt,
9634 QRegister rd,
9635 DRegister rm,
9636 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009637 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9638 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9639 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009640 VIXL_ASSERT(allow_macro_instructions_);
9641 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009642 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009643 ITScope it_scope(this, &cond);
9644 vshll(cond, dt, rd, rm, operand);
9645 }
9646 void Vshll(DataType dt, QRegister rd, DRegister rm, const DOperand& operand) {
9647 Vshll(al, dt, rd, rm, operand);
9648 }
9649
9650 void Vshr(Condition cond,
9651 DataType dt,
9652 DRegister rd,
9653 DRegister rm,
9654 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009655 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9656 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9657 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009658 VIXL_ASSERT(allow_macro_instructions_);
9659 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009660 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009661 ITScope it_scope(this, &cond);
9662 vshr(cond, dt, rd, rm, operand);
9663 }
9664 void Vshr(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9665 Vshr(al, dt, rd, rm, operand);
9666 }
9667
9668 void Vshr(Condition cond,
9669 DataType dt,
9670 QRegister rd,
9671 QRegister rm,
9672 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009673 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9674 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9675 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009676 VIXL_ASSERT(allow_macro_instructions_);
9677 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009678 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009679 ITScope it_scope(this, &cond);
9680 vshr(cond, dt, rd, rm, operand);
9681 }
9682 void Vshr(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9683 Vshr(al, dt, rd, rm, operand);
9684 }
9685
9686 void Vshrn(Condition cond,
9687 DataType dt,
9688 DRegister rd,
9689 QRegister rm,
9690 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009691 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9693 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009694 VIXL_ASSERT(allow_macro_instructions_);
9695 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009696 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009697 ITScope it_scope(this, &cond);
9698 vshrn(cond, dt, rd, rm, operand);
9699 }
9700 void Vshrn(DataType dt, DRegister rd, QRegister rm, const QOperand& operand) {
9701 Vshrn(al, dt, rd, rm, operand);
9702 }
9703
9704 void Vsli(Condition cond,
9705 DataType dt,
9706 DRegister rd,
9707 DRegister rm,
9708 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009709 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9710 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9711 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009712 VIXL_ASSERT(allow_macro_instructions_);
9713 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009714 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009715 ITScope it_scope(this, &cond);
9716 vsli(cond, dt, rd, rm, operand);
9717 }
9718 void Vsli(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9719 Vsli(al, dt, rd, rm, operand);
9720 }
9721
9722 void Vsli(Condition cond,
9723 DataType dt,
9724 QRegister rd,
9725 QRegister rm,
9726 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009727 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9728 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9729 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009730 VIXL_ASSERT(allow_macro_instructions_);
9731 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009732 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009733 ITScope it_scope(this, &cond);
9734 vsli(cond, dt, rd, rm, operand);
9735 }
9736 void Vsli(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9737 Vsli(al, dt, rd, rm, operand);
9738 }
9739
9740 void Vsqrt(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009741 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9742 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009743 VIXL_ASSERT(allow_macro_instructions_);
9744 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009745 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009746 ITScope it_scope(this, &cond);
9747 vsqrt(cond, dt, rd, rm);
9748 }
9749 void Vsqrt(DataType dt, SRegister rd, SRegister rm) { Vsqrt(al, dt, rd, rm); }
9750
9751 void Vsqrt(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009752 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9753 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009754 VIXL_ASSERT(allow_macro_instructions_);
9755 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009756 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009757 ITScope it_scope(this, &cond);
9758 vsqrt(cond, dt, rd, rm);
9759 }
9760 void Vsqrt(DataType dt, DRegister rd, DRegister rm) { Vsqrt(al, dt, rd, rm); }
9761
9762 void Vsra(Condition cond,
9763 DataType dt,
9764 DRegister rd,
9765 DRegister rm,
9766 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009767 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9768 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9769 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009770 VIXL_ASSERT(allow_macro_instructions_);
9771 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009772 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009773 ITScope it_scope(this, &cond);
9774 vsra(cond, dt, rd, rm, operand);
9775 }
9776 void Vsra(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9777 Vsra(al, dt, rd, rm, operand);
9778 }
9779
9780 void Vsra(Condition cond,
9781 DataType dt,
9782 QRegister rd,
9783 QRegister rm,
9784 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009785 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9786 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9787 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009788 VIXL_ASSERT(allow_macro_instructions_);
9789 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009790 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009791 ITScope it_scope(this, &cond);
9792 vsra(cond, dt, rd, rm, operand);
9793 }
9794 void Vsra(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9795 Vsra(al, dt, rd, rm, operand);
9796 }
9797
9798 void Vsri(Condition cond,
9799 DataType dt,
9800 DRegister rd,
9801 DRegister rm,
9802 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009803 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9804 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9805 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009806 VIXL_ASSERT(allow_macro_instructions_);
9807 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009808 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009809 ITScope it_scope(this, &cond);
9810 vsri(cond, dt, rd, rm, operand);
9811 }
9812 void Vsri(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9813 Vsri(al, dt, rd, rm, operand);
9814 }
9815
9816 void Vsri(Condition cond,
9817 DataType dt,
9818 QRegister rd,
9819 QRegister rm,
9820 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009821 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9822 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9823 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009824 VIXL_ASSERT(allow_macro_instructions_);
9825 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009826 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009827 ITScope it_scope(this, &cond);
9828 vsri(cond, dt, rd, rm, operand);
9829 }
9830 void Vsri(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9831 Vsri(al, dt, rd, rm, operand);
9832 }
9833
9834 void Vst1(Condition cond,
9835 DataType dt,
9836 const NeonRegisterList& nreglist,
9837 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009838 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9839 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009840 VIXL_ASSERT(allow_macro_instructions_);
9841 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009842 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009843 ITScope it_scope(this, &cond);
9844 vst1(cond, dt, nreglist, operand);
9845 }
9846 void Vst1(DataType dt,
9847 const NeonRegisterList& nreglist,
9848 const AlignedMemOperand& operand) {
9849 Vst1(al, dt, nreglist, operand);
9850 }
9851
9852 void Vst2(Condition cond,
9853 DataType dt,
9854 const NeonRegisterList& nreglist,
9855 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009856 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9857 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009858 VIXL_ASSERT(allow_macro_instructions_);
9859 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009860 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009861 ITScope it_scope(this, &cond);
9862 vst2(cond, dt, nreglist, operand);
9863 }
9864 void Vst2(DataType dt,
9865 const NeonRegisterList& nreglist,
9866 const AlignedMemOperand& operand) {
9867 Vst2(al, dt, nreglist, operand);
9868 }
9869
9870 void Vst3(Condition cond,
9871 DataType dt,
9872 const NeonRegisterList& nreglist,
9873 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009874 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9875 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009876 VIXL_ASSERT(allow_macro_instructions_);
9877 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009878 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009879 ITScope it_scope(this, &cond);
9880 vst3(cond, dt, nreglist, operand);
9881 }
9882 void Vst3(DataType dt,
9883 const NeonRegisterList& nreglist,
9884 const AlignedMemOperand& operand) {
9885 Vst3(al, dt, nreglist, operand);
9886 }
9887
9888 void Vst3(Condition cond,
9889 DataType dt,
9890 const NeonRegisterList& nreglist,
9891 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009892 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9893 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009894 VIXL_ASSERT(allow_macro_instructions_);
9895 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009896 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009897 ITScope it_scope(this, &cond);
9898 vst3(cond, dt, nreglist, operand);
9899 }
9900 void Vst3(DataType dt,
9901 const NeonRegisterList& nreglist,
9902 const MemOperand& operand) {
9903 Vst3(al, dt, nreglist, operand);
9904 }
9905
9906 void Vst4(Condition cond,
9907 DataType dt,
9908 const NeonRegisterList& nreglist,
9909 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009910 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9911 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009912 VIXL_ASSERT(allow_macro_instructions_);
9913 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009914 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009915 ITScope it_scope(this, &cond);
9916 vst4(cond, dt, nreglist, operand);
9917 }
9918 void Vst4(DataType dt,
9919 const NeonRegisterList& nreglist,
9920 const AlignedMemOperand& operand) {
9921 Vst4(al, dt, nreglist, operand);
9922 }
9923
9924 void Vstm(Condition cond,
9925 DataType dt,
9926 Register rn,
9927 WriteBack write_back,
9928 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009929 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9930 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009931 VIXL_ASSERT(allow_macro_instructions_);
9932 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009933 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009934 ITScope it_scope(this, &cond);
9935 vstm(cond, dt, rn, write_back, dreglist);
9936 }
9937 void Vstm(DataType dt,
9938 Register rn,
9939 WriteBack write_back,
9940 DRegisterList dreglist) {
9941 Vstm(al, dt, rn, write_back, dreglist);
9942 }
9943 void Vstm(Condition cond,
9944 Register rn,
9945 WriteBack write_back,
9946 DRegisterList dreglist) {
9947 Vstm(cond, kDataTypeValueNone, rn, write_back, dreglist);
9948 }
9949 void Vstm(Register rn, WriteBack write_back, DRegisterList dreglist) {
9950 Vstm(al, kDataTypeValueNone, rn, write_back, dreglist);
9951 }
9952
9953 void Vstm(Condition cond,
9954 DataType dt,
9955 Register rn,
9956 WriteBack write_back,
9957 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009958 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9959 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009960 VIXL_ASSERT(allow_macro_instructions_);
9961 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009962 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009963 ITScope it_scope(this, &cond);
9964 vstm(cond, dt, rn, write_back, sreglist);
9965 }
9966 void Vstm(DataType dt,
9967 Register rn,
9968 WriteBack write_back,
9969 SRegisterList sreglist) {
9970 Vstm(al, dt, rn, write_back, sreglist);
9971 }
9972 void Vstm(Condition cond,
9973 Register rn,
9974 WriteBack write_back,
9975 SRegisterList sreglist) {
9976 Vstm(cond, kDataTypeValueNone, rn, write_back, sreglist);
9977 }
9978 void Vstm(Register rn, WriteBack write_back, SRegisterList sreglist) {
9979 Vstm(al, kDataTypeValueNone, rn, write_back, sreglist);
9980 }
9981
9982 void Vstmdb(Condition cond,
9983 DataType dt,
9984 Register rn,
9985 WriteBack write_back,
9986 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009987 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9988 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009989 VIXL_ASSERT(allow_macro_instructions_);
9990 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009991 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009992 ITScope it_scope(this, &cond);
9993 vstmdb(cond, dt, rn, write_back, dreglist);
9994 }
9995 void Vstmdb(DataType dt,
9996 Register rn,
9997 WriteBack write_back,
9998 DRegisterList dreglist) {
9999 Vstmdb(al, dt, rn, write_back, dreglist);
10000 }
10001 void Vstmdb(Condition cond,
10002 Register rn,
10003 WriteBack write_back,
10004 DRegisterList dreglist) {
10005 Vstmdb(cond, kDataTypeValueNone, rn, write_back, dreglist);
10006 }
10007 void Vstmdb(Register rn, WriteBack write_back, DRegisterList dreglist) {
10008 Vstmdb(al, kDataTypeValueNone, rn, write_back, dreglist);
10009 }
10010
10011 void Vstmdb(Condition cond,
10012 DataType dt,
10013 Register rn,
10014 WriteBack write_back,
10015 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010016 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10017 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010018 VIXL_ASSERT(allow_macro_instructions_);
10019 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010020 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010021 ITScope it_scope(this, &cond);
10022 vstmdb(cond, dt, rn, write_back, sreglist);
10023 }
10024 void Vstmdb(DataType dt,
10025 Register rn,
10026 WriteBack write_back,
10027 SRegisterList sreglist) {
10028 Vstmdb(al, dt, rn, write_back, sreglist);
10029 }
10030 void Vstmdb(Condition cond,
10031 Register rn,
10032 WriteBack write_back,
10033 SRegisterList sreglist) {
10034 Vstmdb(cond, kDataTypeValueNone, rn, write_back, sreglist);
10035 }
10036 void Vstmdb(Register rn, WriteBack write_back, SRegisterList sreglist) {
10037 Vstmdb(al, kDataTypeValueNone, rn, write_back, sreglist);
10038 }
10039
10040 void Vstmia(Condition cond,
10041 DataType dt,
10042 Register rn,
10043 WriteBack write_back,
10044 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010045 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10046 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010047 VIXL_ASSERT(allow_macro_instructions_);
10048 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010049 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010050 ITScope it_scope(this, &cond);
10051 vstmia(cond, dt, rn, write_back, dreglist);
10052 }
10053 void Vstmia(DataType dt,
10054 Register rn,
10055 WriteBack write_back,
10056 DRegisterList dreglist) {
10057 Vstmia(al, dt, rn, write_back, dreglist);
10058 }
10059 void Vstmia(Condition cond,
10060 Register rn,
10061 WriteBack write_back,
10062 DRegisterList dreglist) {
10063 Vstmia(cond, kDataTypeValueNone, rn, write_back, dreglist);
10064 }
10065 void Vstmia(Register rn, WriteBack write_back, DRegisterList dreglist) {
10066 Vstmia(al, kDataTypeValueNone, rn, write_back, dreglist);
10067 }
10068
10069 void Vstmia(Condition cond,
10070 DataType dt,
10071 Register rn,
10072 WriteBack write_back,
10073 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010074 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10075 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010076 VIXL_ASSERT(allow_macro_instructions_);
10077 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010078 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010079 ITScope it_scope(this, &cond);
10080 vstmia(cond, dt, rn, write_back, sreglist);
10081 }
10082 void Vstmia(DataType dt,
10083 Register rn,
10084 WriteBack write_back,
10085 SRegisterList sreglist) {
10086 Vstmia(al, dt, rn, write_back, sreglist);
10087 }
10088 void Vstmia(Condition cond,
10089 Register rn,
10090 WriteBack write_back,
10091 SRegisterList sreglist) {
10092 Vstmia(cond, kDataTypeValueNone, rn, write_back, sreglist);
10093 }
10094 void Vstmia(Register rn, WriteBack write_back, SRegisterList sreglist) {
10095 Vstmia(al, kDataTypeValueNone, rn, write_back, sreglist);
10096 }
10097
10098 void Vstr(Condition cond,
10099 DataType dt,
10100 DRegister rd,
10101 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010102 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10103 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010104 VIXL_ASSERT(allow_macro_instructions_);
10105 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010106 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010107 ITScope it_scope(this, &cond);
10108 vstr(cond, dt, rd, operand);
10109 }
10110 void Vstr(DataType dt, DRegister rd, const MemOperand& operand) {
10111 Vstr(al, dt, rd, operand);
10112 }
10113 void Vstr(Condition cond, DRegister rd, const MemOperand& operand) {
10114 Vstr(cond, Untyped64, rd, operand);
10115 }
10116 void Vstr(DRegister rd, const MemOperand& operand) {
10117 Vstr(al, Untyped64, rd, operand);
10118 }
10119
10120 void Vstr(Condition cond,
10121 DataType dt,
10122 SRegister rd,
10123 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010124 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10125 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010126 VIXL_ASSERT(allow_macro_instructions_);
10127 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010128 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010129 ITScope it_scope(this, &cond);
10130 vstr(cond, dt, rd, operand);
10131 }
10132 void Vstr(DataType dt, SRegister rd, const MemOperand& operand) {
10133 Vstr(al, dt, rd, operand);
10134 }
10135 void Vstr(Condition cond, SRegister rd, const MemOperand& operand) {
10136 Vstr(cond, Untyped32, rd, operand);
10137 }
10138 void Vstr(SRegister rd, const MemOperand& operand) {
10139 Vstr(al, Untyped32, rd, operand);
10140 }
10141
10142 void Vsub(
10143 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010144 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10145 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10146 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010147 VIXL_ASSERT(allow_macro_instructions_);
10148 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010149 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010150 ITScope it_scope(this, &cond);
10151 vsub(cond, dt, rd, rn, rm);
10152 }
10153 void Vsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
10154 Vsub(al, dt, rd, rn, rm);
10155 }
10156
10157 void Vsub(
10158 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010159 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10160 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10161 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010162 VIXL_ASSERT(allow_macro_instructions_);
10163 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010164 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010165 ITScope it_scope(this, &cond);
10166 vsub(cond, dt, rd, rn, rm);
10167 }
10168 void Vsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
10169 Vsub(al, dt, rd, rn, rm);
10170 }
10171
10172 void Vsub(
10173 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010174 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10175 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10176 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010177 VIXL_ASSERT(allow_macro_instructions_);
10178 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010179 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010180 ITScope it_scope(this, &cond);
10181 vsub(cond, dt, rd, rn, rm);
10182 }
10183 void Vsub(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
10184 Vsub(al, dt, rd, rn, rm);
10185 }
10186
10187 void Vsubhn(
10188 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010189 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10190 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10191 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010192 VIXL_ASSERT(allow_macro_instructions_);
10193 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010194 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010195 ITScope it_scope(this, &cond);
10196 vsubhn(cond, dt, rd, rn, rm);
10197 }
10198 void Vsubhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
10199 Vsubhn(al, dt, rd, rn, rm);
10200 }
10201
10202 void Vsubl(
10203 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010204 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10205 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10206 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010207 VIXL_ASSERT(allow_macro_instructions_);
10208 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010209 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010210 ITScope it_scope(this, &cond);
10211 vsubl(cond, dt, rd, rn, rm);
10212 }
10213 void Vsubl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
10214 Vsubl(al, dt, rd, rn, rm);
10215 }
10216
10217 void Vsubw(
10218 Condition cond, DataType dt, QRegister rd, QRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010219 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10220 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10221 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010222 VIXL_ASSERT(allow_macro_instructions_);
10223 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010224 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010225 ITScope it_scope(this, &cond);
10226 vsubw(cond, dt, rd, rn, rm);
10227 }
10228 void Vsubw(DataType dt, QRegister rd, QRegister rn, DRegister rm) {
10229 Vsubw(al, dt, rd, rn, rm);
10230 }
10231
10232 void Vswp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010233 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10234 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010235 VIXL_ASSERT(allow_macro_instructions_);
10236 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010237 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010238 ITScope it_scope(this, &cond);
10239 vswp(cond, dt, rd, rm);
10240 }
10241 void Vswp(DataType dt, DRegister rd, DRegister rm) { Vswp(al, dt, rd, rm); }
10242 void Vswp(Condition cond, DRegister rd, DRegister rm) {
10243 Vswp(cond, kDataTypeValueNone, rd, rm);
10244 }
10245 void Vswp(DRegister rd, DRegister rm) {
10246 Vswp(al, kDataTypeValueNone, rd, rm);
10247 }
10248
10249 void Vswp(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010250 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10251 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010252 VIXL_ASSERT(allow_macro_instructions_);
10253 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010254 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010255 ITScope it_scope(this, &cond);
10256 vswp(cond, dt, rd, rm);
10257 }
10258 void Vswp(DataType dt, QRegister rd, QRegister rm) { Vswp(al, dt, rd, rm); }
10259 void Vswp(Condition cond, QRegister rd, QRegister rm) {
10260 Vswp(cond, kDataTypeValueNone, rd, rm);
10261 }
10262 void Vswp(QRegister rd, QRegister rm) {
10263 Vswp(al, kDataTypeValueNone, rd, rm);
10264 }
10265
10266 void Vtbl(Condition cond,
10267 DataType dt,
10268 DRegister rd,
10269 const NeonRegisterList& nreglist,
10270 DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010271 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10272 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10273 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010274 VIXL_ASSERT(allow_macro_instructions_);
10275 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010276 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010277 ITScope it_scope(this, &cond);
10278 vtbl(cond, dt, rd, nreglist, rm);
10279 }
10280 void Vtbl(DataType dt,
10281 DRegister rd,
10282 const NeonRegisterList& nreglist,
10283 DRegister rm) {
10284 Vtbl(al, dt, rd, nreglist, rm);
10285 }
10286
10287 void Vtbx(Condition cond,
10288 DataType dt,
10289 DRegister rd,
10290 const NeonRegisterList& nreglist,
10291 DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010292 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10293 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10294 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010295 VIXL_ASSERT(allow_macro_instructions_);
10296 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010297 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010298 ITScope it_scope(this, &cond);
10299 vtbx(cond, dt, rd, nreglist, rm);
10300 }
10301 void Vtbx(DataType dt,
10302 DRegister rd,
10303 const NeonRegisterList& nreglist,
10304 DRegister rm) {
10305 Vtbx(al, dt, rd, nreglist, rm);
10306 }
10307
10308 void Vtrn(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010309 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10310 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010311 VIXL_ASSERT(allow_macro_instructions_);
10312 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010313 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010314 ITScope it_scope(this, &cond);
10315 vtrn(cond, dt, rd, rm);
10316 }
10317 void Vtrn(DataType dt, DRegister rd, DRegister rm) { Vtrn(al, dt, rd, rm); }
10318
10319 void Vtrn(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010320 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10321 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010322 VIXL_ASSERT(allow_macro_instructions_);
10323 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010324 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010325 ITScope it_scope(this, &cond);
10326 vtrn(cond, dt, rd, rm);
10327 }
10328 void Vtrn(DataType dt, QRegister rd, QRegister rm) { Vtrn(al, dt, rd, rm); }
10329
10330 void Vtst(
10331 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010332 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10333 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10334 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010335 VIXL_ASSERT(allow_macro_instructions_);
10336 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010337 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010338 ITScope it_scope(this, &cond);
10339 vtst(cond, dt, rd, rn, rm);
10340 }
10341 void Vtst(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
10342 Vtst(al, dt, rd, rn, rm);
10343 }
10344
10345 void Vtst(
10346 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010347 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10348 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10349 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010350 VIXL_ASSERT(allow_macro_instructions_);
10351 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010352 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010353 ITScope it_scope(this, &cond);
10354 vtst(cond, dt, rd, rn, rm);
10355 }
10356 void Vtst(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
10357 Vtst(al, dt, rd, rn, rm);
10358 }
10359
10360 void Vuzp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010361 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10362 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010363 VIXL_ASSERT(allow_macro_instructions_);
10364 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010365 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010366 ITScope it_scope(this, &cond);
10367 vuzp(cond, dt, rd, rm);
10368 }
10369 void Vuzp(DataType dt, DRegister rd, DRegister rm) { Vuzp(al, dt, rd, rm); }
10370
10371 void Vuzp(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010372 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10373 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010374 VIXL_ASSERT(allow_macro_instructions_);
10375 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010376 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010377 ITScope it_scope(this, &cond);
10378 vuzp(cond, dt, rd, rm);
10379 }
10380 void Vuzp(DataType dt, QRegister rd, QRegister rm) { Vuzp(al, dt, rd, rm); }
10381
10382 void Vzip(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010383 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10384 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010385 VIXL_ASSERT(allow_macro_instructions_);
10386 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010387 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010388 ITScope it_scope(this, &cond);
10389 vzip(cond, dt, rd, rm);
10390 }
10391 void Vzip(DataType dt, DRegister rd, DRegister rm) { Vzip(al, dt, rd, rm); }
10392
10393 void Vzip(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010394 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
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 vzip(cond, dt, rd, rm);
10401 }
10402 void Vzip(DataType dt, QRegister rd, QRegister rm) { Vzip(al, dt, rd, rm); }
10403
10404 void Yield(Condition cond) {
10405 VIXL_ASSERT(allow_macro_instructions_);
10406 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010407 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010408 ITScope it_scope(this, &cond);
10409 yield(cond);
10410 }
10411 void Yield() { Yield(al); }
Vincent Belliardf6786182016-09-21 11:55:28 +010010412 void Vabs(Condition cond, VRegister rd, VRegister rm) {
10413 VIXL_ASSERT(rd.IsS() || rd.IsD());
10414 VIXL_ASSERT(rd.GetType() == rm.GetType());
10415 if (rd.IsS()) {
10416 Vabs(cond, F32, rd.S(), rm.S());
10417 } else {
10418 Vabs(cond, F64, rd.D(), rm.D());
10419 }
10420 }
10421 void Vabs(VRegister rd, VRegister rm) { Vabs(al, rd, rm); }
10422 void Vadd(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10423 VIXL_ASSERT(rd.IsS() || rd.IsD());
10424 VIXL_ASSERT(rd.GetType() == rn.GetType());
10425 VIXL_ASSERT(rd.GetType() == rm.GetType());
10426 if (rd.IsS()) {
10427 Vadd(cond, F32, rd.S(), rn.S(), rm.S());
10428 } else {
10429 Vadd(cond, F64, rd.D(), rn.D(), rm.D());
10430 }
10431 }
10432 void Vadd(VRegister rd, VRegister rn, VRegister rm) { Vadd(al, rd, rn, rm); }
10433 void Vcmp(Condition cond, VRegister rd, VRegister rm) {
10434 VIXL_ASSERT(rd.IsS() || rd.IsD());
10435 VIXL_ASSERT(rd.GetType() == rm.GetType());
10436 if (rd.IsS()) {
10437 Vcmp(cond, F32, rd.S(), rm.S());
10438 } else {
10439 Vcmp(cond, F64, rd.D(), rm.D());
10440 }
10441 }
10442 void Vcmp(VRegister rd, VRegister rm) { Vcmp(al, rd, rm); }
10443 void Vcmpe(Condition cond, VRegister rd, VRegister rm) {
10444 VIXL_ASSERT(rd.IsS() || rd.IsD());
10445 VIXL_ASSERT(rd.GetType() == rm.GetType());
10446 if (rd.IsS()) {
10447 Vcmpe(cond, F32, rd.S(), rm.S());
10448 } else {
10449 Vcmpe(cond, F64, rd.D(), rm.D());
10450 }
10451 }
10452 void Vcmpe(VRegister rd, VRegister rm) { Vcmpe(al, rd, rm); }
10453 void Vdiv(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10454 VIXL_ASSERT(rd.IsS() || rd.IsD());
10455 VIXL_ASSERT(rd.GetType() == rn.GetType());
10456 VIXL_ASSERT(rd.GetType() == rm.GetType());
10457 if (rd.IsS()) {
10458 Vdiv(cond, F32, rd.S(), rn.S(), rm.S());
10459 } else {
10460 Vdiv(cond, F64, rd.D(), rn.D(), rm.D());
10461 }
10462 }
10463 void Vdiv(VRegister rd, VRegister rn, VRegister rm) { Vdiv(al, rd, rn, rm); }
10464 void Vfma(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10465 VIXL_ASSERT(rd.IsS() || rd.IsD());
10466 VIXL_ASSERT(rd.GetType() == rn.GetType());
10467 VIXL_ASSERT(rd.GetType() == rm.GetType());
10468 if (rd.IsS()) {
10469 Vfma(cond, F32, rd.S(), rn.S(), rm.S());
10470 } else {
10471 Vfma(cond, F64, rd.D(), rn.D(), rm.D());
10472 }
10473 }
10474 void Vfma(VRegister rd, VRegister rn, VRegister rm) { Vfma(al, rd, rn, rm); }
10475 void Vfms(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10476 VIXL_ASSERT(rd.IsS() || rd.IsD());
10477 VIXL_ASSERT(rd.GetType() == rn.GetType());
10478 VIXL_ASSERT(rd.GetType() == rm.GetType());
10479 if (rd.IsS()) {
10480 Vfms(cond, F32, rd.S(), rn.S(), rm.S());
10481 } else {
10482 Vfms(cond, F64, rd.D(), rn.D(), rm.D());
10483 }
10484 }
10485 void Vfms(VRegister rd, VRegister rn, VRegister rm) { Vfms(al, rd, rn, rm); }
10486 void Vfnma(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10487 VIXL_ASSERT(rd.IsS() || rd.IsD());
10488 VIXL_ASSERT(rd.GetType() == rn.GetType());
10489 VIXL_ASSERT(rd.GetType() == rm.GetType());
10490 if (rd.IsS()) {
10491 Vfnma(cond, F32, rd.S(), rn.S(), rm.S());
10492 } else {
10493 Vfnma(cond, F64, rd.D(), rn.D(), rm.D());
10494 }
10495 }
10496 void Vfnma(VRegister rd, VRegister rn, VRegister rm) {
10497 Vfnma(al, rd, rn, rm);
10498 }
10499 void Vfnms(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 Vfnms(cond, F32, rd.S(), rn.S(), rm.S());
10505 } else {
10506 Vfnms(cond, F64, rd.D(), rn.D(), rm.D());
10507 }
10508 }
10509 void Vfnms(VRegister rd, VRegister rn, VRegister rm) {
10510 Vfnms(al, rd, rn, rm);
10511 }
10512 void Vmaxnm(VRegister rd, VRegister rn, VRegister rm) {
10513 VIXL_ASSERT(rd.IsS() || rd.IsD());
10514 VIXL_ASSERT(rd.GetType() == rn.GetType());
10515 VIXL_ASSERT(rd.GetType() == rm.GetType());
10516 if (rd.IsS()) {
10517 Vmaxnm(F32, rd.S(), rn.S(), rm.S());
10518 } else {
10519 Vmaxnm(F64, rd.D(), rn.D(), rm.D());
10520 }
10521 }
10522 void Vminnm(VRegister rd, VRegister rn, VRegister rm) {
10523 VIXL_ASSERT(rd.IsS() || rd.IsD());
10524 VIXL_ASSERT(rd.GetType() == rn.GetType());
10525 VIXL_ASSERT(rd.GetType() == rm.GetType());
10526 if (rd.IsS()) {
10527 Vminnm(F32, rd.S(), rn.S(), rm.S());
10528 } else {
10529 Vminnm(F64, rd.D(), rn.D(), rm.D());
10530 }
10531 }
10532 void Vmla(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 Vmla(cond, F32, rd.S(), rn.S(), rm.S());
10538 } else {
10539 Vmla(cond, F64, rd.D(), rn.D(), rm.D());
10540 }
10541 }
10542 void Vmla(VRegister rd, VRegister rn, VRegister rm) { Vmla(al, rd, rn, rm); }
10543 void Vmls(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10544 VIXL_ASSERT(rd.IsS() || rd.IsD());
10545 VIXL_ASSERT(rd.GetType() == rn.GetType());
10546 VIXL_ASSERT(rd.GetType() == rm.GetType());
10547 if (rd.IsS()) {
10548 Vmls(cond, F32, rd.S(), rn.S(), rm.S());
10549 } else {
10550 Vmls(cond, F64, rd.D(), rn.D(), rm.D());
10551 }
10552 }
10553 void Vmls(VRegister rd, VRegister rn, VRegister rm) { Vmls(al, rd, rn, rm); }
10554 void Vmov(Condition cond, VRegister rd, VRegister rm) {
10555 VIXL_ASSERT(rd.IsS() || rd.IsD());
10556 VIXL_ASSERT(rd.GetType() == rm.GetType());
10557 if (rd.IsS()) {
10558 Vmov(cond, F32, rd.S(), rm.S());
10559 } else {
10560 Vmov(cond, F64, rd.D(), rm.D());
10561 }
10562 }
10563 void Vmov(VRegister rd, VRegister rm) { Vmov(al, rd, rm); }
10564 void Vmul(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10565 VIXL_ASSERT(rd.IsS() || rd.IsD());
10566 VIXL_ASSERT(rd.GetType() == rn.GetType());
10567 VIXL_ASSERT(rd.GetType() == rm.GetType());
10568 if (rd.IsS()) {
10569 Vmul(cond, F32, rd.S(), rn.S(), rm.S());
10570 } else {
10571 Vmul(cond, F64, rd.D(), rn.D(), rm.D());
10572 }
10573 }
10574 void Vmul(VRegister rd, VRegister rn, VRegister rm) { Vmul(al, rd, rn, rm); }
10575 void Vneg(Condition cond, VRegister rd, VRegister rm) {
10576 VIXL_ASSERT(rd.IsS() || rd.IsD());
10577 VIXL_ASSERT(rd.GetType() == rm.GetType());
10578 if (rd.IsS()) {
10579 Vneg(cond, F32, rd.S(), rm.S());
10580 } else {
10581 Vneg(cond, F64, rd.D(), rm.D());
10582 }
10583 }
10584 void Vneg(VRegister rd, VRegister rm) { Vneg(al, rd, rm); }
10585 void Vnmla(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10586 VIXL_ASSERT(rd.IsS() || rd.IsD());
10587 VIXL_ASSERT(rd.GetType() == rn.GetType());
10588 VIXL_ASSERT(rd.GetType() == rm.GetType());
10589 if (rd.IsS()) {
10590 Vnmla(cond, F32, rd.S(), rn.S(), rm.S());
10591 } else {
10592 Vnmla(cond, F64, rd.D(), rn.D(), rm.D());
10593 }
10594 }
10595 void Vnmla(VRegister rd, VRegister rn, VRegister rm) {
10596 Vnmla(al, rd, rn, rm);
10597 }
10598 void Vnmls(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10599 VIXL_ASSERT(rd.IsS() || rd.IsD());
10600 VIXL_ASSERT(rd.GetType() == rn.GetType());
10601 VIXL_ASSERT(rd.GetType() == rm.GetType());
10602 if (rd.IsS()) {
10603 Vnmls(cond, F32, rd.S(), rn.S(), rm.S());
10604 } else {
10605 Vnmls(cond, F64, rd.D(), rn.D(), rm.D());
10606 }
10607 }
10608 void Vnmls(VRegister rd, VRegister rn, VRegister rm) {
10609 Vnmls(al, rd, rn, rm);
10610 }
10611 void Vnmul(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10612 VIXL_ASSERT(rd.IsS() || rd.IsD());
10613 VIXL_ASSERT(rd.GetType() == rn.GetType());
10614 VIXL_ASSERT(rd.GetType() == rm.GetType());
10615 if (rd.IsS()) {
10616 Vnmul(cond, F32, rd.S(), rn.S(), rm.S());
10617 } else {
10618 Vnmul(cond, F64, rd.D(), rn.D(), rm.D());
10619 }
10620 }
10621 void Vnmul(VRegister rd, VRegister rn, VRegister rm) {
10622 Vnmul(al, rd, rn, rm);
10623 }
10624 void Vseleq(VRegister rd, VRegister rn, VRegister rm) {
10625 VIXL_ASSERT(rd.IsS() || rd.IsD());
10626 VIXL_ASSERT(rd.GetType() == rn.GetType());
10627 VIXL_ASSERT(rd.GetType() == rm.GetType());
10628 if (rd.IsS()) {
10629 Vseleq(F32, rd.S(), rn.S(), rm.S());
10630 } else {
10631 Vseleq(F64, rd.D(), rn.D(), rm.D());
10632 }
10633 }
10634 void Vselge(VRegister rd, VRegister rn, VRegister rm) {
10635 VIXL_ASSERT(rd.IsS() || rd.IsD());
10636 VIXL_ASSERT(rd.GetType() == rn.GetType());
10637 VIXL_ASSERT(rd.GetType() == rm.GetType());
10638 if (rd.IsS()) {
10639 Vselge(F32, rd.S(), rn.S(), rm.S());
10640 } else {
10641 Vselge(F64, rd.D(), rn.D(), rm.D());
10642 }
10643 }
10644 void Vselgt(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 Vselgt(F32, rd.S(), rn.S(), rm.S());
10650 } else {
10651 Vselgt(F64, rd.D(), rn.D(), rm.D());
10652 }
10653 }
10654 void Vselvs(VRegister rd, VRegister rn, VRegister rm) {
10655 VIXL_ASSERT(rd.IsS() || rd.IsD());
10656 VIXL_ASSERT(rd.GetType() == rn.GetType());
10657 VIXL_ASSERT(rd.GetType() == rm.GetType());
10658 if (rd.IsS()) {
10659 Vselvs(F32, rd.S(), rn.S(), rm.S());
10660 } else {
10661 Vselvs(F64, rd.D(), rn.D(), rm.D());
10662 }
10663 }
10664 void Vsqrt(Condition cond, VRegister rd, VRegister rm) {
10665 VIXL_ASSERT(rd.IsS() || rd.IsD());
10666 VIXL_ASSERT(rd.GetType() == rm.GetType());
10667 if (rd.IsS()) {
10668 Vsqrt(cond, F32, rd.S(), rm.S());
10669 } else {
10670 Vsqrt(cond, F64, rd.D(), rm.D());
10671 }
10672 }
10673 void Vsqrt(VRegister rd, VRegister rm) { Vsqrt(al, rd, rm); }
10674 void Vsub(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10675 VIXL_ASSERT(rd.IsS() || rd.IsD());
10676 VIXL_ASSERT(rd.GetType() == rn.GetType());
10677 VIXL_ASSERT(rd.GetType() == rm.GetType());
10678 if (rd.IsS()) {
10679 Vsub(cond, F32, rd.S(), rn.S(), rm.S());
10680 } else {
10681 Vsub(cond, F64, rd.D(), rn.D(), rm.D());
10682 }
10683 }
10684 void Vsub(VRegister rd, VRegister rn, VRegister rm) { Vsub(al, rd, rn, rm); }
Alexandre Ramesd3832962016-07-04 15:03:43 +010010685 // End of generated code.
Vincent Belliardd17e3482016-11-22 15:46:43 -080010686
10687 virtual bool AllowUnpredictable() VIXL_OVERRIDE {
10688 VIXL_ABORT_WITH_MSG("Unpredictable instruction.\n");
10689 return false;
10690 }
10691 virtual bool AllowStronglyDiscouraged() VIXL_OVERRIDE {
10692 VIXL_ABORT_WITH_MSG(
10693 "ARM strongly recommends to not use this instruction.\n");
10694 return false;
10695 }
10696
Alexandre Ramesd3832962016-07-04 15:03:43 +010010697 private:
10698 RegisterList available_;
10699 VRegisterList available_vfp_;
10700 MacroAssemblerContext context_;
10701 Label::Offset checkpoint_;
10702 LiteralPoolManager literal_pool_manager_;
10703 VeneerPoolManager veneer_pool_manager_;
Pierre Langlois1e85b7f2016-08-05 14:20:36 +010010704 bool generate_simulator_code_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010010705 bool allow_macro_instructions_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010010706};
10707
Alexandre Ramesd3832962016-07-04 15:03:43 +010010708// Use this scope when you need a one-to-one mapping between methods and
10709// instructions. This scope prevents the MacroAssembler functions from being
10710// called and the literal pools and veneers from being emitted (they can only be
10711// emitted when you create the scope). It also asserts the size of the emitted
10712// instructions is the specified size (or not greater than the specified size).
10713// This scope must be used when you want to directly use the assembler. It will
10714// ensure that the buffer is big enough and that you don't break the pool and
10715// veneer mechanisms.
10716class AssemblerAccurateScope : public CodeBufferCheckScope {
10717 public:
10718 AssemblerAccurateScope(MacroAssembler* masm,
10719 uint32_t size,
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010720 SizePolicy size_policy = kExactSize)
10721 : masm_(masm) {
10722 VIXL_ASSERT(size_policy != kNoAssert);
10723 masm_->EnsureEmitFor(size);
10724 // We cannot initialise the `CodeBufferCheckScope` in the initialisation
10725 // list, as the size checks must be performed after we have checked for the
10726 // pools.
10727 CodeBufferCheckScope::Open(masm, size, kReserveBufferSpace, size_policy);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010728#ifdef VIXL_DEBUG
10729 old_allow_macro_instructions_ = masm->AllowMacroInstructions();
Vincent Belliard8885c172016-08-24 11:33:19 -070010730 old_allow_assembler_ = masm->AllowAssembler();
Alexandre Ramesd3832962016-07-04 15:03:43 +010010731 masm->SetAllowMacroInstructions(false);
Vincent Belliard8885c172016-08-24 11:33:19 -070010732 masm->SetAllowAssembler(true);
Alexandre Ramesfd098172016-08-09 10:29:53 +010010733#else
10734 USE(old_allow_macro_instructions_);
Vincent Belliard8885c172016-08-24 11:33:19 -070010735 USE(old_allow_assembler_);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010736#endif
10737 }
10738
10739 ~AssemblerAccurateScope() {
10740#ifdef VIXL_DEBUG
10741 masm_->SetAllowMacroInstructions(old_allow_macro_instructions_);
Vincent Belliard8885c172016-08-24 11:33:19 -070010742 masm_->SetAllowAssembler(old_allow_assembler_);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010743#endif
10744 }
10745
10746 private:
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010747 MacroAssembler* masm_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010010748 bool old_allow_macro_instructions_;
Vincent Belliard8885c172016-08-24 11:33:19 -070010749 bool old_allow_assembler_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010010750};
10751
10752// This scope utility allows scratch registers to be managed safely. The
10753// MacroAssembler's GetScratchRegisterList() is used as a pool of scratch
10754// registers. These registers can be allocated on demand, and will be returned
10755// at the end of the scope.
10756//
10757// When the scope ends, the MacroAssembler's lists will be restored to their
10758// original state, even if the lists were modified by some other means.
10759class UseScratchRegisterScope {
10760 public:
10761 // This constructor implicitly calls the `Open` function to initialise the
10762 // scope, so it is ready to use immediately after it has been constructed.
10763 explicit UseScratchRegisterScope(MacroAssembler* masm)
10764 : available_(NULL),
10765 available_vfp_(NULL),
10766 old_available_(0),
10767 old_available_vfp_(0) {
10768 Open(masm);
10769 }
10770 // This constructor allows deferred and optional initialisation of the scope.
10771 // The user is required to explicitly call the `Open` function before using
10772 // the scope.
10773 UseScratchRegisterScope()
10774 : available_(NULL),
10775 available_vfp_(NULL),
10776 old_available_(0),
10777 old_available_vfp_(0) {}
10778
10779 // This function performs the actual initialisation work.
10780 void Open(MacroAssembler* masm);
10781
10782 // The destructor always implicitly calls the `Close` function.
10783 ~UseScratchRegisterScope() { Close(); }
10784
10785 // This function performs the cleaning-up work. It must succeed even if the
10786 // scope has not been opened. It is safe to call multiple times.
10787 void Close();
10788
10789 bool IsAvailable(const Register& reg) const;
10790 bool IsAvailable(const VRegister& reg) const;
10791
10792 // Take a register from the temp list. It will be returned automatically when
10793 // the scope ends.
10794 Register Acquire();
10795 VRegister AcquireV(unsigned size_in_bits);
10796 QRegister AcquireQ();
10797 DRegister AcquireD();
10798 SRegister AcquireS();
10799
10800 // Explicitly release an acquired (or excluded) register, putting it back in
10801 // the temp list.
10802 void Release(const Register& reg);
10803 void Release(const VRegister& reg);
10804
10805 // Make the specified registers available as scratch registers for the
10806 // duration of this scope.
10807 void Include(const RegisterList& list);
10808 void Include(const Register& reg1,
10809 const Register& reg2 = NoReg,
10810 const Register& reg3 = NoReg,
10811 const Register& reg4 = NoReg) {
10812 Include(RegisterList(reg1, reg2, reg3, reg4));
10813 }
10814 void Include(const VRegisterList& list);
10815 void Include(const VRegister& reg1,
10816 const VRegister& reg2 = NoVReg,
10817 const VRegister& reg3 = NoVReg,
10818 const VRegister& reg4 = NoVReg) {
10819 Include(VRegisterList(reg1, reg2, reg3, reg4));
10820 }
10821
10822 // Make sure that the specified registers are not available in this scope.
10823 // This can be used to prevent helper functions from using sensitive
10824 // registers, for example.
10825 void Exclude(const RegisterList& list);
10826 void Exclude(const Register& reg1,
10827 const Register& reg2 = NoReg,
10828 const Register& reg3 = NoReg,
10829 const Register& reg4 = NoReg) {
10830 Exclude(RegisterList(reg1, reg2, reg3, reg4));
10831 }
10832 void Exclude(const VRegisterList& list);
10833 void Exclude(const VRegister& reg1,
10834 const VRegister& reg2 = NoVReg,
10835 const VRegister& reg3 = NoVReg,
10836 const VRegister& reg4 = NoVReg) {
10837 Exclude(VRegisterList(reg1, reg2, reg3, reg4));
10838 }
10839
10840 // Prevent any scratch registers from being used in this scope.
10841 void ExcludeAll();
10842
10843 private:
10844 // Available scratch registers.
10845 RegisterList* available_; // kRRegister
10846 VRegisterList* available_vfp_; // kVRegister
10847
10848 // The state of the available lists at the start of this scope.
10849 uint32_t old_available_; // kRRegister
10850 uint64_t old_available_vfp_; // kVRegister
10851
10852 VIXL_DEBUG_NO_RETURN UseScratchRegisterScope(const UseScratchRegisterScope&) {
10853 VIXL_UNREACHABLE();
10854 }
10855 VIXL_DEBUG_NO_RETURN void operator=(const UseScratchRegisterScope&) {
10856 VIXL_UNREACHABLE();
10857 }
10858};
10859
10860class JumpTableBase {
10861 protected:
10862 JumpTableBase(int len, int offset_size)
10863 : table_location_(Label::kMaxOffset),
10864 branch_location_(Label::kMaxOffset),
10865 length_(len),
10866 offset_shift_(WhichPowerOf2(offset_size)),
10867 presence_(length_) {
10868 VIXL_ASSERT((length_ >= 0) && (offset_size <= 4));
10869 }
10870 virtual ~JumpTableBase() {}
10871
10872 public:
10873 int GetTableSizeInBytes() const { return length_ * (1 << offset_shift_); }
10874 int GetOffsetShift() const { return offset_shift_; }
10875 int GetLength() const { return length_; }
10876 Label* GetDefaultLabel() { return &default_; }
10877 Label* GetEndLabel() { return &end_; }
10878 void SetBranchLocation(uint32_t branch_location) {
10879 branch_location_ = branch_location;
10880 }
10881 uint32_t GetBranchLocation() const { return branch_location_; }
10882 void BindTable(uint32_t location) { table_location_ = location; }
10883 virtual void Link(MacroAssembler* masm,
10884 int case_index,
10885 uint32_t location) = 0;
10886
10887 uint32_t GetLocationForCase(int i) {
10888 VIXL_ASSERT((i >= 0) && (i < length_));
10889 return table_location_ + (i * (1 << offset_shift_));
10890 }
10891 void SetPresenceBitForCase(int i) {
10892 VIXL_ASSERT((i >= 0) && (i < length_));
10893 presence_.Set(i);
10894 }
10895
10896 void Finalize(MacroAssembler* masm) {
10897 if (!default_.IsBound()) {
10898 masm->Bind(&default_);
10899 }
10900 masm->Bind(&end_);
10901
10902 presence_.ForEachBitNotSet(LinkIt(this, masm, default_.GetLocation()));
10903 }
10904
10905 private:
10906 uint32_t table_location_;
10907 uint32_t branch_location_;
10908 const int length_;
10909 const int offset_shift_;
10910 BitField presence_;
10911 Label default_;
10912 Label end_;
10913 struct LinkIt {
10914 JumpTableBase* table_;
10915 MacroAssembler* const masm_;
10916 const uint32_t location_;
10917 LinkIt(JumpTableBase* table, MacroAssembler* const masm, uint32_t location)
10918 : table_(table), masm_(masm), location_(location) {}
10919 bool execute(int id) const {
10920 VIXL_ASSERT(id < table_->GetLength());
10921 table_->Link(masm_, static_cast<int>(id), location_);
10922 return true;
10923 }
10924 };
10925};
10926
10927// JumpTable<T>(len): Helper to describe a jump table
10928// len here describes the number of possible case. Values in [0, n[ can have a
10929// jump offset. Any other value will assert.
10930template <typename T>
10931class JumpTable : public JumpTableBase {
10932 protected:
10933 explicit JumpTable(int length) : JumpTableBase(length, sizeof(T)) {}
10934
10935 public:
Pierre Langlois3fac43c2016-10-31 13:38:47 +000010936 virtual void Link(MacroAssembler* masm,
10937 int case_index,
10938 uint32_t location) VIXL_OVERRIDE {
Alexandre Ramesd3832962016-07-04 15:03:43 +010010939 uint32_t position_in_table = GetLocationForCase(case_index);
10940 uint32_t from = GetBranchLocation();
10941 int offset = location - from;
Alexandre Rames919e3fe2016-10-14 09:07:54 +010010942 T* case_offset = masm->GetBuffer()->GetOffsetAddress<T*>(position_in_table);
Jacob Bramley10dae1a2016-07-27 09:45:13 +010010943 if (masm->IsUsingT32()) {
Alexandre Ramesd3832962016-07-04 15:03:43 +010010944 *case_offset = offset >> 1;
10945 } else {
10946 *case_offset = offset >> 2;
10947 }
10948 }
10949};
10950
10951class JumpTable8bitOffset : public JumpTable<uint8_t> {
10952 public:
10953 explicit JumpTable8bitOffset(int length) : JumpTable<uint8_t>(length) {}
10954};
10955
10956class JumpTable16bitOffset : public JumpTable<uint16_t> {
10957 public:
10958 explicit JumpTable16bitOffset(int length) : JumpTable<uint16_t>(length) {}
10959};
10960
10961class JumpTable32bitOffset : public JumpTable<uint32_t> {
10962 public:
10963 explicit JumpTable32bitOffset(int length) : JumpTable<uint32_t>(length) {}
10964};
10965
10966} // namespace aarch32
10967} // namespace vixl
10968
10969#endif // VIXL_AARCH32_MACRO_ASSEMBLER_AARCH32_H_