blob: c695c5aa1904ebce59a6bee03c206c7d69ee6d3e [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;
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000043class UseScratchRegisterScope;
Alexandre Ramesd3832962016-07-04 15:03:43 +010044
Vincent Belliard934696d2016-08-18 11:03:56 -070045enum FlagsUpdate { LeaveFlags = 0, SetFlags = 1, DontCare = 2 };
46
Alexandre Ramesd3832962016-07-04 15:03:43 +010047// LiteralPool class, defined as a container for literals
48class LiteralPool {
49 public:
50 typedef std::list<RawLiteral*>::iterator RawLiteralListIterator;
51
52 public:
53 LiteralPool() : size_(0) {}
54 ~LiteralPool() {
55 VIXL_ASSERT(literals_.empty() && (size_ == 0));
56 for (RawLiteralListIterator literal_it = keep_until_delete_.begin();
57 literal_it != keep_until_delete_.end();
58 literal_it++) {
59 delete *literal_it;
60 }
61 keep_until_delete_.clear();
62 }
63
64 unsigned GetSize() const { return size_; }
65
66 // Add a literal to the literal container.
Vincent Belliard51d1ccc2016-09-22 10:17:11 -070067 void AddLiteral(RawLiteral* literal) {
Baptiste Afsa000f93f2016-12-01 13:09:59 +000068 // Manually placed literals can't be added to a literal pool.
69 VIXL_ASSERT(!literal->IsManuallyPlaced());
Vincent Belliard1ddc52b2016-12-08 08:44:15 -080070 VIXL_ASSERT(!literal->IsBound());
Vincent Belliard51d1ccc2016-09-22 10:17:11 -070071 if (literal->GetPositionInPool() == Label::kMaxOffset) {
72 uint32_t position = GetSize();
73 literal->SetPositionInPool(position);
74 literals_.push_back(literal);
75 size_ += literal->GetAlignedSize();
76 }
Alexandre Ramesd3832962016-07-04 15:03:43 +010077 }
78
79 // First literal to be emitted.
80 RawLiteralListIterator GetFirst() { return literals_.begin(); }
81
82 // Mark the end of the literal container.
83 RawLiteralListIterator GetEnd() { return literals_.end(); }
84
85 // Remove all the literals from the container.
86 // If the literal's memory management has been delegated to the container
87 // it will be delete'd.
88 void Clear() {
89 for (RawLiteralListIterator literal_it = GetFirst(); literal_it != GetEnd();
90 literal_it++) {
91 RawLiteral* literal = *literal_it;
92 switch (literal->GetDeletionPolicy()) {
93 case RawLiteral::kDeletedOnPlacementByPool:
94 delete literal;
95 break;
96 case RawLiteral::kDeletedOnPoolDestruction:
97 keep_until_delete_.push_back(literal);
98 break;
99 case RawLiteral::kManuallyDeleted:
100 break;
101 }
102 }
103 literals_.clear();
104 size_ = 0;
105 }
106
107 private:
108 // Size (in bytes and including alignments) of the literal pool.
109 unsigned size_;
110
111 // Literal container.
112 std::list<RawLiteral*> literals_;
113 // Already bound Literal container the app requested this pool to keep.
114 std::list<RawLiteral*> keep_until_delete_;
115};
116
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000117
Alexandre Ramesd3832962016-07-04 15:03:43 +0100118// Macro assembler for aarch32 instruction set.
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000119class MacroAssembler : public Assembler, public MacroAssemblerInterface {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100120 public:
121 enum EmitOption { kBranchRequired, kNoBranchRequired };
122
Pierre Langlois4c5d65b2016-12-06 11:56:28 +0000123 virtual internal::AssemblerBase* AsAssemblerBase() VIXL_OVERRIDE {
124 return this;
125 }
Vincent Belliard8885c172016-08-24 11:33:19 -0700126
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000127 virtual void BlockPools() VIXL_OVERRIDE {
128 literal_pool_manager_.Block();
129 veneer_pool_manager_.Block();
130 }
131 virtual void ReleasePools() VIXL_OVERRIDE {
132 literal_pool_manager_.Release();
133 veneer_pool_manager_.Release();
134 }
135 virtual void EnsureEmitPoolsFor(size_t size) VIXL_OVERRIDE {
136 // TODO: Optimise this. It also checks that there is space in the buffer,
137 // which we do not need to do here.
138 VIXL_ASSERT(IsUint32(size));
139 EnsureEmitFor(static_cast<uint32_t>(size));
140 }
141
142 private:
143 class MacroEmissionCheckScope : public EmissionCheckScope {
Vincent Belliard8885c172016-08-24 11:33:19 -0700144 public:
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000145 explicit MacroEmissionCheckScope(MacroAssemblerInterface* masm)
146 : EmissionCheckScope(masm, kTypicalMacroInstructionMaxSize) {}
147
148 private:
149 static const size_t kTypicalMacroInstructionMaxSize =
150 8 * kMaxInstructionSizeInBytes;
Vincent Belliard8885c172016-08-24 11:33:19 -0700151 };
152
Alexandre Ramesd3832962016-07-04 15:03:43 +0100153 class MacroAssemblerContext {
154 public:
155 MacroAssemblerContext() : count_(0) {}
156 ~MacroAssemblerContext() {}
157 unsigned GetRecursiveCount() const { return count_; }
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000158 void Up(const char* loc) {
159 location_stack_[count_] = loc;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100160 count_++;
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000161 if (count_ >= kMaxRecursion) {
162 printf(
163 "Recursion limit reached; unable to resolve macro assembler "
164 "call.\n");
165 printf("Macro assembler context stack:\n");
166 for (unsigned i = 0; i < kMaxRecursion; i++) {
167 printf("%10s %s\n", (i == 0) ? "oldest -> " : "", location_stack_[i]);
168 }
169 VIXL_ABORT();
170 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100171 }
172 void Down() {
173 VIXL_ASSERT((count_ > 0) && (count_ < kMaxRecursion));
174 count_--;
175 }
176
177 private:
178 unsigned count_;
Georgia Kouveli4f002a82016-12-14 16:13:54 +0000179 static const uint32_t kMaxRecursion = 6;
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000180 const char* location_stack_[kMaxRecursion];
Alexandre Ramesd3832962016-07-04 15:03:43 +0100181 };
182
Vincent Belliard76887c12016-11-10 12:54:09 -0800183 // This scope is used at each Delegate entry to avoid infinite recursion of
184 // Delegate calls. The limit is defined by
185 // MacroAssemblerContext::kMaxRecursion.
Alexandre Ramesd3832962016-07-04 15:03:43 +0100186 class ContextScope {
187 public:
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000188 explicit ContextScope(MacroAssembler* const masm, const char* loc)
189 : masm_(masm) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100190 VIXL_ASSERT(masm_->AllowMacroInstructions());
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000191 masm_->GetContext()->Up(loc);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100192 }
193 ~ContextScope() { masm_->GetContext()->Down(); }
194
195 private:
196 MacroAssembler* const masm_;
197 };
198
199 MacroAssemblerContext* GetContext() { return &context_; }
200
201 class ITScope {
202 public:
203 ITScope(MacroAssembler* masm, Condition* cond, bool can_use_it = false)
204 : masm_(masm), cond_(*cond), can_use_it_(can_use_it) {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100205 if (!cond_.Is(al) && masm->IsUsingT32()) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100206 if (can_use_it_) {
207 // IT is not deprecated (that implies a 16 bit T32 instruction).
208 // We generate an IT instruction and a conditional instruction.
209 masm->it(cond_);
210 } else {
211 // The usage of IT is deprecated for the instruction.
212 // We generate a conditional branch and an unconditional instruction.
Jacob Bramleyaaac3972016-11-09 15:59:18 +0000213 // TODO: Use a scope utility with a size check. To do that, we'd need
214 // one with Open() and Close() implemented.
Georgia Kouvelie31fda52016-12-13 15:02:45 +0000215 masm_->EnsureEmitFor(kMaxT32MacroInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100216 // Generate the branch.
217 masm_->b(cond_.Negate(), Narrow, &label_);
218 // Tell the macro-assembler to generate unconditional instructions.
219 *cond = al;
220 }
221 }
222#ifdef VIXL_DEBUG
223 initial_cursor_offset_ = masm->GetCursorOffset();
Alexandre Ramesfd098172016-08-09 10:29:53 +0100224#else
225 USE(initial_cursor_offset_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100226#endif
227 }
228 ~ITScope() {
Jacob Bramley356323a2016-11-25 11:28:13 +0000229 if (label_.IsReferenced()) {
230 // We only use the label for conditional T32 instructions for which we
231 // cannot use IT.
232 VIXL_ASSERT(!cond_.Is(al));
233 VIXL_ASSERT(masm_->IsUsingT32());
234 VIXL_ASSERT(!can_use_it_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100235 VIXL_ASSERT(masm_->GetCursorOffset() - initial_cursor_offset_ <=
236 kMaxT32MacroInstructionSizeInBytes);
Vincent Belliarde42218c2016-10-19 13:24:28 -0700237 masm_->BindHelper(&label_);
Jacob Bramley356323a2016-11-25 11:28:13 +0000238 } else if (masm_->IsUsingT32() && !cond_.Is(al)) {
239 // If we've generated a conditional T32 instruction but haven't used the
240 // label, we must have used IT. Check that we did not generate a
241 // deprecated sequence.
242 VIXL_ASSERT(can_use_it_);
243 VIXL_ASSERT(masm_->GetCursorOffset() - initial_cursor_offset_ <=
244 k16BitT32InstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100245 }
246 }
247
248 private:
249 MacroAssembler* masm_;
250 Condition cond_;
251 Label label_;
252 bool can_use_it_;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100253 uint32_t initial_cursor_offset_;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100254 };
255
256 template <Assembler::InstructionCondDtDL asmfn>
257 class EmitLiteralCondDtDL {
258 public:
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000259 EmitLiteralCondDtDL(DataType dt, DRegister rt) : dt_(dt), rt_(rt) {}
260 void emit(MacroAssembler* const masm,
261 Condition cond,
262 RawLiteral* const literal) {
263 (masm->*asmfn)(cond, dt_, rt_, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100264 }
265
266 private:
Alexandre Ramesd3832962016-07-04 15:03:43 +0100267 DataType dt_;
268 DRegister rt_;
269 };
270
271 template <Assembler::InstructionCondDtSL asmfn>
272 class EmitLiteralCondDtSL {
273 public:
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000274 EmitLiteralCondDtSL(DataType dt, SRegister rt) : dt_(dt), rt_(rt) {}
275 void emit(MacroAssembler* const masm,
276 Condition cond,
277 RawLiteral* const literal) {
278 (masm->*asmfn)(cond, dt_, rt_, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100279 }
280
281 private:
Alexandre Ramesd3832962016-07-04 15:03:43 +0100282 DataType dt_;
283 SRegister rt_;
284 };
285
286 template <Assembler::InstructionCondRL asmfn>
287 class EmitLiteralCondRL {
288 public:
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000289 explicit EmitLiteralCondRL(Register rt) : rt_(rt) {}
290 void emit(MacroAssembler* const masm,
291 Condition cond,
292 RawLiteral* const literal) {
293 (masm->*asmfn)(cond, rt_, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100294 }
295
296 private:
Alexandre Ramesd3832962016-07-04 15:03:43 +0100297 Register rt_;
298 };
299
300 template <Assembler::InstructionCondRRL asmfn>
301 class EmitLiteralCondRRL {
302 public:
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000303 EmitLiteralCondRRL(Register rt, Register rt2) : rt_(rt), rt2_(rt2) {}
304 void emit(MacroAssembler* const masm,
305 Condition cond,
306 RawLiteral* const literal) {
307 (masm->*asmfn)(cond, rt_, rt2_, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100308 }
309
310 private:
Alexandre Ramesd3832962016-07-04 15:03:43 +0100311 Register rt_, rt2_;
312 };
313
314 class LiteralPoolManager {
315 public:
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000316 explicit LiteralPoolManager(MacroAssembler* const masm)
317 : masm_(masm), monitor_(0) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100318 ResetCheckpoint();
319 }
320
321 void ResetCheckpoint() { checkpoint_ = Label::kMaxOffset; }
322
323 LiteralPool* GetLiteralPool() { return &literal_pool_; }
324 Label::Offset GetCheckpoint() const {
325 // Make room for a branch over the pools.
326 return checkpoint_ - kMaxInstructionSizeInBytes;
327 }
328 size_t GetLiteralPoolSize() const { return literal_pool_.GetSize(); }
329
330 // Checks if the insertion of the literal will put the forward reference
331 // too far in the literal pool.
Vincent Belliardbd087d82016-11-29 10:40:03 -0800332 // This function is called after generating an instruction with a literal.
333 // We want to know if the literal can be reached by the instruction.
334 // If not, we will unwind the instruction, generate the pool (without the
335 // last literal) and generate the instruction again.
336 // "literal" is the literal we want to insert into the pool.
337 // "from" is the location where the instruction which uses the literal has
338 // been generated.
Georgia Kouvelicf91ee62016-12-13 18:26:36 +0000339 bool WasInsertedTooFar(RawLiteral* literal) const {
340 // Last accessible location for the instruction we just generated, which
341 // uses the literal.
342 Label::ForwardReference& reference = literal->GetBackForwardRef();
343 Label::Offset new_checkpoint = AlignDown(reference.GetCheckpoint(), 4);
344
345 // TODO: We should not need to get the min of new_checkpoint and the
346 // existing checkpoint. The existing checkpoint should already have
347 // been checked when reserving space for this load literal instruction.
348 // The assertion below asserts that we don't need the min operation here.
349 Label::Offset checkpoint =
350 std::min(new_checkpoint, literal->GetAlignedCheckpoint(4));
351 bool literal_in_pool =
352 (literal->GetPositionInPool() != Label::kMaxOffset);
353 Label::Offset position_in_pool = literal_in_pool
354 ? literal->GetPositionInPool()
355 : literal_pool_.GetSize();
Vincent Belliardbd087d82016-11-29 10:40:03 -0800356 // Compare the checkpoint to the location where the literal should be
357 // added.
358 // We add space for two instructions: one branch and one potential veneer
359 // which may be added after the check. In this particular use case, no
360 // veneer can be added but, this way, we are consistent with all the
361 // literal pool checks.
Georgia Kouvelicf91ee62016-12-13 18:26:36 +0000362 int32_t from =
363 reference.GetLocation() + masm_->GetArchitectureStatePCOffset();
Vincent Belliardbd087d82016-11-29 10:40:03 -0800364 bool too_far =
Georgia Kouvelicf91ee62016-12-13 18:26:36 +0000365 checkpoint < from + position_in_pool +
366 2 * static_cast<int32_t>(kMaxInstructionSizeInBytes);
367 // Assert if the literal is already in the pool and the existing
368 // checkpoint triggers a rewind here, as this means the pool should
369 // already have been emitted (perhaps we have not reserved enough space
370 // for the instruction we are about to rewind).
371 VIXL_ASSERT(!(too_far && (literal->GetCheckpoint() < new_checkpoint)));
Alexandre Ramesd3832962016-07-04 15:03:43 +0100372 return too_far;
373 }
374
375 // Set the different checkpoints where the literal pool has to be emited.
376 void UpdateCheckpoint(RawLiteral* literal) {
377 // The literal should have been placed somewhere in the literal pool
378 VIXL_ASSERT(literal->GetPositionInPool() != Label::kMaxOffset);
379 // TODO(all): Consider AddForwardRef as a virtual so the checkpoint is
380 // updated when inserted. Or move checkpoint_ into Label,
381 literal->UpdateCheckpoint();
382 Label::Offset tmp =
383 literal->GetAlignedCheckpoint(4) - literal->GetPositionInPool();
384 if (checkpoint_ > tmp) {
385 checkpoint_ = tmp;
386 masm_->ComputeCheckpoint();
387 }
388 }
389
Alexandre Rames4e6b4af2016-11-08 16:04:55 +0000390 bool IsEmpty() const { return GetLiteralPoolSize() == 0; }
391
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000392 void Block() { monitor_++; }
393 void Release() {
394 VIXL_ASSERT(IsBlocked());
395 if (--monitor_ == 0) {
396 // Ensure the pool has not been blocked for too long.
397 VIXL_ASSERT(masm_->GetCursorOffset() <= checkpoint_);
398 }
399 }
400 bool IsBlocked() const { return monitor_ != 0; }
401
Alexandre Ramesd3832962016-07-04 15:03:43 +0100402 private:
403 MacroAssembler* const masm_;
404 LiteralPool literal_pool_;
405
406 // Max offset in the code buffer where the literal needs to be
407 // emitted. A default value of Label::kMaxOffset means that the checkpoint
408 // is invalid.
409 Label::Offset checkpoint_;
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000410 // Indicates whether the emission of this pool is blocked.
411 int monitor_;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100412 };
413
Alexandre Ramesd3832962016-07-04 15:03:43 +0100414 void PerformEnsureEmit(Label::Offset target, uint32_t extra_size);
415
416 protected:
417 void HandleOutOfBoundsImmediate(Condition cond, Register tmp, uint32_t imm);
Vincent Belliardf8833fa2016-11-08 15:01:57 -0800418 void PadToMinimumBranchRange(Label* label);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100419
420 // Generate the instruction and if it's not possible revert the whole thing.
421 // emit the literal pool and regenerate the instruction.
422 // Note: The instruction is generated via
423 // void T::emit(MacroAssembler* const, RawLiteral* const)
424 template <typename T>
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000425 void GenerateInstruction(Condition cond,
426 T instr_callback,
427 RawLiteral* const literal) {
Pierre Langloisf5348ce2016-09-22 11:15:35 +0100428 int32_t cursor = GetCursorOffset();
Alexandre Ramesd3832962016-07-04 15:03:43 +0100429 // Emit the instruction, via the assembler
Vincent Belliard8885c172016-08-24 11:33:19 -0700430 {
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000431 MacroEmissionCheckScope guard(this);
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000432 // The ITScope can change the condition and we want to be able to revert
433 // this.
434 Condition c(cond);
435 ITScope it_scope(this, &c);
436 instr_callback.emit(this, c, literal);
Vincent Belliard8885c172016-08-24 11:33:19 -0700437 }
Vincent Belliard1ddc52b2016-12-08 08:44:15 -0800438 if (!literal->IsManuallyPlaced() && !literal->IsBound()) {
Georgia Kouvelicf91ee62016-12-13 18:26:36 +0000439 if (WasInsertedTooFar(literal)) {
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700440 // The instruction's data is too far: revert the emission
Alexandre Rames919e3fe2016-10-14 09:07:54 +0100441 GetBuffer()->Rewind(cursor);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700442 literal->InvalidateLastForwardReference(RawLiteral::kNoUpdateNecessary);
443 EmitLiteralPool(kBranchRequired);
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000444 MacroEmissionCheckScope guard(this);
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000445 ITScope it_scope(this, &cond);
446 instr_callback.emit(this, cond, literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700447 }
Georgia Kouveli50e45c52016-12-13 18:26:36 +0000448 // The literal pool above might have included the literal - in which
449 // case it will now be bound.
450 if (!literal->IsBound()) {
451 literal_pool_manager_.GetLiteralPool()->AddLiteral(literal);
452 literal_pool_manager_.UpdateCheckpoint(literal);
453 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100454 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100455 }
456
457 public:
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100458 explicit MacroAssembler(InstructionSet isa = A32)
459 : Assembler(isa),
Alexandre Ramesd3832962016-07-04 15:03:43 +0100460 available_(r12),
Jacob Bramleye8ce9f02016-12-14 16:03:31 +0000461 current_scratch_scope_(NULL),
Alexandre Ramesd3832962016-07-04 15:03:43 +0100462 checkpoint_(Label::kMaxOffset),
463 literal_pool_manager_(this),
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100464 veneer_pool_manager_(this),
Vincent Belliardbd087d82016-11-29 10:40:03 -0800465 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE),
466 doing_veneer_pool_generation_(false) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100467#ifdef VIXL_DEBUG
468 SetAllowMacroInstructions(true);
Alexandre Ramesfd098172016-08-09 10:29:53 +0100469#else
470 USE(literal_pool_manager_);
471 USE(allow_macro_instructions_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100472#endif
473 ComputeCheckpoint();
474 }
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100475 explicit MacroAssembler(size_t size, InstructionSet isa = A32)
476 : Assembler(size, isa),
477 available_(r12),
Jacob Bramleye8ce9f02016-12-14 16:03:31 +0000478 current_scratch_scope_(NULL),
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100479 checkpoint_(Label::kMaxOffset),
480 literal_pool_manager_(this),
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100481 veneer_pool_manager_(this),
Vincent Belliardbd087d82016-11-29 10:40:03 -0800482 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE),
483 doing_veneer_pool_generation_(false) {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100484#ifdef VIXL_DEBUG
485 SetAllowMacroInstructions(true);
486#endif
487 ComputeCheckpoint();
488 }
Alexandre Rames919e3fe2016-10-14 09:07:54 +0100489 MacroAssembler(byte* buffer, size_t size, InstructionSet isa = A32)
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100490 : Assembler(buffer, size, isa),
Alexandre Ramesd3832962016-07-04 15:03:43 +0100491 available_(r12),
Jacob Bramleye8ce9f02016-12-14 16:03:31 +0000492 current_scratch_scope_(NULL),
Alexandre Ramesd3832962016-07-04 15:03:43 +0100493 checkpoint_(Label::kMaxOffset),
494 literal_pool_manager_(this),
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100495 veneer_pool_manager_(this),
Vincent Belliardbd087d82016-11-29 10:40:03 -0800496 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE),
497 doing_veneer_pool_generation_(false) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100498#ifdef VIXL_DEBUG
499 SetAllowMacroInstructions(true);
500#endif
501 ComputeCheckpoint();
502 }
503
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100504 bool GenerateSimulatorCode() const { return generate_simulator_code_; }
505
Alexandre Ramesd3832962016-07-04 15:03:43 +0100506 // Tell whether any of the macro instruction can be used. When false the
507 // MacroAssembler will assert if a method which can emit a variable number
508 // of instructions is called.
Pierre Langlois4c5d65b2016-12-06 11:56:28 +0000509 virtual void SetAllowMacroInstructions(bool value) VIXL_OVERRIDE {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100510 allow_macro_instructions_ = value;
511 }
Pierre Langlois4c5d65b2016-12-06 11:56:28 +0000512 virtual bool AllowMacroInstructions() const VIXL_OVERRIDE {
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000513 return allow_macro_instructions_;
514 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100515
516 void FinalizeCode() {
517 EmitLiteralPool(kNoBranchRequired);
518 Assembler::FinalizeCode();
519 }
520
521 RegisterList* GetScratchRegisterList() { return &available_; }
522 VRegisterList* GetScratchVRegisterList() { return &available_vfp_; }
523
Jacob Bramleye8ce9f02016-12-14 16:03:31 +0000524 // Get or set the current (most-deeply-nested) UseScratchRegisterScope.
525 void SetCurrentScratchRegisterScope(UseScratchRegisterScope* scope) {
526 current_scratch_scope_ = scope;
527 }
528 UseScratchRegisterScope* GetCurrentScratchRegisterScope() {
529 return current_scratch_scope_;
530 }
531
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000532 // Given an address calculation (Register + immediate), generate code to
533 // partially compute the address. The returned MemOperand will perform any
534 // remaining computation in a subsequent load or store instruction.
535 //
Jacob Bramley9c112d82016-12-08 14:38:44 +0000536 // The offset provided should be the offset that would be used in a load or
537 // store instruction (if it had sufficient range). This only matters where
538 // base.Is(pc), since load and store instructions align the pc before
539 // dereferencing it.
540 //
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000541 // TODO: Improve the handling of negative offsets. They are not implemented
542 // precisely for now because they only have a marginal benefit for the
543 // existing uses (in delegates).
544 MemOperand MemOperandComputationHelper(Condition cond,
545 Register scratch,
546 Register base,
547 uint32_t offset,
548 uint32_t extra_offset_mask = 0);
549
550 MemOperand MemOperandComputationHelper(Register scratch,
551 Register base,
552 uint32_t offset,
553 uint32_t extra_offset_mask = 0) {
554 return MemOperandComputationHelper(al,
555 scratch,
556 base,
557 offset,
558 extra_offset_mask);
559 }
560 MemOperand MemOperandComputationHelper(Condition cond,
561 Register scratch,
562 Label* label,
563 uint32_t extra_offset_mask = 0) {
564 // Check for buffer space _before_ calculating the offset, in case we
565 // generate a pool that affects the offset calculation.
Jacob Bramley89d2f772016-12-08 17:04:16 +0000566 CodeBufferCheckScope scope(this, 4 * kMaxInstructionSizeInBytes);
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000567 Label::Offset offset =
568 label->GetLocation() -
569 AlignDown(GetCursorOffset() + GetArchitectureStatePCOffset(), 4);
570 return MemOperandComputationHelper(cond,
571 scratch,
572 pc,
573 offset,
574 extra_offset_mask);
575 }
576 MemOperand MemOperandComputationHelper(Register scratch,
577 Label* label,
578 uint32_t extra_offset_mask = 0) {
579 return MemOperandComputationHelper(al, scratch, label, extra_offset_mask);
580 }
581
582 // Determine the appropriate mask to pass into MemOperandComputationHelper.
583 uint32_t GetOffsetMask(InstructionType type, AddrMode addrmode);
584
Alexandre Ramesd3832962016-07-04 15:03:43 +0100585 // State and type helpers.
586 bool IsModifiedImmediate(uint32_t imm) {
Vincent Belliard5ddbc802016-12-16 07:57:11 -0800587 return IsUsingT32() ? ImmediateT32::IsImmediateT32(imm)
588 : ImmediateA32::IsImmediateA32(imm);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100589 }
590
591 void Bind(Label* label) {
592 VIXL_ASSERT(allow_macro_instructions_);
Vincent Belliardf8833fa2016-11-08 15:01:57 -0800593 PadToMinimumBranchRange(label);
Vincent Belliarde42218c2016-10-19 13:24:28 -0700594 BindHelper(label);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100595 }
596
597 void AddBranchLabel(Label* label) {
598 if (label->IsBound()) return;
599 veneer_pool_manager_.AddLabel(label);
600 }
601
602 void Place(RawLiteral* literal) {
603 VIXL_ASSERT(allow_macro_instructions_);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700604 VIXL_ASSERT(literal->IsManuallyPlaced());
Alexandre Ramesfd7a00d2016-11-09 14:38:04 +0000605 // We have two calls to `GetBuffer()->Align()` below, that aligns on word
606 // (4 bytes) boundaries. Only one is taken into account in
607 // `GetAlignedSize()`.
608 static const size_t kMaxAlignSize = 3;
609 size_t size = literal->GetAlignedSize() + kMaxAlignSize;
610 VIXL_ASSERT(IsUint32(size));
611 // TODO: We should use a scope here to check the size of data emitted. We
612 // currently cannot because `aarch32::CodeBufferCheckScope` currently checks
613 // for pools, so that could lead to an infinite loop.
614 EnsureEmitFor(static_cast<uint32_t>(size));
615 // Literals must be emitted aligned on word (4 bytes) boundaries.
616 GetBuffer()->Align();
Vincent Belliarde42218c2016-10-19 13:24:28 -0700617 PlaceHelper(literal);
618 GetBuffer()->Align();
Alexandre Ramesd3832962016-07-04 15:03:43 +0100619 }
620
621 void ComputeCheckpoint();
622
Vincent Belliarddcffac42016-10-19 11:31:20 -0700623 int32_t GetMarginBeforeVeneerEmission() const {
624 return veneer_pool_manager_.GetCheckpoint() - GetCursorOffset();
625 }
626
Vincent Belliardbd087d82016-11-29 10:40:03 -0800627 Label::Offset GetTargetForLiteralEmission() const {
628 if (literal_pool_manager_.IsEmpty()) return Label::kMaxOffset;
629 // We add an instruction to the size as the instruction which calls this
630 // function may add a veneer and, without this extra instruction, could put
631 // the literals out of range. For example, it's the case for a "B"
632 // instruction. At the beginning of the instruction we call EnsureEmitFor
633 // which calls this function. However, the target of the branch hasn't been
634 // inserted yet in the veneer pool.
635 size_t veneer_max_size =
636 veneer_pool_manager_.GetMaxSize() + kMaxInstructionSizeInBytes;
637 VIXL_ASSERT(IsInt32(veneer_max_size));
638 // We must be able to generate the veneer pool first.
639 Label::Offset tmp = literal_pool_manager_.GetCheckpoint() -
640 static_cast<Label::Offset>(veneer_max_size);
641 VIXL_ASSERT(tmp >= 0);
642 return tmp;
643 }
644
Alexandre Rames0eb25b02016-11-22 16:35:55 +0000645 int32_t GetMarginBeforeLiteralEmission() const {
Vincent Belliardbd087d82016-11-29 10:40:03 -0800646 Label::Offset tmp = GetTargetForLiteralEmission();
647 VIXL_ASSERT(tmp >= GetCursorOffset());
648 return tmp - GetCursorOffset();
Vincent Belliarddcffac42016-10-19 11:31:20 -0700649 }
650
Alexandre Rames4e6b4af2016-11-08 16:04:55 +0000651 bool VeneerPoolIsEmpty() const { return veneer_pool_manager_.IsEmpty(); }
652 bool LiteralPoolIsEmpty() const { return literal_pool_manager_.IsEmpty(); }
Vincent Belliarddcffac42016-10-19 11:31:20 -0700653
Alexandre Ramesd3832962016-07-04 15:03:43 +0100654 void EnsureEmitFor(uint32_t size) {
Alexandre Ramesfd7a00d2016-11-09 14:38:04 +0000655 Label::Offset target = GetCursorOffset() + size;
Vincent Belliard40b7e472016-11-09 09:46:30 -0800656 if (target <= checkpoint_) return;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100657 PerformEnsureEmit(target, size);
658 }
659
Georgia Kouvelicf91ee62016-12-13 18:26:36 +0000660 bool WasInsertedTooFar(RawLiteral* literal) {
661 return literal_pool_manager_.WasInsertedTooFar(literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100662 }
663
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000664 bool AliasesAvailableScratchRegister(Register reg) {
665 return GetScratchRegisterList()->Includes(reg);
666 }
667
Vincent Belliardadbb4a72016-11-22 14:24:54 -0800668 bool AliasesAvailableScratchRegister(RegisterOrAPSR_nzcv reg) {
669 if (reg.IsAPSR_nzcv()) return false;
670 return GetScratchRegisterList()->Includes(reg.AsRegister());
671 }
672
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000673 bool AliasesAvailableScratchRegister(VRegister reg) {
674 return GetScratchVRegisterList()->IncludesAliasOf(reg);
675 }
676
677 bool AliasesAvailableScratchRegister(const Operand& operand) {
678 if (operand.IsImmediate()) return false;
679 return AliasesAvailableScratchRegister(operand.GetBaseRegister()) ||
680 (operand.IsRegisterShiftedRegister() &&
681 AliasesAvailableScratchRegister(operand.GetShiftRegister()));
682 }
683
684 bool AliasesAvailableScratchRegister(const NeonOperand& operand) {
685 if (operand.IsImmediate()) return false;
686 return AliasesAvailableScratchRegister(operand.GetRegister());
687 }
688
689 bool AliasesAvailableScratchRegister(SRegisterList list) {
690 for (int n = 0; n < list.GetLength(); n++) {
691 if (AliasesAvailableScratchRegister(list.GetSRegister(n))) return true;
692 }
693 return false;
694 }
695
696 bool AliasesAvailableScratchRegister(DRegisterList list) {
697 for (int n = 0; n < list.GetLength(); n++) {
698 if (AliasesAvailableScratchRegister(list.GetDRegister(n))) return true;
699 }
700 return false;
701 }
702
703 bool AliasesAvailableScratchRegister(NeonRegisterList list) {
704 for (int n = 0; n < list.GetLength(); n++) {
705 if (AliasesAvailableScratchRegister(list.GetDRegister(n))) return true;
706 }
707 return false;
708 }
709
710 bool AliasesAvailableScratchRegister(RegisterList list) {
711 return GetScratchRegisterList()->Overlaps(list);
712 }
713
714 bool AliasesAvailableScratchRegister(const MemOperand& operand) {
715 return AliasesAvailableScratchRegister(operand.GetBaseRegister()) ||
716 (operand.IsShiftedRegister() &&
717 AliasesAvailableScratchRegister(operand.GetOffsetRegister()));
718 }
719
Alexandre Ramesd3832962016-07-04 15:03:43 +0100720 // Emit the literal pool in the code buffer.
721 // Every literal is placed on a 32bit boundary
722 // All the literals in the pool will be removed from the pool and potentially
723 // delete'd.
Alexandre Rames1661f512016-10-31 09:43:20 +0000724 void EmitLiteralPool(LiteralPool* const literal_pool, EmitOption option);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100725 void EmitLiteralPool(EmitOption option = kBranchRequired) {
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000726 VIXL_ASSERT(!literal_pool_manager_.IsBlocked());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100727 EmitLiteralPool(literal_pool_manager_.GetLiteralPool(), option);
728 literal_pool_manager_.ResetCheckpoint();
729 ComputeCheckpoint();
730 }
731
Pierre Langloisf5348ce2016-09-22 11:15:35 +0100732 size_t GetLiteralPoolSize() const {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100733 return literal_pool_manager_.GetLiteralPoolSize();
734 }
735
Pierre Langlois25e39872016-10-20 17:14:21 +0100736 // Adr with a literal already constructed. Add the literal to the pool if it
737 // is not already done.
738 void Adr(Condition cond, Register rd, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000739 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
740 VIXL_ASSERT(allow_macro_instructions_);
741 VIXL_ASSERT(OutsideITBlock());
742 EmitLiteralCondRL<&Assembler::adr> emit_helper(rd);
743 GenerateInstruction(cond, emit_helper, literal);
Pierre Langlois25e39872016-10-20 17:14:21 +0100744 }
745 void Adr(Register rd, RawLiteral* literal) { Adr(al, rd, literal); }
746
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700747 // Loads with literals already constructed. Add the literal to the pool
748 // if it is not already done.
749 void Ldr(Condition cond, Register rt, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000750 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
751 VIXL_ASSERT(allow_macro_instructions_);
752 VIXL_ASSERT(OutsideITBlock());
753 EmitLiteralCondRL<&Assembler::ldr> emit_helper(rt);
754 GenerateInstruction(cond, emit_helper, literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700755 }
756 void Ldr(Register rt, RawLiteral* literal) { Ldr(al, rt, literal); }
757
758 void Ldrb(Condition cond, Register rt, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000759 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
760 VIXL_ASSERT(allow_macro_instructions_);
761 VIXL_ASSERT(OutsideITBlock());
762 EmitLiteralCondRL<&Assembler::ldrb> emit_helper(rt);
763 GenerateInstruction(cond, emit_helper, literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700764 }
765 void Ldrb(Register rt, RawLiteral* literal) { Ldrb(al, rt, literal); }
766
767 void Ldrd(Condition cond, Register rt, Register rt2, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000768 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
769 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
770 VIXL_ASSERT(allow_macro_instructions_);
771 VIXL_ASSERT(OutsideITBlock());
772 EmitLiteralCondRRL<&Assembler::ldrd> emit_helper(rt, rt2);
773 GenerateInstruction(cond, emit_helper, literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700774 }
775 void Ldrd(Register rt, Register rt2, RawLiteral* literal) {
776 Ldrd(al, rt, rt2, literal);
777 }
778
779 void Ldrh(Condition cond, Register rt, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000780 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
781 VIXL_ASSERT(allow_macro_instructions_);
782 VIXL_ASSERT(OutsideITBlock());
783 EmitLiteralCondRL<&Assembler::ldrh> emit_helper(rt);
784 GenerateInstruction(cond, emit_helper, literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700785 }
786 void Ldrh(Register rt, RawLiteral* literal) { Ldrh(al, rt, literal); }
787
788 void Ldrsb(Condition cond, Register rt, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000789 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
790 VIXL_ASSERT(allow_macro_instructions_);
791 VIXL_ASSERT(OutsideITBlock());
792 EmitLiteralCondRL<&Assembler::ldrsb> emit_helper(rt);
793 GenerateInstruction(cond, emit_helper, literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700794 }
795 void Ldrsb(Register rt, RawLiteral* literal) { Ldrsb(al, rt, literal); }
796
797 void Ldrsh(Condition cond, Register rt, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000798 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
799 VIXL_ASSERT(allow_macro_instructions_);
800 VIXL_ASSERT(OutsideITBlock());
801 EmitLiteralCondRL<&Assembler::ldrsh> emit_helper(rt);
802 GenerateInstruction(cond, emit_helper, literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700803 }
804 void Ldrsh(Register rt, RawLiteral* literal) { Ldrsh(al, rt, literal); }
805
806 void Vldr(Condition cond, DataType dt, DRegister rd, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000807 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
808 VIXL_ASSERT(allow_macro_instructions_);
809 VIXL_ASSERT(OutsideITBlock());
810 EmitLiteralCondDtDL<&Assembler::vldr> emit_helper(dt, rd);
811 GenerateInstruction(cond, emit_helper, literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700812 }
813 void Vldr(DataType dt, DRegister rd, RawLiteral* literal) {
814 Vldr(al, dt, rd, literal);
815 }
816 void Vldr(Condition cond, DRegister rd, RawLiteral* literal) {
817 Vldr(cond, Untyped64, rd, literal);
818 }
819 void Vldr(DRegister rd, RawLiteral* literal) {
820 Vldr(al, Untyped64, rd, literal);
821 }
822
823 void Vldr(Condition cond, DataType dt, SRegister rd, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000824 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
825 VIXL_ASSERT(allow_macro_instructions_);
826 VIXL_ASSERT(OutsideITBlock());
827 EmitLiteralCondDtSL<&Assembler::vldr> emit_helper(dt, rd);
828 GenerateInstruction(cond, emit_helper, literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700829 }
830 void Vldr(DataType dt, SRegister rd, RawLiteral* literal) {
831 Vldr(al, dt, rd, literal);
832 }
833 void Vldr(Condition cond, SRegister rd, RawLiteral* literal) {
834 Vldr(cond, Untyped32, rd, literal);
835 }
836 void Vldr(SRegister rd, RawLiteral* literal) {
837 Vldr(al, Untyped32, rd, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100838 }
839
840 // Generic Ldr(register, data)
841 void Ldr(Condition cond, Register rt, uint32_t v) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000842 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
843 VIXL_ASSERT(allow_macro_instructions_);
844 VIXL_ASSERT(OutsideITBlock());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100845 RawLiteral* literal =
846 new Literal<uint32_t>(v, RawLiteral::kDeletedOnPlacementByPool);
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000847 EmitLiteralCondRL<&Assembler::ldr> emit_helper(rt);
848 GenerateInstruction(cond, emit_helper, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100849 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100850 template <typename T>
851 void Ldr(Register rt, T v) {
852 Ldr(al, rt, v);
853 }
854
855 // Generic Ldrd(rt, rt2, data)
856 void Ldrd(Condition cond, Register rt, Register rt2, uint64_t v) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000857 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
858 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
859 VIXL_ASSERT(allow_macro_instructions_);
860 VIXL_ASSERT(OutsideITBlock());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100861 RawLiteral* literal =
862 new Literal<uint64_t>(v, RawLiteral::kDeletedOnPlacementByPool);
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000863 EmitLiteralCondRRL<&Assembler::ldrd> emit_helper(rt, rt2);
864 GenerateInstruction(cond, emit_helper, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100865 }
866 template <typename T>
867 void Ldrd(Register rt, Register rt2, T v) {
868 Ldrd(al, rt, rt2, v);
869 }
870
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700871 void Vldr(Condition cond, SRegister rd, float v) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000872 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
873 VIXL_ASSERT(allow_macro_instructions_);
874 VIXL_ASSERT(OutsideITBlock());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100875 RawLiteral* literal =
876 new Literal<float>(v, RawLiteral::kDeletedOnPlacementByPool);
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000877 EmitLiteralCondDtSL<&Assembler::vldr> emit_helper(Untyped32, rd);
878 GenerateInstruction(cond, emit_helper, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100879 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700880 void Vldr(SRegister rd, float v) { Vldr(al, rd, v); }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100881
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700882 void Vldr(Condition cond, DRegister rd, double v) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000883 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
884 VIXL_ASSERT(allow_macro_instructions_);
885 VIXL_ASSERT(OutsideITBlock());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100886 RawLiteral* literal =
887 new Literal<double>(v, RawLiteral::kDeletedOnPlacementByPool);
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000888 EmitLiteralCondDtDL<&Assembler::vldr> emit_helper(Untyped64, rd);
889 GenerateInstruction(cond, emit_helper, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100890 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700891 void Vldr(DRegister rd, double v) { Vldr(al, rd, v); }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100892
893 void Vmov(Condition cond, DRegister rt, double v) { Vmov(cond, F64, rt, v); }
894 void Vmov(DRegister rt, double v) { Vmov(al, F64, rt, v); }
895 void Vmov(Condition cond, SRegister rt, float v) { Vmov(cond, F32, rt, v); }
896 void Vmov(SRegister rt, float v) { Vmov(al, F32, rt, v); }
897
898 void Switch(Register reg, JumpTableBase* table);
Vincent Belliard8885c172016-08-24 11:33:19 -0700899 void GenerateSwitchTable(JumpTableBase* table, int table_size);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100900 void Case(JumpTableBase* table, int case_index);
901 void Break(JumpTableBase* table);
902 void Default(JumpTableBase* table);
903 void EndSwitch(JumpTableBase* table);
904
Alexandre Ramesad91cee2016-07-26 09:31:34 +0100905 // Claim memory on the stack.
906 // Note that the Claim, Drop, and Peek helpers below ensure that offsets used
907 // are multiples of 32 bits to help maintain 32-bit SP alignment.
908 // We could `Align{Up,Down}(size, 4)`, but that's potentially problematic:
Alexandre Ramesd3832962016-07-04 15:03:43 +0100909 // Claim(3)
910 // Claim(1)
911 // Drop(4)
912 // would seem correct, when in fact:
913 // Claim(3) -> sp = sp - 4
Alexandre Ramesad91cee2016-07-26 09:31:34 +0100914 // Claim(1) -> sp = sp - 4
Alexandre Ramesd3832962016-07-04 15:03:43 +0100915 // Drop(4) -> sp = sp + 4
916 //
917 void Claim(int32_t size) {
918 if (size == 0) return;
919 // The stack must be kept 32bit aligned.
920 VIXL_ASSERT((size > 0) && ((size % 4) == 0));
921 Sub(sp, sp, size);
922 }
923 // Release memory on the stack
924 void Drop(int32_t size) {
925 if (size == 0) return;
926 // The stack must be kept 32bit aligned.
927 VIXL_ASSERT((size > 0) && ((size % 4) == 0));
928 Add(sp, sp, size);
929 }
930 void Peek(Register dst, int32_t offset) {
931 VIXL_ASSERT((offset >= 0) && ((offset % 4) == 0));
932 Ldr(dst, MemOperand(sp, offset));
933 }
934 void Poke(Register src, int32_t offset) {
935 VIXL_ASSERT((offset >= 0) && ((offset % 4) == 0));
936 Str(src, MemOperand(sp, offset));
937 }
938 void Printf(const char* format,
939 CPURegister reg1 = NoReg,
940 CPURegister reg2 = NoReg,
941 CPURegister reg3 = NoReg,
942 CPURegister reg4 = NoReg);
943 // Functions used by Printf for generation.
944 void PushRegister(CPURegister reg);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100945 void PreparePrintfArgument(CPURegister reg,
946 int* core_count,
947 int* vfp_count,
948 uint32_t* printf_type);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100949 // Handlers for cases not handled by the assembler.
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800950 // ADD, MOVT, MOVW, SUB, SXTB16, TEQ, UXTB16
Alexandre Ramesd3832962016-07-04 15:03:43 +0100951 virtual void Delegate(InstructionType type,
952 InstructionCondROp instruction,
953 Condition cond,
954 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000955 const Operand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800956 // CMN, CMP, MOV, MOVS, MVN, MVNS, SXTB, SXTH, TST, UXTB, UXTH
Alexandre Ramesd3832962016-07-04 15:03:43 +0100957 virtual void Delegate(InstructionType type,
958 InstructionCondSizeROp instruction,
959 Condition cond,
960 EncodingSize size,
961 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000962 const Operand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800963 // ADDW, ORN, ORNS, PKHBT, PKHTB, RSC, RSCS, SUBW, SXTAB, SXTAB16, SXTAH,
964 // UXTAB, UXTAB16, UXTAH
Alexandre Ramesd3832962016-07-04 15:03:43 +0100965 virtual void Delegate(InstructionType type,
966 InstructionCondRROp instruction,
967 Condition cond,
968 Register rd,
969 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000970 const Operand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800971 // ADC, ADCS, ADD, ADDS, AND, ANDS, ASR, ASRS, BIC, BICS, EOR, EORS, LSL,
972 // LSLS, LSR, LSRS, ORR, ORRS, ROR, RORS, RSB, RSBS, SBC, SBCS, SUB, SUBS
Alexandre Ramesd3832962016-07-04 15:03:43 +0100973 virtual void Delegate(InstructionType type,
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000974 InstructionCondSizeRL instruction,
975 Condition cond,
976 EncodingSize size,
977 Register rd,
978 Label* label) VIXL_OVERRIDE;
979 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100980 InstructionCondSizeRROp instruction,
981 Condition cond,
982 EncodingSize size,
983 Register rd,
984 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000985 const Operand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800986 // CBNZ, CBZ
Alexandre Ramesd3832962016-07-04 15:03:43 +0100987 virtual void Delegate(InstructionType type,
988 InstructionRL instruction,
989 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000990 Label* label) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800991 // VMOV
Alexandre Ramesd3832962016-07-04 15:03:43 +0100992 virtual void Delegate(InstructionType type,
993 InstructionCondDtSSop instruction,
994 Condition cond,
995 DataType dt,
996 SRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000997 const SOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800998 // VMOV, VMVN
Alexandre Ramesd3832962016-07-04 15:03:43 +0100999 virtual void Delegate(InstructionType type,
1000 InstructionCondDtDDop instruction,
1001 Condition cond,
1002 DataType dt,
1003 DRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +00001004 const DOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -08001005 // VMOV, VMVN
Alexandre Ramesd3832962016-07-04 15:03:43 +01001006 virtual void Delegate(InstructionType type,
1007 InstructionCondDtQQop instruction,
1008 Condition cond,
1009 DataType dt,
1010 QRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +00001011 const QOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -08001012 // LDR, LDRB, LDRH, LDRSB, LDRSH, STR, STRB, STRH
Alexandre Ramesd3832962016-07-04 15:03:43 +01001013 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +01001014 InstructionCondSizeRMop instruction,
1015 Condition cond,
1016 EncodingSize size,
1017 Register rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +00001018 const MemOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -08001019 // LDAEXD, LDRD, LDREXD, STLEX, STLEXB, STLEXH, STRD, STREX, STREXB, STREXH
Alexandre Ramesd3832962016-07-04 15:03:43 +01001020 virtual void Delegate(InstructionType type,
Jacob Bramleyf8c22842016-11-29 15:07:12 +00001021 InstructionCondRL instruction,
1022 Condition cond,
1023 Register rt,
1024 Label* label) VIXL_OVERRIDE;
1025 virtual void Delegate(InstructionType type,
1026 InstructionCondRRL instruction,
1027 Condition cond,
1028 Register rt,
1029 Register rt2,
1030 Label* label) VIXL_OVERRIDE;
1031 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +01001032 InstructionCondRRMop instruction,
1033 Condition cond,
1034 Register rt,
1035 Register rt2,
Pierre Langlois3fac43c2016-10-31 13:38:47 +00001036 const MemOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -08001037 // VLDR, VSTR
Alexandre Ramesd3832962016-07-04 15:03:43 +01001038 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +01001039 InstructionCondDtSMop instruction,
1040 Condition cond,
1041 DataType dt,
1042 SRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +00001043 const MemOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -08001044 // VLDR, VSTR
Alexandre Ramesd3832962016-07-04 15:03:43 +01001045 virtual void Delegate(InstructionType type,
1046 InstructionCondDtDMop instruction,
1047 Condition cond,
1048 DataType dt,
1049 DRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +00001050 const MemOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -08001051 // MSR
Alexandre Ramesd3832962016-07-04 15:03:43 +01001052 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +01001053 InstructionCondMsrOp instruction,
1054 Condition cond,
1055 MaskedSpecialRegister spec_reg,
Pierre Langlois3fac43c2016-10-31 13:38:47 +00001056 const Operand& operand) VIXL_OVERRIDE;
Jacob Bramleyf8c22842016-11-29 15:07:12 +00001057 virtual void Delegate(InstructionType type,
1058 InstructionCondDtDL instruction,
1059 Condition cond,
1060 DataType dt,
1061 DRegister rd,
1062 Label* label) VIXL_OVERRIDE;
1063 virtual void Delegate(InstructionType type,
1064 InstructionCondDtSL instruction,
1065 Condition cond,
1066 DataType dt,
1067 SRegister rd,
1068 Label* label) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +01001069
1070 // Start of generated code.
1071
1072 void Adc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001073 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1074 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1075 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001076 VIXL_ASSERT(allow_macro_instructions_);
1077 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001078 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001079 bool can_use_it =
1080 // ADC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1081 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) &&
1082 operand.GetBaseRegister().IsLow();
1083 ITScope it_scope(this, &cond, can_use_it);
1084 adc(cond, rd, rn, operand);
1085 }
1086 void Adc(Register rd, Register rn, const Operand& operand) {
1087 Adc(al, rd, rn, operand);
1088 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001089 void Adc(FlagsUpdate flags,
1090 Condition cond,
1091 Register rd,
1092 Register rn,
1093 const Operand& operand) {
1094 switch (flags) {
1095 case LeaveFlags:
1096 Adc(cond, rd, rn, operand);
1097 break;
1098 case SetFlags:
1099 Adcs(cond, rd, rn, operand);
1100 break;
1101 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001102 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1103 rn.Is(rd) && operand.IsPlainRegister() &&
1104 operand.GetBaseRegister().IsLow();
1105 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001106 Adcs(cond, rd, rn, operand);
1107 } else {
1108 Adc(cond, rd, rn, operand);
1109 }
1110 break;
1111 }
1112 }
1113 void Adc(FlagsUpdate flags,
1114 Register rd,
1115 Register rn,
1116 const Operand& operand) {
1117 Adc(flags, al, rd, rn, operand);
1118 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001119
1120 void Adcs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001121 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1122 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1123 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001124 VIXL_ASSERT(allow_macro_instructions_);
1125 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001126 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001127 ITScope it_scope(this, &cond);
1128 adcs(cond, rd, rn, operand);
1129 }
1130 void Adcs(Register rd, Register rn, const Operand& operand) {
1131 Adcs(al, rd, rn, operand);
1132 }
1133
1134 void Add(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001135 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1136 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1137 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001138 VIXL_ASSERT(allow_macro_instructions_);
1139 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001140 MacroEmissionCheckScope guard(this);
Alexandre Rames628c5262016-09-21 11:52:30 +01001141 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
1142 uint32_t immediate = operand.GetImmediate();
1143 if (immediate == 0) {
1144 return;
1145 }
1146 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001147 bool can_use_it =
1148 // ADD<c>{<q>} <Rd>, <Rn>, #<imm3> ; T1
1149 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() &&
1150 rd.IsLow()) ||
1151 // ADD<c>{<q>} {<Rdn>,} <Rdn>, #<imm8> ; T2
1152 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
1153 rd.IsLow() && rn.Is(rd)) ||
1154 // ADD{<c>}{<q>} <Rd>, SP, #<imm8> ; T1
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001155 (operand.IsImmediate() && (operand.GetImmediate() <= 1020) &&
Alexandre Ramesd3832962016-07-04 15:03:43 +01001156 ((operand.GetImmediate() & 0x3) == 0) && rd.IsLow() && rn.IsSP()) ||
1157 // ADD<c>{<q>} <Rd>, <Rn>, <Rm>
1158 (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
1159 operand.GetBaseRegister().IsLow()) ||
1160 // ADD<c>{<q>} <Rdn>, <Rm> ; T2
1161 (operand.IsPlainRegister() && !rd.IsPC() && rn.Is(rd) &&
1162 !operand.GetBaseRegister().IsSP() &&
1163 !operand.GetBaseRegister().IsPC()) ||
1164 // ADD{<c>}{<q>} {<Rdm>,} SP, <Rdm> ; T1
1165 (operand.IsPlainRegister() && !rd.IsPC() && rn.IsSP() &&
1166 operand.GetBaseRegister().Is(rd));
1167 ITScope it_scope(this, &cond, can_use_it);
1168 add(cond, rd, rn, operand);
1169 }
1170 void Add(Register rd, Register rn, const Operand& operand) {
1171 Add(al, rd, rn, operand);
1172 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001173 void Add(FlagsUpdate flags,
1174 Condition cond,
1175 Register rd,
1176 Register rn,
1177 const Operand& operand) {
1178 switch (flags) {
1179 case LeaveFlags:
1180 Add(cond, rd, rn, operand);
1181 break;
1182 case SetFlags:
1183 Adds(cond, rd, rn, operand);
1184 break;
1185 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001186 bool setflags_is_smaller =
Vincent Belliard934696d2016-08-18 11:03:56 -07001187 IsUsingT32() && cond.Is(al) &&
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001188 ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
Georgia Kouveli1091d742016-12-16 16:30:39 +00001189 !rd.Is(rn) && operand.GetBaseRegister().IsLow()) ||
Vincent Belliard934696d2016-08-18 11:03:56 -07001190 (operand.IsImmediate() &&
1191 ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) ||
1192 (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256)))));
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001193 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001194 Adds(cond, rd, rn, operand);
1195 } else {
Georgia Kouvelidd8e4912016-12-12 16:42:30 +00001196 bool changed_op_is_smaller =
1197 operand.IsImmediate() && (operand.GetSignedImmediate() < 0) &&
1198 ((rd.IsLow() && rn.IsLow() &&
1199 (operand.GetSignedImmediate() >= -7)) ||
1200 (rd.IsLow() && rn.Is(rd) &&
1201 (operand.GetSignedImmediate() >= -255)));
1202 if (changed_op_is_smaller) {
1203 Subs(cond, rd, rn, -operand.GetSignedImmediate());
1204 } else {
1205 Add(cond, rd, rn, operand);
1206 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001207 }
1208 break;
1209 }
1210 }
1211 void Add(FlagsUpdate flags,
1212 Register rd,
1213 Register rn,
1214 const Operand& operand) {
1215 Add(flags, al, rd, rn, operand);
1216 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001217
1218 void Adds(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001219 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1220 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1221 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001222 VIXL_ASSERT(allow_macro_instructions_);
1223 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001224 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001225 ITScope it_scope(this, &cond);
1226 adds(cond, rd, rn, operand);
1227 }
1228 void Adds(Register rd, Register rn, const Operand& operand) {
1229 Adds(al, rd, rn, operand);
1230 }
1231
Alexandre Ramesd3832962016-07-04 15:03:43 +01001232 void Adr(Condition cond, Register rd, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001233 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001234 VIXL_ASSERT(allow_macro_instructions_);
1235 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001236 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001237 ITScope it_scope(this, &cond);
1238 adr(cond, rd, label);
1239 }
1240 void Adr(Register rd, Label* label) { Adr(al, rd, label); }
1241
1242 void And(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001243 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1244 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1245 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001246 VIXL_ASSERT(allow_macro_instructions_);
1247 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001248 MacroEmissionCheckScope guard(this);
Vincent Belliarda576eb92016-12-13 14:38:55 -08001249 if (rd.Is(rn) && operand.IsPlainRegister() &&
1250 rd.Is(operand.GetBaseRegister())) {
1251 return;
1252 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001253 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001254 uint32_t immediate = operand.GetImmediate();
1255 if (immediate == 0) {
1256 mov(rd, 0);
1257 return;
1258 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001259 if ((immediate == 0xffffffff) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001260 return;
1261 }
1262 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001263 bool can_use_it =
1264 // AND<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1265 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1266 operand.GetBaseRegister().IsLow();
1267 ITScope it_scope(this, &cond, can_use_it);
1268 and_(cond, rd, rn, operand);
1269 }
1270 void And(Register rd, Register rn, const Operand& operand) {
1271 And(al, rd, rn, operand);
1272 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001273 void And(FlagsUpdate flags,
1274 Condition cond,
1275 Register rd,
1276 Register rn,
1277 const Operand& operand) {
1278 switch (flags) {
1279 case LeaveFlags:
1280 And(cond, rd, rn, operand);
1281 break;
1282 case SetFlags:
1283 Ands(cond, rd, rn, operand);
1284 break;
1285 case DontCare:
Vincent Belliarda576eb92016-12-13 14:38:55 -08001286 if (operand.IsPlainRegister() && rd.Is(rn) &&
1287 rd.Is(operand.GetBaseRegister())) {
1288 return;
1289 }
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001290 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1291 rn.Is(rd) && operand.IsPlainRegister() &&
1292 operand.GetBaseRegister().IsLow();
1293 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001294 Ands(cond, rd, rn, operand);
1295 } else {
1296 And(cond, rd, rn, operand);
1297 }
1298 break;
1299 }
1300 }
1301 void And(FlagsUpdate flags,
1302 Register rd,
1303 Register rn,
1304 const Operand& operand) {
1305 And(flags, al, rd, rn, operand);
1306 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001307
1308 void Ands(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001309 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1310 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1311 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001312 VIXL_ASSERT(allow_macro_instructions_);
1313 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001314 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001315 ITScope it_scope(this, &cond);
1316 ands(cond, rd, rn, operand);
1317 }
1318 void Ands(Register rd, Register rn, const Operand& operand) {
1319 Ands(al, rd, rn, operand);
1320 }
1321
1322 void Asr(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001323 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1324 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
1325 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001326 VIXL_ASSERT(allow_macro_instructions_);
1327 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001328 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001329 bool can_use_it =
1330 // ASR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
1331 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
1332 (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) ||
1333 // ASR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
1334 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
1335 operand.GetBaseRegister().IsLow());
1336 ITScope it_scope(this, &cond, can_use_it);
1337 asr(cond, rd, rm, operand);
1338 }
1339 void Asr(Register rd, Register rm, const Operand& operand) {
1340 Asr(al, rd, rm, operand);
1341 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001342 void Asr(FlagsUpdate flags,
1343 Condition cond,
1344 Register rd,
1345 Register rm,
1346 const Operand& operand) {
1347 switch (flags) {
1348 case LeaveFlags:
1349 Asr(cond, rd, rm, operand);
1350 break;
1351 case SetFlags:
1352 Asrs(cond, rd, rm, operand);
1353 break;
1354 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001355 bool setflags_is_smaller =
1356 IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() &&
1357 ((operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
1358 (operand.GetImmediate() <= 32)) ||
1359 (operand.IsPlainRegister() && rd.Is(rm)));
1360 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001361 Asrs(cond, rd, rm, operand);
1362 } else {
1363 Asr(cond, rd, rm, operand);
1364 }
1365 break;
1366 }
1367 }
1368 void Asr(FlagsUpdate flags,
1369 Register rd,
1370 Register rm,
1371 const Operand& operand) {
1372 Asr(flags, al, rd, rm, operand);
1373 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001374
1375 void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001376 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1377 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
1378 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001379 VIXL_ASSERT(allow_macro_instructions_);
1380 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001381 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001382 ITScope it_scope(this, &cond);
1383 asrs(cond, rd, rm, operand);
1384 }
1385 void Asrs(Register rd, Register rm, const Operand& operand) {
1386 Asrs(al, rd, rm, operand);
1387 }
1388
Vincent Belliard4a30c5d2016-12-08 09:23:42 -08001389 void B(Condition cond, Label* label, BranchHint hint = kBranchWithoutHint) {
Alexandre Ramesd3832962016-07-04 15:03:43 +01001390 VIXL_ASSERT(allow_macro_instructions_);
1391 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001392 MacroEmissionCheckScope guard(this);
Vincent Belliard4a30c5d2016-12-08 09:23:42 -08001393 if (hint == kNear) {
1394 if (label->IsBound()) {
1395 b(cond, label);
1396 } else {
1397 b(cond, Narrow, label);
1398 }
1399 } else {
1400 b(cond, label);
1401 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001402 AddBranchLabel(label);
1403 }
Vincent Belliard4a30c5d2016-12-08 09:23:42 -08001404 void B(Label* label, BranchHint hint = kBranchWithoutHint) {
1405 B(al, label, hint);
1406 }
1407 void BPreferNear(Condition cond, Label* label) { B(cond, label, kNear); }
1408 void BPreferNear(Label* label) { B(al, label, kNear); }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001409
1410 void Bfc(Condition cond, Register rd, uint32_t lsb, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001411 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1412 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001413 VIXL_ASSERT(allow_macro_instructions_);
1414 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001415 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001416 ITScope it_scope(this, &cond);
1417 bfc(cond, rd, lsb, operand);
1418 }
1419 void Bfc(Register rd, uint32_t lsb, const Operand& operand) {
1420 Bfc(al, rd, lsb, operand);
1421 }
1422
1423 void Bfi(Condition cond,
1424 Register rd,
1425 Register rn,
1426 uint32_t lsb,
1427 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001428 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1429 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1430 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001431 VIXL_ASSERT(allow_macro_instructions_);
1432 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001433 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001434 ITScope it_scope(this, &cond);
1435 bfi(cond, rd, rn, lsb, operand);
1436 }
1437 void Bfi(Register rd, Register rn, uint32_t lsb, const Operand& operand) {
1438 Bfi(al, rd, rn, lsb, operand);
1439 }
1440
1441 void Bic(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001442 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1443 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1444 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001445 VIXL_ASSERT(allow_macro_instructions_);
1446 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001447 MacroEmissionCheckScope guard(this);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001448 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001449 uint32_t immediate = operand.GetImmediate();
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001450 if ((immediate == 0) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001451 return;
1452 }
1453 if (immediate == 0xffffffff) {
1454 mov(rd, 0);
1455 return;
1456 }
1457 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001458 bool can_use_it =
1459 // BIC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1460 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1461 operand.GetBaseRegister().IsLow();
1462 ITScope it_scope(this, &cond, can_use_it);
1463 bic(cond, rd, rn, operand);
1464 }
1465 void Bic(Register rd, Register rn, const Operand& operand) {
1466 Bic(al, rd, rn, operand);
1467 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001468 void Bic(FlagsUpdate flags,
1469 Condition cond,
1470 Register rd,
1471 Register rn,
1472 const Operand& operand) {
1473 switch (flags) {
1474 case LeaveFlags:
1475 Bic(cond, rd, rn, operand);
1476 break;
1477 case SetFlags:
1478 Bics(cond, rd, rn, operand);
1479 break;
1480 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001481 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1482 rn.Is(rd) && operand.IsPlainRegister() &&
1483 operand.GetBaseRegister().IsLow();
1484 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001485 Bics(cond, rd, rn, operand);
1486 } else {
1487 Bic(cond, rd, rn, operand);
1488 }
1489 break;
1490 }
1491 }
1492 void Bic(FlagsUpdate flags,
1493 Register rd,
1494 Register rn,
1495 const Operand& operand) {
1496 Bic(flags, al, rd, rn, operand);
1497 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001498
1499 void Bics(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001500 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1501 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1502 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001503 VIXL_ASSERT(allow_macro_instructions_);
1504 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001505 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001506 ITScope it_scope(this, &cond);
1507 bics(cond, rd, rn, operand);
1508 }
1509 void Bics(Register rd, Register rn, const Operand& operand) {
1510 Bics(al, rd, rn, operand);
1511 }
1512
1513 void Bkpt(Condition cond, uint32_t imm) {
1514 VIXL_ASSERT(allow_macro_instructions_);
1515 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001516 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001517 ITScope it_scope(this, &cond);
1518 bkpt(cond, imm);
1519 }
1520 void Bkpt(uint32_t imm) { Bkpt(al, imm); }
1521
1522 void Bl(Condition cond, Label* label) {
1523 VIXL_ASSERT(allow_macro_instructions_);
1524 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001525 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001526 ITScope it_scope(this, &cond);
1527 bl(cond, label);
1528 AddBranchLabel(label);
1529 }
1530 void Bl(Label* label) { Bl(al, label); }
1531
1532 void Blx(Condition cond, Label* label) {
1533 VIXL_ASSERT(allow_macro_instructions_);
1534 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001535 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001536 ITScope it_scope(this, &cond);
1537 blx(cond, label);
1538 AddBranchLabel(label);
1539 }
1540 void Blx(Label* label) { Blx(al, label); }
1541
1542 void Blx(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001543 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001544 VIXL_ASSERT(allow_macro_instructions_);
1545 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001546 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001547 bool can_use_it =
1548 // BLX{<c>}{<q>} <Rm> ; T1
1549 !rm.IsPC();
1550 ITScope it_scope(this, &cond, can_use_it);
1551 blx(cond, rm);
1552 }
1553 void Blx(Register rm) { Blx(al, rm); }
1554
1555 void Bx(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001556 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001557 VIXL_ASSERT(allow_macro_instructions_);
1558 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001559 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001560 bool can_use_it =
1561 // BX{<c>}{<q>} <Rm> ; T1
1562 !rm.IsPC();
1563 ITScope it_scope(this, &cond, can_use_it);
1564 bx(cond, rm);
1565 }
1566 void Bx(Register rm) { Bx(al, rm); }
1567
1568 void Bxj(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001569 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001570 VIXL_ASSERT(allow_macro_instructions_);
1571 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001572 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001573 ITScope it_scope(this, &cond);
1574 bxj(cond, rm);
1575 }
1576 void Bxj(Register rm) { Bxj(al, rm); }
1577
1578 void Cbnz(Register rn, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001579 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001580 VIXL_ASSERT(allow_macro_instructions_);
1581 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001582 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001583 cbnz(rn, label);
1584 AddBranchLabel(label);
1585 }
1586
1587 void Cbz(Register rn, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001588 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001589 VIXL_ASSERT(allow_macro_instructions_);
1590 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001591 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001592 cbz(rn, label);
1593 AddBranchLabel(label);
1594 }
1595
1596 void Clrex(Condition cond) {
1597 VIXL_ASSERT(allow_macro_instructions_);
1598 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001599 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001600 ITScope it_scope(this, &cond);
1601 clrex(cond);
1602 }
1603 void Clrex() { Clrex(al); }
1604
1605 void Clz(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001606 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1607 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001608 VIXL_ASSERT(allow_macro_instructions_);
1609 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001610 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001611 ITScope it_scope(this, &cond);
1612 clz(cond, rd, rm);
1613 }
1614 void Clz(Register rd, Register rm) { Clz(al, rd, rm); }
1615
1616 void Cmn(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001617 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1618 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001619 VIXL_ASSERT(allow_macro_instructions_);
1620 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001621 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001622 bool can_use_it =
1623 // CMN{<c>}{<q>} <Rn>, <Rm> ; T1
1624 operand.IsPlainRegister() && rn.IsLow() &&
1625 operand.GetBaseRegister().IsLow();
1626 ITScope it_scope(this, &cond, can_use_it);
1627 cmn(cond, rn, operand);
1628 }
1629 void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); }
1630
1631 void Cmp(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001632 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1633 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001634 VIXL_ASSERT(allow_macro_instructions_);
1635 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001636 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001637 bool can_use_it =
1638 // CMP{<c>}{<q>} <Rn>, #<imm8> ; T1
1639 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
1640 rn.IsLow()) ||
1641 // CMP{<c>}{<q>} <Rn>, <Rm> ; T1 T2
1642 (operand.IsPlainRegister() && !rn.IsPC() &&
1643 !operand.GetBaseRegister().IsPC());
1644 ITScope it_scope(this, &cond, can_use_it);
1645 cmp(cond, rn, operand);
1646 }
1647 void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); }
1648
1649 void Crc32b(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001650 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1651 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1652 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001653 VIXL_ASSERT(allow_macro_instructions_);
1654 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001655 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001656 ITScope it_scope(this, &cond);
1657 crc32b(cond, rd, rn, rm);
1658 }
1659 void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); }
1660
1661 void Crc32cb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001662 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1663 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1664 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001665 VIXL_ASSERT(allow_macro_instructions_);
1666 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001667 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001668 ITScope it_scope(this, &cond);
1669 crc32cb(cond, rd, rn, rm);
1670 }
1671 void Crc32cb(Register rd, Register rn, Register rm) {
1672 Crc32cb(al, rd, rn, rm);
1673 }
1674
1675 void Crc32ch(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001676 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1677 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1678 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001679 VIXL_ASSERT(allow_macro_instructions_);
1680 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001681 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001682 ITScope it_scope(this, &cond);
1683 crc32ch(cond, rd, rn, rm);
1684 }
1685 void Crc32ch(Register rd, Register rn, Register rm) {
1686 Crc32ch(al, rd, rn, rm);
1687 }
1688
1689 void Crc32cw(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001690 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1691 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001693 VIXL_ASSERT(allow_macro_instructions_);
1694 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001695 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001696 ITScope it_scope(this, &cond);
1697 crc32cw(cond, rd, rn, rm);
1698 }
1699 void Crc32cw(Register rd, Register rn, Register rm) {
1700 Crc32cw(al, rd, rn, rm);
1701 }
1702
1703 void Crc32h(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001704 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1705 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1706 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001707 VIXL_ASSERT(allow_macro_instructions_);
1708 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001709 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001710 ITScope it_scope(this, &cond);
1711 crc32h(cond, rd, rn, rm);
1712 }
1713 void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); }
1714
1715 void Crc32w(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001716 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1717 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1718 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001719 VIXL_ASSERT(allow_macro_instructions_);
1720 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001721 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001722 ITScope it_scope(this, &cond);
1723 crc32w(cond, rd, rn, rm);
1724 }
1725 void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); }
1726
1727 void Dmb(Condition cond, MemoryBarrier option) {
1728 VIXL_ASSERT(allow_macro_instructions_);
1729 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001730 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001731 ITScope it_scope(this, &cond);
1732 dmb(cond, option);
1733 }
1734 void Dmb(MemoryBarrier option) { Dmb(al, option); }
1735
1736 void Dsb(Condition cond, MemoryBarrier option) {
1737 VIXL_ASSERT(allow_macro_instructions_);
1738 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001739 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001740 ITScope it_scope(this, &cond);
1741 dsb(cond, option);
1742 }
1743 void Dsb(MemoryBarrier option) { Dsb(al, option); }
1744
1745 void Eor(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001746 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1747 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1748 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001749 VIXL_ASSERT(allow_macro_instructions_);
1750 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001751 MacroEmissionCheckScope guard(this);
Alexandre Rames628c5262016-09-21 11:52:30 +01001752 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
1753 uint32_t immediate = operand.GetImmediate();
1754 if (immediate == 0) {
1755 return;
1756 }
1757 if (immediate == 0xffffffff) {
1758 mvn(rd, rn);
1759 return;
1760 }
1761 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001762 bool can_use_it =
1763 // EOR<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1764 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1765 operand.GetBaseRegister().IsLow();
1766 ITScope it_scope(this, &cond, can_use_it);
1767 eor(cond, rd, rn, operand);
1768 }
1769 void Eor(Register rd, Register rn, const Operand& operand) {
1770 Eor(al, rd, rn, operand);
1771 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001772 void Eor(FlagsUpdate flags,
1773 Condition cond,
1774 Register rd,
1775 Register rn,
1776 const Operand& operand) {
1777 switch (flags) {
1778 case LeaveFlags:
1779 Eor(cond, rd, rn, operand);
1780 break;
1781 case SetFlags:
1782 Eors(cond, rd, rn, operand);
1783 break;
1784 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001785 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1786 rn.Is(rd) && operand.IsPlainRegister() &&
1787 operand.GetBaseRegister().IsLow();
1788 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001789 Eors(cond, rd, rn, operand);
1790 } else {
1791 Eor(cond, rd, rn, operand);
1792 }
1793 break;
1794 }
1795 }
1796 void Eor(FlagsUpdate flags,
1797 Register rd,
1798 Register rn,
1799 const Operand& operand) {
1800 Eor(flags, al, rd, rn, operand);
1801 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001802
1803 void Eors(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001804 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1805 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1806 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001807 VIXL_ASSERT(allow_macro_instructions_);
1808 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001809 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001810 ITScope it_scope(this, &cond);
1811 eors(cond, rd, rn, operand);
1812 }
1813 void Eors(Register rd, Register rn, const Operand& operand) {
1814 Eors(al, rd, rn, operand);
1815 }
1816
1817 void Fldmdbx(Condition cond,
1818 Register rn,
1819 WriteBack write_back,
1820 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001821 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1822 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001823 VIXL_ASSERT(allow_macro_instructions_);
1824 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001825 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001826 ITScope it_scope(this, &cond);
1827 fldmdbx(cond, rn, write_back, dreglist);
1828 }
1829 void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) {
1830 Fldmdbx(al, rn, write_back, dreglist);
1831 }
1832
1833 void Fldmiax(Condition cond,
1834 Register rn,
1835 WriteBack write_back,
1836 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001837 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1838 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001839 VIXL_ASSERT(allow_macro_instructions_);
1840 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001841 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001842 ITScope it_scope(this, &cond);
1843 fldmiax(cond, rn, write_back, dreglist);
1844 }
1845 void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) {
1846 Fldmiax(al, rn, write_back, dreglist);
1847 }
1848
1849 void Fstmdbx(Condition cond,
1850 Register rn,
1851 WriteBack write_back,
1852 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001853 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1854 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001855 VIXL_ASSERT(allow_macro_instructions_);
1856 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001857 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001858 ITScope it_scope(this, &cond);
1859 fstmdbx(cond, rn, write_back, dreglist);
1860 }
1861 void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) {
1862 Fstmdbx(al, rn, write_back, dreglist);
1863 }
1864
1865 void Fstmiax(Condition cond,
1866 Register rn,
1867 WriteBack write_back,
1868 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001869 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1870 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001871 VIXL_ASSERT(allow_macro_instructions_);
1872 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001873 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001874 ITScope it_scope(this, &cond);
1875 fstmiax(cond, rn, write_back, dreglist);
1876 }
1877 void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) {
1878 Fstmiax(al, rn, write_back, dreglist);
1879 }
1880
1881 void Hlt(Condition cond, uint32_t imm) {
1882 VIXL_ASSERT(allow_macro_instructions_);
1883 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001884 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001885 ITScope it_scope(this, &cond);
1886 hlt(cond, imm);
1887 }
1888 void Hlt(uint32_t imm) { Hlt(al, imm); }
1889
1890 void Hvc(Condition cond, uint32_t imm) {
1891 VIXL_ASSERT(allow_macro_instructions_);
1892 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001893 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001894 ITScope it_scope(this, &cond);
1895 hvc(cond, imm);
1896 }
1897 void Hvc(uint32_t imm) { Hvc(al, imm); }
1898
1899 void Isb(Condition cond, MemoryBarrier option) {
1900 VIXL_ASSERT(allow_macro_instructions_);
1901 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001902 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001903 ITScope it_scope(this, &cond);
1904 isb(cond, option);
1905 }
1906 void Isb(MemoryBarrier option) { Isb(al, option); }
1907
Alexandre Ramesd3832962016-07-04 15:03:43 +01001908 void Lda(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001909 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1910 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001911 VIXL_ASSERT(allow_macro_instructions_);
1912 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001913 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001914 ITScope it_scope(this, &cond);
1915 lda(cond, rt, operand);
1916 }
1917 void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); }
1918
1919 void Ldab(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001920 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1921 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001922 VIXL_ASSERT(allow_macro_instructions_);
1923 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001924 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001925 ITScope it_scope(this, &cond);
1926 ldab(cond, rt, operand);
1927 }
1928 void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); }
1929
1930 void Ldaex(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001931 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1932 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001933 VIXL_ASSERT(allow_macro_instructions_);
1934 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001935 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001936 ITScope it_scope(this, &cond);
1937 ldaex(cond, rt, operand);
1938 }
1939 void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); }
1940
1941 void Ldaexb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001942 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1943 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001944 VIXL_ASSERT(allow_macro_instructions_);
1945 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001946 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001947 ITScope it_scope(this, &cond);
1948 ldaexb(cond, rt, operand);
1949 }
1950 void Ldaexb(Register rt, const MemOperand& operand) {
1951 Ldaexb(al, rt, operand);
1952 }
1953
1954 void Ldaexd(Condition cond,
1955 Register rt,
1956 Register rt2,
1957 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001958 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1959 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
1960 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001961 VIXL_ASSERT(allow_macro_instructions_);
1962 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001963 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001964 ITScope it_scope(this, &cond);
1965 ldaexd(cond, rt, rt2, operand);
1966 }
1967 void Ldaexd(Register rt, Register rt2, const MemOperand& operand) {
1968 Ldaexd(al, rt, rt2, operand);
1969 }
1970
1971 void Ldaexh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001972 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1973 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001974 VIXL_ASSERT(allow_macro_instructions_);
1975 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001976 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001977 ITScope it_scope(this, &cond);
1978 ldaexh(cond, rt, operand);
1979 }
1980 void Ldaexh(Register rt, const MemOperand& operand) {
1981 Ldaexh(al, rt, operand);
1982 }
1983
1984 void Ldah(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001985 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1986 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001987 VIXL_ASSERT(allow_macro_instructions_);
1988 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001989 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001990 ITScope it_scope(this, &cond);
1991 ldah(cond, rt, operand);
1992 }
1993 void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); }
1994
1995 void Ldm(Condition cond,
1996 Register rn,
1997 WriteBack write_back,
1998 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001999 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2000 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002001 VIXL_ASSERT(allow_macro_instructions_);
2002 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002003 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002004 ITScope it_scope(this, &cond);
2005 ldm(cond, rn, write_back, registers);
2006 }
2007 void Ldm(Register rn, WriteBack write_back, RegisterList registers) {
2008 Ldm(al, rn, write_back, registers);
2009 }
2010
2011 void Ldmda(Condition cond,
2012 Register rn,
2013 WriteBack write_back,
2014 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002015 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2016 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002017 VIXL_ASSERT(allow_macro_instructions_);
2018 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002019 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002020 ITScope it_scope(this, &cond);
2021 ldmda(cond, rn, write_back, registers);
2022 }
2023 void Ldmda(Register rn, WriteBack write_back, RegisterList registers) {
2024 Ldmda(al, rn, write_back, registers);
2025 }
2026
2027 void Ldmdb(Condition cond,
2028 Register rn,
2029 WriteBack write_back,
2030 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002031 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2032 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002033 VIXL_ASSERT(allow_macro_instructions_);
2034 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002035 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002036 ITScope it_scope(this, &cond);
2037 ldmdb(cond, rn, write_back, registers);
2038 }
2039 void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) {
2040 Ldmdb(al, rn, write_back, registers);
2041 }
2042
2043 void Ldmea(Condition cond,
2044 Register rn,
2045 WriteBack write_back,
2046 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002047 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2048 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002049 VIXL_ASSERT(allow_macro_instructions_);
2050 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002051 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002052 ITScope it_scope(this, &cond);
2053 ldmea(cond, rn, write_back, registers);
2054 }
2055 void Ldmea(Register rn, WriteBack write_back, RegisterList registers) {
2056 Ldmea(al, rn, write_back, registers);
2057 }
2058
2059 void Ldmed(Condition cond,
2060 Register rn,
2061 WriteBack write_back,
2062 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002063 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2064 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002065 VIXL_ASSERT(allow_macro_instructions_);
2066 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002067 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002068 ITScope it_scope(this, &cond);
2069 ldmed(cond, rn, write_back, registers);
2070 }
2071 void Ldmed(Register rn, WriteBack write_back, RegisterList registers) {
2072 Ldmed(al, rn, write_back, registers);
2073 }
2074
2075 void Ldmfa(Condition cond,
2076 Register rn,
2077 WriteBack write_back,
2078 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002079 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2080 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002081 VIXL_ASSERT(allow_macro_instructions_);
2082 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002083 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002084 ITScope it_scope(this, &cond);
2085 ldmfa(cond, rn, write_back, registers);
2086 }
2087 void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) {
2088 Ldmfa(al, rn, write_back, registers);
2089 }
2090
2091 void Ldmfd(Condition cond,
2092 Register rn,
2093 WriteBack write_back,
2094 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002095 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2096 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002097 VIXL_ASSERT(allow_macro_instructions_);
2098 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002099 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002100 ITScope it_scope(this, &cond);
2101 ldmfd(cond, rn, write_back, registers);
2102 }
2103 void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) {
2104 Ldmfd(al, rn, write_back, registers);
2105 }
2106
2107 void Ldmib(Condition cond,
2108 Register rn,
2109 WriteBack write_back,
2110 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002111 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2112 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002113 VIXL_ASSERT(allow_macro_instructions_);
2114 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002115 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002116 ITScope it_scope(this, &cond);
2117 ldmib(cond, rn, write_back, registers);
2118 }
2119 void Ldmib(Register rn, WriteBack write_back, RegisterList registers) {
2120 Ldmib(al, rn, write_back, registers);
2121 }
2122
2123 void Ldr(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002124 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2125 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002126 VIXL_ASSERT(allow_macro_instructions_);
2127 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002128 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002129 bool can_use_it =
2130 // LDR{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
2131 (operand.IsImmediate() && rt.IsLow() &&
2132 operand.GetBaseRegister().IsLow() &&
2133 operand.IsOffsetImmediateWithinRange(0, 124, 4) &&
2134 (operand.GetAddrMode() == Offset)) ||
2135 // LDR{<c>}{<q>} <Rt>, [SP{, #{+}<imm>}] ; T2
2136 (operand.IsImmediate() && rt.IsLow() &&
2137 operand.GetBaseRegister().IsSP() &&
2138 operand.IsOffsetImmediateWithinRange(0, 1020, 4) &&
2139 (operand.GetAddrMode() == Offset)) ||
2140 // LDR{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2141 (operand.IsPlainRegister() && rt.IsLow() &&
2142 operand.GetBaseRegister().IsLow() &&
2143 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2144 (operand.GetAddrMode() == Offset));
2145 ITScope it_scope(this, &cond, can_use_it);
2146 ldr(cond, rt, operand);
2147 }
2148 void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); }
2149
2150 void Ldr(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002151 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002152 VIXL_ASSERT(allow_macro_instructions_);
2153 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002154 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002155 ITScope it_scope(this, &cond);
2156 ldr(cond, rt, label);
2157 }
2158 void Ldr(Register rt, Label* label) { Ldr(al, rt, label); }
2159
2160 void Ldrb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002161 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2162 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002163 VIXL_ASSERT(allow_macro_instructions_);
2164 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002165 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002166 bool can_use_it =
2167 // LDRB{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
2168 (operand.IsImmediate() && rt.IsLow() &&
2169 operand.GetBaseRegister().IsLow() &&
2170 operand.IsOffsetImmediateWithinRange(0, 31) &&
2171 (operand.GetAddrMode() == Offset)) ||
2172 // LDRB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2173 (operand.IsPlainRegister() && rt.IsLow() &&
2174 operand.GetBaseRegister().IsLow() &&
2175 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2176 (operand.GetAddrMode() == Offset));
2177 ITScope it_scope(this, &cond, can_use_it);
2178 ldrb(cond, rt, operand);
2179 }
2180 void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); }
2181
2182 void Ldrb(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002183 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002184 VIXL_ASSERT(allow_macro_instructions_);
2185 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002186 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002187 ITScope it_scope(this, &cond);
2188 ldrb(cond, rt, label);
2189 }
2190 void Ldrb(Register rt, Label* label) { Ldrb(al, rt, label); }
2191
2192 void Ldrd(Condition cond,
2193 Register rt,
2194 Register rt2,
2195 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002196 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2197 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
2198 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002199 VIXL_ASSERT(allow_macro_instructions_);
2200 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002201 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002202 ITScope it_scope(this, &cond);
2203 ldrd(cond, rt, rt2, operand);
2204 }
2205 void Ldrd(Register rt, Register rt2, const MemOperand& operand) {
2206 Ldrd(al, rt, rt2, operand);
2207 }
2208
2209 void Ldrd(Condition cond, Register rt, Register rt2, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002210 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2211 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002212 VIXL_ASSERT(allow_macro_instructions_);
2213 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002214 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002215 ITScope it_scope(this, &cond);
2216 ldrd(cond, rt, rt2, label);
2217 }
2218 void Ldrd(Register rt, Register rt2, Label* label) {
2219 Ldrd(al, rt, rt2, label);
2220 }
2221
2222 void Ldrex(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002223 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2224 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002225 VIXL_ASSERT(allow_macro_instructions_);
2226 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002227 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002228 ITScope it_scope(this, &cond);
2229 ldrex(cond, rt, operand);
2230 }
2231 void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); }
2232
2233 void Ldrexb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002234 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2235 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002236 VIXL_ASSERT(allow_macro_instructions_);
2237 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002238 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002239 ITScope it_scope(this, &cond);
2240 ldrexb(cond, rt, operand);
2241 }
2242 void Ldrexb(Register rt, const MemOperand& operand) {
2243 Ldrexb(al, rt, operand);
2244 }
2245
2246 void Ldrexd(Condition cond,
2247 Register rt,
2248 Register rt2,
2249 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002250 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2251 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
2252 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002253 VIXL_ASSERT(allow_macro_instructions_);
2254 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002255 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002256 ITScope it_scope(this, &cond);
2257 ldrexd(cond, rt, rt2, operand);
2258 }
2259 void Ldrexd(Register rt, Register rt2, const MemOperand& operand) {
2260 Ldrexd(al, rt, rt2, operand);
2261 }
2262
2263 void Ldrexh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002264 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2265 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002266 VIXL_ASSERT(allow_macro_instructions_);
2267 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002268 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002269 ITScope it_scope(this, &cond);
2270 ldrexh(cond, rt, operand);
2271 }
2272 void Ldrexh(Register rt, const MemOperand& operand) {
2273 Ldrexh(al, rt, operand);
2274 }
2275
2276 void Ldrh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002277 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2278 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002279 VIXL_ASSERT(allow_macro_instructions_);
2280 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002281 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002282 bool can_use_it =
2283 // LDRH{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
2284 (operand.IsImmediate() && rt.IsLow() &&
2285 operand.GetBaseRegister().IsLow() &&
2286 operand.IsOffsetImmediateWithinRange(0, 62, 2) &&
2287 (operand.GetAddrMode() == Offset)) ||
2288 // LDRH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2289 (operand.IsPlainRegister() && rt.IsLow() &&
2290 operand.GetBaseRegister().IsLow() &&
2291 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2292 (operand.GetAddrMode() == Offset));
2293 ITScope it_scope(this, &cond, can_use_it);
2294 ldrh(cond, rt, operand);
2295 }
2296 void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); }
2297
2298 void Ldrh(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002299 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002300 VIXL_ASSERT(allow_macro_instructions_);
2301 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002302 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002303 ITScope it_scope(this, &cond);
2304 ldrh(cond, rt, label);
2305 }
2306 void Ldrh(Register rt, Label* label) { Ldrh(al, rt, label); }
2307
2308 void Ldrsb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002309 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2310 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002311 VIXL_ASSERT(allow_macro_instructions_);
2312 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002313 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002314 bool can_use_it =
2315 // LDRSB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2316 operand.IsPlainRegister() && rt.IsLow() &&
2317 operand.GetBaseRegister().IsLow() &&
2318 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2319 (operand.GetAddrMode() == Offset);
2320 ITScope it_scope(this, &cond, can_use_it);
2321 ldrsb(cond, rt, operand);
2322 }
2323 void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); }
2324
2325 void Ldrsb(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002326 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002327 VIXL_ASSERT(allow_macro_instructions_);
2328 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002329 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002330 ITScope it_scope(this, &cond);
2331 ldrsb(cond, rt, label);
2332 }
2333 void Ldrsb(Register rt, Label* label) { Ldrsb(al, rt, label); }
2334
2335 void Ldrsh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002336 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2337 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002338 VIXL_ASSERT(allow_macro_instructions_);
2339 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002340 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002341 bool can_use_it =
2342 // LDRSH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2343 operand.IsPlainRegister() && rt.IsLow() &&
2344 operand.GetBaseRegister().IsLow() &&
2345 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2346 (operand.GetAddrMode() == Offset);
2347 ITScope it_scope(this, &cond, can_use_it);
2348 ldrsh(cond, rt, operand);
2349 }
2350 void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); }
2351
2352 void Ldrsh(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002353 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002354 VIXL_ASSERT(allow_macro_instructions_);
2355 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002356 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002357 ITScope it_scope(this, &cond);
2358 ldrsh(cond, rt, label);
2359 }
2360 void Ldrsh(Register rt, Label* label) { Ldrsh(al, rt, label); }
2361
2362 void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002363 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2364 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2365 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002366 VIXL_ASSERT(allow_macro_instructions_);
2367 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002368 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002369 bool can_use_it =
2370 // LSL<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
2371 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2372 (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) ||
2373 // LSL<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
2374 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
2375 operand.GetBaseRegister().IsLow());
2376 ITScope it_scope(this, &cond, can_use_it);
2377 lsl(cond, rd, rm, operand);
2378 }
2379 void Lsl(Register rd, Register rm, const Operand& operand) {
2380 Lsl(al, rd, rm, operand);
2381 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002382 void Lsl(FlagsUpdate flags,
2383 Condition cond,
2384 Register rd,
2385 Register rm,
2386 const Operand& operand) {
2387 switch (flags) {
2388 case LeaveFlags:
2389 Lsl(cond, rd, rm, operand);
2390 break;
2391 case SetFlags:
2392 Lsls(cond, rd, rm, operand);
2393 break;
2394 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002395 bool setflags_is_smaller =
2396 IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() &&
2397 ((operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2398 (operand.GetImmediate() < 32)) ||
2399 (operand.IsPlainRegister() && rd.Is(rm)));
2400 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002401 Lsls(cond, rd, rm, operand);
2402 } else {
2403 Lsl(cond, rd, rm, operand);
2404 }
2405 break;
2406 }
2407 }
2408 void Lsl(FlagsUpdate flags,
2409 Register rd,
2410 Register rm,
2411 const Operand& operand) {
2412 Lsl(flags, al, rd, rm, operand);
2413 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002414
2415 void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002416 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2417 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2418 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002419 VIXL_ASSERT(allow_macro_instructions_);
2420 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002421 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002422 ITScope it_scope(this, &cond);
2423 lsls(cond, rd, rm, operand);
2424 }
2425 void Lsls(Register rd, Register rm, const Operand& operand) {
2426 Lsls(al, rd, rm, operand);
2427 }
2428
2429 void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002430 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2431 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2432 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002433 VIXL_ASSERT(allow_macro_instructions_);
2434 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002435 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002436 bool can_use_it =
2437 // LSR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
2438 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2439 (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) ||
2440 // LSR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
2441 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
2442 operand.GetBaseRegister().IsLow());
2443 ITScope it_scope(this, &cond, can_use_it);
2444 lsr(cond, rd, rm, operand);
2445 }
2446 void Lsr(Register rd, Register rm, const Operand& operand) {
2447 Lsr(al, rd, rm, operand);
2448 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002449 void Lsr(FlagsUpdate flags,
2450 Condition cond,
2451 Register rd,
2452 Register rm,
2453 const Operand& operand) {
2454 switch (flags) {
2455 case LeaveFlags:
2456 Lsr(cond, rd, rm, operand);
2457 break;
2458 case SetFlags:
2459 Lsrs(cond, rd, rm, operand);
2460 break;
2461 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002462 bool setflags_is_smaller =
2463 IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() &&
2464 ((operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2465 (operand.GetImmediate() <= 32)) ||
2466 (operand.IsPlainRegister() && rd.Is(rm)));
2467 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002468 Lsrs(cond, rd, rm, operand);
2469 } else {
2470 Lsr(cond, rd, rm, operand);
2471 }
2472 break;
2473 }
2474 }
2475 void Lsr(FlagsUpdate flags,
2476 Register rd,
2477 Register rm,
2478 const Operand& operand) {
2479 Lsr(flags, al, rd, rm, operand);
2480 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002481
2482 void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002483 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2485 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002486 VIXL_ASSERT(allow_macro_instructions_);
2487 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002488 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002489 ITScope it_scope(this, &cond);
2490 lsrs(cond, rd, rm, operand);
2491 }
2492 void Lsrs(Register rd, Register rm, const Operand& operand) {
2493 Lsrs(al, rd, rm, operand);
2494 }
2495
2496 void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002497 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2498 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2499 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2500 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002501 VIXL_ASSERT(allow_macro_instructions_);
2502 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002503 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002504 ITScope it_scope(this, &cond);
2505 mla(cond, rd, rn, rm, ra);
2506 }
2507 void Mla(Register rd, Register rn, Register rm, Register ra) {
2508 Mla(al, rd, rn, rm, ra);
2509 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002510 void Mla(FlagsUpdate flags,
2511 Condition cond,
2512 Register rd,
2513 Register rn,
2514 Register rm,
2515 Register ra) {
2516 switch (flags) {
2517 case LeaveFlags:
2518 Mla(cond, rd, rn, rm, ra);
2519 break;
2520 case SetFlags:
2521 Mlas(cond, rd, rn, rm, ra);
2522 break;
2523 case DontCare:
2524 Mla(cond, rd, rn, rm, ra);
2525 break;
2526 }
2527 }
2528 void Mla(
2529 FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) {
2530 Mla(flags, al, rd, rn, rm, ra);
2531 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002532
2533 void Mlas(
2534 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002535 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2536 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2537 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2538 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002539 VIXL_ASSERT(allow_macro_instructions_);
2540 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002541 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002542 ITScope it_scope(this, &cond);
2543 mlas(cond, rd, rn, rm, ra);
2544 }
2545 void Mlas(Register rd, Register rn, Register rm, Register ra) {
2546 Mlas(al, rd, rn, rm, ra);
2547 }
2548
2549 void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002550 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2551 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2552 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2553 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002554 VIXL_ASSERT(allow_macro_instructions_);
2555 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002556 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002557 ITScope it_scope(this, &cond);
2558 mls(cond, rd, rn, rm, ra);
2559 }
2560 void Mls(Register rd, Register rn, Register rm, Register ra) {
2561 Mls(al, rd, rn, rm, ra);
2562 }
2563
2564 void Mov(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002565 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
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 Belliarda576eb92016-12-13 14:38:55 -08002570 if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) {
2571 return;
2572 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002573 bool can_use_it =
2574 // MOV<c>{<q>} <Rd>, #<imm8> ; T1
2575 (operand.IsImmediate() && rd.IsLow() &&
2576 (operand.GetImmediate() <= 255)) ||
2577 // MOV{<c>}{<q>} <Rd>, <Rm> ; T1
2578 (operand.IsPlainRegister() && !rd.IsPC() &&
2579 !operand.GetBaseRegister().IsPC()) ||
2580 // MOV<c>{<q>} <Rd>, <Rm> {, <shift> #<amount>} ; T2
2581 (operand.IsImmediateShiftedRegister() && rd.IsLow() &&
2582 operand.GetBaseRegister().IsLow() &&
2583 (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) ||
2584 operand.GetShift().Is(ASR))) ||
2585 // MOV<c>{<q>} <Rdm>, <Rdm>, LSL <Rs> ; T1
2586 // MOV<c>{<q>} <Rdm>, <Rdm>, LSR <Rs> ; T1
2587 // MOV<c>{<q>} <Rdm>, <Rdm>, ASR <Rs> ; T1
2588 // MOV<c>{<q>} <Rdm>, <Rdm>, ROR <Rs> ; T1
2589 (operand.IsRegisterShiftedRegister() &&
2590 rd.Is(operand.GetBaseRegister()) && rd.IsLow() &&
2591 (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) ||
2592 operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) &&
2593 operand.GetShiftRegister().IsLow());
2594 ITScope it_scope(this, &cond, can_use_it);
2595 mov(cond, rd, operand);
2596 }
2597 void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002598 void Mov(FlagsUpdate flags,
2599 Condition cond,
2600 Register rd,
2601 const Operand& operand) {
2602 switch (flags) {
2603 case LeaveFlags:
2604 Mov(cond, rd, operand);
2605 break;
2606 case SetFlags:
2607 Movs(cond, rd, operand);
2608 break;
2609 case DontCare:
Vincent Belliarda576eb92016-12-13 14:38:55 -08002610 if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) {
2611 return;
2612 }
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002613 bool setflags_is_smaller =
Vincent Belliard934696d2016-08-18 11:03:56 -07002614 IsUsingT32() && cond.Is(al) &&
2615 ((operand.IsImmediateShiftedRegister() && rd.IsLow() &&
2616 operand.GetBaseRegister().IsLow() &&
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002617 (operand.GetShiftAmount() >= 1) &&
2618 (((operand.GetShiftAmount() <= 32) &&
2619 ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) ||
2620 ((operand.GetShiftAmount() < 32) &&
2621 operand.GetShift().IsLSL()))) ||
Vincent Belliard934696d2016-08-18 11:03:56 -07002622 (operand.IsRegisterShiftedRegister() && rd.IsLow() &&
2623 operand.GetBaseRegister().Is(rd) &&
2624 operand.GetShiftRegister().IsLow() &&
2625 (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() ||
2626 operand.GetShift().IsASR() || operand.GetShift().IsROR())) ||
2627 (operand.IsImmediate() && rd.IsLow() &&
2628 (operand.GetImmediate() < 256)));
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002629 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002630 Movs(cond, rd, operand);
2631 } else {
2632 Mov(cond, rd, operand);
2633 }
2634 break;
2635 }
2636 }
2637 void Mov(FlagsUpdate flags, Register rd, const Operand& operand) {
2638 Mov(flags, al, rd, operand);
2639 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002640
2641 void Movs(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002642 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2643 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002644 VIXL_ASSERT(allow_macro_instructions_);
2645 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002646 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002647 ITScope it_scope(this, &cond);
2648 movs(cond, rd, operand);
2649 }
2650 void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); }
2651
2652 void Movt(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002653 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2654 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002655 VIXL_ASSERT(allow_macro_instructions_);
2656 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002657 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002658 ITScope it_scope(this, &cond);
2659 movt(cond, rd, operand);
2660 }
2661 void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); }
2662
Alexandre Ramesd3832962016-07-04 15:03:43 +01002663 void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002664 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002665 VIXL_ASSERT(allow_macro_instructions_);
2666 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002667 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002668 ITScope it_scope(this, &cond);
2669 mrs(cond, rd, spec_reg);
2670 }
2671 void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); }
2672
2673 void Msr(Condition cond,
2674 MaskedSpecialRegister spec_reg,
2675 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002676 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002677 VIXL_ASSERT(allow_macro_instructions_);
2678 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002679 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002680 ITScope it_scope(this, &cond);
2681 msr(cond, spec_reg, operand);
2682 }
2683 void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) {
2684 Msr(al, spec_reg, operand);
2685 }
2686
2687 void Mul(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002688 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2689 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2690 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002691 VIXL_ASSERT(allow_macro_instructions_);
2692 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002693 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002694 bool can_use_it =
2695 // MUL<c>{<q>} <Rdm>, <Rn>{, <Rdm>} ; T1
2696 rd.Is(rm) && rn.IsLow() && rm.IsLow();
2697 ITScope it_scope(this, &cond, can_use_it);
2698 mul(cond, rd, rn, rm);
2699 }
2700 void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002701 void Mul(FlagsUpdate flags,
2702 Condition cond,
2703 Register rd,
2704 Register rn,
2705 Register rm) {
2706 switch (flags) {
2707 case LeaveFlags:
2708 Mul(cond, rd, rn, rm);
2709 break;
2710 case SetFlags:
2711 Muls(cond, rd, rn, rm);
2712 break;
2713 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002714 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2715 rn.IsLow() && rm.Is(rd);
2716 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002717 Muls(cond, rd, rn, rm);
2718 } else {
2719 Mul(cond, rd, rn, rm);
2720 }
2721 break;
2722 }
2723 }
2724 void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) {
2725 Mul(flags, al, rd, rn, rm);
2726 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002727
2728 void Muls(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002729 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2730 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2731 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002732 VIXL_ASSERT(allow_macro_instructions_);
2733 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002734 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002735 ITScope it_scope(this, &cond);
2736 muls(cond, rd, rn, rm);
2737 }
2738 void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); }
2739
2740 void Mvn(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002741 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2742 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002743 VIXL_ASSERT(allow_macro_instructions_);
2744 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002745 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002746 bool can_use_it =
2747 // MVN<c>{<q>} <Rd>, <Rm> ; T1
2748 operand.IsPlainRegister() && rd.IsLow() &&
2749 operand.GetBaseRegister().IsLow();
2750 ITScope it_scope(this, &cond, can_use_it);
2751 mvn(cond, rd, operand);
2752 }
2753 void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002754 void Mvn(FlagsUpdate flags,
2755 Condition cond,
2756 Register rd,
2757 const Operand& operand) {
2758 switch (flags) {
2759 case LeaveFlags:
2760 Mvn(cond, rd, operand);
2761 break;
2762 case SetFlags:
2763 Mvns(cond, rd, operand);
2764 break;
2765 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002766 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2767 operand.IsPlainRegister() &&
2768 operand.GetBaseRegister().IsLow();
2769 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002770 Mvns(cond, rd, operand);
2771 } else {
2772 Mvn(cond, rd, operand);
2773 }
2774 break;
2775 }
2776 }
2777 void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) {
2778 Mvn(flags, al, rd, operand);
2779 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002780
2781 void Mvns(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002782 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2783 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
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 mvns(cond, rd, operand);
2789 }
2790 void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); }
2791
2792 void Nop(Condition cond) {
2793 VIXL_ASSERT(allow_macro_instructions_);
2794 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002795 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002796 ITScope it_scope(this, &cond);
2797 nop(cond);
2798 }
2799 void Nop() { Nop(al); }
2800
2801 void Orn(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002802 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2803 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2804 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002805 VIXL_ASSERT(allow_macro_instructions_);
2806 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002807 MacroEmissionCheckScope guard(this);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002808 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002809 uint32_t immediate = operand.GetImmediate();
2810 if (immediate == 0) {
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002811 mvn(rd, 0);
Alexandre Rames628c5262016-09-21 11:52:30 +01002812 return;
2813 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002814 if ((immediate == 0xffffffff) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002815 return;
2816 }
2817 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002818 ITScope it_scope(this, &cond);
2819 orn(cond, rd, rn, operand);
2820 }
2821 void Orn(Register rd, Register rn, const Operand& operand) {
2822 Orn(al, rd, rn, operand);
2823 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002824 void Orn(FlagsUpdate flags,
2825 Condition cond,
2826 Register rd,
2827 Register rn,
2828 const Operand& operand) {
2829 switch (flags) {
2830 case LeaveFlags:
2831 Orn(cond, rd, rn, operand);
2832 break;
2833 case SetFlags:
2834 Orns(cond, rd, rn, operand);
2835 break;
2836 case DontCare:
2837 Orn(cond, rd, rn, operand);
2838 break;
2839 }
2840 }
2841 void Orn(FlagsUpdate flags,
2842 Register rd,
2843 Register rn,
2844 const Operand& operand) {
2845 Orn(flags, al, rd, rn, operand);
2846 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002847
2848 void Orns(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002849 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2850 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2851 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
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 orns(cond, rd, rn, operand);
2857 }
2858 void Orns(Register rd, Register rn, const Operand& operand) {
2859 Orns(al, rd, rn, operand);
2860 }
2861
2862 void Orr(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002863 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2864 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2865 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002866 VIXL_ASSERT(allow_macro_instructions_);
2867 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002868 MacroEmissionCheckScope guard(this);
Vincent Belliarda576eb92016-12-13 14:38:55 -08002869 if (rd.Is(rn) && operand.IsPlainRegister() &&
2870 rd.Is(operand.GetBaseRegister())) {
2871 return;
2872 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002873 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002874 uint32_t immediate = operand.GetImmediate();
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002875 if ((immediate == 0) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002876 return;
2877 }
2878 if (immediate == 0xffffffff) {
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002879 mvn(rd, 0);
Alexandre Rames628c5262016-09-21 11:52:30 +01002880 return;
2881 }
2882 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002883 bool can_use_it =
2884 // ORR<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
2885 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
2886 operand.GetBaseRegister().IsLow();
2887 ITScope it_scope(this, &cond, can_use_it);
2888 orr(cond, rd, rn, operand);
2889 }
2890 void Orr(Register rd, Register rn, const Operand& operand) {
2891 Orr(al, rd, rn, operand);
2892 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002893 void Orr(FlagsUpdate flags,
2894 Condition cond,
2895 Register rd,
2896 Register rn,
2897 const Operand& operand) {
2898 switch (flags) {
2899 case LeaveFlags:
2900 Orr(cond, rd, rn, operand);
2901 break;
2902 case SetFlags:
2903 Orrs(cond, rd, rn, operand);
2904 break;
2905 case DontCare:
Vincent Belliarda576eb92016-12-13 14:38:55 -08002906 if (operand.IsPlainRegister() && rd.Is(rn) &&
2907 rd.Is(operand.GetBaseRegister())) {
2908 return;
2909 }
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002910 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2911 rn.Is(rd) && operand.IsPlainRegister() &&
2912 operand.GetBaseRegister().IsLow();
2913 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002914 Orrs(cond, rd, rn, operand);
2915 } else {
2916 Orr(cond, rd, rn, operand);
2917 }
2918 break;
2919 }
2920 }
2921 void Orr(FlagsUpdate flags,
2922 Register rd,
2923 Register rn,
2924 const Operand& operand) {
2925 Orr(flags, al, rd, rn, operand);
2926 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002927
2928 void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002929 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2930 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2931 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002932 VIXL_ASSERT(allow_macro_instructions_);
2933 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002934 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002935 ITScope it_scope(this, &cond);
2936 orrs(cond, rd, rn, operand);
2937 }
2938 void Orrs(Register rd, Register rn, const Operand& operand) {
2939 Orrs(al, rd, rn, operand);
2940 }
2941
2942 void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002943 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2945 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
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 pkhbt(cond, rd, rn, operand);
2951 }
2952 void Pkhbt(Register rd, Register rn, const Operand& operand) {
2953 Pkhbt(al, rd, rn, operand);
2954 }
2955
2956 void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002957 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2958 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2959 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002960 VIXL_ASSERT(allow_macro_instructions_);
2961 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002962 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002963 ITScope it_scope(this, &cond);
2964 pkhtb(cond, rd, rn, operand);
2965 }
2966 void Pkhtb(Register rd, Register rn, const Operand& operand) {
2967 Pkhtb(al, rd, rn, operand);
2968 }
2969
2970 void Pld(Condition cond, Label* label) {
2971 VIXL_ASSERT(allow_macro_instructions_);
2972 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002973 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002974 ITScope it_scope(this, &cond);
2975 pld(cond, label);
2976 }
2977 void Pld(Label* label) { Pld(al, label); }
2978
2979 void Pld(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002980 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002981 VIXL_ASSERT(allow_macro_instructions_);
2982 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002983 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002984 ITScope it_scope(this, &cond);
2985 pld(cond, operand);
2986 }
2987 void Pld(const MemOperand& operand) { Pld(al, operand); }
2988
2989 void Pldw(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002990 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002991 VIXL_ASSERT(allow_macro_instructions_);
2992 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002993 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002994 ITScope it_scope(this, &cond);
2995 pldw(cond, operand);
2996 }
2997 void Pldw(const MemOperand& operand) { Pldw(al, operand); }
2998
2999 void Pli(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003000 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003001 VIXL_ASSERT(allow_macro_instructions_);
3002 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003003 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003004 ITScope it_scope(this, &cond);
3005 pli(cond, operand);
3006 }
3007 void Pli(const MemOperand& operand) { Pli(al, operand); }
3008
3009 void Pli(Condition cond, Label* label) {
3010 VIXL_ASSERT(allow_macro_instructions_);
3011 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003012 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003013 ITScope it_scope(this, &cond);
3014 pli(cond, label);
3015 }
3016 void Pli(Label* label) { Pli(al, label); }
3017
3018 void Pop(Condition cond, RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003019 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003020 VIXL_ASSERT(allow_macro_instructions_);
3021 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003022 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003023 ITScope it_scope(this, &cond);
3024 pop(cond, registers);
3025 }
3026 void Pop(RegisterList registers) { Pop(al, registers); }
3027
3028 void Pop(Condition cond, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003029 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003030 VIXL_ASSERT(allow_macro_instructions_);
3031 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003032 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003033 ITScope it_scope(this, &cond);
3034 pop(cond, rt);
3035 }
3036 void Pop(Register rt) { Pop(al, rt); }
3037
3038 void Push(Condition cond, RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003039 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003040 VIXL_ASSERT(allow_macro_instructions_);
3041 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003042 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003043 ITScope it_scope(this, &cond);
3044 push(cond, registers);
3045 }
3046 void Push(RegisterList registers) { Push(al, registers); }
3047
3048 void Push(Condition cond, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003049 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003050 VIXL_ASSERT(allow_macro_instructions_);
3051 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003052 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003053 ITScope it_scope(this, &cond);
3054 push(cond, rt);
3055 }
3056 void Push(Register rt) { Push(al, rt); }
3057
3058 void Qadd(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003059 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3060 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3061 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003062 VIXL_ASSERT(allow_macro_instructions_);
3063 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003064 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003065 ITScope it_scope(this, &cond);
3066 qadd(cond, rd, rm, rn);
3067 }
3068 void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); }
3069
3070 void Qadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003071 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3072 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3073 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003074 VIXL_ASSERT(allow_macro_instructions_);
3075 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003076 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003077 ITScope it_scope(this, &cond);
3078 qadd16(cond, rd, rn, rm);
3079 }
3080 void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); }
3081
3082 void Qadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003083 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3084 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3085 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003086 VIXL_ASSERT(allow_macro_instructions_);
3087 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003088 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003089 ITScope it_scope(this, &cond);
3090 qadd8(cond, rd, rn, rm);
3091 }
3092 void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); }
3093
3094 void Qasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003095 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3096 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3097 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003098 VIXL_ASSERT(allow_macro_instructions_);
3099 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003100 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003101 ITScope it_scope(this, &cond);
3102 qasx(cond, rd, rn, rm);
3103 }
3104 void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); }
3105
3106 void Qdadd(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003107 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3108 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3109 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003110 VIXL_ASSERT(allow_macro_instructions_);
3111 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003112 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003113 ITScope it_scope(this, &cond);
3114 qdadd(cond, rd, rm, rn);
3115 }
3116 void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); }
3117
3118 void Qdsub(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003119 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3120 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3121 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003122 VIXL_ASSERT(allow_macro_instructions_);
3123 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003124 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003125 ITScope it_scope(this, &cond);
3126 qdsub(cond, rd, rm, rn);
3127 }
3128 void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); }
3129
3130 void Qsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003131 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3132 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3133 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003134 VIXL_ASSERT(allow_macro_instructions_);
3135 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003136 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003137 ITScope it_scope(this, &cond);
3138 qsax(cond, rd, rn, rm);
3139 }
3140 void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); }
3141
3142 void Qsub(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003143 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3144 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3145 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003146 VIXL_ASSERT(allow_macro_instructions_);
3147 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003148 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003149 ITScope it_scope(this, &cond);
3150 qsub(cond, rd, rm, rn);
3151 }
3152 void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); }
3153
3154 void Qsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003155 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3156 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3157 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003158 VIXL_ASSERT(allow_macro_instructions_);
3159 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003160 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003161 ITScope it_scope(this, &cond);
3162 qsub16(cond, rd, rn, rm);
3163 }
3164 void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); }
3165
3166 void Qsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003167 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3168 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3169 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003170 VIXL_ASSERT(allow_macro_instructions_);
3171 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003172 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003173 ITScope it_scope(this, &cond);
3174 qsub8(cond, rd, rn, rm);
3175 }
3176 void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); }
3177
3178 void Rbit(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003179 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3180 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003181 VIXL_ASSERT(allow_macro_instructions_);
3182 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003183 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003184 ITScope it_scope(this, &cond);
3185 rbit(cond, rd, rm);
3186 }
3187 void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); }
3188
3189 void Rev(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003190 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3191 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003192 VIXL_ASSERT(allow_macro_instructions_);
3193 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003194 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003195 ITScope it_scope(this, &cond);
3196 rev(cond, rd, rm);
3197 }
3198 void Rev(Register rd, Register rm) { Rev(al, rd, rm); }
3199
3200 void Rev16(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003201 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3202 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003203 VIXL_ASSERT(allow_macro_instructions_);
3204 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003205 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003206 ITScope it_scope(this, &cond);
3207 rev16(cond, rd, rm);
3208 }
3209 void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); }
3210
3211 void Revsh(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003212 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3213 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003214 VIXL_ASSERT(allow_macro_instructions_);
3215 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003216 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003217 ITScope it_scope(this, &cond);
3218 revsh(cond, rd, rm);
3219 }
3220 void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); }
3221
3222 void Ror(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003223 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3224 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3225 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003226 VIXL_ASSERT(allow_macro_instructions_);
3227 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003228 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003229 bool can_use_it =
Alexandre Ramesd3832962016-07-04 15:03:43 +01003230 // ROR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
Georgia Kouvelie7a16902016-11-23 16:13:22 +00003231 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
3232 operand.GetBaseRegister().IsLow();
Alexandre Ramesd3832962016-07-04 15:03:43 +01003233 ITScope it_scope(this, &cond, can_use_it);
3234 ror(cond, rd, rm, operand);
3235 }
3236 void Ror(Register rd, Register rm, const Operand& operand) {
3237 Ror(al, rd, rm, operand);
3238 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003239 void Ror(FlagsUpdate flags,
3240 Condition cond,
3241 Register rd,
3242 Register rm,
3243 const Operand& operand) {
3244 switch (flags) {
3245 case LeaveFlags:
3246 Ror(cond, rd, rm, operand);
3247 break;
3248 case SetFlags:
3249 Rors(cond, rd, rm, operand);
3250 break;
3251 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00003252 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
3253 rm.IsLow() && operand.IsPlainRegister() &&
3254 rd.Is(rm);
3255 if (setflags_is_smaller) {
3256 Rors(cond, rd, rm, operand);
3257 } else {
3258 Ror(cond, rd, rm, operand);
3259 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003260 break;
3261 }
3262 }
3263 void Ror(FlagsUpdate flags,
3264 Register rd,
3265 Register rm,
3266 const Operand& operand) {
3267 Ror(flags, al, rd, rm, operand);
3268 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003269
3270 void Rors(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003271 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3272 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3273 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003274 VIXL_ASSERT(allow_macro_instructions_);
3275 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003276 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003277 ITScope it_scope(this, &cond);
3278 rors(cond, rd, rm, operand);
3279 }
3280 void Rors(Register rd, Register rm, const Operand& operand) {
3281 Rors(al, rd, rm, operand);
3282 }
3283
3284 void Rrx(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003285 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3286 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003287 VIXL_ASSERT(allow_macro_instructions_);
3288 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003289 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003290 ITScope it_scope(this, &cond);
3291 rrx(cond, rd, rm);
3292 }
3293 void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); }
Vincent Belliard934696d2016-08-18 11:03:56 -07003294 void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) {
3295 switch (flags) {
3296 case LeaveFlags:
3297 Rrx(cond, rd, rm);
3298 break;
3299 case SetFlags:
3300 Rrxs(cond, rd, rm);
3301 break;
3302 case DontCare:
3303 Rrx(cond, rd, rm);
3304 break;
3305 }
3306 }
3307 void Rrx(FlagsUpdate flags, Register rd, Register rm) {
3308 Rrx(flags, al, rd, rm);
3309 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003310
3311 void Rrxs(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003312 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
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 rrxs(cond, rd, rm);
3319 }
3320 void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); }
3321
3322 void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003323 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3324 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3325 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
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 bool can_use_it =
3330 // RSB<c>{<q>} {<Rd>, }<Rn>, #0 ; T1
3331 operand.IsImmediate() && rd.IsLow() && rn.IsLow() &&
3332 (operand.GetImmediate() == 0);
3333 ITScope it_scope(this, &cond, can_use_it);
3334 rsb(cond, rd, rn, operand);
3335 }
3336 void Rsb(Register rd, Register rn, const Operand& operand) {
3337 Rsb(al, rd, rn, operand);
3338 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003339 void Rsb(FlagsUpdate flags,
3340 Condition cond,
3341 Register rd,
3342 Register rn,
3343 const Operand& operand) {
3344 switch (flags) {
3345 case LeaveFlags:
3346 Rsb(cond, rd, rn, operand);
3347 break;
3348 case SetFlags:
3349 Rsbs(cond, rd, rn, operand);
3350 break;
3351 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00003352 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
3353 rn.IsLow() && operand.IsImmediate() &&
3354 (operand.GetImmediate() == 0);
3355 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07003356 Rsbs(cond, rd, rn, operand);
3357 } else {
3358 Rsb(cond, rd, rn, operand);
3359 }
3360 break;
3361 }
3362 }
3363 void Rsb(FlagsUpdate flags,
3364 Register rd,
3365 Register rn,
3366 const Operand& operand) {
3367 Rsb(flags, al, rd, rn, operand);
3368 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003369
3370 void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003371 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3372 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3373 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003374 VIXL_ASSERT(allow_macro_instructions_);
3375 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003376 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003377 ITScope it_scope(this, &cond);
3378 rsbs(cond, rd, rn, operand);
3379 }
3380 void Rsbs(Register rd, Register rn, const Operand& operand) {
3381 Rsbs(al, rd, rn, operand);
3382 }
3383
3384 void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003385 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3386 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3387 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003388 VIXL_ASSERT(allow_macro_instructions_);
3389 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003390 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003391 ITScope it_scope(this, &cond);
3392 rsc(cond, rd, rn, operand);
3393 }
3394 void Rsc(Register rd, Register rn, const Operand& operand) {
3395 Rsc(al, rd, rn, operand);
3396 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003397 void Rsc(FlagsUpdate flags,
3398 Condition cond,
3399 Register rd,
3400 Register rn,
3401 const Operand& operand) {
3402 switch (flags) {
3403 case LeaveFlags:
3404 Rsc(cond, rd, rn, operand);
3405 break;
3406 case SetFlags:
3407 Rscs(cond, rd, rn, operand);
3408 break;
3409 case DontCare:
3410 Rsc(cond, rd, rn, operand);
3411 break;
3412 }
3413 }
3414 void Rsc(FlagsUpdate flags,
3415 Register rd,
3416 Register rn,
3417 const Operand& operand) {
3418 Rsc(flags, al, rd, rn, operand);
3419 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003420
3421 void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003422 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3423 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3424 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003425 VIXL_ASSERT(allow_macro_instructions_);
3426 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003427 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003428 ITScope it_scope(this, &cond);
3429 rscs(cond, rd, rn, operand);
3430 }
3431 void Rscs(Register rd, Register rn, const Operand& operand) {
3432 Rscs(al, rd, rn, operand);
3433 }
3434
3435 void Sadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003436 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3437 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3438 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003439 VIXL_ASSERT(allow_macro_instructions_);
3440 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003441 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003442 ITScope it_scope(this, &cond);
3443 sadd16(cond, rd, rn, rm);
3444 }
3445 void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); }
3446
3447 void Sadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003448 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3449 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3450 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003451 VIXL_ASSERT(allow_macro_instructions_);
3452 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003453 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003454 ITScope it_scope(this, &cond);
3455 sadd8(cond, rd, rn, rm);
3456 }
3457 void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); }
3458
3459 void Sasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003460 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3461 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3462 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003463 VIXL_ASSERT(allow_macro_instructions_);
3464 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003465 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003466 ITScope it_scope(this, &cond);
3467 sasx(cond, rd, rn, rm);
3468 }
3469 void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); }
3470
3471 void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003472 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3473 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3474 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003475 VIXL_ASSERT(allow_macro_instructions_);
3476 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003477 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003478 bool can_use_it =
3479 // SBC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
3480 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) &&
3481 operand.GetBaseRegister().IsLow();
3482 ITScope it_scope(this, &cond, can_use_it);
3483 sbc(cond, rd, rn, operand);
3484 }
3485 void Sbc(Register rd, Register rn, const Operand& operand) {
3486 Sbc(al, rd, rn, operand);
3487 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003488 void Sbc(FlagsUpdate flags,
3489 Condition cond,
3490 Register rd,
3491 Register rn,
3492 const Operand& operand) {
3493 switch (flags) {
3494 case LeaveFlags:
3495 Sbc(cond, rd, rn, operand);
3496 break;
3497 case SetFlags:
3498 Sbcs(cond, rd, rn, operand);
3499 break;
3500 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00003501 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
3502 rn.Is(rd) && operand.IsPlainRegister() &&
3503 operand.GetBaseRegister().IsLow();
3504 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07003505 Sbcs(cond, rd, rn, operand);
3506 } else {
3507 Sbc(cond, rd, rn, operand);
3508 }
3509 break;
3510 }
3511 }
3512 void Sbc(FlagsUpdate flags,
3513 Register rd,
3514 Register rn,
3515 const Operand& operand) {
3516 Sbc(flags, al, rd, rn, operand);
3517 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003518
3519 void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003520 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3521 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3522 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003523 VIXL_ASSERT(allow_macro_instructions_);
3524 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003525 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003526 ITScope it_scope(this, &cond);
3527 sbcs(cond, rd, rn, operand);
3528 }
3529 void Sbcs(Register rd, Register rn, const Operand& operand) {
3530 Sbcs(al, rd, rn, operand);
3531 }
3532
3533 void Sbfx(Condition cond,
3534 Register rd,
3535 Register rn,
3536 uint32_t lsb,
3537 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003538 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3539 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3540 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003541 VIXL_ASSERT(allow_macro_instructions_);
3542 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003543 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003544 ITScope it_scope(this, &cond);
3545 sbfx(cond, rd, rn, lsb, operand);
3546 }
3547 void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) {
3548 Sbfx(al, rd, rn, lsb, operand);
3549 }
3550
3551 void Sdiv(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003552 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3553 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3554 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003555 VIXL_ASSERT(allow_macro_instructions_);
3556 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003557 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003558 ITScope it_scope(this, &cond);
3559 sdiv(cond, rd, rn, rm);
3560 }
3561 void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); }
3562
3563 void Sel(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003564 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3565 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3566 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003567 VIXL_ASSERT(allow_macro_instructions_);
3568 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003569 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003570 ITScope it_scope(this, &cond);
3571 sel(cond, rd, rn, rm);
3572 }
3573 void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); }
3574
3575 void Shadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003576 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3577 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3578 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003579 VIXL_ASSERT(allow_macro_instructions_);
3580 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003581 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003582 ITScope it_scope(this, &cond);
3583 shadd16(cond, rd, rn, rm);
3584 }
3585 void Shadd16(Register rd, Register rn, Register rm) {
3586 Shadd16(al, rd, rn, rm);
3587 }
3588
3589 void Shadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003590 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3591 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3592 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003593 VIXL_ASSERT(allow_macro_instructions_);
3594 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003595 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003596 ITScope it_scope(this, &cond);
3597 shadd8(cond, rd, rn, rm);
3598 }
3599 void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); }
3600
3601 void Shasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003602 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3603 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3604 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003605 VIXL_ASSERT(allow_macro_instructions_);
3606 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003607 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003608 ITScope it_scope(this, &cond);
3609 shasx(cond, rd, rn, rm);
3610 }
3611 void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); }
3612
3613 void Shsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003614 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3615 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3616 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003617 VIXL_ASSERT(allow_macro_instructions_);
3618 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003619 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003620 ITScope it_scope(this, &cond);
3621 shsax(cond, rd, rn, rm);
3622 }
3623 void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); }
3624
3625 void Shsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003626 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3627 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3628 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003629 VIXL_ASSERT(allow_macro_instructions_);
3630 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003631 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003632 ITScope it_scope(this, &cond);
3633 shsub16(cond, rd, rn, rm);
3634 }
3635 void Shsub16(Register rd, Register rn, Register rm) {
3636 Shsub16(al, rd, rn, rm);
3637 }
3638
3639 void Shsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003640 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3641 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3642 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003643 VIXL_ASSERT(allow_macro_instructions_);
3644 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003645 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003646 ITScope it_scope(this, &cond);
3647 shsub8(cond, rd, rn, rm);
3648 }
3649 void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); }
3650
3651 void Smlabb(
3652 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003653 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3654 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3655 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3656 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003657 VIXL_ASSERT(allow_macro_instructions_);
3658 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003659 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003660 ITScope it_scope(this, &cond);
3661 smlabb(cond, rd, rn, rm, ra);
3662 }
3663 void Smlabb(Register rd, Register rn, Register rm, Register ra) {
3664 Smlabb(al, rd, rn, rm, ra);
3665 }
3666
3667 void Smlabt(
3668 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003669 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3670 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3671 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3672 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003673 VIXL_ASSERT(allow_macro_instructions_);
3674 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003675 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003676 ITScope it_scope(this, &cond);
3677 smlabt(cond, rd, rn, rm, ra);
3678 }
3679 void Smlabt(Register rd, Register rn, Register rm, Register ra) {
3680 Smlabt(al, rd, rn, rm, ra);
3681 }
3682
3683 void Smlad(
3684 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003685 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3686 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3687 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3688 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003689 VIXL_ASSERT(allow_macro_instructions_);
3690 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003691 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003692 ITScope it_scope(this, &cond);
3693 smlad(cond, rd, rn, rm, ra);
3694 }
3695 void Smlad(Register rd, Register rn, Register rm, Register ra) {
3696 Smlad(al, rd, rn, rm, ra);
3697 }
3698
3699 void Smladx(
3700 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003701 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3702 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3703 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3704 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003705 VIXL_ASSERT(allow_macro_instructions_);
3706 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003707 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003708 ITScope it_scope(this, &cond);
3709 smladx(cond, rd, rn, rm, ra);
3710 }
3711 void Smladx(Register rd, Register rn, Register rm, Register ra) {
3712 Smladx(al, rd, rn, rm, ra);
3713 }
3714
3715 void Smlal(
3716 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003717 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3718 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3719 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3720 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003721 VIXL_ASSERT(allow_macro_instructions_);
3722 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003723 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003724 ITScope it_scope(this, &cond);
3725 smlal(cond, rdlo, rdhi, rn, rm);
3726 }
3727 void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) {
3728 Smlal(al, rdlo, rdhi, rn, rm);
3729 }
3730
3731 void Smlalbb(
3732 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003733 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3734 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3735 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3736 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003737 VIXL_ASSERT(allow_macro_instructions_);
3738 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003739 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003740 ITScope it_scope(this, &cond);
3741 smlalbb(cond, rdlo, rdhi, rn, rm);
3742 }
3743 void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) {
3744 Smlalbb(al, rdlo, rdhi, rn, rm);
3745 }
3746
3747 void Smlalbt(
3748 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003749 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3750 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3751 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3752 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003753 VIXL_ASSERT(allow_macro_instructions_);
3754 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003755 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003756 ITScope it_scope(this, &cond);
3757 smlalbt(cond, rdlo, rdhi, rn, rm);
3758 }
3759 void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) {
3760 Smlalbt(al, rdlo, rdhi, rn, rm);
3761 }
3762
3763 void Smlald(
3764 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003765 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3766 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3767 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3768 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003769 VIXL_ASSERT(allow_macro_instructions_);
3770 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003771 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003772 ITScope it_scope(this, &cond);
3773 smlald(cond, rdlo, rdhi, rn, rm);
3774 }
3775 void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) {
3776 Smlald(al, rdlo, rdhi, rn, rm);
3777 }
3778
3779 void Smlaldx(
3780 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003781 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3782 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3783 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3784 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003785 VIXL_ASSERT(allow_macro_instructions_);
3786 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003787 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003788 ITScope it_scope(this, &cond);
3789 smlaldx(cond, rdlo, rdhi, rn, rm);
3790 }
3791 void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) {
3792 Smlaldx(al, rdlo, rdhi, rn, rm);
3793 }
3794
3795 void Smlals(
3796 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003797 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3798 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3799 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3800 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003801 VIXL_ASSERT(allow_macro_instructions_);
3802 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003803 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003804 ITScope it_scope(this, &cond);
3805 smlals(cond, rdlo, rdhi, rn, rm);
3806 }
3807 void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) {
3808 Smlals(al, rdlo, rdhi, rn, rm);
3809 }
3810
3811 void Smlaltb(
3812 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003813 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3814 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3815 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3816 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003817 VIXL_ASSERT(allow_macro_instructions_);
3818 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003819 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003820 ITScope it_scope(this, &cond);
3821 smlaltb(cond, rdlo, rdhi, rn, rm);
3822 }
3823 void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) {
3824 Smlaltb(al, rdlo, rdhi, rn, rm);
3825 }
3826
3827 void Smlaltt(
3828 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003829 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3830 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3831 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3832 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003833 VIXL_ASSERT(allow_macro_instructions_);
3834 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003835 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003836 ITScope it_scope(this, &cond);
3837 smlaltt(cond, rdlo, rdhi, rn, rm);
3838 }
3839 void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) {
3840 Smlaltt(al, rdlo, rdhi, rn, rm);
3841 }
3842
3843 void Smlatb(
3844 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003845 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3846 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3847 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3848 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003849 VIXL_ASSERT(allow_macro_instructions_);
3850 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003851 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003852 ITScope it_scope(this, &cond);
3853 smlatb(cond, rd, rn, rm, ra);
3854 }
3855 void Smlatb(Register rd, Register rn, Register rm, Register ra) {
3856 Smlatb(al, rd, rn, rm, ra);
3857 }
3858
3859 void Smlatt(
3860 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003861 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3862 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3863 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3864 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003865 VIXL_ASSERT(allow_macro_instructions_);
3866 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003867 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003868 ITScope it_scope(this, &cond);
3869 smlatt(cond, rd, rn, rm, ra);
3870 }
3871 void Smlatt(Register rd, Register rn, Register rm, Register ra) {
3872 Smlatt(al, rd, rn, rm, ra);
3873 }
3874
3875 void Smlawb(
3876 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003877 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3878 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3879 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3880 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003881 VIXL_ASSERT(allow_macro_instructions_);
3882 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003883 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003884 ITScope it_scope(this, &cond);
3885 smlawb(cond, rd, rn, rm, ra);
3886 }
3887 void Smlawb(Register rd, Register rn, Register rm, Register ra) {
3888 Smlawb(al, rd, rn, rm, ra);
3889 }
3890
3891 void Smlawt(
3892 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003893 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3894 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3895 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3896 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003897 VIXL_ASSERT(allow_macro_instructions_);
3898 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003899 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003900 ITScope it_scope(this, &cond);
3901 smlawt(cond, rd, rn, rm, ra);
3902 }
3903 void Smlawt(Register rd, Register rn, Register rm, Register ra) {
3904 Smlawt(al, rd, rn, rm, ra);
3905 }
3906
3907 void Smlsd(
3908 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003909 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3910 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3911 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3912 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003913 VIXL_ASSERT(allow_macro_instructions_);
3914 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003915 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003916 ITScope it_scope(this, &cond);
3917 smlsd(cond, rd, rn, rm, ra);
3918 }
3919 void Smlsd(Register rd, Register rn, Register rm, Register ra) {
3920 Smlsd(al, rd, rn, rm, ra);
3921 }
3922
3923 void Smlsdx(
3924 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003925 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3926 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3927 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3928 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003929 VIXL_ASSERT(allow_macro_instructions_);
3930 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003931 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003932 ITScope it_scope(this, &cond);
3933 smlsdx(cond, rd, rn, rm, ra);
3934 }
3935 void Smlsdx(Register rd, Register rn, Register rm, Register ra) {
3936 Smlsdx(al, rd, rn, rm, ra);
3937 }
3938
3939 void Smlsld(
3940 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003941 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3942 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3943 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003945 VIXL_ASSERT(allow_macro_instructions_);
3946 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003947 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003948 ITScope it_scope(this, &cond);
3949 smlsld(cond, rdlo, rdhi, rn, rm);
3950 }
3951 void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) {
3952 Smlsld(al, rdlo, rdhi, rn, rm);
3953 }
3954
3955 void Smlsldx(
3956 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003957 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3958 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3959 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3960 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003961 VIXL_ASSERT(allow_macro_instructions_);
3962 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003963 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003964 ITScope it_scope(this, &cond);
3965 smlsldx(cond, rdlo, rdhi, rn, rm);
3966 }
3967 void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) {
3968 Smlsldx(al, rdlo, rdhi, rn, rm);
3969 }
3970
3971 void Smmla(
3972 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003973 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3974 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3975 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3976 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003977 VIXL_ASSERT(allow_macro_instructions_);
3978 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003979 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003980 ITScope it_scope(this, &cond);
3981 smmla(cond, rd, rn, rm, ra);
3982 }
3983 void Smmla(Register rd, Register rn, Register rm, Register ra) {
3984 Smmla(al, rd, rn, rm, ra);
3985 }
3986
3987 void Smmlar(
3988 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003989 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3990 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3991 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3992 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003993 VIXL_ASSERT(allow_macro_instructions_);
3994 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003995 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003996 ITScope it_scope(this, &cond);
3997 smmlar(cond, rd, rn, rm, ra);
3998 }
3999 void Smmlar(Register rd, Register rn, Register rm, Register ra) {
4000 Smmlar(al, rd, rn, rm, ra);
4001 }
4002
4003 void Smmls(
4004 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004005 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4006 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4007 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
4008 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004009 VIXL_ASSERT(allow_macro_instructions_);
4010 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004011 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004012 ITScope it_scope(this, &cond);
4013 smmls(cond, rd, rn, rm, ra);
4014 }
4015 void Smmls(Register rd, Register rn, Register rm, Register ra) {
4016 Smmls(al, rd, rn, rm, ra);
4017 }
4018
4019 void Smmlsr(
4020 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004021 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4022 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4023 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
4024 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
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 smmlsr(cond, rd, rn, rm, ra);
4030 }
4031 void Smmlsr(Register rd, Register rn, Register rm, Register ra) {
4032 Smmlsr(al, rd, rn, rm, ra);
4033 }
4034
4035 void Smmul(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004036 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4037 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4038 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004039 VIXL_ASSERT(allow_macro_instructions_);
4040 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004041 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004042 ITScope it_scope(this, &cond);
4043 smmul(cond, rd, rn, rm);
4044 }
4045 void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); }
4046
4047 void Smmulr(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004048 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4049 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4050 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004051 VIXL_ASSERT(allow_macro_instructions_);
4052 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004053 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004054 ITScope it_scope(this, &cond);
4055 smmulr(cond, rd, rn, rm);
4056 }
4057 void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); }
4058
4059 void Smuad(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004060 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4061 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4062 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004063 VIXL_ASSERT(allow_macro_instructions_);
4064 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004065 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004066 ITScope it_scope(this, &cond);
4067 smuad(cond, rd, rn, rm);
4068 }
4069 void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); }
4070
4071 void Smuadx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004072 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4073 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4074 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004075 VIXL_ASSERT(allow_macro_instructions_);
4076 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004077 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004078 ITScope it_scope(this, &cond);
4079 smuadx(cond, rd, rn, rm);
4080 }
4081 void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); }
4082
4083 void Smulbb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004084 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4085 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4086 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004087 VIXL_ASSERT(allow_macro_instructions_);
4088 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004089 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004090 ITScope it_scope(this, &cond);
4091 smulbb(cond, rd, rn, rm);
4092 }
4093 void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); }
4094
4095 void Smulbt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004096 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4097 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4098 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004099 VIXL_ASSERT(allow_macro_instructions_);
4100 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004101 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004102 ITScope it_scope(this, &cond);
4103 smulbt(cond, rd, rn, rm);
4104 }
4105 void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); }
4106
4107 void Smull(
4108 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004109 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4110 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4111 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4112 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004113 VIXL_ASSERT(allow_macro_instructions_);
4114 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004115 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004116 ITScope it_scope(this, &cond);
4117 smull(cond, rdlo, rdhi, rn, rm);
4118 }
4119 void Smull(Register rdlo, Register rdhi, Register rn, Register rm) {
4120 Smull(al, rdlo, rdhi, rn, rm);
4121 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004122 void Smull(FlagsUpdate flags,
4123 Condition cond,
4124 Register rdlo,
4125 Register rdhi,
4126 Register rn,
4127 Register rm) {
4128 switch (flags) {
4129 case LeaveFlags:
4130 Smull(cond, rdlo, rdhi, rn, rm);
4131 break;
4132 case SetFlags:
4133 Smulls(cond, rdlo, rdhi, rn, rm);
4134 break;
4135 case DontCare:
4136 Smull(cond, rdlo, rdhi, rn, rm);
4137 break;
4138 }
4139 }
4140 void Smull(FlagsUpdate flags,
4141 Register rdlo,
4142 Register rdhi,
4143 Register rn,
4144 Register rm) {
4145 Smull(flags, al, rdlo, rdhi, rn, rm);
4146 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004147
4148 void Smulls(
4149 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004150 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4151 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4152 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4153 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004154 VIXL_ASSERT(allow_macro_instructions_);
4155 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004156 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004157 ITScope it_scope(this, &cond);
4158 smulls(cond, rdlo, rdhi, rn, rm);
4159 }
4160 void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) {
4161 Smulls(al, rdlo, rdhi, rn, rm);
4162 }
4163
4164 void Smultb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004165 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4166 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4167 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004168 VIXL_ASSERT(allow_macro_instructions_);
4169 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004170 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004171 ITScope it_scope(this, &cond);
4172 smultb(cond, rd, rn, rm);
4173 }
4174 void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); }
4175
4176 void Smultt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004177 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4178 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4179 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004180 VIXL_ASSERT(allow_macro_instructions_);
4181 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004182 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004183 ITScope it_scope(this, &cond);
4184 smultt(cond, rd, rn, rm);
4185 }
4186 void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); }
4187
4188 void Smulwb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004189 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4190 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4191 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004192 VIXL_ASSERT(allow_macro_instructions_);
4193 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004194 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004195 ITScope it_scope(this, &cond);
4196 smulwb(cond, rd, rn, rm);
4197 }
4198 void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); }
4199
4200 void Smulwt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004201 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4202 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4203 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004204 VIXL_ASSERT(allow_macro_instructions_);
4205 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004206 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004207 ITScope it_scope(this, &cond);
4208 smulwt(cond, rd, rn, rm);
4209 }
4210 void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); }
4211
4212 void Smusd(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004213 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4214 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4215 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004216 VIXL_ASSERT(allow_macro_instructions_);
4217 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004218 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004219 ITScope it_scope(this, &cond);
4220 smusd(cond, rd, rn, rm);
4221 }
4222 void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); }
4223
4224 void Smusdx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004225 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4226 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4227 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004228 VIXL_ASSERT(allow_macro_instructions_);
4229 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004230 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004231 ITScope it_scope(this, &cond);
4232 smusdx(cond, rd, rn, rm);
4233 }
4234 void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); }
4235
4236 void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004237 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4238 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004239 VIXL_ASSERT(allow_macro_instructions_);
4240 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004241 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004242 ITScope it_scope(this, &cond);
4243 ssat(cond, rd, imm, operand);
4244 }
4245 void Ssat(Register rd, uint32_t imm, const Operand& operand) {
4246 Ssat(al, rd, imm, operand);
4247 }
4248
4249 void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004250 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4251 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004252 VIXL_ASSERT(allow_macro_instructions_);
4253 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004254 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004255 ITScope it_scope(this, &cond);
4256 ssat16(cond, rd, imm, rn);
4257 }
4258 void Ssat16(Register rd, uint32_t imm, Register rn) {
4259 Ssat16(al, rd, imm, rn);
4260 }
4261
4262 void Ssax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004263 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4264 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4265 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004266 VIXL_ASSERT(allow_macro_instructions_);
4267 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004268 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004269 ITScope it_scope(this, &cond);
4270 ssax(cond, rd, rn, rm);
4271 }
4272 void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); }
4273
4274 void Ssub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004275 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4276 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4277 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004278 VIXL_ASSERT(allow_macro_instructions_);
4279 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004280 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004281 ITScope it_scope(this, &cond);
4282 ssub16(cond, rd, rn, rm);
4283 }
4284 void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); }
4285
4286 void Ssub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004287 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4288 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4289 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004290 VIXL_ASSERT(allow_macro_instructions_);
4291 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004292 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004293 ITScope it_scope(this, &cond);
4294 ssub8(cond, rd, rn, rm);
4295 }
4296 void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); }
4297
4298 void Stl(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004299 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4300 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004301 VIXL_ASSERT(allow_macro_instructions_);
4302 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004303 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004304 ITScope it_scope(this, &cond);
4305 stl(cond, rt, operand);
4306 }
4307 void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); }
4308
4309 void Stlb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004310 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4311 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004312 VIXL_ASSERT(allow_macro_instructions_);
4313 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004314 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004315 ITScope it_scope(this, &cond);
4316 stlb(cond, rt, operand);
4317 }
4318 void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); }
4319
4320 void Stlex(Condition cond,
4321 Register rd,
4322 Register rt,
4323 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004324 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4325 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4326 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004327 VIXL_ASSERT(allow_macro_instructions_);
4328 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004329 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004330 ITScope it_scope(this, &cond);
4331 stlex(cond, rd, rt, operand);
4332 }
4333 void Stlex(Register rd, Register rt, const MemOperand& operand) {
4334 Stlex(al, rd, rt, operand);
4335 }
4336
4337 void Stlexb(Condition cond,
4338 Register rd,
4339 Register rt,
4340 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004341 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4342 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4343 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004344 VIXL_ASSERT(allow_macro_instructions_);
4345 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004346 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004347 ITScope it_scope(this, &cond);
4348 stlexb(cond, rd, rt, operand);
4349 }
4350 void Stlexb(Register rd, Register rt, const MemOperand& operand) {
4351 Stlexb(al, rd, rt, operand);
4352 }
4353
4354 void Stlexd(Condition cond,
4355 Register rd,
4356 Register rt,
4357 Register rt2,
4358 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004359 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4360 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4361 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4362 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004363 VIXL_ASSERT(allow_macro_instructions_);
4364 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004365 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004366 ITScope it_scope(this, &cond);
4367 stlexd(cond, rd, rt, rt2, operand);
4368 }
4369 void Stlexd(Register rd,
4370 Register rt,
4371 Register rt2,
4372 const MemOperand& operand) {
4373 Stlexd(al, rd, rt, rt2, operand);
4374 }
4375
4376 void Stlexh(Condition cond,
4377 Register rd,
4378 Register rt,
4379 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004380 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4381 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4382 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004383 VIXL_ASSERT(allow_macro_instructions_);
4384 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004385 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004386 ITScope it_scope(this, &cond);
4387 stlexh(cond, rd, rt, operand);
4388 }
4389 void Stlexh(Register rd, Register rt, const MemOperand& operand) {
4390 Stlexh(al, rd, rt, operand);
4391 }
4392
4393 void Stlh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004394 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4395 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004396 VIXL_ASSERT(allow_macro_instructions_);
4397 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004398 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004399 ITScope it_scope(this, &cond);
4400 stlh(cond, rt, operand);
4401 }
4402 void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); }
4403
4404 void Stm(Condition cond,
4405 Register rn,
4406 WriteBack write_back,
4407 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004408 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4409 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004410 VIXL_ASSERT(allow_macro_instructions_);
4411 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004412 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004413 ITScope it_scope(this, &cond);
4414 stm(cond, rn, write_back, registers);
4415 }
4416 void Stm(Register rn, WriteBack write_back, RegisterList registers) {
4417 Stm(al, rn, write_back, registers);
4418 }
4419
4420 void Stmda(Condition cond,
4421 Register rn,
4422 WriteBack write_back,
4423 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004424 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4425 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004426 VIXL_ASSERT(allow_macro_instructions_);
4427 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004428 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004429 ITScope it_scope(this, &cond);
4430 stmda(cond, rn, write_back, registers);
4431 }
4432 void Stmda(Register rn, WriteBack write_back, RegisterList registers) {
4433 Stmda(al, rn, write_back, registers);
4434 }
4435
4436 void Stmdb(Condition cond,
4437 Register rn,
4438 WriteBack write_back,
4439 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004440 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4441 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004442 VIXL_ASSERT(allow_macro_instructions_);
4443 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004444 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004445 ITScope it_scope(this, &cond);
4446 stmdb(cond, rn, write_back, registers);
4447 }
4448 void Stmdb(Register rn, WriteBack write_back, RegisterList registers) {
4449 Stmdb(al, rn, write_back, registers);
4450 }
4451
4452 void Stmea(Condition cond,
4453 Register rn,
4454 WriteBack write_back,
4455 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004456 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4457 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004458 VIXL_ASSERT(allow_macro_instructions_);
4459 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004460 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004461 ITScope it_scope(this, &cond);
4462 stmea(cond, rn, write_back, registers);
4463 }
4464 void Stmea(Register rn, WriteBack write_back, RegisterList registers) {
4465 Stmea(al, rn, write_back, registers);
4466 }
4467
4468 void Stmed(Condition cond,
4469 Register rn,
4470 WriteBack write_back,
4471 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004472 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4473 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004474 VIXL_ASSERT(allow_macro_instructions_);
4475 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004476 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004477 ITScope it_scope(this, &cond);
4478 stmed(cond, rn, write_back, registers);
4479 }
4480 void Stmed(Register rn, WriteBack write_back, RegisterList registers) {
4481 Stmed(al, rn, write_back, registers);
4482 }
4483
4484 void Stmfa(Condition cond,
4485 Register rn,
4486 WriteBack write_back,
4487 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004488 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4489 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004490 VIXL_ASSERT(allow_macro_instructions_);
4491 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004492 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004493 ITScope it_scope(this, &cond);
4494 stmfa(cond, rn, write_back, registers);
4495 }
4496 void Stmfa(Register rn, WriteBack write_back, RegisterList registers) {
4497 Stmfa(al, rn, write_back, registers);
4498 }
4499
4500 void Stmfd(Condition cond,
4501 Register rn,
4502 WriteBack write_back,
4503 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004504 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4505 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004506 VIXL_ASSERT(allow_macro_instructions_);
4507 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004508 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004509 ITScope it_scope(this, &cond);
4510 stmfd(cond, rn, write_back, registers);
4511 }
4512 void Stmfd(Register rn, WriteBack write_back, RegisterList registers) {
4513 Stmfd(al, rn, write_back, registers);
4514 }
4515
4516 void Stmib(Condition cond,
4517 Register rn,
4518 WriteBack write_back,
4519 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004520 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4521 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004522 VIXL_ASSERT(allow_macro_instructions_);
4523 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004524 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004525 ITScope it_scope(this, &cond);
4526 stmib(cond, rn, write_back, registers);
4527 }
4528 void Stmib(Register rn, WriteBack write_back, RegisterList registers) {
4529 Stmib(al, rn, write_back, registers);
4530 }
4531
4532 void Str(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004533 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4534 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004535 VIXL_ASSERT(allow_macro_instructions_);
4536 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004537 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004538 bool can_use_it =
4539 // STR{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4540 (operand.IsImmediate() && rt.IsLow() &&
4541 operand.GetBaseRegister().IsLow() &&
4542 operand.IsOffsetImmediateWithinRange(0, 124, 4) &&
4543 (operand.GetAddrMode() == Offset)) ||
4544 // STR{<c>}{<q>} <Rt>, [SP{, #{+}<imm>}] ; T2
4545 (operand.IsImmediate() && rt.IsLow() &&
4546 operand.GetBaseRegister().IsSP() &&
4547 operand.IsOffsetImmediateWithinRange(0, 1020, 4) &&
4548 (operand.GetAddrMode() == Offset)) ||
4549 // STR{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4550 (operand.IsPlainRegister() && rt.IsLow() &&
4551 operand.GetBaseRegister().IsLow() &&
4552 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4553 (operand.GetAddrMode() == Offset));
4554 ITScope it_scope(this, &cond, can_use_it);
4555 str(cond, rt, operand);
4556 }
4557 void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); }
4558
4559 void Strb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004560 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
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 bool can_use_it =
4566 // STRB{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4567 (operand.IsImmediate() && rt.IsLow() &&
4568 operand.GetBaseRegister().IsLow() &&
4569 operand.IsOffsetImmediateWithinRange(0, 31) &&
4570 (operand.GetAddrMode() == Offset)) ||
4571 // STRB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4572 (operand.IsPlainRegister() && rt.IsLow() &&
4573 operand.GetBaseRegister().IsLow() &&
4574 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4575 (operand.GetAddrMode() == Offset));
4576 ITScope it_scope(this, &cond, can_use_it);
4577 strb(cond, rt, operand);
4578 }
4579 void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); }
4580
4581 void Strd(Condition cond,
4582 Register rt,
4583 Register rt2,
4584 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004585 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4586 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4587 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004588 VIXL_ASSERT(allow_macro_instructions_);
4589 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004590 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004591 ITScope it_scope(this, &cond);
4592 strd(cond, rt, rt2, operand);
4593 }
4594 void Strd(Register rt, Register rt2, const MemOperand& operand) {
4595 Strd(al, rt, rt2, operand);
4596 }
4597
4598 void Strex(Condition cond,
4599 Register rd,
4600 Register rt,
4601 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004602 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4603 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4604 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004605 VIXL_ASSERT(allow_macro_instructions_);
4606 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004607 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004608 ITScope it_scope(this, &cond);
4609 strex(cond, rd, rt, operand);
4610 }
4611 void Strex(Register rd, Register rt, const MemOperand& operand) {
4612 Strex(al, rd, rt, operand);
4613 }
4614
4615 void Strexb(Condition cond,
4616 Register rd,
4617 Register rt,
4618 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004619 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4620 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4621 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004622 VIXL_ASSERT(allow_macro_instructions_);
4623 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004624 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004625 ITScope it_scope(this, &cond);
4626 strexb(cond, rd, rt, operand);
4627 }
4628 void Strexb(Register rd, Register rt, const MemOperand& operand) {
4629 Strexb(al, rd, rt, operand);
4630 }
4631
4632 void Strexd(Condition cond,
4633 Register rd,
4634 Register rt,
4635 Register rt2,
4636 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004637 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4638 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4639 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4640 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004641 VIXL_ASSERT(allow_macro_instructions_);
4642 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004643 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004644 ITScope it_scope(this, &cond);
4645 strexd(cond, rd, rt, rt2, operand);
4646 }
4647 void Strexd(Register rd,
4648 Register rt,
4649 Register rt2,
4650 const MemOperand& operand) {
4651 Strexd(al, rd, rt, rt2, operand);
4652 }
4653
4654 void Strexh(Condition cond,
4655 Register rd,
4656 Register rt,
4657 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004658 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4659 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4660 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004661 VIXL_ASSERT(allow_macro_instructions_);
4662 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004663 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004664 ITScope it_scope(this, &cond);
4665 strexh(cond, rd, rt, operand);
4666 }
4667 void Strexh(Register rd, Register rt, const MemOperand& operand) {
4668 Strexh(al, rd, rt, operand);
4669 }
4670
4671 void Strh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004672 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4673 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004674 VIXL_ASSERT(allow_macro_instructions_);
4675 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004676 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004677 bool can_use_it =
4678 // STRH{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4679 (operand.IsImmediate() && rt.IsLow() &&
4680 operand.GetBaseRegister().IsLow() &&
4681 operand.IsOffsetImmediateWithinRange(0, 62, 2) &&
4682 (operand.GetAddrMode() == Offset)) ||
4683 // STRH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4684 (operand.IsPlainRegister() && rt.IsLow() &&
4685 operand.GetBaseRegister().IsLow() &&
4686 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4687 (operand.GetAddrMode() == Offset));
4688 ITScope it_scope(this, &cond, can_use_it);
4689 strh(cond, rt, operand);
4690 }
4691 void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); }
4692
4693 void Sub(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004694 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4696 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004697 VIXL_ASSERT(allow_macro_instructions_);
4698 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004699 MacroEmissionCheckScope guard(this);
Alexandre Rames628c5262016-09-21 11:52:30 +01004700 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
4701 uint32_t immediate = operand.GetImmediate();
4702 if (immediate == 0) {
4703 return;
4704 }
4705 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004706 bool can_use_it =
4707 // SUB<c>{<q>} <Rd>, <Rn>, #<imm3> ; T1
4708 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() &&
4709 rd.IsLow()) ||
4710 // SUB<c>{<q>} {<Rdn>,} <Rdn>, #<imm8> ; T2
4711 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
4712 rd.IsLow() && rn.Is(rd)) ||
4713 // SUB<c>{<q>} <Rd>, <Rn>, <Rm>
4714 (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
4715 operand.GetBaseRegister().IsLow());
4716 ITScope it_scope(this, &cond, can_use_it);
4717 sub(cond, rd, rn, operand);
4718 }
4719 void Sub(Register rd, Register rn, const Operand& operand) {
4720 Sub(al, rd, rn, operand);
4721 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004722 void Sub(FlagsUpdate flags,
4723 Condition cond,
4724 Register rd,
4725 Register rn,
4726 const Operand& operand) {
4727 switch (flags) {
4728 case LeaveFlags:
4729 Sub(cond, rd, rn, operand);
4730 break;
4731 case SetFlags:
4732 Subs(cond, rd, rn, operand);
4733 break;
4734 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00004735 bool setflags_is_smaller =
Vincent Belliard934696d2016-08-18 11:03:56 -07004736 IsUsingT32() && cond.Is(al) &&
4737 ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
4738 operand.GetBaseRegister().IsLow()) ||
4739 (operand.IsImmediate() &&
4740 ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) ||
4741 (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256)))));
Georgia Kouveli4443cf92016-12-08 11:34:57 +00004742 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07004743 Subs(cond, rd, rn, operand);
4744 } else {
Georgia Kouvelidd8e4912016-12-12 16:42:30 +00004745 bool changed_op_is_smaller =
4746 operand.IsImmediate() && (operand.GetSignedImmediate() < 0) &&
4747 ((rd.IsLow() && rn.IsLow() &&
4748 (operand.GetSignedImmediate() >= -7)) ||
4749 (rd.IsLow() && rn.Is(rd) &&
4750 (operand.GetSignedImmediate() >= -255)));
4751 if (changed_op_is_smaller) {
4752 Adds(cond, rd, rn, -operand.GetSignedImmediate());
4753 } else {
4754 Sub(cond, rd, rn, operand);
4755 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004756 }
4757 break;
4758 }
4759 }
4760 void Sub(FlagsUpdate flags,
4761 Register rd,
4762 Register rn,
4763 const Operand& operand) {
4764 Sub(flags, al, rd, rn, operand);
4765 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004766
4767 void Subs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004768 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4769 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4770 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004771 VIXL_ASSERT(allow_macro_instructions_);
4772 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004773 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004774 ITScope it_scope(this, &cond);
4775 subs(cond, rd, rn, operand);
4776 }
4777 void Subs(Register rd, Register rn, const Operand& operand) {
4778 Subs(al, rd, rn, operand);
4779 }
4780
Alexandre Ramesd3832962016-07-04 15:03:43 +01004781 void Svc(Condition cond, uint32_t imm) {
4782 VIXL_ASSERT(allow_macro_instructions_);
4783 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004784 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004785 ITScope it_scope(this, &cond);
4786 svc(cond, imm);
4787 }
4788 void Svc(uint32_t imm) { Svc(al, imm); }
4789
4790 void Sxtab(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004791 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4792 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4793 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004794 VIXL_ASSERT(allow_macro_instructions_);
4795 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004796 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004797 ITScope it_scope(this, &cond);
4798 sxtab(cond, rd, rn, operand);
4799 }
4800 void Sxtab(Register rd, Register rn, const Operand& operand) {
4801 Sxtab(al, rd, rn, operand);
4802 }
4803
4804 void Sxtab16(Condition cond,
4805 Register rd,
4806 Register rn,
4807 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004808 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4809 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4810 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004811 VIXL_ASSERT(allow_macro_instructions_);
4812 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004813 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004814 ITScope it_scope(this, &cond);
4815 sxtab16(cond, rd, rn, operand);
4816 }
4817 void Sxtab16(Register rd, Register rn, const Operand& operand) {
4818 Sxtab16(al, rd, rn, operand);
4819 }
4820
4821 void Sxtah(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004822 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4823 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4824 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004825 VIXL_ASSERT(allow_macro_instructions_);
4826 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004827 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004828 ITScope it_scope(this, &cond);
4829 sxtah(cond, rd, rn, operand);
4830 }
4831 void Sxtah(Register rd, Register rn, const Operand& operand) {
4832 Sxtah(al, rd, rn, operand);
4833 }
4834
4835 void Sxtb(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004836 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4837 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004838 VIXL_ASSERT(allow_macro_instructions_);
4839 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004840 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004841 ITScope it_scope(this, &cond);
4842 sxtb(cond, rd, operand);
4843 }
4844 void Sxtb(Register rd, const Operand& operand) { Sxtb(al, rd, operand); }
4845
4846 void Sxtb16(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004847 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4848 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004849 VIXL_ASSERT(allow_macro_instructions_);
4850 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004851 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004852 ITScope it_scope(this, &cond);
4853 sxtb16(cond, rd, operand);
4854 }
4855 void Sxtb16(Register rd, const Operand& operand) { Sxtb16(al, rd, operand); }
4856
4857 void Sxth(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004858 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4859 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004860 VIXL_ASSERT(allow_macro_instructions_);
4861 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004862 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004863 ITScope it_scope(this, &cond);
4864 sxth(cond, rd, operand);
4865 }
4866 void Sxth(Register rd, const Operand& operand) { Sxth(al, rd, operand); }
4867
Alexandre Ramesd3832962016-07-04 15:03:43 +01004868 void Teq(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004869 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4870 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004871 VIXL_ASSERT(allow_macro_instructions_);
4872 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004873 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004874 ITScope it_scope(this, &cond);
4875 teq(cond, rn, operand);
4876 }
4877 void Teq(Register rn, const Operand& operand) { Teq(al, rn, operand); }
4878
4879 void Tst(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004880 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4881 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004882 VIXL_ASSERT(allow_macro_instructions_);
4883 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004884 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004885 bool can_use_it =
4886 // TST{<c>}{<q>} <Rn>, <Rm> ; T1
4887 operand.IsPlainRegister() && rn.IsLow() &&
4888 operand.GetBaseRegister().IsLow();
4889 ITScope it_scope(this, &cond, can_use_it);
4890 tst(cond, rn, operand);
4891 }
4892 void Tst(Register rn, const Operand& operand) { Tst(al, rn, operand); }
4893
4894 void Uadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004895 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4896 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4897 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004898 VIXL_ASSERT(allow_macro_instructions_);
4899 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004900 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004901 ITScope it_scope(this, &cond);
4902 uadd16(cond, rd, rn, rm);
4903 }
4904 void Uadd16(Register rd, Register rn, Register rm) { Uadd16(al, rd, rn, rm); }
4905
4906 void Uadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004907 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4908 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4909 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004910 VIXL_ASSERT(allow_macro_instructions_);
4911 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004912 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004913 ITScope it_scope(this, &cond);
4914 uadd8(cond, rd, rn, rm);
4915 }
4916 void Uadd8(Register rd, Register rn, Register rm) { Uadd8(al, rd, rn, rm); }
4917
4918 void Uasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004919 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4920 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4921 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004922 VIXL_ASSERT(allow_macro_instructions_);
4923 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004924 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004925 ITScope it_scope(this, &cond);
4926 uasx(cond, rd, rn, rm);
4927 }
4928 void Uasx(Register rd, Register rn, Register rm) { Uasx(al, rd, rn, rm); }
4929
4930 void Ubfx(Condition cond,
4931 Register rd,
4932 Register rn,
4933 uint32_t lsb,
4934 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004935 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4936 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4937 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004938 VIXL_ASSERT(allow_macro_instructions_);
4939 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004940 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004941 ITScope it_scope(this, &cond);
4942 ubfx(cond, rd, rn, lsb, operand);
4943 }
4944 void Ubfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) {
4945 Ubfx(al, rd, rn, lsb, operand);
4946 }
4947
4948 void Udf(Condition cond, uint32_t imm) {
4949 VIXL_ASSERT(allow_macro_instructions_);
4950 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004951 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004952 ITScope it_scope(this, &cond);
4953 udf(cond, imm);
4954 }
4955 void Udf(uint32_t imm) { Udf(al, imm); }
4956
4957 void Udiv(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004958 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4959 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4960 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004961 VIXL_ASSERT(allow_macro_instructions_);
4962 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004963 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004964 ITScope it_scope(this, &cond);
4965 udiv(cond, rd, rn, rm);
4966 }
4967 void Udiv(Register rd, Register rn, Register rm) { Udiv(al, rd, rn, rm); }
4968
4969 void Uhadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004970 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4971 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4972 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004973 VIXL_ASSERT(allow_macro_instructions_);
4974 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004975 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004976 ITScope it_scope(this, &cond);
4977 uhadd16(cond, rd, rn, rm);
4978 }
4979 void Uhadd16(Register rd, Register rn, Register rm) {
4980 Uhadd16(al, rd, rn, rm);
4981 }
4982
4983 void Uhadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004984 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4985 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4986 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004987 VIXL_ASSERT(allow_macro_instructions_);
4988 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004989 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004990 ITScope it_scope(this, &cond);
4991 uhadd8(cond, rd, rn, rm);
4992 }
4993 void Uhadd8(Register rd, Register rn, Register rm) { Uhadd8(al, rd, rn, rm); }
4994
4995 void Uhasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004996 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4997 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4998 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004999 VIXL_ASSERT(allow_macro_instructions_);
5000 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005001 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005002 ITScope it_scope(this, &cond);
5003 uhasx(cond, rd, rn, rm);
5004 }
5005 void Uhasx(Register rd, Register rn, Register rm) { Uhasx(al, rd, rn, rm); }
5006
5007 void Uhsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005008 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5009 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5010 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005011 VIXL_ASSERT(allow_macro_instructions_);
5012 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005013 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005014 ITScope it_scope(this, &cond);
5015 uhsax(cond, rd, rn, rm);
5016 }
5017 void Uhsax(Register rd, Register rn, Register rm) { Uhsax(al, rd, rn, rm); }
5018
5019 void Uhsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005020 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5021 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5022 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005023 VIXL_ASSERT(allow_macro_instructions_);
5024 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005025 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005026 ITScope it_scope(this, &cond);
5027 uhsub16(cond, rd, rn, rm);
5028 }
5029 void Uhsub16(Register rd, Register rn, Register rm) {
5030 Uhsub16(al, rd, rn, rm);
5031 }
5032
5033 void Uhsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005034 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5035 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5036 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005037 VIXL_ASSERT(allow_macro_instructions_);
5038 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005039 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005040 ITScope it_scope(this, &cond);
5041 uhsub8(cond, rd, rn, rm);
5042 }
5043 void Uhsub8(Register rd, Register rn, Register rm) { Uhsub8(al, rd, rn, rm); }
5044
5045 void Umaal(
5046 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005047 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
5048 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
5049 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5050 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005051 VIXL_ASSERT(allow_macro_instructions_);
5052 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005053 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005054 ITScope it_scope(this, &cond);
5055 umaal(cond, rdlo, rdhi, rn, rm);
5056 }
5057 void Umaal(Register rdlo, Register rdhi, Register rn, Register rm) {
5058 Umaal(al, rdlo, rdhi, rn, rm);
5059 }
5060
5061 void Umlal(
5062 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005063 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
5064 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
5065 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5066 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005067 VIXL_ASSERT(allow_macro_instructions_);
5068 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005069 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005070 ITScope it_scope(this, &cond);
5071 umlal(cond, rdlo, rdhi, rn, rm);
5072 }
5073 void Umlal(Register rdlo, Register rdhi, Register rn, Register rm) {
5074 Umlal(al, rdlo, rdhi, rn, rm);
5075 }
Vincent Belliard934696d2016-08-18 11:03:56 -07005076 void Umlal(FlagsUpdate flags,
5077 Condition cond,
5078 Register rdlo,
5079 Register rdhi,
5080 Register rn,
5081 Register rm) {
5082 switch (flags) {
5083 case LeaveFlags:
5084 Umlal(cond, rdlo, rdhi, rn, rm);
5085 break;
5086 case SetFlags:
5087 Umlals(cond, rdlo, rdhi, rn, rm);
5088 break;
5089 case DontCare:
5090 Umlal(cond, rdlo, rdhi, rn, rm);
5091 break;
5092 }
5093 }
5094 void Umlal(FlagsUpdate flags,
5095 Register rdlo,
5096 Register rdhi,
5097 Register rn,
5098 Register rm) {
5099 Umlal(flags, al, rdlo, rdhi, rn, rm);
5100 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01005101
5102 void Umlals(
5103 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005104 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
5105 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
5106 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5107 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005108 VIXL_ASSERT(allow_macro_instructions_);
5109 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005110 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005111 ITScope it_scope(this, &cond);
5112 umlals(cond, rdlo, rdhi, rn, rm);
5113 }
5114 void Umlals(Register rdlo, Register rdhi, Register rn, Register rm) {
5115 Umlals(al, rdlo, rdhi, rn, rm);
5116 }
5117
5118 void Umull(
5119 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005120 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
5121 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
5122 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5123 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005124 VIXL_ASSERT(allow_macro_instructions_);
5125 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005126 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005127 ITScope it_scope(this, &cond);
5128 umull(cond, rdlo, rdhi, rn, rm);
5129 }
5130 void Umull(Register rdlo, Register rdhi, Register rn, Register rm) {
5131 Umull(al, rdlo, rdhi, rn, rm);
5132 }
Vincent Belliard934696d2016-08-18 11:03:56 -07005133 void Umull(FlagsUpdate flags,
5134 Condition cond,
5135 Register rdlo,
5136 Register rdhi,
5137 Register rn,
5138 Register rm) {
5139 switch (flags) {
5140 case LeaveFlags:
5141 Umull(cond, rdlo, rdhi, rn, rm);
5142 break;
5143 case SetFlags:
5144 Umulls(cond, rdlo, rdhi, rn, rm);
5145 break;
5146 case DontCare:
5147 Umull(cond, rdlo, rdhi, rn, rm);
5148 break;
5149 }
5150 }
5151 void Umull(FlagsUpdate flags,
5152 Register rdlo,
5153 Register rdhi,
5154 Register rn,
5155 Register rm) {
5156 Umull(flags, al, rdlo, rdhi, rn, rm);
5157 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01005158
5159 void Umulls(
5160 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005161 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
5162 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
5163 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5164 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005165 VIXL_ASSERT(allow_macro_instructions_);
5166 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005167 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005168 ITScope it_scope(this, &cond);
5169 umulls(cond, rdlo, rdhi, rn, rm);
5170 }
5171 void Umulls(Register rdlo, Register rdhi, Register rn, Register rm) {
5172 Umulls(al, rdlo, rdhi, rn, rm);
5173 }
5174
5175 void Uqadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005176 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5177 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5178 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005179 VIXL_ASSERT(allow_macro_instructions_);
5180 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005181 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005182 ITScope it_scope(this, &cond);
5183 uqadd16(cond, rd, rn, rm);
5184 }
5185 void Uqadd16(Register rd, Register rn, Register rm) {
5186 Uqadd16(al, rd, rn, rm);
5187 }
5188
5189 void Uqadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005190 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5191 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5192 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005193 VIXL_ASSERT(allow_macro_instructions_);
5194 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005195 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005196 ITScope it_scope(this, &cond);
5197 uqadd8(cond, rd, rn, rm);
5198 }
5199 void Uqadd8(Register rd, Register rn, Register rm) { Uqadd8(al, rd, rn, rm); }
5200
5201 void Uqasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005202 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5203 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5204 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005205 VIXL_ASSERT(allow_macro_instructions_);
5206 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005207 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005208 ITScope it_scope(this, &cond);
5209 uqasx(cond, rd, rn, rm);
5210 }
5211 void Uqasx(Register rd, Register rn, Register rm) { Uqasx(al, rd, rn, rm); }
5212
5213 void Uqsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005214 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5215 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5216 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005217 VIXL_ASSERT(allow_macro_instructions_);
5218 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005219 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005220 ITScope it_scope(this, &cond);
5221 uqsax(cond, rd, rn, rm);
5222 }
5223 void Uqsax(Register rd, Register rn, Register rm) { Uqsax(al, rd, rn, rm); }
5224
5225 void Uqsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005226 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5227 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5228 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005229 VIXL_ASSERT(allow_macro_instructions_);
5230 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005231 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005232 ITScope it_scope(this, &cond);
5233 uqsub16(cond, rd, rn, rm);
5234 }
5235 void Uqsub16(Register rd, Register rn, Register rm) {
5236 Uqsub16(al, rd, rn, rm);
5237 }
5238
5239 void Uqsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005240 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5241 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5242 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005243 VIXL_ASSERT(allow_macro_instructions_);
5244 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005245 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005246 ITScope it_scope(this, &cond);
5247 uqsub8(cond, rd, rn, rm);
5248 }
5249 void Uqsub8(Register rd, Register rn, Register rm) { Uqsub8(al, rd, rn, rm); }
5250
5251 void Usad8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005252 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5253 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5254 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005255 VIXL_ASSERT(allow_macro_instructions_);
5256 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005257 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005258 ITScope it_scope(this, &cond);
5259 usad8(cond, rd, rn, rm);
5260 }
5261 void Usad8(Register rd, Register rn, Register rm) { Usad8(al, rd, rn, rm); }
5262
5263 void Usada8(
5264 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005265 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5266 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5267 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5268 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005269 VIXL_ASSERT(allow_macro_instructions_);
5270 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005271 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005272 ITScope it_scope(this, &cond);
5273 usada8(cond, rd, rn, rm, ra);
5274 }
5275 void Usada8(Register rd, Register rn, Register rm, Register ra) {
5276 Usada8(al, rd, rn, rm, ra);
5277 }
5278
5279 void Usat(Condition cond, Register rd, uint32_t imm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005280 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5281 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005282 VIXL_ASSERT(allow_macro_instructions_);
5283 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005284 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005285 ITScope it_scope(this, &cond);
5286 usat(cond, rd, imm, operand);
5287 }
5288 void Usat(Register rd, uint32_t imm, const Operand& operand) {
5289 Usat(al, rd, imm, operand);
5290 }
5291
5292 void Usat16(Condition cond, Register rd, uint32_t imm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005293 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5294 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005295 VIXL_ASSERT(allow_macro_instructions_);
5296 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005297 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005298 ITScope it_scope(this, &cond);
5299 usat16(cond, rd, imm, rn);
5300 }
5301 void Usat16(Register rd, uint32_t imm, Register rn) {
5302 Usat16(al, rd, imm, rn);
5303 }
5304
5305 void Usax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005306 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5307 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5308 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005309 VIXL_ASSERT(allow_macro_instructions_);
5310 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005311 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005312 ITScope it_scope(this, &cond);
5313 usax(cond, rd, rn, rm);
5314 }
5315 void Usax(Register rd, Register rn, Register rm) { Usax(al, rd, rn, rm); }
5316
5317 void Usub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005318 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5319 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5320 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005321 VIXL_ASSERT(allow_macro_instructions_);
5322 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005323 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005324 ITScope it_scope(this, &cond);
5325 usub16(cond, rd, rn, rm);
5326 }
5327 void Usub16(Register rd, Register rn, Register rm) { Usub16(al, rd, rn, rm); }
5328
5329 void Usub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005330 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5331 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5332 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005333 VIXL_ASSERT(allow_macro_instructions_);
5334 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005335 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005336 ITScope it_scope(this, &cond);
5337 usub8(cond, rd, rn, rm);
5338 }
5339 void Usub8(Register rd, Register rn, Register rm) { Usub8(al, rd, rn, rm); }
5340
5341 void Uxtab(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005342 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5343 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5344 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005345 VIXL_ASSERT(allow_macro_instructions_);
5346 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005347 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005348 ITScope it_scope(this, &cond);
5349 uxtab(cond, rd, rn, operand);
5350 }
5351 void Uxtab(Register rd, Register rn, const Operand& operand) {
5352 Uxtab(al, rd, rn, operand);
5353 }
5354
5355 void Uxtab16(Condition cond,
5356 Register rd,
5357 Register rn,
5358 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005359 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5360 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5361 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005362 VIXL_ASSERT(allow_macro_instructions_);
5363 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005364 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005365 ITScope it_scope(this, &cond);
5366 uxtab16(cond, rd, rn, operand);
5367 }
5368 void Uxtab16(Register rd, Register rn, const Operand& operand) {
5369 Uxtab16(al, rd, rn, operand);
5370 }
5371
5372 void Uxtah(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005373 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5374 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5375 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005376 VIXL_ASSERT(allow_macro_instructions_);
5377 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005378 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005379 ITScope it_scope(this, &cond);
5380 uxtah(cond, rd, rn, operand);
5381 }
5382 void Uxtah(Register rd, Register rn, const Operand& operand) {
5383 Uxtah(al, rd, rn, operand);
5384 }
5385
5386 void Uxtb(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005387 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5388 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
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 uxtb(cond, rd, operand);
5394 }
5395 void Uxtb(Register rd, const Operand& operand) { Uxtb(al, rd, operand); }
5396
5397 void Uxtb16(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005398 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5399 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005400 VIXL_ASSERT(allow_macro_instructions_);
5401 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005402 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005403 ITScope it_scope(this, &cond);
5404 uxtb16(cond, rd, operand);
5405 }
5406 void Uxtb16(Register rd, const Operand& operand) { Uxtb16(al, rd, operand); }
5407
5408 void Uxth(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005409 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5410 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005411 VIXL_ASSERT(allow_macro_instructions_);
5412 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005413 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005414 ITScope it_scope(this, &cond);
5415 uxth(cond, rd, operand);
5416 }
5417 void Uxth(Register rd, const Operand& operand) { Uxth(al, rd, operand); }
5418
5419 void Vaba(
5420 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005421 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5422 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5423 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005424 VIXL_ASSERT(allow_macro_instructions_);
5425 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005426 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005427 ITScope it_scope(this, &cond);
5428 vaba(cond, dt, rd, rn, rm);
5429 }
5430 void Vaba(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5431 Vaba(al, dt, rd, rn, rm);
5432 }
5433
5434 void Vaba(
5435 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005436 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5437 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5438 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005439 VIXL_ASSERT(allow_macro_instructions_);
5440 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005441 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005442 ITScope it_scope(this, &cond);
5443 vaba(cond, dt, rd, rn, rm);
5444 }
5445 void Vaba(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5446 Vaba(al, dt, rd, rn, rm);
5447 }
5448
5449 void Vabal(
5450 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005451 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5452 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5453 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005454 VIXL_ASSERT(allow_macro_instructions_);
5455 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005456 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005457 ITScope it_scope(this, &cond);
5458 vabal(cond, dt, rd, rn, rm);
5459 }
5460 void Vabal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5461 Vabal(al, dt, rd, rn, rm);
5462 }
5463
5464 void Vabd(
5465 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005466 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5467 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5468 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005469 VIXL_ASSERT(allow_macro_instructions_);
5470 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005471 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005472 ITScope it_scope(this, &cond);
5473 vabd(cond, dt, rd, rn, rm);
5474 }
5475 void Vabd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5476 Vabd(al, dt, rd, rn, rm);
5477 }
5478
5479 void Vabd(
5480 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005481 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5482 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5483 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005484 VIXL_ASSERT(allow_macro_instructions_);
5485 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005486 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005487 ITScope it_scope(this, &cond);
5488 vabd(cond, dt, rd, rn, rm);
5489 }
5490 void Vabd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5491 Vabd(al, dt, rd, rn, rm);
5492 }
5493
5494 void Vabdl(
5495 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005496 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5497 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5498 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005499 VIXL_ASSERT(allow_macro_instructions_);
5500 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005501 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005502 ITScope it_scope(this, &cond);
5503 vabdl(cond, dt, rd, rn, rm);
5504 }
5505 void Vabdl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5506 Vabdl(al, dt, rd, rn, rm);
5507 }
5508
5509 void Vabs(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005510 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5511 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005512 VIXL_ASSERT(allow_macro_instructions_);
5513 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005514 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005515 ITScope it_scope(this, &cond);
5516 vabs(cond, dt, rd, rm);
5517 }
5518 void Vabs(DataType dt, DRegister rd, DRegister rm) { Vabs(al, dt, rd, rm); }
5519
5520 void Vabs(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005521 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5522 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005523 VIXL_ASSERT(allow_macro_instructions_);
5524 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005525 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005526 ITScope it_scope(this, &cond);
5527 vabs(cond, dt, rd, rm);
5528 }
5529 void Vabs(DataType dt, QRegister rd, QRegister rm) { Vabs(al, dt, rd, rm); }
5530
5531 void Vabs(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005532 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5533 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005534 VIXL_ASSERT(allow_macro_instructions_);
5535 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005536 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005537 ITScope it_scope(this, &cond);
5538 vabs(cond, dt, rd, rm);
5539 }
5540 void Vabs(DataType dt, SRegister rd, SRegister rm) { Vabs(al, dt, rd, rm); }
5541
5542 void Vacge(
5543 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005544 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5545 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5546 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005547 VIXL_ASSERT(allow_macro_instructions_);
5548 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005549 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005550 ITScope it_scope(this, &cond);
5551 vacge(cond, dt, rd, rn, rm);
5552 }
5553 void Vacge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5554 Vacge(al, dt, rd, rn, rm);
5555 }
5556
5557 void Vacge(
5558 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005559 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5560 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5561 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005562 VIXL_ASSERT(allow_macro_instructions_);
5563 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005564 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005565 ITScope it_scope(this, &cond);
5566 vacge(cond, dt, rd, rn, rm);
5567 }
5568 void Vacge(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5569 Vacge(al, dt, rd, rn, rm);
5570 }
5571
5572 void Vacgt(
5573 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005574 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5575 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5576 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005577 VIXL_ASSERT(allow_macro_instructions_);
5578 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005579 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005580 ITScope it_scope(this, &cond);
5581 vacgt(cond, dt, rd, rn, rm);
5582 }
5583 void Vacgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5584 Vacgt(al, dt, rd, rn, rm);
5585 }
5586
5587 void Vacgt(
5588 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005589 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5590 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5591 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005592 VIXL_ASSERT(allow_macro_instructions_);
5593 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005594 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005595 ITScope it_scope(this, &cond);
5596 vacgt(cond, dt, rd, rn, rm);
5597 }
5598 void Vacgt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5599 Vacgt(al, dt, rd, rn, rm);
5600 }
5601
5602 void Vacle(
5603 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005604 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5605 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5606 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005607 VIXL_ASSERT(allow_macro_instructions_);
5608 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005609 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005610 ITScope it_scope(this, &cond);
5611 vacle(cond, dt, rd, rn, rm);
5612 }
5613 void Vacle(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5614 Vacle(al, dt, rd, rn, rm);
5615 }
5616
5617 void Vacle(
5618 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005619 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5620 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5621 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005622 VIXL_ASSERT(allow_macro_instructions_);
5623 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005624 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005625 ITScope it_scope(this, &cond);
5626 vacle(cond, dt, rd, rn, rm);
5627 }
5628 void Vacle(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5629 Vacle(al, dt, rd, rn, rm);
5630 }
5631
5632 void Vaclt(
5633 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005634 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5635 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5636 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005637 VIXL_ASSERT(allow_macro_instructions_);
5638 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005639 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005640 ITScope it_scope(this, &cond);
5641 vaclt(cond, dt, rd, rn, rm);
5642 }
5643 void Vaclt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5644 Vaclt(al, dt, rd, rn, rm);
5645 }
5646
5647 void Vaclt(
5648 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005649 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5650 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5651 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005652 VIXL_ASSERT(allow_macro_instructions_);
5653 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005654 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005655 ITScope it_scope(this, &cond);
5656 vaclt(cond, dt, rd, rn, rm);
5657 }
5658 void Vaclt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5659 Vaclt(al, dt, rd, rn, rm);
5660 }
5661
5662 void Vadd(
5663 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005664 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5665 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5666 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005667 VIXL_ASSERT(allow_macro_instructions_);
5668 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005669 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005670 ITScope it_scope(this, &cond);
5671 vadd(cond, dt, rd, rn, rm);
5672 }
5673 void Vadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5674 Vadd(al, dt, rd, rn, rm);
5675 }
5676
5677 void Vadd(
5678 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005679 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5680 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5681 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005682 VIXL_ASSERT(allow_macro_instructions_);
5683 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005684 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005685 ITScope it_scope(this, &cond);
5686 vadd(cond, dt, rd, rn, rm);
5687 }
5688 void Vadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5689 Vadd(al, dt, rd, rn, rm);
5690 }
5691
5692 void Vadd(
5693 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005694 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5696 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005697 VIXL_ASSERT(allow_macro_instructions_);
5698 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005699 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005700 ITScope it_scope(this, &cond);
5701 vadd(cond, dt, rd, rn, rm);
5702 }
5703 void Vadd(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
5704 Vadd(al, dt, rd, rn, rm);
5705 }
5706
5707 void Vaddhn(
5708 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005709 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5710 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5711 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005712 VIXL_ASSERT(allow_macro_instructions_);
5713 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005714 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005715 ITScope it_scope(this, &cond);
5716 vaddhn(cond, dt, rd, rn, rm);
5717 }
5718 void Vaddhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
5719 Vaddhn(al, dt, rd, rn, rm);
5720 }
5721
5722 void Vaddl(
5723 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005724 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5725 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5726 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005727 VIXL_ASSERT(allow_macro_instructions_);
5728 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005729 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005730 ITScope it_scope(this, &cond);
5731 vaddl(cond, dt, rd, rn, rm);
5732 }
5733 void Vaddl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5734 Vaddl(al, dt, rd, rn, rm);
5735 }
5736
5737 void Vaddw(
5738 Condition cond, DataType dt, QRegister rd, QRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005739 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5740 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5741 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005742 VIXL_ASSERT(allow_macro_instructions_);
5743 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005744 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005745 ITScope it_scope(this, &cond);
5746 vaddw(cond, dt, rd, rn, rm);
5747 }
5748 void Vaddw(DataType dt, QRegister rd, QRegister rn, DRegister rm) {
5749 Vaddw(al, dt, rd, rn, rm);
5750 }
5751
5752 void Vand(Condition cond,
5753 DataType dt,
5754 DRegister rd,
5755 DRegister rn,
5756 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005757 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5758 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5759 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005760 VIXL_ASSERT(allow_macro_instructions_);
5761 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005762 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005763 ITScope it_scope(this, &cond);
5764 vand(cond, dt, rd, rn, operand);
5765 }
5766 void Vand(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
5767 Vand(al, dt, rd, rn, operand);
5768 }
5769
5770 void Vand(Condition cond,
5771 DataType dt,
5772 QRegister rd,
5773 QRegister rn,
5774 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005775 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5776 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5777 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005778 VIXL_ASSERT(allow_macro_instructions_);
5779 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005780 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005781 ITScope it_scope(this, &cond);
5782 vand(cond, dt, rd, rn, operand);
5783 }
5784 void Vand(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
5785 Vand(al, dt, rd, rn, operand);
5786 }
5787
5788 void Vbic(Condition cond,
5789 DataType dt,
5790 DRegister rd,
5791 DRegister rn,
5792 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005793 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5794 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5795 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005796 VIXL_ASSERT(allow_macro_instructions_);
5797 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005798 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005799 ITScope it_scope(this, &cond);
5800 vbic(cond, dt, rd, rn, operand);
5801 }
5802 void Vbic(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
5803 Vbic(al, dt, rd, rn, operand);
5804 }
5805
5806 void Vbic(Condition cond,
5807 DataType dt,
5808 QRegister rd,
5809 QRegister rn,
5810 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005811 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5812 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5813 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005814 VIXL_ASSERT(allow_macro_instructions_);
5815 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005816 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005817 ITScope it_scope(this, &cond);
5818 vbic(cond, dt, rd, rn, operand);
5819 }
5820 void Vbic(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
5821 Vbic(al, dt, rd, rn, operand);
5822 }
5823
5824 void Vbif(
5825 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005826 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5827 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5828 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005829 VIXL_ASSERT(allow_macro_instructions_);
5830 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005831 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005832 ITScope it_scope(this, &cond);
5833 vbif(cond, dt, rd, rn, rm);
5834 }
5835 void Vbif(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5836 Vbif(al, dt, rd, rn, rm);
5837 }
5838 void Vbif(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5839 Vbif(cond, kDataTypeValueNone, rd, rn, rm);
5840 }
5841 void Vbif(DRegister rd, DRegister rn, DRegister rm) {
5842 Vbif(al, kDataTypeValueNone, rd, rn, rm);
5843 }
5844
5845 void Vbif(
5846 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005847 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5848 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5849 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005850 VIXL_ASSERT(allow_macro_instructions_);
5851 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005852 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005853 ITScope it_scope(this, &cond);
5854 vbif(cond, dt, rd, rn, rm);
5855 }
5856 void Vbif(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5857 Vbif(al, dt, rd, rn, rm);
5858 }
5859 void Vbif(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5860 Vbif(cond, kDataTypeValueNone, rd, rn, rm);
5861 }
5862 void Vbif(QRegister rd, QRegister rn, QRegister rm) {
5863 Vbif(al, kDataTypeValueNone, rd, rn, rm);
5864 }
5865
5866 void Vbit(
5867 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005868 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5869 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5870 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005871 VIXL_ASSERT(allow_macro_instructions_);
5872 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005873 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005874 ITScope it_scope(this, &cond);
5875 vbit(cond, dt, rd, rn, rm);
5876 }
5877 void Vbit(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5878 Vbit(al, dt, rd, rn, rm);
5879 }
5880 void Vbit(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5881 Vbit(cond, kDataTypeValueNone, rd, rn, rm);
5882 }
5883 void Vbit(DRegister rd, DRegister rn, DRegister rm) {
5884 Vbit(al, kDataTypeValueNone, rd, rn, rm);
5885 }
5886
5887 void Vbit(
5888 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005889 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5890 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5891 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005892 VIXL_ASSERT(allow_macro_instructions_);
5893 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005894 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005895 ITScope it_scope(this, &cond);
5896 vbit(cond, dt, rd, rn, rm);
5897 }
5898 void Vbit(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5899 Vbit(al, dt, rd, rn, rm);
5900 }
5901 void Vbit(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5902 Vbit(cond, kDataTypeValueNone, rd, rn, rm);
5903 }
5904 void Vbit(QRegister rd, QRegister rn, QRegister rm) {
5905 Vbit(al, kDataTypeValueNone, rd, rn, rm);
5906 }
5907
5908 void Vbsl(
5909 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005910 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5911 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5912 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005913 VIXL_ASSERT(allow_macro_instructions_);
5914 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005915 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005916 ITScope it_scope(this, &cond);
5917 vbsl(cond, dt, rd, rn, rm);
5918 }
5919 void Vbsl(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5920 Vbsl(al, dt, rd, rn, rm);
5921 }
5922 void Vbsl(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5923 Vbsl(cond, kDataTypeValueNone, rd, rn, rm);
5924 }
5925 void Vbsl(DRegister rd, DRegister rn, DRegister rm) {
5926 Vbsl(al, kDataTypeValueNone, rd, rn, rm);
5927 }
5928
5929 void Vbsl(
5930 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005931 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5932 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5933 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005934 VIXL_ASSERT(allow_macro_instructions_);
5935 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005936 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005937 ITScope it_scope(this, &cond);
5938 vbsl(cond, dt, rd, rn, rm);
5939 }
5940 void Vbsl(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5941 Vbsl(al, dt, rd, rn, rm);
5942 }
5943 void Vbsl(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5944 Vbsl(cond, kDataTypeValueNone, rd, rn, rm);
5945 }
5946 void Vbsl(QRegister rd, QRegister rn, QRegister rm) {
5947 Vbsl(al, kDataTypeValueNone, rd, rn, rm);
5948 }
5949
5950 void Vceq(Condition cond,
5951 DataType dt,
5952 DRegister rd,
5953 DRegister rm,
5954 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005955 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5956 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5957 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005958 VIXL_ASSERT(allow_macro_instructions_);
5959 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005960 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005961 ITScope it_scope(this, &cond);
5962 vceq(cond, dt, rd, rm, operand);
5963 }
5964 void Vceq(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5965 Vceq(al, dt, rd, rm, operand);
5966 }
5967
5968 void Vceq(Condition cond,
5969 DataType dt,
5970 QRegister rd,
5971 QRegister rm,
5972 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005973 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5974 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5975 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005976 VIXL_ASSERT(allow_macro_instructions_);
5977 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005978 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005979 ITScope it_scope(this, &cond);
5980 vceq(cond, dt, rd, rm, operand);
5981 }
5982 void Vceq(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5983 Vceq(al, dt, rd, rm, operand);
5984 }
5985
5986 void Vceq(
5987 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005988 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5989 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5990 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005991 VIXL_ASSERT(allow_macro_instructions_);
5992 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005993 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005994 ITScope it_scope(this, &cond);
5995 vceq(cond, dt, rd, rn, rm);
5996 }
5997 void Vceq(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5998 Vceq(al, dt, rd, rn, rm);
5999 }
6000
6001 void Vceq(
6002 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006003 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6004 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6005 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006006 VIXL_ASSERT(allow_macro_instructions_);
6007 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006008 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006009 ITScope it_scope(this, &cond);
6010 vceq(cond, dt, rd, rn, rm);
6011 }
6012 void Vceq(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6013 Vceq(al, dt, rd, rn, rm);
6014 }
6015
6016 void Vcge(Condition cond,
6017 DataType dt,
6018 DRegister rd,
6019 DRegister rm,
6020 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006021 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6022 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6023 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006024 VIXL_ASSERT(allow_macro_instructions_);
6025 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006026 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006027 ITScope it_scope(this, &cond);
6028 vcge(cond, dt, rd, rm, operand);
6029 }
6030 void Vcge(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
6031 Vcge(al, dt, rd, rm, operand);
6032 }
6033
6034 void Vcge(Condition cond,
6035 DataType dt,
6036 QRegister rd,
6037 QRegister rm,
6038 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006039 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6040 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6041 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
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 vcge(cond, dt, rd, rm, operand);
6047 }
6048 void Vcge(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
6049 Vcge(al, dt, rd, rm, operand);
6050 }
6051
6052 void Vcge(
6053 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006054 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6055 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6056 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006057 VIXL_ASSERT(allow_macro_instructions_);
6058 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006059 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006060 ITScope it_scope(this, &cond);
6061 vcge(cond, dt, rd, rn, rm);
6062 }
6063 void Vcge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6064 Vcge(al, dt, rd, rn, rm);
6065 }
6066
6067 void Vcge(
6068 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006069 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6070 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6071 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006072 VIXL_ASSERT(allow_macro_instructions_);
6073 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006074 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006075 ITScope it_scope(this, &cond);
6076 vcge(cond, dt, rd, rn, rm);
6077 }
6078 void Vcge(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6079 Vcge(al, dt, rd, rn, rm);
6080 }
6081
6082 void Vcgt(Condition cond,
6083 DataType dt,
6084 DRegister rd,
6085 DRegister rm,
6086 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006087 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6088 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6089 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006090 VIXL_ASSERT(allow_macro_instructions_);
6091 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006092 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006093 ITScope it_scope(this, &cond);
6094 vcgt(cond, dt, rd, rm, operand);
6095 }
6096 void Vcgt(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
6097 Vcgt(al, dt, rd, rm, operand);
6098 }
6099
6100 void Vcgt(Condition cond,
6101 DataType dt,
6102 QRegister rd,
6103 QRegister rm,
6104 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006105 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6106 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6107 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006108 VIXL_ASSERT(allow_macro_instructions_);
6109 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006110 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006111 ITScope it_scope(this, &cond);
6112 vcgt(cond, dt, rd, rm, operand);
6113 }
6114 void Vcgt(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
6115 Vcgt(al, dt, rd, rm, operand);
6116 }
6117
6118 void Vcgt(
6119 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006120 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6121 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6122 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006123 VIXL_ASSERT(allow_macro_instructions_);
6124 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006125 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006126 ITScope it_scope(this, &cond);
6127 vcgt(cond, dt, rd, rn, rm);
6128 }
6129 void Vcgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6130 Vcgt(al, dt, rd, rn, rm);
6131 }
6132
6133 void Vcgt(
6134 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006135 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6136 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6137 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006138 VIXL_ASSERT(allow_macro_instructions_);
6139 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006140 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006141 ITScope it_scope(this, &cond);
6142 vcgt(cond, dt, rd, rn, rm);
6143 }
6144 void Vcgt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6145 Vcgt(al, dt, rd, rn, rm);
6146 }
6147
6148 void Vcle(Condition cond,
6149 DataType dt,
6150 DRegister rd,
6151 DRegister rm,
6152 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006153 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6154 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6155 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006156 VIXL_ASSERT(allow_macro_instructions_);
6157 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006158 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006159 ITScope it_scope(this, &cond);
6160 vcle(cond, dt, rd, rm, operand);
6161 }
6162 void Vcle(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
6163 Vcle(al, dt, rd, rm, operand);
6164 }
6165
6166 void Vcle(Condition cond,
6167 DataType dt,
6168 QRegister rd,
6169 QRegister rm,
6170 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006171 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6172 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6173 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006174 VIXL_ASSERT(allow_macro_instructions_);
6175 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006176 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006177 ITScope it_scope(this, &cond);
6178 vcle(cond, dt, rd, rm, operand);
6179 }
6180 void Vcle(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
6181 Vcle(al, dt, rd, rm, operand);
6182 }
6183
6184 void Vcle(
6185 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006186 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6187 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6188 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006189 VIXL_ASSERT(allow_macro_instructions_);
6190 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006191 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006192 ITScope it_scope(this, &cond);
6193 vcle(cond, dt, rd, rn, rm);
6194 }
6195 void Vcle(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6196 Vcle(al, dt, rd, rn, rm);
6197 }
6198
6199 void Vcle(
6200 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006201 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6202 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6203 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006204 VIXL_ASSERT(allow_macro_instructions_);
6205 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006206 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006207 ITScope it_scope(this, &cond);
6208 vcle(cond, dt, rd, rn, rm);
6209 }
6210 void Vcle(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6211 Vcle(al, dt, rd, rn, rm);
6212 }
6213
6214 void Vcls(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006215 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6216 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006217 VIXL_ASSERT(allow_macro_instructions_);
6218 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006219 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006220 ITScope it_scope(this, &cond);
6221 vcls(cond, dt, rd, rm);
6222 }
6223 void Vcls(DataType dt, DRegister rd, DRegister rm) { Vcls(al, dt, rd, rm); }
6224
6225 void Vcls(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006226 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6227 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006228 VIXL_ASSERT(allow_macro_instructions_);
6229 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006230 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006231 ITScope it_scope(this, &cond);
6232 vcls(cond, dt, rd, rm);
6233 }
6234 void Vcls(DataType dt, QRegister rd, QRegister rm) { Vcls(al, dt, rd, rm); }
6235
6236 void Vclt(Condition cond,
6237 DataType dt,
6238 DRegister rd,
6239 DRegister rm,
6240 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006241 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6242 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6243 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006244 VIXL_ASSERT(allow_macro_instructions_);
6245 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006246 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006247 ITScope it_scope(this, &cond);
6248 vclt(cond, dt, rd, rm, operand);
6249 }
6250 void Vclt(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
6251 Vclt(al, dt, rd, rm, operand);
6252 }
6253
6254 void Vclt(Condition cond,
6255 DataType dt,
6256 QRegister rd,
6257 QRegister rm,
6258 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006259 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6260 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6261 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006262 VIXL_ASSERT(allow_macro_instructions_);
6263 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006264 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006265 ITScope it_scope(this, &cond);
6266 vclt(cond, dt, rd, rm, operand);
6267 }
6268 void Vclt(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
6269 Vclt(al, dt, rd, rm, operand);
6270 }
6271
6272 void Vclt(
6273 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006274 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6275 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6276 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006277 VIXL_ASSERT(allow_macro_instructions_);
6278 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006279 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006280 ITScope it_scope(this, &cond);
6281 vclt(cond, dt, rd, rn, rm);
6282 }
6283 void Vclt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6284 Vclt(al, dt, rd, rn, rm);
6285 }
6286
6287 void Vclt(
6288 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006289 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6290 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6291 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006292 VIXL_ASSERT(allow_macro_instructions_);
6293 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006294 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006295 ITScope it_scope(this, &cond);
6296 vclt(cond, dt, rd, rn, rm);
6297 }
6298 void Vclt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6299 Vclt(al, dt, rd, rn, rm);
6300 }
6301
6302 void Vclz(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006303 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6304 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006305 VIXL_ASSERT(allow_macro_instructions_);
6306 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006307 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006308 ITScope it_scope(this, &cond);
6309 vclz(cond, dt, rd, rm);
6310 }
6311 void Vclz(DataType dt, DRegister rd, DRegister rm) { Vclz(al, dt, rd, rm); }
6312
6313 void Vclz(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006314 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6315 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006316 VIXL_ASSERT(allow_macro_instructions_);
6317 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006318 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006319 ITScope it_scope(this, &cond);
6320 vclz(cond, dt, rd, rm);
6321 }
6322 void Vclz(DataType dt, QRegister rd, QRegister rm) { Vclz(al, dt, rd, rm); }
6323
6324 void Vcmp(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006325 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6326 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006327 VIXL_ASSERT(allow_macro_instructions_);
6328 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006329 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006330 ITScope it_scope(this, &cond);
6331 vcmp(cond, dt, rd, rm);
6332 }
6333 void Vcmp(DataType dt, SRegister rd, SRegister rm) { Vcmp(al, dt, rd, rm); }
6334
6335 void Vcmp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006336 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6337 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006338 VIXL_ASSERT(allow_macro_instructions_);
6339 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006340 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006341 ITScope it_scope(this, &cond);
6342 vcmp(cond, dt, rd, rm);
6343 }
6344 void Vcmp(DataType dt, DRegister rd, DRegister rm) { Vcmp(al, dt, rd, rm); }
6345
6346 void Vcmp(Condition cond, DataType dt, SRegister rd, double imm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006347 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006348 VIXL_ASSERT(allow_macro_instructions_);
6349 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006350 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006351 ITScope it_scope(this, &cond);
6352 vcmp(cond, dt, rd, imm);
6353 }
6354 void Vcmp(DataType dt, SRegister rd, double imm) { Vcmp(al, dt, rd, imm); }
6355
6356 void Vcmp(Condition cond, DataType dt, DRegister rd, double imm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006357 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006358 VIXL_ASSERT(allow_macro_instructions_);
6359 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006360 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006361 ITScope it_scope(this, &cond);
6362 vcmp(cond, dt, rd, imm);
6363 }
6364 void Vcmp(DataType dt, DRegister rd, double imm) { Vcmp(al, dt, rd, imm); }
6365
6366 void Vcmpe(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006367 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6368 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006369 VIXL_ASSERT(allow_macro_instructions_);
6370 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006371 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006372 ITScope it_scope(this, &cond);
6373 vcmpe(cond, dt, rd, rm);
6374 }
6375 void Vcmpe(DataType dt, SRegister rd, SRegister rm) { Vcmpe(al, dt, rd, rm); }
6376
6377 void Vcmpe(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006378 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6379 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006380 VIXL_ASSERT(allow_macro_instructions_);
6381 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006382 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006383 ITScope it_scope(this, &cond);
6384 vcmpe(cond, dt, rd, rm);
6385 }
6386 void Vcmpe(DataType dt, DRegister rd, DRegister rm) { Vcmpe(al, dt, rd, rm); }
6387
6388 void Vcmpe(Condition cond, DataType dt, SRegister rd, double imm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006389 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
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 vcmpe(cond, dt, rd, imm);
6395 }
6396 void Vcmpe(DataType dt, SRegister rd, double imm) { Vcmpe(al, dt, rd, imm); }
6397
6398 void Vcmpe(Condition cond, DataType dt, DRegister rd, double imm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006399 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006400 VIXL_ASSERT(allow_macro_instructions_);
6401 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006402 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006403 ITScope it_scope(this, &cond);
6404 vcmpe(cond, dt, rd, imm);
6405 }
6406 void Vcmpe(DataType dt, DRegister rd, double imm) { Vcmpe(al, dt, rd, imm); }
6407
6408 void Vcnt(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006409 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6410 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006411 VIXL_ASSERT(allow_macro_instructions_);
6412 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006413 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006414 ITScope it_scope(this, &cond);
6415 vcnt(cond, dt, rd, rm);
6416 }
6417 void Vcnt(DataType dt, DRegister rd, DRegister rm) { Vcnt(al, dt, rd, rm); }
6418
6419 void Vcnt(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006420 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6421 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006422 VIXL_ASSERT(allow_macro_instructions_);
6423 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006424 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006425 ITScope it_scope(this, &cond);
6426 vcnt(cond, dt, rd, rm);
6427 }
6428 void Vcnt(DataType dt, QRegister rd, QRegister rm) { Vcnt(al, dt, rd, rm); }
6429
6430 void Vcvt(
6431 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006432 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6433 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006434 VIXL_ASSERT(allow_macro_instructions_);
6435 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006436 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006437 ITScope it_scope(this, &cond);
6438 vcvt(cond, dt1, dt2, rd, rm);
6439 }
6440 void Vcvt(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6441 Vcvt(al, dt1, dt2, rd, rm);
6442 }
6443
6444 void Vcvt(
6445 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister 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 ITScope it_scope(this, &cond);
6452 vcvt(cond, dt1, dt2, rd, rm);
6453 }
6454 void Vcvt(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6455 Vcvt(al, dt1, dt2, rd, rm);
6456 }
6457
6458 void Vcvt(Condition cond,
6459 DataType dt1,
6460 DataType dt2,
6461 DRegister rd,
6462 DRegister rm,
6463 int32_t fbits) {
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 ITScope it_scope(this, &cond);
6470 vcvt(cond, dt1, dt2, rd, rm, fbits);
6471 }
6472 void Vcvt(
6473 DataType dt1, DataType dt2, DRegister rd, DRegister rm, int32_t fbits) {
6474 Vcvt(al, dt1, dt2, rd, rm, fbits);
6475 }
6476
6477 void Vcvt(Condition cond,
6478 DataType dt1,
6479 DataType dt2,
6480 QRegister rd,
6481 QRegister rm,
6482 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006483 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006485 VIXL_ASSERT(allow_macro_instructions_);
6486 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006487 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006488 ITScope it_scope(this, &cond);
6489 vcvt(cond, dt1, dt2, rd, rm, fbits);
6490 }
6491 void Vcvt(
6492 DataType dt1, DataType dt2, QRegister rd, QRegister rm, int32_t fbits) {
6493 Vcvt(al, dt1, dt2, rd, rm, fbits);
6494 }
6495
6496 void Vcvt(Condition cond,
6497 DataType dt1,
6498 DataType dt2,
6499 SRegister rd,
6500 SRegister rm,
6501 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006502 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6503 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006504 VIXL_ASSERT(allow_macro_instructions_);
6505 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006506 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006507 ITScope it_scope(this, &cond);
6508 vcvt(cond, dt1, dt2, rd, rm, fbits);
6509 }
6510 void Vcvt(
6511 DataType dt1, DataType dt2, SRegister rd, SRegister rm, int32_t fbits) {
6512 Vcvt(al, dt1, dt2, rd, rm, fbits);
6513 }
6514
6515 void Vcvt(
6516 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006517 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6518 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006519 VIXL_ASSERT(allow_macro_instructions_);
6520 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006521 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006522 ITScope it_scope(this, &cond);
6523 vcvt(cond, dt1, dt2, rd, rm);
6524 }
6525 void Vcvt(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
6526 Vcvt(al, dt1, dt2, rd, rm);
6527 }
6528
6529 void Vcvt(
6530 Condition cond, DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006531 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6532 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006533 VIXL_ASSERT(allow_macro_instructions_);
6534 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006535 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006536 ITScope it_scope(this, &cond);
6537 vcvt(cond, dt1, dt2, rd, rm);
6538 }
6539 void Vcvt(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
6540 Vcvt(al, dt1, dt2, rd, rm);
6541 }
6542
6543 void Vcvt(
6544 Condition cond, DataType dt1, DataType dt2, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006545 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6546 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006547 VIXL_ASSERT(allow_macro_instructions_);
6548 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006549 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006550 ITScope it_scope(this, &cond);
6551 vcvt(cond, dt1, dt2, rd, rm);
6552 }
6553 void Vcvt(DataType dt1, DataType dt2, DRegister rd, QRegister rm) {
6554 Vcvt(al, dt1, dt2, rd, rm);
6555 }
6556
6557 void Vcvt(
6558 Condition cond, DataType dt1, DataType dt2, QRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006559 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6560 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006561 VIXL_ASSERT(allow_macro_instructions_);
6562 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006563 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006564 ITScope it_scope(this, &cond);
6565 vcvt(cond, dt1, dt2, rd, rm);
6566 }
6567 void Vcvt(DataType dt1, DataType dt2, QRegister rd, DRegister rm) {
6568 Vcvt(al, dt1, dt2, rd, rm);
6569 }
6570
6571 void Vcvt(
6572 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006573 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6574 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006575 VIXL_ASSERT(allow_macro_instructions_);
6576 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006577 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006578 ITScope it_scope(this, &cond);
6579 vcvt(cond, dt1, dt2, rd, rm);
6580 }
6581 void Vcvt(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6582 Vcvt(al, dt1, dt2, rd, rm);
6583 }
6584
6585 void Vcvta(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006586 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6587 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006588 VIXL_ASSERT(allow_macro_instructions_);
6589 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006590 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006591 vcvta(dt1, dt2, rd, rm);
6592 }
6593
6594 void Vcvta(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006595 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6596 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006597 VIXL_ASSERT(allow_macro_instructions_);
6598 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006599 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006600 vcvta(dt1, dt2, rd, rm);
6601 }
6602
6603 void Vcvta(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006604 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6605 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006606 VIXL_ASSERT(allow_macro_instructions_);
6607 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006608 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006609 vcvta(dt1, dt2, rd, rm);
6610 }
6611
6612 void Vcvta(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006613 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6614 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006615 VIXL_ASSERT(allow_macro_instructions_);
6616 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006617 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006618 vcvta(dt1, dt2, rd, rm);
6619 }
6620
6621 void Vcvtb(
6622 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006623 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6624 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006625 VIXL_ASSERT(allow_macro_instructions_);
6626 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006627 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006628 ITScope it_scope(this, &cond);
6629 vcvtb(cond, dt1, dt2, rd, rm);
6630 }
6631 void Vcvtb(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6632 Vcvtb(al, dt1, dt2, rd, rm);
6633 }
6634
6635 void Vcvtb(
6636 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006637 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6638 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006639 VIXL_ASSERT(allow_macro_instructions_);
6640 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006641 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006642 ITScope it_scope(this, &cond);
6643 vcvtb(cond, dt1, dt2, rd, rm);
6644 }
6645 void Vcvtb(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6646 Vcvtb(al, dt1, dt2, rd, rm);
6647 }
6648
6649 void Vcvtb(
6650 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006651 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6652 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006653 VIXL_ASSERT(allow_macro_instructions_);
6654 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006655 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006656 ITScope it_scope(this, &cond);
6657 vcvtb(cond, dt1, dt2, rd, rm);
6658 }
6659 void Vcvtb(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6660 Vcvtb(al, dt1, dt2, rd, rm);
6661 }
6662
6663 void Vcvtm(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006664 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6665 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006666 VIXL_ASSERT(allow_macro_instructions_);
6667 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006668 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006669 vcvtm(dt1, dt2, rd, rm);
6670 }
6671
6672 void Vcvtm(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006673 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6674 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006675 VIXL_ASSERT(allow_macro_instructions_);
6676 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006677 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006678 vcvtm(dt1, dt2, rd, rm);
6679 }
6680
6681 void Vcvtm(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006682 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6683 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006684 VIXL_ASSERT(allow_macro_instructions_);
6685 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006686 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006687 vcvtm(dt1, dt2, rd, rm);
6688 }
6689
6690 void Vcvtm(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006691 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006693 VIXL_ASSERT(allow_macro_instructions_);
6694 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006695 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006696 vcvtm(dt1, dt2, rd, rm);
6697 }
6698
6699 void Vcvtn(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006700 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6701 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006702 VIXL_ASSERT(allow_macro_instructions_);
6703 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006704 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006705 vcvtn(dt1, dt2, rd, rm);
6706 }
6707
6708 void Vcvtn(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006709 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6710 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006711 VIXL_ASSERT(allow_macro_instructions_);
6712 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006713 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006714 vcvtn(dt1, dt2, rd, rm);
6715 }
6716
6717 void Vcvtn(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006718 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6719 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006720 VIXL_ASSERT(allow_macro_instructions_);
6721 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006722 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006723 vcvtn(dt1, dt2, rd, rm);
6724 }
6725
6726 void Vcvtn(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006727 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6728 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006729 VIXL_ASSERT(allow_macro_instructions_);
6730 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006731 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006732 vcvtn(dt1, dt2, rd, rm);
6733 }
6734
6735 void Vcvtp(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006736 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6737 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006738 VIXL_ASSERT(allow_macro_instructions_);
6739 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006740 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006741 vcvtp(dt1, dt2, rd, rm);
6742 }
6743
6744 void Vcvtp(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006745 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6746 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006747 VIXL_ASSERT(allow_macro_instructions_);
6748 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006749 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006750 vcvtp(dt1, dt2, rd, rm);
6751 }
6752
6753 void Vcvtp(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006754 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6755 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006756 VIXL_ASSERT(allow_macro_instructions_);
6757 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006758 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006759 vcvtp(dt1, dt2, rd, rm);
6760 }
6761
6762 void Vcvtp(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006763 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6764 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006765 VIXL_ASSERT(allow_macro_instructions_);
6766 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006767 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006768 vcvtp(dt1, dt2, rd, rm);
6769 }
6770
6771 void Vcvtr(
6772 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006773 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6774 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006775 VIXL_ASSERT(allow_macro_instructions_);
6776 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006777 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006778 ITScope it_scope(this, &cond);
6779 vcvtr(cond, dt1, dt2, rd, rm);
6780 }
6781 void Vcvtr(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6782 Vcvtr(al, dt1, dt2, rd, rm);
6783 }
6784
6785 void Vcvtr(
6786 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006787 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6788 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006789 VIXL_ASSERT(allow_macro_instructions_);
6790 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006791 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006792 ITScope it_scope(this, &cond);
6793 vcvtr(cond, dt1, dt2, rd, rm);
6794 }
6795 void Vcvtr(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6796 Vcvtr(al, dt1, dt2, rd, rm);
6797 }
6798
6799 void Vcvtt(
6800 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006801 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6802 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006803 VIXL_ASSERT(allow_macro_instructions_);
6804 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006805 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006806 ITScope it_scope(this, &cond);
6807 vcvtt(cond, dt1, dt2, rd, rm);
6808 }
6809 void Vcvtt(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6810 Vcvtt(al, dt1, dt2, rd, rm);
6811 }
6812
6813 void Vcvtt(
6814 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006815 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6816 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006817 VIXL_ASSERT(allow_macro_instructions_);
6818 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006819 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006820 ITScope it_scope(this, &cond);
6821 vcvtt(cond, dt1, dt2, rd, rm);
6822 }
6823 void Vcvtt(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6824 Vcvtt(al, dt1, dt2, rd, rm);
6825 }
6826
6827 void Vcvtt(
6828 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006829 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6830 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006831 VIXL_ASSERT(allow_macro_instructions_);
6832 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006833 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006834 ITScope it_scope(this, &cond);
6835 vcvtt(cond, dt1, dt2, rd, rm);
6836 }
6837 void Vcvtt(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6838 Vcvtt(al, dt1, dt2, rd, rm);
6839 }
6840
6841 void Vdiv(
6842 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006843 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6844 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6845 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006846 VIXL_ASSERT(allow_macro_instructions_);
6847 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006848 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006849 ITScope it_scope(this, &cond);
6850 vdiv(cond, dt, rd, rn, rm);
6851 }
6852 void Vdiv(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6853 Vdiv(al, dt, rd, rn, rm);
6854 }
6855
6856 void Vdiv(
6857 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006858 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6859 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6860 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006861 VIXL_ASSERT(allow_macro_instructions_);
6862 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006863 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006864 ITScope it_scope(this, &cond);
6865 vdiv(cond, dt, rd, rn, rm);
6866 }
6867 void Vdiv(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6868 Vdiv(al, dt, rd, rn, rm);
6869 }
6870
6871 void Vdup(Condition cond, DataType dt, QRegister rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006872 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6873 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006874 VIXL_ASSERT(allow_macro_instructions_);
6875 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006876 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006877 ITScope it_scope(this, &cond);
6878 vdup(cond, dt, rd, rt);
6879 }
6880 void Vdup(DataType dt, QRegister rd, Register rt) { Vdup(al, dt, rd, rt); }
6881
6882 void Vdup(Condition cond, DataType dt, DRegister rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006883 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6884 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006885 VIXL_ASSERT(allow_macro_instructions_);
6886 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006887 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006888 ITScope it_scope(this, &cond);
6889 vdup(cond, dt, rd, rt);
6890 }
6891 void Vdup(DataType dt, DRegister rd, Register rt) { Vdup(al, dt, rd, rt); }
6892
6893 void Vdup(Condition cond, DataType dt, DRegister rd, DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006894 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6895 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006896 VIXL_ASSERT(allow_macro_instructions_);
6897 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006898 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006899 ITScope it_scope(this, &cond);
6900 vdup(cond, dt, rd, rm);
6901 }
6902 void Vdup(DataType dt, DRegister rd, DRegisterLane rm) {
6903 Vdup(al, dt, rd, rm);
6904 }
6905
6906 void Vdup(Condition cond, DataType dt, QRegister rd, DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006907 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6908 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006909 VIXL_ASSERT(allow_macro_instructions_);
6910 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006911 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006912 ITScope it_scope(this, &cond);
6913 vdup(cond, dt, rd, rm);
6914 }
6915 void Vdup(DataType dt, QRegister rd, DRegisterLane rm) {
6916 Vdup(al, dt, rd, rm);
6917 }
6918
6919 void Veor(
6920 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006921 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6922 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6923 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006924 VIXL_ASSERT(allow_macro_instructions_);
6925 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006926 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006927 ITScope it_scope(this, &cond);
6928 veor(cond, dt, rd, rn, rm);
6929 }
6930 void Veor(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6931 Veor(al, dt, rd, rn, rm);
6932 }
6933 void Veor(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
6934 Veor(cond, kDataTypeValueNone, rd, rn, rm);
6935 }
6936 void Veor(DRegister rd, DRegister rn, DRegister rm) {
6937 Veor(al, kDataTypeValueNone, rd, rn, rm);
6938 }
6939
6940 void Veor(
6941 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006942 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6943 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006945 VIXL_ASSERT(allow_macro_instructions_);
6946 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006947 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006948 ITScope it_scope(this, &cond);
6949 veor(cond, dt, rd, rn, rm);
6950 }
6951 void Veor(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6952 Veor(al, dt, rd, rn, rm);
6953 }
6954 void Veor(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
6955 Veor(cond, kDataTypeValueNone, rd, rn, rm);
6956 }
6957 void Veor(QRegister rd, QRegister rn, QRegister rm) {
6958 Veor(al, kDataTypeValueNone, rd, rn, rm);
6959 }
6960
6961 void Vext(Condition cond,
6962 DataType dt,
6963 DRegister rd,
6964 DRegister rn,
6965 DRegister rm,
6966 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006967 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6968 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6969 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6970 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006971 VIXL_ASSERT(allow_macro_instructions_);
6972 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006973 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006974 ITScope it_scope(this, &cond);
6975 vext(cond, dt, rd, rn, rm, operand);
6976 }
6977 void Vext(DataType dt,
6978 DRegister rd,
6979 DRegister rn,
6980 DRegister rm,
6981 const DOperand& operand) {
6982 Vext(al, dt, rd, rn, rm, operand);
6983 }
6984
6985 void Vext(Condition cond,
6986 DataType dt,
6987 QRegister rd,
6988 QRegister rn,
6989 QRegister rm,
6990 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006991 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6992 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6993 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6994 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006995 VIXL_ASSERT(allow_macro_instructions_);
6996 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006997 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006998 ITScope it_scope(this, &cond);
6999 vext(cond, dt, rd, rn, rm, operand);
7000 }
7001 void Vext(DataType dt,
7002 QRegister rd,
7003 QRegister rn,
7004 QRegister rm,
7005 const QOperand& operand) {
7006 Vext(al, dt, rd, rn, rm, operand);
7007 }
7008
7009 void Vfma(
7010 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007011 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7012 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7013 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007014 VIXL_ASSERT(allow_macro_instructions_);
7015 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007016 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007017 ITScope it_scope(this, &cond);
7018 vfma(cond, dt, rd, rn, rm);
7019 }
7020 void Vfma(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7021 Vfma(al, dt, rd, rn, rm);
7022 }
7023
7024 void Vfma(
7025 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007026 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7027 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7028 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007029 VIXL_ASSERT(allow_macro_instructions_);
7030 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007031 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007032 ITScope it_scope(this, &cond);
7033 vfma(cond, dt, rd, rn, rm);
7034 }
7035 void Vfma(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7036 Vfma(al, dt, rd, rn, rm);
7037 }
7038
7039 void Vfma(
7040 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007041 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7042 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7043 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007044 VIXL_ASSERT(allow_macro_instructions_);
7045 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007046 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007047 ITScope it_scope(this, &cond);
7048 vfma(cond, dt, rd, rn, rm);
7049 }
7050 void Vfma(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7051 Vfma(al, dt, rd, rn, rm);
7052 }
7053
7054 void Vfms(
7055 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007056 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7057 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7058 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007059 VIXL_ASSERT(allow_macro_instructions_);
7060 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007061 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007062 ITScope it_scope(this, &cond);
7063 vfms(cond, dt, rd, rn, rm);
7064 }
7065 void Vfms(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7066 Vfms(al, dt, rd, rn, rm);
7067 }
7068
7069 void Vfms(
7070 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007071 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7072 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7073 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007074 VIXL_ASSERT(allow_macro_instructions_);
7075 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007076 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007077 ITScope it_scope(this, &cond);
7078 vfms(cond, dt, rd, rn, rm);
7079 }
7080 void Vfms(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7081 Vfms(al, dt, rd, rn, rm);
7082 }
7083
7084 void Vfms(
7085 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007086 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7087 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7088 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007089 VIXL_ASSERT(allow_macro_instructions_);
7090 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007091 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007092 ITScope it_scope(this, &cond);
7093 vfms(cond, dt, rd, rn, rm);
7094 }
7095 void Vfms(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7096 Vfms(al, dt, rd, rn, rm);
7097 }
7098
7099 void Vfnma(
7100 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007101 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7102 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7103 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007104 VIXL_ASSERT(allow_macro_instructions_);
7105 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007106 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007107 ITScope it_scope(this, &cond);
7108 vfnma(cond, dt, rd, rn, rm);
7109 }
7110 void Vfnma(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7111 Vfnma(al, dt, rd, rn, rm);
7112 }
7113
7114 void Vfnma(
7115 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007116 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7117 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7118 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007119 VIXL_ASSERT(allow_macro_instructions_);
7120 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007121 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007122 ITScope it_scope(this, &cond);
7123 vfnma(cond, dt, rd, rn, rm);
7124 }
7125 void Vfnma(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7126 Vfnma(al, dt, rd, rn, rm);
7127 }
7128
7129 void Vfnms(
7130 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007131 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7132 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7133 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007134 VIXL_ASSERT(allow_macro_instructions_);
7135 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007136 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007137 ITScope it_scope(this, &cond);
7138 vfnms(cond, dt, rd, rn, rm);
7139 }
7140 void Vfnms(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7141 Vfnms(al, dt, rd, rn, rm);
7142 }
7143
7144 void Vfnms(
7145 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007146 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7147 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7148 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007149 VIXL_ASSERT(allow_macro_instructions_);
7150 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007151 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007152 ITScope it_scope(this, &cond);
7153 vfnms(cond, dt, rd, rn, rm);
7154 }
7155 void Vfnms(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7156 Vfnms(al, dt, rd, rn, rm);
7157 }
7158
7159 void Vhadd(
7160 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007161 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7162 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7163 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007164 VIXL_ASSERT(allow_macro_instructions_);
7165 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007166 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007167 ITScope it_scope(this, &cond);
7168 vhadd(cond, dt, rd, rn, rm);
7169 }
7170 void Vhadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7171 Vhadd(al, dt, rd, rn, rm);
7172 }
7173
7174 void Vhadd(
7175 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007176 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7177 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7178 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007179 VIXL_ASSERT(allow_macro_instructions_);
7180 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007181 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007182 ITScope it_scope(this, &cond);
7183 vhadd(cond, dt, rd, rn, rm);
7184 }
7185 void Vhadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7186 Vhadd(al, dt, rd, rn, rm);
7187 }
7188
7189 void Vhsub(
7190 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007191 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7192 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7193 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007194 VIXL_ASSERT(allow_macro_instructions_);
7195 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007196 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007197 ITScope it_scope(this, &cond);
7198 vhsub(cond, dt, rd, rn, rm);
7199 }
7200 void Vhsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7201 Vhsub(al, dt, rd, rn, rm);
7202 }
7203
7204 void Vhsub(
7205 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007206 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7207 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7208 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007209 VIXL_ASSERT(allow_macro_instructions_);
7210 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007211 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007212 ITScope it_scope(this, &cond);
7213 vhsub(cond, dt, rd, rn, rm);
7214 }
7215 void Vhsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7216 Vhsub(al, dt, rd, rn, rm);
7217 }
7218
7219 void Vld1(Condition cond,
7220 DataType dt,
7221 const NeonRegisterList& nreglist,
7222 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007223 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7224 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007225 VIXL_ASSERT(allow_macro_instructions_);
7226 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007227 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007228 ITScope it_scope(this, &cond);
7229 vld1(cond, dt, nreglist, operand);
7230 }
7231 void Vld1(DataType dt,
7232 const NeonRegisterList& nreglist,
7233 const AlignedMemOperand& operand) {
7234 Vld1(al, dt, nreglist, operand);
7235 }
7236
7237 void Vld2(Condition cond,
7238 DataType dt,
7239 const NeonRegisterList& nreglist,
7240 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007241 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7242 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007243 VIXL_ASSERT(allow_macro_instructions_);
7244 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007245 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007246 ITScope it_scope(this, &cond);
7247 vld2(cond, dt, nreglist, operand);
7248 }
7249 void Vld2(DataType dt,
7250 const NeonRegisterList& nreglist,
7251 const AlignedMemOperand& operand) {
7252 Vld2(al, dt, nreglist, operand);
7253 }
7254
7255 void Vld3(Condition cond,
7256 DataType dt,
7257 const NeonRegisterList& nreglist,
7258 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007259 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7260 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007261 VIXL_ASSERT(allow_macro_instructions_);
7262 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007263 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007264 ITScope it_scope(this, &cond);
7265 vld3(cond, dt, nreglist, operand);
7266 }
7267 void Vld3(DataType dt,
7268 const NeonRegisterList& nreglist,
7269 const AlignedMemOperand& operand) {
7270 Vld3(al, dt, nreglist, operand);
7271 }
7272
7273 void Vld3(Condition cond,
7274 DataType dt,
7275 const NeonRegisterList& nreglist,
7276 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007277 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7278 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007279 VIXL_ASSERT(allow_macro_instructions_);
7280 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007281 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007282 ITScope it_scope(this, &cond);
7283 vld3(cond, dt, nreglist, operand);
7284 }
7285 void Vld3(DataType dt,
7286 const NeonRegisterList& nreglist,
7287 const MemOperand& operand) {
7288 Vld3(al, dt, nreglist, operand);
7289 }
7290
7291 void Vld4(Condition cond,
7292 DataType dt,
7293 const NeonRegisterList& nreglist,
7294 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007295 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7296 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007297 VIXL_ASSERT(allow_macro_instructions_);
7298 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007299 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007300 ITScope it_scope(this, &cond);
7301 vld4(cond, dt, nreglist, operand);
7302 }
7303 void Vld4(DataType dt,
7304 const NeonRegisterList& nreglist,
7305 const AlignedMemOperand& operand) {
7306 Vld4(al, dt, nreglist, operand);
7307 }
7308
7309 void Vldm(Condition cond,
7310 DataType dt,
7311 Register rn,
7312 WriteBack write_back,
7313 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007314 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7315 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
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 vldm(cond, dt, rn, write_back, dreglist);
7321 }
7322 void Vldm(DataType dt,
7323 Register rn,
7324 WriteBack write_back,
7325 DRegisterList dreglist) {
7326 Vldm(al, dt, rn, write_back, dreglist);
7327 }
7328 void Vldm(Condition cond,
7329 Register rn,
7330 WriteBack write_back,
7331 DRegisterList dreglist) {
7332 Vldm(cond, kDataTypeValueNone, rn, write_back, dreglist);
7333 }
7334 void Vldm(Register rn, WriteBack write_back, DRegisterList dreglist) {
7335 Vldm(al, kDataTypeValueNone, rn, write_back, dreglist);
7336 }
7337
7338 void Vldm(Condition cond,
7339 DataType dt,
7340 Register rn,
7341 WriteBack write_back,
7342 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007343 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7344 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007345 VIXL_ASSERT(allow_macro_instructions_);
7346 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007347 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007348 ITScope it_scope(this, &cond);
7349 vldm(cond, dt, rn, write_back, sreglist);
7350 }
7351 void Vldm(DataType dt,
7352 Register rn,
7353 WriteBack write_back,
7354 SRegisterList sreglist) {
7355 Vldm(al, dt, rn, write_back, sreglist);
7356 }
7357 void Vldm(Condition cond,
7358 Register rn,
7359 WriteBack write_back,
7360 SRegisterList sreglist) {
7361 Vldm(cond, kDataTypeValueNone, rn, write_back, sreglist);
7362 }
7363 void Vldm(Register rn, WriteBack write_back, SRegisterList sreglist) {
7364 Vldm(al, kDataTypeValueNone, rn, write_back, sreglist);
7365 }
7366
7367 void Vldmdb(Condition cond,
7368 DataType dt,
7369 Register rn,
7370 WriteBack write_back,
7371 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007372 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7373 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007374 VIXL_ASSERT(allow_macro_instructions_);
7375 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007376 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007377 ITScope it_scope(this, &cond);
7378 vldmdb(cond, dt, rn, write_back, dreglist);
7379 }
7380 void Vldmdb(DataType dt,
7381 Register rn,
7382 WriteBack write_back,
7383 DRegisterList dreglist) {
7384 Vldmdb(al, dt, rn, write_back, dreglist);
7385 }
7386 void Vldmdb(Condition cond,
7387 Register rn,
7388 WriteBack write_back,
7389 DRegisterList dreglist) {
7390 Vldmdb(cond, kDataTypeValueNone, rn, write_back, dreglist);
7391 }
7392 void Vldmdb(Register rn, WriteBack write_back, DRegisterList dreglist) {
7393 Vldmdb(al, kDataTypeValueNone, rn, write_back, dreglist);
7394 }
7395
7396 void Vldmdb(Condition cond,
7397 DataType dt,
7398 Register rn,
7399 WriteBack write_back,
7400 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007401 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7402 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007403 VIXL_ASSERT(allow_macro_instructions_);
7404 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007405 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007406 ITScope it_scope(this, &cond);
7407 vldmdb(cond, dt, rn, write_back, sreglist);
7408 }
7409 void Vldmdb(DataType dt,
7410 Register rn,
7411 WriteBack write_back,
7412 SRegisterList sreglist) {
7413 Vldmdb(al, dt, rn, write_back, sreglist);
7414 }
7415 void Vldmdb(Condition cond,
7416 Register rn,
7417 WriteBack write_back,
7418 SRegisterList sreglist) {
7419 Vldmdb(cond, kDataTypeValueNone, rn, write_back, sreglist);
7420 }
7421 void Vldmdb(Register rn, WriteBack write_back, SRegisterList sreglist) {
7422 Vldmdb(al, kDataTypeValueNone, rn, write_back, sreglist);
7423 }
7424
7425 void Vldmia(Condition cond,
7426 DataType dt,
7427 Register rn,
7428 WriteBack write_back,
7429 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007430 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7431 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007432 VIXL_ASSERT(allow_macro_instructions_);
7433 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007434 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007435 ITScope it_scope(this, &cond);
7436 vldmia(cond, dt, rn, write_back, dreglist);
7437 }
7438 void Vldmia(DataType dt,
7439 Register rn,
7440 WriteBack write_back,
7441 DRegisterList dreglist) {
7442 Vldmia(al, dt, rn, write_back, dreglist);
7443 }
7444 void Vldmia(Condition cond,
7445 Register rn,
7446 WriteBack write_back,
7447 DRegisterList dreglist) {
7448 Vldmia(cond, kDataTypeValueNone, rn, write_back, dreglist);
7449 }
7450 void Vldmia(Register rn, WriteBack write_back, DRegisterList dreglist) {
7451 Vldmia(al, kDataTypeValueNone, rn, write_back, dreglist);
7452 }
7453
7454 void Vldmia(Condition cond,
7455 DataType dt,
7456 Register rn,
7457 WriteBack write_back,
7458 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007459 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7460 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007461 VIXL_ASSERT(allow_macro_instructions_);
7462 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007463 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007464 ITScope it_scope(this, &cond);
7465 vldmia(cond, dt, rn, write_back, sreglist);
7466 }
7467 void Vldmia(DataType dt,
7468 Register rn,
7469 WriteBack write_back,
7470 SRegisterList sreglist) {
7471 Vldmia(al, dt, rn, write_back, sreglist);
7472 }
7473 void Vldmia(Condition cond,
7474 Register rn,
7475 WriteBack write_back,
7476 SRegisterList sreglist) {
7477 Vldmia(cond, kDataTypeValueNone, rn, write_back, sreglist);
7478 }
7479 void Vldmia(Register rn, WriteBack write_back, SRegisterList sreglist) {
7480 Vldmia(al, kDataTypeValueNone, rn, write_back, sreglist);
7481 }
7482
7483 void Vldr(Condition cond, DataType dt, DRegister rd, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007485 VIXL_ASSERT(allow_macro_instructions_);
7486 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007487 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007488 ITScope it_scope(this, &cond);
7489 vldr(cond, dt, rd, label);
7490 }
7491 void Vldr(DataType dt, DRegister rd, Label* label) {
7492 Vldr(al, dt, rd, label);
7493 }
7494 void Vldr(Condition cond, DRegister rd, Label* label) {
7495 Vldr(cond, Untyped64, rd, label);
7496 }
7497 void Vldr(DRegister rd, Label* label) { Vldr(al, Untyped64, rd, label); }
7498
7499 void Vldr(Condition cond,
7500 DataType dt,
7501 DRegister rd,
7502 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007503 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7504 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
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 vldr(cond, dt, rd, operand);
7510 }
7511 void Vldr(DataType dt, DRegister rd, const MemOperand& operand) {
7512 Vldr(al, dt, rd, operand);
7513 }
7514 void Vldr(Condition cond, DRegister rd, const MemOperand& operand) {
7515 Vldr(cond, Untyped64, rd, operand);
7516 }
7517 void Vldr(DRegister rd, const MemOperand& operand) {
7518 Vldr(al, Untyped64, rd, operand);
7519 }
7520
7521 void Vldr(Condition cond, DataType dt, SRegister rd, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007522 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007523 VIXL_ASSERT(allow_macro_instructions_);
7524 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007525 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007526 ITScope it_scope(this, &cond);
7527 vldr(cond, dt, rd, label);
7528 }
7529 void Vldr(DataType dt, SRegister rd, Label* label) {
7530 Vldr(al, dt, rd, label);
7531 }
7532 void Vldr(Condition cond, SRegister rd, Label* label) {
7533 Vldr(cond, Untyped32, rd, label);
7534 }
7535 void Vldr(SRegister rd, Label* label) { Vldr(al, Untyped32, rd, label); }
7536
7537 void Vldr(Condition cond,
7538 DataType dt,
7539 SRegister rd,
7540 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007541 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7542 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007543 VIXL_ASSERT(allow_macro_instructions_);
7544 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007545 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007546 ITScope it_scope(this, &cond);
7547 vldr(cond, dt, rd, operand);
7548 }
7549 void Vldr(DataType dt, SRegister rd, const MemOperand& operand) {
7550 Vldr(al, dt, rd, operand);
7551 }
7552 void Vldr(Condition cond, SRegister rd, const MemOperand& operand) {
7553 Vldr(cond, Untyped32, rd, operand);
7554 }
7555 void Vldr(SRegister rd, const MemOperand& operand) {
7556 Vldr(al, Untyped32, rd, operand);
7557 }
7558
7559 void Vmax(
7560 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007561 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7562 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007564 VIXL_ASSERT(allow_macro_instructions_);
7565 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007566 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007567 ITScope it_scope(this, &cond);
7568 vmax(cond, dt, rd, rn, rm);
7569 }
7570 void Vmax(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7571 Vmax(al, dt, rd, rn, rm);
7572 }
7573
7574 void Vmax(
7575 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007576 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7577 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7578 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007579 VIXL_ASSERT(allow_macro_instructions_);
7580 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007581 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007582 ITScope it_scope(this, &cond);
7583 vmax(cond, dt, rd, rn, rm);
7584 }
7585 void Vmax(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7586 Vmax(al, dt, rd, rn, rm);
7587 }
7588
7589 void Vmaxnm(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007590 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7591 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7592 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007593 VIXL_ASSERT(allow_macro_instructions_);
7594 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007595 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007596 vmaxnm(dt, rd, rn, rm);
7597 }
7598
7599 void Vmaxnm(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007600 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7601 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7602 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007603 VIXL_ASSERT(allow_macro_instructions_);
7604 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007605 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007606 vmaxnm(dt, rd, rn, rm);
7607 }
7608
7609 void Vmaxnm(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007610 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7611 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7612 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007613 VIXL_ASSERT(allow_macro_instructions_);
7614 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007615 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007616 vmaxnm(dt, rd, rn, rm);
7617 }
7618
7619 void Vmin(
7620 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007621 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7622 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7623 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007624 VIXL_ASSERT(allow_macro_instructions_);
7625 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007626 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007627 ITScope it_scope(this, &cond);
7628 vmin(cond, dt, rd, rn, rm);
7629 }
7630 void Vmin(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7631 Vmin(al, dt, rd, rn, rm);
7632 }
7633
7634 void Vmin(
7635 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007636 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7637 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7638 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007639 VIXL_ASSERT(allow_macro_instructions_);
7640 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007641 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007642 ITScope it_scope(this, &cond);
7643 vmin(cond, dt, rd, rn, rm);
7644 }
7645 void Vmin(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7646 Vmin(al, dt, rd, rn, rm);
7647 }
7648
7649 void Vminnm(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007650 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7651 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7652 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007653 VIXL_ASSERT(allow_macro_instructions_);
7654 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007655 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007656 vminnm(dt, rd, rn, rm);
7657 }
7658
7659 void Vminnm(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007660 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7661 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7662 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007663 VIXL_ASSERT(allow_macro_instructions_);
7664 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007665 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007666 vminnm(dt, rd, rn, rm);
7667 }
7668
7669 void Vminnm(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007670 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7671 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7672 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007673 VIXL_ASSERT(allow_macro_instructions_);
7674 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007675 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007676 vminnm(dt, rd, rn, rm);
7677 }
7678
7679 void Vmla(Condition cond,
7680 DataType dt,
7681 DRegister rd,
7682 DRegister rn,
7683 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007684 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7685 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7686 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007687 VIXL_ASSERT(allow_macro_instructions_);
7688 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007689 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007690 ITScope it_scope(this, &cond);
7691 vmla(cond, dt, rd, rn, rm);
7692 }
7693 void Vmla(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
7694 Vmla(al, dt, rd, rn, rm);
7695 }
7696
7697 void Vmla(Condition cond,
7698 DataType dt,
7699 QRegister rd,
7700 QRegister rn,
7701 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007702 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7703 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7704 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007705 VIXL_ASSERT(allow_macro_instructions_);
7706 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007707 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007708 ITScope it_scope(this, &cond);
7709 vmla(cond, dt, rd, rn, rm);
7710 }
7711 void Vmla(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
7712 Vmla(al, dt, rd, rn, rm);
7713 }
7714
7715 void Vmla(
7716 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007717 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7718 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7719 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007720 VIXL_ASSERT(allow_macro_instructions_);
7721 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007722 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007723 ITScope it_scope(this, &cond);
7724 vmla(cond, dt, rd, rn, rm);
7725 }
7726 void Vmla(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7727 Vmla(al, dt, rd, rn, rm);
7728 }
7729
7730 void Vmla(
7731 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007732 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7733 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7734 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007735 VIXL_ASSERT(allow_macro_instructions_);
7736 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007737 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007738 ITScope it_scope(this, &cond);
7739 vmla(cond, dt, rd, rn, rm);
7740 }
7741 void Vmla(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7742 Vmla(al, dt, rd, rn, rm);
7743 }
7744
7745 void Vmla(
7746 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007747 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7748 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7749 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007750 VIXL_ASSERT(allow_macro_instructions_);
7751 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007752 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007753 ITScope it_scope(this, &cond);
7754 vmla(cond, dt, rd, rn, rm);
7755 }
7756 void Vmla(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7757 Vmla(al, dt, rd, rn, rm);
7758 }
7759
7760 void Vmlal(Condition cond,
7761 DataType dt,
7762 QRegister rd,
7763 DRegister rn,
7764 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007765 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7766 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7767 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007768 VIXL_ASSERT(allow_macro_instructions_);
7769 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007770 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007771 ITScope it_scope(this, &cond);
7772 vmlal(cond, dt, rd, rn, rm);
7773 }
7774 void Vmlal(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
7775 Vmlal(al, dt, rd, rn, rm);
7776 }
7777
7778 void Vmlal(
7779 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007780 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7781 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7782 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007783 VIXL_ASSERT(allow_macro_instructions_);
7784 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007785 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007786 ITScope it_scope(this, &cond);
7787 vmlal(cond, dt, rd, rn, rm);
7788 }
7789 void Vmlal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7790 Vmlal(al, dt, rd, rn, rm);
7791 }
7792
7793 void Vmls(Condition cond,
7794 DataType dt,
7795 DRegister rd,
7796 DRegister rn,
7797 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007798 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7799 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7800 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007801 VIXL_ASSERT(allow_macro_instructions_);
7802 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007803 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007804 ITScope it_scope(this, &cond);
7805 vmls(cond, dt, rd, rn, rm);
7806 }
7807 void Vmls(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
7808 Vmls(al, dt, rd, rn, rm);
7809 }
7810
7811 void Vmls(Condition cond,
7812 DataType dt,
7813 QRegister rd,
7814 QRegister rn,
7815 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007816 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7817 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7818 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007819 VIXL_ASSERT(allow_macro_instructions_);
7820 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007821 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007822 ITScope it_scope(this, &cond);
7823 vmls(cond, dt, rd, rn, rm);
7824 }
7825 void Vmls(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
7826 Vmls(al, dt, rd, rn, rm);
7827 }
7828
7829 void Vmls(
7830 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007831 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7832 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7833 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
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 vmls(cond, dt, rd, rn, rm);
7839 }
7840 void Vmls(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7841 Vmls(al, dt, rd, rn, rm);
7842 }
7843
7844 void Vmls(
7845 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007846 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7847 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7848 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007849 VIXL_ASSERT(allow_macro_instructions_);
7850 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007851 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007852 ITScope it_scope(this, &cond);
7853 vmls(cond, dt, rd, rn, rm);
7854 }
7855 void Vmls(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7856 Vmls(al, dt, rd, rn, rm);
7857 }
7858
7859 void Vmls(
7860 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007861 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7862 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7863 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007864 VIXL_ASSERT(allow_macro_instructions_);
7865 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007866 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007867 ITScope it_scope(this, &cond);
7868 vmls(cond, dt, rd, rn, rm);
7869 }
7870 void Vmls(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7871 Vmls(al, dt, rd, rn, rm);
7872 }
7873
7874 void Vmlsl(Condition cond,
7875 DataType dt,
7876 QRegister rd,
7877 DRegister rn,
7878 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007879 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7880 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7881 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007882 VIXL_ASSERT(allow_macro_instructions_);
7883 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007884 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007885 ITScope it_scope(this, &cond);
7886 vmlsl(cond, dt, rd, rn, rm);
7887 }
7888 void Vmlsl(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
7889 Vmlsl(al, dt, rd, rn, rm);
7890 }
7891
7892 void Vmlsl(
7893 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007894 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7895 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7896 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007897 VIXL_ASSERT(allow_macro_instructions_);
7898 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007899 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007900 ITScope it_scope(this, &cond);
7901 vmlsl(cond, dt, rd, rn, rm);
7902 }
7903 void Vmlsl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7904 Vmlsl(al, dt, rd, rn, rm);
7905 }
7906
7907 void Vmov(Condition cond, Register rt, SRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007908 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7909 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007910 VIXL_ASSERT(allow_macro_instructions_);
7911 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007912 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007913 ITScope it_scope(this, &cond);
7914 vmov(cond, rt, rn);
7915 }
7916 void Vmov(Register rt, SRegister rn) { Vmov(al, rt, rn); }
7917
7918 void Vmov(Condition cond, SRegister rn, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007919 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7920 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007921 VIXL_ASSERT(allow_macro_instructions_);
7922 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007923 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007924 ITScope it_scope(this, &cond);
7925 vmov(cond, rn, rt);
7926 }
7927 void Vmov(SRegister rn, Register rt) { Vmov(al, rn, rt); }
7928
7929 void Vmov(Condition cond, Register rt, Register rt2, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007930 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7931 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
7932 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007933 VIXL_ASSERT(allow_macro_instructions_);
7934 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007935 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007936 ITScope it_scope(this, &cond);
7937 vmov(cond, rt, rt2, rm);
7938 }
7939 void Vmov(Register rt, Register rt2, DRegister rm) { Vmov(al, rt, rt2, rm); }
7940
7941 void Vmov(Condition cond, DRegister rm, Register rt, Register rt2) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007942 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7943 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007945 VIXL_ASSERT(allow_macro_instructions_);
7946 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007947 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007948 ITScope it_scope(this, &cond);
7949 vmov(cond, rm, rt, rt2);
7950 }
7951 void Vmov(DRegister rm, Register rt, Register rt2) { Vmov(al, rm, rt, rt2); }
7952
7953 void Vmov(
7954 Condition cond, Register rt, Register rt2, SRegister rm, SRegister rm1) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007955 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7956 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
7957 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7958 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm1));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007959 VIXL_ASSERT(allow_macro_instructions_);
7960 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007961 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007962 ITScope it_scope(this, &cond);
7963 vmov(cond, rt, rt2, rm, rm1);
7964 }
7965 void Vmov(Register rt, Register rt2, SRegister rm, SRegister rm1) {
7966 Vmov(al, rt, rt2, rm, rm1);
7967 }
7968
7969 void Vmov(
7970 Condition cond, SRegister rm, SRegister rm1, Register rt, Register rt2) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007971 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7972 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm1));
7973 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7974 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007975 VIXL_ASSERT(allow_macro_instructions_);
7976 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007977 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007978 ITScope it_scope(this, &cond);
7979 vmov(cond, rm, rm1, rt, rt2);
7980 }
7981 void Vmov(SRegister rm, SRegister rm1, Register rt, Register rt2) {
7982 Vmov(al, rm, rm1, rt, rt2);
7983 }
7984
7985 void Vmov(Condition cond, DataType dt, DRegisterLane rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007986 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7987 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007988 VIXL_ASSERT(allow_macro_instructions_);
7989 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007990 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007991 ITScope it_scope(this, &cond);
7992 vmov(cond, dt, rd, rt);
7993 }
7994 void Vmov(DataType dt, DRegisterLane rd, Register rt) {
7995 Vmov(al, dt, rd, rt);
7996 }
7997 void Vmov(Condition cond, DRegisterLane rd, Register rt) {
7998 Vmov(cond, kDataTypeValueNone, rd, rt);
7999 }
8000 void Vmov(DRegisterLane rd, Register rt) {
8001 Vmov(al, kDataTypeValueNone, rd, rt);
8002 }
8003
8004 void Vmov(Condition cond,
8005 DataType dt,
8006 DRegister rd,
8007 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008008 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8009 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008010 VIXL_ASSERT(allow_macro_instructions_);
8011 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008012 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008013 ITScope it_scope(this, &cond);
8014 vmov(cond, dt, rd, operand);
8015 }
8016 void Vmov(DataType dt, DRegister rd, const DOperand& operand) {
8017 Vmov(al, dt, rd, operand);
8018 }
8019
8020 void Vmov(Condition cond,
8021 DataType dt,
8022 QRegister rd,
8023 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008024 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8025 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008026 VIXL_ASSERT(allow_macro_instructions_);
8027 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008028 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008029 ITScope it_scope(this, &cond);
8030 vmov(cond, dt, rd, operand);
8031 }
8032 void Vmov(DataType dt, QRegister rd, const QOperand& operand) {
8033 Vmov(al, dt, rd, operand);
8034 }
8035
8036 void Vmov(Condition cond,
8037 DataType dt,
8038 SRegister rd,
8039 const SOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008040 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8041 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008042 VIXL_ASSERT(allow_macro_instructions_);
8043 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008044 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008045 ITScope it_scope(this, &cond);
8046 vmov(cond, dt, rd, operand);
8047 }
8048 void Vmov(DataType dt, SRegister rd, const SOperand& operand) {
8049 Vmov(al, dt, rd, operand);
8050 }
8051
8052 void Vmov(Condition cond, DataType dt, Register rt, DRegisterLane rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008053 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
8054 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008055 VIXL_ASSERT(allow_macro_instructions_);
8056 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008057 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008058 ITScope it_scope(this, &cond);
8059 vmov(cond, dt, rt, rn);
8060 }
8061 void Vmov(DataType dt, Register rt, DRegisterLane rn) {
8062 Vmov(al, dt, rt, rn);
8063 }
8064 void Vmov(Condition cond, Register rt, DRegisterLane rn) {
8065 Vmov(cond, kDataTypeValueNone, rt, rn);
8066 }
8067 void Vmov(Register rt, DRegisterLane rn) {
8068 Vmov(al, kDataTypeValueNone, rt, rn);
8069 }
8070
8071 void Vmovl(Condition cond, DataType dt, QRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008072 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
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 vmovl(cond, dt, rd, rm);
8079 }
8080 void Vmovl(DataType dt, QRegister rd, DRegister rm) { Vmovl(al, dt, rd, rm); }
8081
8082 void Vmovn(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008083 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8084 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008085 VIXL_ASSERT(allow_macro_instructions_);
8086 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008087 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008088 ITScope it_scope(this, &cond);
8089 vmovn(cond, dt, rd, rm);
8090 }
8091 void Vmovn(DataType dt, DRegister rd, QRegister rm) { Vmovn(al, dt, rd, rm); }
8092
8093 void Vmrs(Condition cond,
8094 RegisterOrAPSR_nzcv rt,
8095 SpecialFPRegister spec_reg) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008096 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008097 VIXL_ASSERT(allow_macro_instructions_);
8098 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008099 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008100 ITScope it_scope(this, &cond);
8101 vmrs(cond, rt, spec_reg);
8102 }
8103 void Vmrs(RegisterOrAPSR_nzcv rt, SpecialFPRegister spec_reg) {
8104 Vmrs(al, rt, spec_reg);
8105 }
8106
8107 void Vmsr(Condition cond, SpecialFPRegister spec_reg, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008108 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008109 VIXL_ASSERT(allow_macro_instructions_);
8110 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008111 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008112 ITScope it_scope(this, &cond);
8113 vmsr(cond, spec_reg, rt);
8114 }
8115 void Vmsr(SpecialFPRegister spec_reg, Register rt) { Vmsr(al, spec_reg, rt); }
8116
8117 void Vmul(Condition cond,
8118 DataType dt,
8119 DRegister rd,
8120 DRegister rn,
8121 DRegister dm,
8122 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008123 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8124 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8125 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008126 VIXL_ASSERT(allow_macro_instructions_);
8127 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008128 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008129 ITScope it_scope(this, &cond);
8130 vmul(cond, dt, rd, rn, dm, index);
8131 }
8132 void Vmul(
8133 DataType dt, DRegister rd, DRegister rn, DRegister dm, unsigned index) {
8134 Vmul(al, dt, rd, rn, dm, index);
8135 }
8136
8137 void Vmul(Condition cond,
8138 DataType dt,
8139 QRegister rd,
8140 QRegister rn,
8141 DRegister dm,
8142 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008143 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8144 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8145 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008146 VIXL_ASSERT(allow_macro_instructions_);
8147 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008148 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008149 ITScope it_scope(this, &cond);
8150 vmul(cond, dt, rd, rn, dm, index);
8151 }
8152 void Vmul(
8153 DataType dt, QRegister rd, QRegister rn, DRegister dm, unsigned index) {
8154 Vmul(al, dt, rd, rn, dm, index);
8155 }
8156
8157 void Vmul(
8158 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008159 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8160 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8161 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008162 VIXL_ASSERT(allow_macro_instructions_);
8163 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008164 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008165 ITScope it_scope(this, &cond);
8166 vmul(cond, dt, rd, rn, rm);
8167 }
8168 void Vmul(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8169 Vmul(al, dt, rd, rn, rm);
8170 }
8171
8172 void Vmul(
8173 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008174 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8175 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8176 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008177 VIXL_ASSERT(allow_macro_instructions_);
8178 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008179 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008180 ITScope it_scope(this, &cond);
8181 vmul(cond, dt, rd, rn, rm);
8182 }
8183 void Vmul(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8184 Vmul(al, dt, rd, rn, rm);
8185 }
8186
8187 void Vmul(
8188 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008189 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8190 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8191 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008192 VIXL_ASSERT(allow_macro_instructions_);
8193 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008194 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008195 ITScope it_scope(this, &cond);
8196 vmul(cond, dt, rd, rn, rm);
8197 }
8198 void Vmul(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8199 Vmul(al, dt, rd, rn, rm);
8200 }
8201
8202 void Vmull(Condition cond,
8203 DataType dt,
8204 QRegister rd,
8205 DRegister rn,
8206 DRegister dm,
8207 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008208 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8209 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8210 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008211 VIXL_ASSERT(allow_macro_instructions_);
8212 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008213 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008214 ITScope it_scope(this, &cond);
8215 vmull(cond, dt, rd, rn, dm, index);
8216 }
8217 void Vmull(
8218 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
8219 Vmull(al, dt, rd, rn, dm, index);
8220 }
8221
8222 void Vmull(
8223 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008224 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8225 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8226 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008227 VIXL_ASSERT(allow_macro_instructions_);
8228 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008229 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008230 ITScope it_scope(this, &cond);
8231 vmull(cond, dt, rd, rn, rm);
8232 }
8233 void Vmull(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8234 Vmull(al, dt, rd, rn, rm);
8235 }
8236
8237 void Vmvn(Condition cond,
8238 DataType dt,
8239 DRegister rd,
8240 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008241 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8242 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008243 VIXL_ASSERT(allow_macro_instructions_);
8244 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008245 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008246 ITScope it_scope(this, &cond);
8247 vmvn(cond, dt, rd, operand);
8248 }
8249 void Vmvn(DataType dt, DRegister rd, const DOperand& operand) {
8250 Vmvn(al, dt, rd, operand);
8251 }
8252
8253 void Vmvn(Condition cond,
8254 DataType dt,
8255 QRegister rd,
8256 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008257 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8258 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008259 VIXL_ASSERT(allow_macro_instructions_);
8260 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008261 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008262 ITScope it_scope(this, &cond);
8263 vmvn(cond, dt, rd, operand);
8264 }
8265 void Vmvn(DataType dt, QRegister rd, const QOperand& operand) {
8266 Vmvn(al, dt, rd, operand);
8267 }
8268
8269 void Vneg(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008270 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8271 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008272 VIXL_ASSERT(allow_macro_instructions_);
8273 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008274 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008275 ITScope it_scope(this, &cond);
8276 vneg(cond, dt, rd, rm);
8277 }
8278 void Vneg(DataType dt, DRegister rd, DRegister rm) { Vneg(al, dt, rd, rm); }
8279
8280 void Vneg(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008281 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8282 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008283 VIXL_ASSERT(allow_macro_instructions_);
8284 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008285 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008286 ITScope it_scope(this, &cond);
8287 vneg(cond, dt, rd, rm);
8288 }
8289 void Vneg(DataType dt, QRegister rd, QRegister rm) { Vneg(al, dt, rd, rm); }
8290
8291 void Vneg(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008292 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8293 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008294 VIXL_ASSERT(allow_macro_instructions_);
8295 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008296 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008297 ITScope it_scope(this, &cond);
8298 vneg(cond, dt, rd, rm);
8299 }
8300 void Vneg(DataType dt, SRegister rd, SRegister rm) { Vneg(al, dt, rd, rm); }
8301
8302 void Vnmla(
8303 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008304 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8305 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8306 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008307 VIXL_ASSERT(allow_macro_instructions_);
8308 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008309 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008310 ITScope it_scope(this, &cond);
8311 vnmla(cond, dt, rd, rn, rm);
8312 }
8313 void Vnmla(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8314 Vnmla(al, dt, rd, rn, rm);
8315 }
8316
8317 void Vnmla(
8318 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008319 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8320 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8321 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008322 VIXL_ASSERT(allow_macro_instructions_);
8323 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008324 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008325 ITScope it_scope(this, &cond);
8326 vnmla(cond, dt, rd, rn, rm);
8327 }
8328 void Vnmla(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8329 Vnmla(al, dt, rd, rn, rm);
8330 }
8331
8332 void Vnmls(
8333 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008334 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8335 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8336 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008337 VIXL_ASSERT(allow_macro_instructions_);
8338 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008339 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008340 ITScope it_scope(this, &cond);
8341 vnmls(cond, dt, rd, rn, rm);
8342 }
8343 void Vnmls(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8344 Vnmls(al, dt, rd, rn, rm);
8345 }
8346
8347 void Vnmls(
8348 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008349 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8350 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8351 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008352 VIXL_ASSERT(allow_macro_instructions_);
8353 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008354 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008355 ITScope it_scope(this, &cond);
8356 vnmls(cond, dt, rd, rn, rm);
8357 }
8358 void Vnmls(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8359 Vnmls(al, dt, rd, rn, rm);
8360 }
8361
8362 void Vnmul(
8363 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008364 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8365 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8366 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008367 VIXL_ASSERT(allow_macro_instructions_);
8368 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008369 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008370 ITScope it_scope(this, &cond);
8371 vnmul(cond, dt, rd, rn, rm);
8372 }
8373 void Vnmul(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8374 Vnmul(al, dt, rd, rn, rm);
8375 }
8376
8377 void Vnmul(
8378 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008379 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8380 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8381 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008382 VIXL_ASSERT(allow_macro_instructions_);
8383 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008384 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008385 ITScope it_scope(this, &cond);
8386 vnmul(cond, dt, rd, rn, rm);
8387 }
8388 void Vnmul(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8389 Vnmul(al, dt, rd, rn, rm);
8390 }
8391
8392 void Vorn(Condition cond,
8393 DataType dt,
8394 DRegister rd,
8395 DRegister rn,
8396 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008397 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8398 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8399 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008400 VIXL_ASSERT(allow_macro_instructions_);
8401 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008402 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008403 ITScope it_scope(this, &cond);
8404 vorn(cond, dt, rd, rn, operand);
8405 }
8406 void Vorn(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
8407 Vorn(al, dt, rd, rn, operand);
8408 }
8409
8410 void Vorn(Condition cond,
8411 DataType dt,
8412 QRegister rd,
8413 QRegister rn,
8414 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008415 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8416 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8417 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
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 vorn(cond, dt, rd, rn, operand);
8423 }
8424 void Vorn(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
8425 Vorn(al, dt, rd, rn, operand);
8426 }
8427
8428 void Vorr(Condition cond,
8429 DataType dt,
8430 DRegister rd,
8431 DRegister rn,
8432 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008433 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8434 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8435 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008436 VIXL_ASSERT(allow_macro_instructions_);
8437 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008438 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008439 ITScope it_scope(this, &cond);
8440 vorr(cond, dt, rd, rn, operand);
8441 }
8442 void Vorr(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
8443 Vorr(al, dt, rd, rn, operand);
8444 }
8445 void Vorr(Condition cond,
8446 DRegister rd,
8447 DRegister rn,
8448 const DOperand& operand) {
8449 Vorr(cond, kDataTypeValueNone, rd, rn, operand);
8450 }
8451 void Vorr(DRegister rd, DRegister rn, const DOperand& operand) {
8452 Vorr(al, kDataTypeValueNone, rd, rn, operand);
8453 }
8454
8455 void Vorr(Condition cond,
8456 DataType dt,
8457 QRegister rd,
8458 QRegister rn,
8459 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008460 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8461 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8462 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008463 VIXL_ASSERT(allow_macro_instructions_);
8464 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008465 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008466 ITScope it_scope(this, &cond);
8467 vorr(cond, dt, rd, rn, operand);
8468 }
8469 void Vorr(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
8470 Vorr(al, dt, rd, rn, operand);
8471 }
8472 void Vorr(Condition cond,
8473 QRegister rd,
8474 QRegister rn,
8475 const QOperand& operand) {
8476 Vorr(cond, kDataTypeValueNone, rd, rn, operand);
8477 }
8478 void Vorr(QRegister rd, QRegister rn, const QOperand& operand) {
8479 Vorr(al, kDataTypeValueNone, rd, rn, operand);
8480 }
8481
8482 void Vpadal(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008483 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008485 VIXL_ASSERT(allow_macro_instructions_);
8486 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008487 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008488 ITScope it_scope(this, &cond);
8489 vpadal(cond, dt, rd, rm);
8490 }
8491 void Vpadal(DataType dt, DRegister rd, DRegister rm) {
8492 Vpadal(al, dt, rd, rm);
8493 }
8494
8495 void Vpadal(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008496 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8497 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008498 VIXL_ASSERT(allow_macro_instructions_);
8499 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008500 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008501 ITScope it_scope(this, &cond);
8502 vpadal(cond, dt, rd, rm);
8503 }
8504 void Vpadal(DataType dt, QRegister rd, QRegister rm) {
8505 Vpadal(al, dt, rd, rm);
8506 }
8507
8508 void Vpadd(
8509 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008510 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8511 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8512 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008513 VIXL_ASSERT(allow_macro_instructions_);
8514 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008515 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008516 ITScope it_scope(this, &cond);
8517 vpadd(cond, dt, rd, rn, rm);
8518 }
8519 void Vpadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8520 Vpadd(al, dt, rd, rn, rm);
8521 }
8522
8523 void Vpaddl(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008524 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8525 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008526 VIXL_ASSERT(allow_macro_instructions_);
8527 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008528 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008529 ITScope it_scope(this, &cond);
8530 vpaddl(cond, dt, rd, rm);
8531 }
8532 void Vpaddl(DataType dt, DRegister rd, DRegister rm) {
8533 Vpaddl(al, dt, rd, rm);
8534 }
8535
8536 void Vpaddl(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008537 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8538 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008539 VIXL_ASSERT(allow_macro_instructions_);
8540 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008541 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008542 ITScope it_scope(this, &cond);
8543 vpaddl(cond, dt, rd, rm);
8544 }
8545 void Vpaddl(DataType dt, QRegister rd, QRegister rm) {
8546 Vpaddl(al, dt, rd, rm);
8547 }
8548
8549 void Vpmax(
8550 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister 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 vpmax(cond, dt, rd, rn, rm);
8559 }
8560 void Vpmax(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8561 Vpmax(al, dt, rd, rn, rm);
8562 }
8563
8564 void Vpmin(
8565 Condition cond, DataType dt, DRegister 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 vpmin(cond, dt, rd, rn, rm);
8574 }
8575 void Vpmin(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8576 Vpmin(al, dt, rd, rn, rm);
8577 }
8578
8579 void Vpop(Condition cond, DataType dt, DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008580 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008581 VIXL_ASSERT(allow_macro_instructions_);
8582 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008583 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008584 ITScope it_scope(this, &cond);
8585 vpop(cond, dt, dreglist);
8586 }
8587 void Vpop(DataType dt, DRegisterList dreglist) { Vpop(al, dt, dreglist); }
8588 void Vpop(Condition cond, DRegisterList dreglist) {
8589 Vpop(cond, kDataTypeValueNone, dreglist);
8590 }
8591 void Vpop(DRegisterList dreglist) { Vpop(al, kDataTypeValueNone, dreglist); }
8592
8593 void Vpop(Condition cond, DataType dt, SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008594 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008595 VIXL_ASSERT(allow_macro_instructions_);
8596 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008597 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008598 ITScope it_scope(this, &cond);
8599 vpop(cond, dt, sreglist);
8600 }
8601 void Vpop(DataType dt, SRegisterList sreglist) { Vpop(al, dt, sreglist); }
8602 void Vpop(Condition cond, SRegisterList sreglist) {
8603 Vpop(cond, kDataTypeValueNone, sreglist);
8604 }
8605 void Vpop(SRegisterList sreglist) { Vpop(al, kDataTypeValueNone, sreglist); }
8606
8607 void Vpush(Condition cond, DataType dt, DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008608 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008609 VIXL_ASSERT(allow_macro_instructions_);
8610 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008611 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008612 ITScope it_scope(this, &cond);
8613 vpush(cond, dt, dreglist);
8614 }
8615 void Vpush(DataType dt, DRegisterList dreglist) { Vpush(al, dt, dreglist); }
8616 void Vpush(Condition cond, DRegisterList dreglist) {
8617 Vpush(cond, kDataTypeValueNone, dreglist);
8618 }
8619 void Vpush(DRegisterList dreglist) {
8620 Vpush(al, kDataTypeValueNone, dreglist);
8621 }
8622
8623 void Vpush(Condition cond, DataType dt, SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008624 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008625 VIXL_ASSERT(allow_macro_instructions_);
8626 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008627 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008628 ITScope it_scope(this, &cond);
8629 vpush(cond, dt, sreglist);
8630 }
8631 void Vpush(DataType dt, SRegisterList sreglist) { Vpush(al, dt, sreglist); }
8632 void Vpush(Condition cond, SRegisterList sreglist) {
8633 Vpush(cond, kDataTypeValueNone, sreglist);
8634 }
8635 void Vpush(SRegisterList sreglist) {
8636 Vpush(al, kDataTypeValueNone, sreglist);
8637 }
8638
8639 void Vqabs(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008640 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8641 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008642 VIXL_ASSERT(allow_macro_instructions_);
8643 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008644 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008645 ITScope it_scope(this, &cond);
8646 vqabs(cond, dt, rd, rm);
8647 }
8648 void Vqabs(DataType dt, DRegister rd, DRegister rm) { Vqabs(al, dt, rd, rm); }
8649
8650 void Vqabs(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008651 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8652 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008653 VIXL_ASSERT(allow_macro_instructions_);
8654 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008655 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008656 ITScope it_scope(this, &cond);
8657 vqabs(cond, dt, rd, rm);
8658 }
8659 void Vqabs(DataType dt, QRegister rd, QRegister rm) { Vqabs(al, dt, rd, rm); }
8660
8661 void Vqadd(
8662 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008663 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8664 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8665 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008666 VIXL_ASSERT(allow_macro_instructions_);
8667 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008668 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008669 ITScope it_scope(this, &cond);
8670 vqadd(cond, dt, rd, rn, rm);
8671 }
8672 void Vqadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8673 Vqadd(al, dt, rd, rn, rm);
8674 }
8675
8676 void Vqadd(
8677 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008678 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8679 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8680 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008681 VIXL_ASSERT(allow_macro_instructions_);
8682 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008683 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008684 ITScope it_scope(this, &cond);
8685 vqadd(cond, dt, rd, rn, rm);
8686 }
8687 void Vqadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8688 Vqadd(al, dt, rd, rn, rm);
8689 }
8690
8691 void Vqdmlal(
8692 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008693 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8694 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008696 VIXL_ASSERT(allow_macro_instructions_);
8697 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008698 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008699 ITScope it_scope(this, &cond);
8700 vqdmlal(cond, dt, rd, rn, rm);
8701 }
8702 void Vqdmlal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8703 Vqdmlal(al, dt, rd, rn, rm);
8704 }
8705
8706 void Vqdmlal(Condition cond,
8707 DataType dt,
8708 QRegister rd,
8709 DRegister rn,
8710 DRegister dm,
8711 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008712 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8713 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8714 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008715 VIXL_ASSERT(allow_macro_instructions_);
8716 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008717 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008718 ITScope it_scope(this, &cond);
8719 vqdmlal(cond, dt, rd, rn, dm, index);
8720 }
8721 void Vqdmlal(
8722 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
8723 Vqdmlal(al, dt, rd, rn, dm, index);
8724 }
8725
8726 void Vqdmlsl(
8727 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008728 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8729 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8730 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
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 vqdmlsl(cond, dt, rd, rn, rm);
8736 }
8737 void Vqdmlsl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8738 Vqdmlsl(al, dt, rd, rn, rm);
8739 }
8740
8741 void Vqdmlsl(Condition cond,
8742 DataType dt,
8743 QRegister rd,
8744 DRegister rn,
8745 DRegister dm,
8746 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008747 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8748 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8749 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008750 VIXL_ASSERT(allow_macro_instructions_);
8751 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008752 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008753 ITScope it_scope(this, &cond);
8754 vqdmlsl(cond, dt, rd, rn, dm, index);
8755 }
8756 void Vqdmlsl(
8757 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
8758 Vqdmlsl(al, dt, rd, rn, dm, index);
8759 }
8760
8761 void Vqdmulh(
8762 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008763 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8764 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8765 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008766 VIXL_ASSERT(allow_macro_instructions_);
8767 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008768 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008769 ITScope it_scope(this, &cond);
8770 vqdmulh(cond, dt, rd, rn, rm);
8771 }
8772 void Vqdmulh(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8773 Vqdmulh(al, dt, rd, rn, rm);
8774 }
8775
8776 void Vqdmulh(
8777 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008778 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8779 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8780 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008781 VIXL_ASSERT(allow_macro_instructions_);
8782 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008783 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008784 ITScope it_scope(this, &cond);
8785 vqdmulh(cond, dt, rd, rn, rm);
8786 }
8787 void Vqdmulh(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8788 Vqdmulh(al, dt, rd, rn, rm);
8789 }
8790
8791 void Vqdmulh(Condition cond,
8792 DataType dt,
8793 DRegister rd,
8794 DRegister rn,
8795 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008796 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8797 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8798 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008799 VIXL_ASSERT(allow_macro_instructions_);
8800 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008801 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008802 ITScope it_scope(this, &cond);
8803 vqdmulh(cond, dt, rd, rn, rm);
8804 }
8805 void Vqdmulh(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
8806 Vqdmulh(al, dt, rd, rn, rm);
8807 }
8808
8809 void Vqdmulh(Condition cond,
8810 DataType dt,
8811 QRegister rd,
8812 QRegister rn,
8813 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008814 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8815 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8816 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008817 VIXL_ASSERT(allow_macro_instructions_);
8818 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008819 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008820 ITScope it_scope(this, &cond);
8821 vqdmulh(cond, dt, rd, rn, rm);
8822 }
8823 void Vqdmulh(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
8824 Vqdmulh(al, dt, rd, rn, rm);
8825 }
8826
8827 void Vqdmull(
8828 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008829 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8830 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8831 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008832 VIXL_ASSERT(allow_macro_instructions_);
8833 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008834 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008835 ITScope it_scope(this, &cond);
8836 vqdmull(cond, dt, rd, rn, rm);
8837 }
8838 void Vqdmull(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8839 Vqdmull(al, dt, rd, rn, rm);
8840 }
8841
8842 void Vqdmull(Condition cond,
8843 DataType dt,
8844 QRegister rd,
8845 DRegister rn,
8846 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008847 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8848 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8849 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008850 VIXL_ASSERT(allow_macro_instructions_);
8851 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008852 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008853 ITScope it_scope(this, &cond);
8854 vqdmull(cond, dt, rd, rn, rm);
8855 }
8856 void Vqdmull(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
8857 Vqdmull(al, dt, rd, rn, rm);
8858 }
8859
8860 void Vqmovn(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008861 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8862 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008863 VIXL_ASSERT(allow_macro_instructions_);
8864 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008865 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008866 ITScope it_scope(this, &cond);
8867 vqmovn(cond, dt, rd, rm);
8868 }
8869 void Vqmovn(DataType dt, DRegister rd, QRegister rm) {
8870 Vqmovn(al, dt, rd, rm);
8871 }
8872
8873 void Vqmovun(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008874 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8875 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008876 VIXL_ASSERT(allow_macro_instructions_);
8877 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008878 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008879 ITScope it_scope(this, &cond);
8880 vqmovun(cond, dt, rd, rm);
8881 }
8882 void Vqmovun(DataType dt, DRegister rd, QRegister rm) {
8883 Vqmovun(al, dt, rd, rm);
8884 }
8885
8886 void Vqneg(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008887 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8888 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008889 VIXL_ASSERT(allow_macro_instructions_);
8890 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008891 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008892 ITScope it_scope(this, &cond);
8893 vqneg(cond, dt, rd, rm);
8894 }
8895 void Vqneg(DataType dt, DRegister rd, DRegister rm) { Vqneg(al, dt, rd, rm); }
8896
8897 void Vqneg(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008898 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8899 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008900 VIXL_ASSERT(allow_macro_instructions_);
8901 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008902 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008903 ITScope it_scope(this, &cond);
8904 vqneg(cond, dt, rd, rm);
8905 }
8906 void Vqneg(DataType dt, QRegister rd, QRegister rm) { Vqneg(al, dt, rd, rm); }
8907
8908 void Vqrdmulh(
8909 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008910 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8911 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8912 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008913 VIXL_ASSERT(allow_macro_instructions_);
8914 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008915 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008916 ITScope it_scope(this, &cond);
8917 vqrdmulh(cond, dt, rd, rn, rm);
8918 }
8919 void Vqrdmulh(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8920 Vqrdmulh(al, dt, rd, rn, rm);
8921 }
8922
8923 void Vqrdmulh(
8924 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008925 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8926 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8927 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008928 VIXL_ASSERT(allow_macro_instructions_);
8929 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008930 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008931 ITScope it_scope(this, &cond);
8932 vqrdmulh(cond, dt, rd, rn, rm);
8933 }
8934 void Vqrdmulh(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8935 Vqrdmulh(al, dt, rd, rn, rm);
8936 }
8937
8938 void Vqrdmulh(Condition cond,
8939 DataType dt,
8940 DRegister rd,
8941 DRegister rn,
8942 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008943 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8945 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008946 VIXL_ASSERT(allow_macro_instructions_);
8947 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008948 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008949 ITScope it_scope(this, &cond);
8950 vqrdmulh(cond, dt, rd, rn, rm);
8951 }
8952 void Vqrdmulh(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
8953 Vqrdmulh(al, dt, rd, rn, rm);
8954 }
8955
8956 void Vqrdmulh(Condition cond,
8957 DataType dt,
8958 QRegister rd,
8959 QRegister rn,
8960 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008961 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8962 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
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 vqrdmulh(cond, dt, rd, rn, rm);
8969 }
8970 void Vqrdmulh(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
8971 Vqrdmulh(al, dt, rd, rn, rm);
8972 }
8973
8974 void Vqrshl(
8975 Condition cond, DataType dt, DRegister rd, DRegister rm, DRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008976 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8977 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8978 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
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 vqrshl(cond, dt, rd, rm, rn);
8984 }
8985 void Vqrshl(DataType dt, DRegister rd, DRegister rm, DRegister rn) {
8986 Vqrshl(al, dt, rd, rm, rn);
8987 }
8988
8989 void Vqrshl(
8990 Condition cond, DataType dt, QRegister rd, QRegister rm, QRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008991 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8992 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8993 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
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 vqrshl(cond, dt, rd, rm, rn);
8999 }
9000 void Vqrshl(DataType dt, QRegister rd, QRegister rm, QRegister rn) {
9001 Vqrshl(al, dt, rd, rm, rn);
9002 }
9003
9004 void Vqrshrn(Condition cond,
9005 DataType dt,
9006 DRegister rd,
9007 QRegister rm,
9008 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009009 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9010 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9011 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009012 VIXL_ASSERT(allow_macro_instructions_);
9013 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009014 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009015 ITScope it_scope(this, &cond);
9016 vqrshrn(cond, dt, rd, rm, operand);
9017 }
9018 void Vqrshrn(DataType dt,
9019 DRegister rd,
9020 QRegister rm,
9021 const QOperand& operand) {
9022 Vqrshrn(al, dt, rd, rm, operand);
9023 }
9024
9025 void Vqrshrun(Condition cond,
9026 DataType dt,
9027 DRegister rd,
9028 QRegister rm,
9029 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009030 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9031 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9032 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
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 vqrshrun(cond, dt, rd, rm, operand);
9038 }
9039 void Vqrshrun(DataType dt,
9040 DRegister rd,
9041 QRegister rm,
9042 const QOperand& operand) {
9043 Vqrshrun(al, dt, rd, rm, operand);
9044 }
9045
9046 void Vqshl(Condition cond,
9047 DataType dt,
9048 DRegister rd,
9049 DRegister rm,
9050 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009051 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9052 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9053 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009054 VIXL_ASSERT(allow_macro_instructions_);
9055 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009056 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009057 ITScope it_scope(this, &cond);
9058 vqshl(cond, dt, rd, rm, operand);
9059 }
9060 void Vqshl(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9061 Vqshl(al, dt, rd, rm, operand);
9062 }
9063
9064 void Vqshl(Condition cond,
9065 DataType dt,
9066 QRegister rd,
9067 QRegister rm,
9068 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009069 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9070 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9071 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
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 vqshl(cond, dt, rd, rm, operand);
9077 }
9078 void Vqshl(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9079 Vqshl(al, dt, rd, rm, operand);
9080 }
9081
9082 void Vqshlu(Condition cond,
9083 DataType dt,
9084 DRegister rd,
9085 DRegister rm,
9086 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009087 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9088 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9089 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009090 VIXL_ASSERT(allow_macro_instructions_);
9091 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009092 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009093 ITScope it_scope(this, &cond);
9094 vqshlu(cond, dt, rd, rm, operand);
9095 }
9096 void Vqshlu(DataType dt,
9097 DRegister rd,
9098 DRegister rm,
9099 const DOperand& operand) {
9100 Vqshlu(al, dt, rd, rm, operand);
9101 }
9102
9103 void Vqshlu(Condition cond,
9104 DataType dt,
9105 QRegister rd,
9106 QRegister rm,
9107 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009108 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9109 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9110 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009111 VIXL_ASSERT(allow_macro_instructions_);
9112 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009113 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009114 ITScope it_scope(this, &cond);
9115 vqshlu(cond, dt, rd, rm, operand);
9116 }
9117 void Vqshlu(DataType dt,
9118 QRegister rd,
9119 QRegister rm,
9120 const QOperand& operand) {
9121 Vqshlu(al, dt, rd, rm, operand);
9122 }
9123
9124 void Vqshrn(Condition cond,
9125 DataType dt,
9126 DRegister rd,
9127 QRegister rm,
9128 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009129 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9130 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9131 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009132 VIXL_ASSERT(allow_macro_instructions_);
9133 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009134 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009135 ITScope it_scope(this, &cond);
9136 vqshrn(cond, dt, rd, rm, operand);
9137 }
9138 void Vqshrn(DataType dt,
9139 DRegister rd,
9140 QRegister rm,
9141 const QOperand& operand) {
9142 Vqshrn(al, dt, rd, rm, operand);
9143 }
9144
9145 void Vqshrun(Condition cond,
9146 DataType dt,
9147 DRegister rd,
9148 QRegister rm,
9149 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009150 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9151 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9152 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009153 VIXL_ASSERT(allow_macro_instructions_);
9154 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009155 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009156 ITScope it_scope(this, &cond);
9157 vqshrun(cond, dt, rd, rm, operand);
9158 }
9159 void Vqshrun(DataType dt,
9160 DRegister rd,
9161 QRegister rm,
9162 const QOperand& operand) {
9163 Vqshrun(al, dt, rd, rm, operand);
9164 }
9165
9166 void Vqsub(
9167 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009168 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9169 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9170 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009171 VIXL_ASSERT(allow_macro_instructions_);
9172 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009173 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009174 ITScope it_scope(this, &cond);
9175 vqsub(cond, dt, rd, rn, rm);
9176 }
9177 void Vqsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9178 Vqsub(al, dt, rd, rn, rm);
9179 }
9180
9181 void Vqsub(
9182 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009183 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9184 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9185 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009186 VIXL_ASSERT(allow_macro_instructions_);
9187 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009188 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009189 ITScope it_scope(this, &cond);
9190 vqsub(cond, dt, rd, rn, rm);
9191 }
9192 void Vqsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9193 Vqsub(al, dt, rd, rn, rm);
9194 }
9195
9196 void Vraddhn(
9197 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009198 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9199 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9200 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009201 VIXL_ASSERT(allow_macro_instructions_);
9202 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009203 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009204 ITScope it_scope(this, &cond);
9205 vraddhn(cond, dt, rd, rn, rm);
9206 }
9207 void Vraddhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
9208 Vraddhn(al, dt, rd, rn, rm);
9209 }
9210
9211 void Vrecpe(Condition cond, DataType dt, DRegister rd, DRegister 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 ITScope it_scope(this, &cond);
9218 vrecpe(cond, dt, rd, rm);
9219 }
9220 void Vrecpe(DataType dt, DRegister rd, DRegister rm) {
9221 Vrecpe(al, dt, rd, rm);
9222 }
9223
9224 void Vrecpe(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009225 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9226 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009227 VIXL_ASSERT(allow_macro_instructions_);
9228 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009229 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009230 ITScope it_scope(this, &cond);
9231 vrecpe(cond, dt, rd, rm);
9232 }
9233 void Vrecpe(DataType dt, QRegister rd, QRegister rm) {
9234 Vrecpe(al, dt, rd, rm);
9235 }
9236
9237 void Vrecps(
9238 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009239 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9240 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9241 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009242 VIXL_ASSERT(allow_macro_instructions_);
9243 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009244 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009245 ITScope it_scope(this, &cond);
9246 vrecps(cond, dt, rd, rn, rm);
9247 }
9248 void Vrecps(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9249 Vrecps(al, dt, rd, rn, rm);
9250 }
9251
9252 void Vrecps(
9253 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009254 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9255 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9256 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009257 VIXL_ASSERT(allow_macro_instructions_);
9258 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009259 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009260 ITScope it_scope(this, &cond);
9261 vrecps(cond, dt, rd, rn, rm);
9262 }
9263 void Vrecps(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9264 Vrecps(al, dt, rd, rn, rm);
9265 }
9266
9267 void Vrev16(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009268 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9269 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009270 VIXL_ASSERT(allow_macro_instructions_);
9271 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009272 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009273 ITScope it_scope(this, &cond);
9274 vrev16(cond, dt, rd, rm);
9275 }
9276 void Vrev16(DataType dt, DRegister rd, DRegister rm) {
9277 Vrev16(al, dt, rd, rm);
9278 }
9279
9280 void Vrev16(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009281 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9282 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009283 VIXL_ASSERT(allow_macro_instructions_);
9284 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009285 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009286 ITScope it_scope(this, &cond);
9287 vrev16(cond, dt, rd, rm);
9288 }
9289 void Vrev16(DataType dt, QRegister rd, QRegister rm) {
9290 Vrev16(al, dt, rd, rm);
9291 }
9292
9293 void Vrev32(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009294 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9295 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009296 VIXL_ASSERT(allow_macro_instructions_);
9297 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009298 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009299 ITScope it_scope(this, &cond);
9300 vrev32(cond, dt, rd, rm);
9301 }
9302 void Vrev32(DataType dt, DRegister rd, DRegister rm) {
9303 Vrev32(al, dt, rd, rm);
9304 }
9305
9306 void Vrev32(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009307 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9308 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009309 VIXL_ASSERT(allow_macro_instructions_);
9310 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009311 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009312 ITScope it_scope(this, &cond);
9313 vrev32(cond, dt, rd, rm);
9314 }
9315 void Vrev32(DataType dt, QRegister rd, QRegister rm) {
9316 Vrev32(al, dt, rd, rm);
9317 }
9318
9319 void Vrev64(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009320 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9321 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009322 VIXL_ASSERT(allow_macro_instructions_);
9323 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009324 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009325 ITScope it_scope(this, &cond);
9326 vrev64(cond, dt, rd, rm);
9327 }
9328 void Vrev64(DataType dt, DRegister rd, DRegister rm) {
9329 Vrev64(al, dt, rd, rm);
9330 }
9331
9332 void Vrev64(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009333 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9334 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009335 VIXL_ASSERT(allow_macro_instructions_);
9336 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009337 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009338 ITScope it_scope(this, &cond);
9339 vrev64(cond, dt, rd, rm);
9340 }
9341 void Vrev64(DataType dt, QRegister rd, QRegister rm) {
9342 Vrev64(al, dt, rd, rm);
9343 }
9344
9345 void Vrhadd(
9346 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009347 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9348 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9349 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009350 VIXL_ASSERT(allow_macro_instructions_);
9351 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009352 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009353 ITScope it_scope(this, &cond);
9354 vrhadd(cond, dt, rd, rn, rm);
9355 }
9356 void Vrhadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9357 Vrhadd(al, dt, rd, rn, rm);
9358 }
9359
9360 void Vrhadd(
9361 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009362 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9363 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9364 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009365 VIXL_ASSERT(allow_macro_instructions_);
9366 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009367 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009368 ITScope it_scope(this, &cond);
9369 vrhadd(cond, dt, rd, rn, rm);
9370 }
9371 void Vrhadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9372 Vrhadd(al, dt, rd, rn, rm);
9373 }
9374
9375 void Vrinta(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009376 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9377 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
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 vrinta(dt1, dt2, rd, rm);
9382 }
9383
9384 void Vrinta(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009385 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9386 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009387 VIXL_ASSERT(allow_macro_instructions_);
9388 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009389 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009390 vrinta(dt1, dt2, rd, rm);
9391 }
9392
9393 void Vrinta(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009394 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9395 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
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 vrinta(dt1, dt2, rd, rm);
9400 }
9401
9402 void Vrintm(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009403 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9404 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009405 VIXL_ASSERT(allow_macro_instructions_);
9406 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009407 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009408 vrintm(dt1, dt2, rd, rm);
9409 }
9410
9411 void Vrintm(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009412 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9413 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009414 VIXL_ASSERT(allow_macro_instructions_);
9415 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009416 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009417 vrintm(dt1, dt2, rd, rm);
9418 }
9419
9420 void Vrintm(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009421 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9422 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009423 VIXL_ASSERT(allow_macro_instructions_);
9424 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009425 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009426 vrintm(dt1, dt2, rd, rm);
9427 }
9428
9429 void Vrintn(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009430 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9431 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009432 VIXL_ASSERT(allow_macro_instructions_);
9433 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009434 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009435 vrintn(dt1, dt2, rd, rm);
9436 }
9437
9438 void Vrintn(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009439 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9440 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009441 VIXL_ASSERT(allow_macro_instructions_);
9442 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009443 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009444 vrintn(dt1, dt2, rd, rm);
9445 }
9446
9447 void Vrintn(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009448 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9449 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009450 VIXL_ASSERT(allow_macro_instructions_);
9451 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009452 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009453 vrintn(dt1, dt2, rd, rm);
9454 }
9455
9456 void Vrintp(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009457 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9458 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009459 VIXL_ASSERT(allow_macro_instructions_);
9460 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009461 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009462 vrintp(dt1, dt2, rd, rm);
9463 }
9464
9465 void Vrintp(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009466 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9467 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009468 VIXL_ASSERT(allow_macro_instructions_);
9469 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009470 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009471 vrintp(dt1, dt2, rd, rm);
9472 }
9473
9474 void Vrintp(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009475 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9476 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009477 VIXL_ASSERT(allow_macro_instructions_);
9478 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009479 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009480 vrintp(dt1, dt2, rd, rm);
9481 }
9482
9483 void Vrintr(
9484 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009485 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9486 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009487 VIXL_ASSERT(allow_macro_instructions_);
9488 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009489 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009490 ITScope it_scope(this, &cond);
9491 vrintr(cond, dt1, dt2, rd, rm);
9492 }
9493 void Vrintr(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
9494 Vrintr(al, dt1, dt2, rd, rm);
9495 }
9496
9497 void Vrintr(
9498 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009499 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9500 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009501 VIXL_ASSERT(allow_macro_instructions_);
9502 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009503 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009504 ITScope it_scope(this, &cond);
9505 vrintr(cond, dt1, dt2, rd, rm);
9506 }
9507 void Vrintr(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
9508 Vrintr(al, dt1, dt2, rd, rm);
9509 }
9510
9511 void Vrintx(
9512 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009513 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9514 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009515 VIXL_ASSERT(allow_macro_instructions_);
9516 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009517 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009518 ITScope it_scope(this, &cond);
9519 vrintx(cond, dt1, dt2, rd, rm);
9520 }
9521 void Vrintx(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
9522 Vrintx(al, dt1, dt2, rd, rm);
9523 }
9524
9525 void Vrintx(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009526 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9527 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009528 VIXL_ASSERT(allow_macro_instructions_);
9529 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009530 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009531 vrintx(dt1, dt2, rd, rm);
9532 }
9533
9534 void Vrintx(
9535 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009536 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9537 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009538 VIXL_ASSERT(allow_macro_instructions_);
9539 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009540 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009541 ITScope it_scope(this, &cond);
9542 vrintx(cond, dt1, dt2, rd, rm);
9543 }
9544 void Vrintx(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
9545 Vrintx(al, dt1, dt2, rd, rm);
9546 }
9547
9548 void Vrintz(
9549 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009550 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9551 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009552 VIXL_ASSERT(allow_macro_instructions_);
9553 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009554 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009555 ITScope it_scope(this, &cond);
9556 vrintz(cond, dt1, dt2, rd, rm);
9557 }
9558 void Vrintz(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
9559 Vrintz(al, dt1, dt2, rd, rm);
9560 }
9561
9562 void Vrintz(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9564 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009565 VIXL_ASSERT(allow_macro_instructions_);
9566 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009567 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009568 vrintz(dt1, dt2, rd, rm);
9569 }
9570
9571 void Vrintz(
9572 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009573 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9574 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009575 VIXL_ASSERT(allow_macro_instructions_);
9576 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009577 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009578 ITScope it_scope(this, &cond);
9579 vrintz(cond, dt1, dt2, rd, rm);
9580 }
9581 void Vrintz(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
9582 Vrintz(al, dt1, dt2, rd, rm);
9583 }
9584
9585 void Vrshl(
9586 Condition cond, DataType dt, DRegister rd, DRegister rm, DRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009587 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9588 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9589 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
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 ITScope it_scope(this, &cond);
9594 vrshl(cond, dt, rd, rm, rn);
9595 }
9596 void Vrshl(DataType dt, DRegister rd, DRegister rm, DRegister rn) {
9597 Vrshl(al, dt, rd, rm, rn);
9598 }
9599
9600 void Vrshl(
9601 Condition cond, DataType dt, QRegister rd, QRegister rm, QRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009602 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9603 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9604 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009605 VIXL_ASSERT(allow_macro_instructions_);
9606 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009607 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009608 ITScope it_scope(this, &cond);
9609 vrshl(cond, dt, rd, rm, rn);
9610 }
9611 void Vrshl(DataType dt, QRegister rd, QRegister rm, QRegister rn) {
9612 Vrshl(al, dt, rd, rm, rn);
9613 }
9614
9615 void Vrshr(Condition cond,
9616 DataType dt,
9617 DRegister rd,
9618 DRegister rm,
9619 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009620 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9621 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9622 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009623 VIXL_ASSERT(allow_macro_instructions_);
9624 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009625 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009626 ITScope it_scope(this, &cond);
9627 vrshr(cond, dt, rd, rm, operand);
9628 }
9629 void Vrshr(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9630 Vrshr(al, dt, rd, rm, operand);
9631 }
9632
9633 void Vrshr(Condition cond,
9634 DataType dt,
9635 QRegister rd,
9636 QRegister rm,
9637 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009638 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9639 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9640 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009641 VIXL_ASSERT(allow_macro_instructions_);
9642 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009643 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009644 ITScope it_scope(this, &cond);
9645 vrshr(cond, dt, rd, rm, operand);
9646 }
9647 void Vrshr(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9648 Vrshr(al, dt, rd, rm, operand);
9649 }
9650
9651 void Vrshrn(Condition cond,
9652 DataType dt,
9653 DRegister rd,
9654 QRegister rm,
9655 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009656 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9657 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9658 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009659 VIXL_ASSERT(allow_macro_instructions_);
9660 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009661 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009662 ITScope it_scope(this, &cond);
9663 vrshrn(cond, dt, rd, rm, operand);
9664 }
9665 void Vrshrn(DataType dt,
9666 DRegister rd,
9667 QRegister rm,
9668 const QOperand& operand) {
9669 Vrshrn(al, dt, rd, rm, operand);
9670 }
9671
9672 void Vrsqrte(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009673 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9674 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009675 VIXL_ASSERT(allow_macro_instructions_);
9676 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009677 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009678 ITScope it_scope(this, &cond);
9679 vrsqrte(cond, dt, rd, rm);
9680 }
9681 void Vrsqrte(DataType dt, DRegister rd, DRegister rm) {
9682 Vrsqrte(al, dt, rd, rm);
9683 }
9684
9685 void Vrsqrte(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009686 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9687 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009688 VIXL_ASSERT(allow_macro_instructions_);
9689 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009690 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009691 ITScope it_scope(this, &cond);
9692 vrsqrte(cond, dt, rd, rm);
9693 }
9694 void Vrsqrte(DataType dt, QRegister rd, QRegister rm) {
9695 Vrsqrte(al, dt, rd, rm);
9696 }
9697
9698 void Vrsqrts(
9699 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009700 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9701 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9702 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009703 VIXL_ASSERT(allow_macro_instructions_);
9704 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009705 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009706 ITScope it_scope(this, &cond);
9707 vrsqrts(cond, dt, rd, rn, rm);
9708 }
9709 void Vrsqrts(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9710 Vrsqrts(al, dt, rd, rn, rm);
9711 }
9712
9713 void Vrsqrts(
9714 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009715 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9716 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9717 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009718 VIXL_ASSERT(allow_macro_instructions_);
9719 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009720 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009721 ITScope it_scope(this, &cond);
9722 vrsqrts(cond, dt, rd, rn, rm);
9723 }
9724 void Vrsqrts(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9725 Vrsqrts(al, dt, rd, rn, rm);
9726 }
9727
9728 void Vrsra(Condition cond,
9729 DataType dt,
9730 DRegister rd,
9731 DRegister rm,
9732 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009733 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9734 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9735 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009736 VIXL_ASSERT(allow_macro_instructions_);
9737 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009738 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009739 ITScope it_scope(this, &cond);
9740 vrsra(cond, dt, rd, rm, operand);
9741 }
9742 void Vrsra(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9743 Vrsra(al, dt, rd, rm, operand);
9744 }
9745
9746 void Vrsra(Condition cond,
9747 DataType dt,
9748 QRegister rd,
9749 QRegister rm,
9750 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009751 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9752 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9753 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
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 vrsra(cond, dt, rd, rm, operand);
9759 }
9760 void Vrsra(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9761 Vrsra(al, dt, rd, rm, operand);
9762 }
9763
9764 void Vrsubhn(
9765 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009766 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9767 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9768 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009769 VIXL_ASSERT(allow_macro_instructions_);
9770 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009771 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009772 ITScope it_scope(this, &cond);
9773 vrsubhn(cond, dt, rd, rn, rm);
9774 }
9775 void Vrsubhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
9776 Vrsubhn(al, dt, rd, rn, rm);
9777 }
9778
9779 void Vseleq(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009780 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9781 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9782 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009783 VIXL_ASSERT(allow_macro_instructions_);
9784 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009785 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009786 vseleq(dt, rd, rn, rm);
9787 }
9788
9789 void Vseleq(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009790 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9791 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9792 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009793 VIXL_ASSERT(allow_macro_instructions_);
9794 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009795 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009796 vseleq(dt, rd, rn, rm);
9797 }
9798
9799 void Vselge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009800 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9801 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9802 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009803 VIXL_ASSERT(allow_macro_instructions_);
9804 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009805 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009806 vselge(dt, rd, rn, rm);
9807 }
9808
9809 void Vselge(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009810 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9811 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9812 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009813 VIXL_ASSERT(allow_macro_instructions_);
9814 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009815 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009816 vselge(dt, rd, rn, rm);
9817 }
9818
9819 void Vselgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009820 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9821 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9822 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009823 VIXL_ASSERT(allow_macro_instructions_);
9824 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009825 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009826 vselgt(dt, rd, rn, rm);
9827 }
9828
9829 void Vselgt(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009830 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9831 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9832 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009833 VIXL_ASSERT(allow_macro_instructions_);
9834 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009835 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009836 vselgt(dt, rd, rn, rm);
9837 }
9838
9839 void Vselvs(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009840 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9841 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9842 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009843 VIXL_ASSERT(allow_macro_instructions_);
9844 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009845 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009846 vselvs(dt, rd, rn, rm);
9847 }
9848
9849 void Vselvs(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009850 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9851 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9852 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009853 VIXL_ASSERT(allow_macro_instructions_);
9854 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009855 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009856 vselvs(dt, rd, rn, rm);
9857 }
9858
9859 void Vshl(Condition cond,
9860 DataType dt,
9861 DRegister rd,
9862 DRegister rm,
9863 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009864 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9865 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9866 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009867 VIXL_ASSERT(allow_macro_instructions_);
9868 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009869 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009870 ITScope it_scope(this, &cond);
9871 vshl(cond, dt, rd, rm, operand);
9872 }
9873 void Vshl(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9874 Vshl(al, dt, rd, rm, operand);
9875 }
9876
9877 void Vshl(Condition cond,
9878 DataType dt,
9879 QRegister rd,
9880 QRegister rm,
9881 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009882 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9883 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9884 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009885 VIXL_ASSERT(allow_macro_instructions_);
9886 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009887 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009888 ITScope it_scope(this, &cond);
9889 vshl(cond, dt, rd, rm, operand);
9890 }
9891 void Vshl(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9892 Vshl(al, dt, rd, rm, operand);
9893 }
9894
9895 void Vshll(Condition cond,
9896 DataType dt,
9897 QRegister rd,
9898 DRegister rm,
9899 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009900 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9901 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9902 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009903 VIXL_ASSERT(allow_macro_instructions_);
9904 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009905 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009906 ITScope it_scope(this, &cond);
9907 vshll(cond, dt, rd, rm, operand);
9908 }
9909 void Vshll(DataType dt, QRegister rd, DRegister rm, const DOperand& operand) {
9910 Vshll(al, dt, rd, rm, operand);
9911 }
9912
9913 void Vshr(Condition cond,
9914 DataType dt,
9915 DRegister rd,
9916 DRegister rm,
9917 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009918 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9919 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9920 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009921 VIXL_ASSERT(allow_macro_instructions_);
9922 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009923 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009924 ITScope it_scope(this, &cond);
9925 vshr(cond, dt, rd, rm, operand);
9926 }
9927 void Vshr(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9928 Vshr(al, dt, rd, rm, operand);
9929 }
9930
9931 void Vshr(Condition cond,
9932 DataType dt,
9933 QRegister rd,
9934 QRegister rm,
9935 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009936 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9937 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9938 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009939 VIXL_ASSERT(allow_macro_instructions_);
9940 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009941 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009942 ITScope it_scope(this, &cond);
9943 vshr(cond, dt, rd, rm, operand);
9944 }
9945 void Vshr(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9946 Vshr(al, dt, rd, rm, operand);
9947 }
9948
9949 void Vshrn(Condition cond,
9950 DataType dt,
9951 DRegister rd,
9952 QRegister rm,
9953 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009954 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9955 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9956 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009957 VIXL_ASSERT(allow_macro_instructions_);
9958 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009959 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009960 ITScope it_scope(this, &cond);
9961 vshrn(cond, dt, rd, rm, operand);
9962 }
9963 void Vshrn(DataType dt, DRegister rd, QRegister rm, const QOperand& operand) {
9964 Vshrn(al, dt, rd, rm, operand);
9965 }
9966
9967 void Vsli(Condition cond,
9968 DataType dt,
9969 DRegister rd,
9970 DRegister rm,
9971 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009972 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9973 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9974 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009975 VIXL_ASSERT(allow_macro_instructions_);
9976 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009977 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009978 ITScope it_scope(this, &cond);
9979 vsli(cond, dt, rd, rm, operand);
9980 }
9981 void Vsli(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9982 Vsli(al, dt, rd, rm, operand);
9983 }
9984
9985 void Vsli(Condition cond,
9986 DataType dt,
9987 QRegister rd,
9988 QRegister rm,
9989 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009990 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9991 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9992 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009993 VIXL_ASSERT(allow_macro_instructions_);
9994 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009995 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009996 ITScope it_scope(this, &cond);
9997 vsli(cond, dt, rd, rm, operand);
9998 }
9999 void Vsli(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
10000 Vsli(al, dt, rd, rm, operand);
10001 }
10002
10003 void Vsqrt(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010004 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10005 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010006 VIXL_ASSERT(allow_macro_instructions_);
10007 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010008 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010009 ITScope it_scope(this, &cond);
10010 vsqrt(cond, dt, rd, rm);
10011 }
10012 void Vsqrt(DataType dt, SRegister rd, SRegister rm) { Vsqrt(al, dt, rd, rm); }
10013
10014 void Vsqrt(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010015 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10016 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010017 VIXL_ASSERT(allow_macro_instructions_);
10018 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010019 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010020 ITScope it_scope(this, &cond);
10021 vsqrt(cond, dt, rd, rm);
10022 }
10023 void Vsqrt(DataType dt, DRegister rd, DRegister rm) { Vsqrt(al, dt, rd, rm); }
10024
10025 void Vsra(Condition cond,
10026 DataType dt,
10027 DRegister rd,
10028 DRegister rm,
10029 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010030 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10031 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
10032 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010033 VIXL_ASSERT(allow_macro_instructions_);
10034 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010035 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010036 ITScope it_scope(this, &cond);
10037 vsra(cond, dt, rd, rm, operand);
10038 }
10039 void Vsra(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
10040 Vsra(al, dt, rd, rm, operand);
10041 }
10042
10043 void Vsra(Condition cond,
10044 DataType dt,
10045 QRegister rd,
10046 QRegister rm,
10047 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010048 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10049 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
10050 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010051 VIXL_ASSERT(allow_macro_instructions_);
10052 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010053 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010054 ITScope it_scope(this, &cond);
10055 vsra(cond, dt, rd, rm, operand);
10056 }
10057 void Vsra(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
10058 Vsra(al, dt, rd, rm, operand);
10059 }
10060
10061 void Vsri(Condition cond,
10062 DataType dt,
10063 DRegister rd,
10064 DRegister rm,
10065 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010066 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10067 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
10068 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010069 VIXL_ASSERT(allow_macro_instructions_);
10070 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010071 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010072 ITScope it_scope(this, &cond);
10073 vsri(cond, dt, rd, rm, operand);
10074 }
10075 void Vsri(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
10076 Vsri(al, dt, rd, rm, operand);
10077 }
10078
10079 void Vsri(Condition cond,
10080 DataType dt,
10081 QRegister rd,
10082 QRegister rm,
10083 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010084 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10085 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
10086 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010087 VIXL_ASSERT(allow_macro_instructions_);
10088 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010089 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010090 ITScope it_scope(this, &cond);
10091 vsri(cond, dt, rd, rm, operand);
10092 }
10093 void Vsri(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
10094 Vsri(al, dt, rd, rm, operand);
10095 }
10096
10097 void Vst1(Condition cond,
10098 DataType dt,
10099 const NeonRegisterList& nreglist,
10100 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010101 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10102 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010103 VIXL_ASSERT(allow_macro_instructions_);
10104 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010105 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010106 ITScope it_scope(this, &cond);
10107 vst1(cond, dt, nreglist, operand);
10108 }
10109 void Vst1(DataType dt,
10110 const NeonRegisterList& nreglist,
10111 const AlignedMemOperand& operand) {
10112 Vst1(al, dt, nreglist, operand);
10113 }
10114
10115 void Vst2(Condition cond,
10116 DataType dt,
10117 const NeonRegisterList& nreglist,
10118 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010119 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10120 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010121 VIXL_ASSERT(allow_macro_instructions_);
10122 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010123 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010124 ITScope it_scope(this, &cond);
10125 vst2(cond, dt, nreglist, operand);
10126 }
10127 void Vst2(DataType dt,
10128 const NeonRegisterList& nreglist,
10129 const AlignedMemOperand& operand) {
10130 Vst2(al, dt, nreglist, operand);
10131 }
10132
10133 void Vst3(Condition cond,
10134 DataType dt,
10135 const NeonRegisterList& nreglist,
10136 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010137 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10138 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010139 VIXL_ASSERT(allow_macro_instructions_);
10140 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010141 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010142 ITScope it_scope(this, &cond);
10143 vst3(cond, dt, nreglist, operand);
10144 }
10145 void Vst3(DataType dt,
10146 const NeonRegisterList& nreglist,
10147 const AlignedMemOperand& operand) {
10148 Vst3(al, dt, nreglist, operand);
10149 }
10150
10151 void Vst3(Condition cond,
10152 DataType dt,
10153 const NeonRegisterList& nreglist,
10154 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010155 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10156 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010157 VIXL_ASSERT(allow_macro_instructions_);
10158 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010159 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010160 ITScope it_scope(this, &cond);
10161 vst3(cond, dt, nreglist, operand);
10162 }
10163 void Vst3(DataType dt,
10164 const NeonRegisterList& nreglist,
10165 const MemOperand& operand) {
10166 Vst3(al, dt, nreglist, operand);
10167 }
10168
10169 void Vst4(Condition cond,
10170 DataType dt,
10171 const NeonRegisterList& nreglist,
10172 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010173 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10174 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010175 VIXL_ASSERT(allow_macro_instructions_);
10176 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010177 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010178 ITScope it_scope(this, &cond);
10179 vst4(cond, dt, nreglist, operand);
10180 }
10181 void Vst4(DataType dt,
10182 const NeonRegisterList& nreglist,
10183 const AlignedMemOperand& operand) {
10184 Vst4(al, dt, nreglist, operand);
10185 }
10186
10187 void Vstm(Condition cond,
10188 DataType dt,
10189 Register rn,
10190 WriteBack write_back,
10191 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010192 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10193 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010194 VIXL_ASSERT(allow_macro_instructions_);
10195 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010196 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010197 ITScope it_scope(this, &cond);
10198 vstm(cond, dt, rn, write_back, dreglist);
10199 }
10200 void Vstm(DataType dt,
10201 Register rn,
10202 WriteBack write_back,
10203 DRegisterList dreglist) {
10204 Vstm(al, dt, rn, write_back, dreglist);
10205 }
10206 void Vstm(Condition cond,
10207 Register rn,
10208 WriteBack write_back,
10209 DRegisterList dreglist) {
10210 Vstm(cond, kDataTypeValueNone, rn, write_back, dreglist);
10211 }
10212 void Vstm(Register rn, WriteBack write_back, DRegisterList dreglist) {
10213 Vstm(al, kDataTypeValueNone, rn, write_back, dreglist);
10214 }
10215
10216 void Vstm(Condition cond,
10217 DataType dt,
10218 Register rn,
10219 WriteBack write_back,
10220 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010221 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10222 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010223 VIXL_ASSERT(allow_macro_instructions_);
10224 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010225 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010226 ITScope it_scope(this, &cond);
10227 vstm(cond, dt, rn, write_back, sreglist);
10228 }
10229 void Vstm(DataType dt,
10230 Register rn,
10231 WriteBack write_back,
10232 SRegisterList sreglist) {
10233 Vstm(al, dt, rn, write_back, sreglist);
10234 }
10235 void Vstm(Condition cond,
10236 Register rn,
10237 WriteBack write_back,
10238 SRegisterList sreglist) {
10239 Vstm(cond, kDataTypeValueNone, rn, write_back, sreglist);
10240 }
10241 void Vstm(Register rn, WriteBack write_back, SRegisterList sreglist) {
10242 Vstm(al, kDataTypeValueNone, rn, write_back, sreglist);
10243 }
10244
10245 void Vstmdb(Condition cond,
10246 DataType dt,
10247 Register rn,
10248 WriteBack write_back,
10249 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010250 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10251 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
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 vstmdb(cond, dt, rn, write_back, dreglist);
10257 }
10258 void Vstmdb(DataType dt,
10259 Register rn,
10260 WriteBack write_back,
10261 DRegisterList dreglist) {
10262 Vstmdb(al, dt, rn, write_back, dreglist);
10263 }
10264 void Vstmdb(Condition cond,
10265 Register rn,
10266 WriteBack write_back,
10267 DRegisterList dreglist) {
10268 Vstmdb(cond, kDataTypeValueNone, rn, write_back, dreglist);
10269 }
10270 void Vstmdb(Register rn, WriteBack write_back, DRegisterList dreglist) {
10271 Vstmdb(al, kDataTypeValueNone, rn, write_back, dreglist);
10272 }
10273
10274 void Vstmdb(Condition cond,
10275 DataType dt,
10276 Register rn,
10277 WriteBack write_back,
10278 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010279 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10280 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010281 VIXL_ASSERT(allow_macro_instructions_);
10282 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010283 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010284 ITScope it_scope(this, &cond);
10285 vstmdb(cond, dt, rn, write_back, sreglist);
10286 }
10287 void Vstmdb(DataType dt,
10288 Register rn,
10289 WriteBack write_back,
10290 SRegisterList sreglist) {
10291 Vstmdb(al, dt, rn, write_back, sreglist);
10292 }
10293 void Vstmdb(Condition cond,
10294 Register rn,
10295 WriteBack write_back,
10296 SRegisterList sreglist) {
10297 Vstmdb(cond, kDataTypeValueNone, rn, write_back, sreglist);
10298 }
10299 void Vstmdb(Register rn, WriteBack write_back, SRegisterList sreglist) {
10300 Vstmdb(al, kDataTypeValueNone, rn, write_back, sreglist);
10301 }
10302
10303 void Vstmia(Condition cond,
10304 DataType dt,
10305 Register rn,
10306 WriteBack write_back,
10307 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010308 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10309 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010310 VIXL_ASSERT(allow_macro_instructions_);
10311 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010312 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010313 ITScope it_scope(this, &cond);
10314 vstmia(cond, dt, rn, write_back, dreglist);
10315 }
10316 void Vstmia(DataType dt,
10317 Register rn,
10318 WriteBack write_back,
10319 DRegisterList dreglist) {
10320 Vstmia(al, dt, rn, write_back, dreglist);
10321 }
10322 void Vstmia(Condition cond,
10323 Register rn,
10324 WriteBack write_back,
10325 DRegisterList dreglist) {
10326 Vstmia(cond, kDataTypeValueNone, rn, write_back, dreglist);
10327 }
10328 void Vstmia(Register rn, WriteBack write_back, DRegisterList dreglist) {
10329 Vstmia(al, kDataTypeValueNone, rn, write_back, dreglist);
10330 }
10331
10332 void Vstmia(Condition cond,
10333 DataType dt,
10334 Register rn,
10335 WriteBack write_back,
10336 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010337 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10338 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010339 VIXL_ASSERT(allow_macro_instructions_);
10340 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010341 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010342 ITScope it_scope(this, &cond);
10343 vstmia(cond, dt, rn, write_back, sreglist);
10344 }
10345 void Vstmia(DataType dt,
10346 Register rn,
10347 WriteBack write_back,
10348 SRegisterList sreglist) {
10349 Vstmia(al, dt, rn, write_back, sreglist);
10350 }
10351 void Vstmia(Condition cond,
10352 Register rn,
10353 WriteBack write_back,
10354 SRegisterList sreglist) {
10355 Vstmia(cond, kDataTypeValueNone, rn, write_back, sreglist);
10356 }
10357 void Vstmia(Register rn, WriteBack write_back, SRegisterList sreglist) {
10358 Vstmia(al, kDataTypeValueNone, rn, write_back, sreglist);
10359 }
10360
10361 void Vstr(Condition cond,
10362 DataType dt,
10363 DRegister rd,
10364 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010365 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10366 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010367 VIXL_ASSERT(allow_macro_instructions_);
10368 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010369 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010370 ITScope it_scope(this, &cond);
10371 vstr(cond, dt, rd, operand);
10372 }
10373 void Vstr(DataType dt, DRegister rd, const MemOperand& operand) {
10374 Vstr(al, dt, rd, operand);
10375 }
10376 void Vstr(Condition cond, DRegister rd, const MemOperand& operand) {
10377 Vstr(cond, Untyped64, rd, operand);
10378 }
10379 void Vstr(DRegister rd, const MemOperand& operand) {
10380 Vstr(al, Untyped64, rd, operand);
10381 }
10382
10383 void Vstr(Condition cond,
10384 DataType dt,
10385 SRegister rd,
10386 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010387 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10388 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010389 VIXL_ASSERT(allow_macro_instructions_);
10390 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010391 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010392 ITScope it_scope(this, &cond);
10393 vstr(cond, dt, rd, operand);
10394 }
10395 void Vstr(DataType dt, SRegister rd, const MemOperand& operand) {
10396 Vstr(al, dt, rd, operand);
10397 }
10398 void Vstr(Condition cond, SRegister rd, const MemOperand& operand) {
10399 Vstr(cond, Untyped32, rd, operand);
10400 }
10401 void Vstr(SRegister rd, const MemOperand& operand) {
10402 Vstr(al, Untyped32, rd, operand);
10403 }
10404
10405 void Vsub(
10406 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010407 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10408 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10409 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010410 VIXL_ASSERT(allow_macro_instructions_);
10411 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010412 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010413 ITScope it_scope(this, &cond);
10414 vsub(cond, dt, rd, rn, rm);
10415 }
10416 void Vsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
10417 Vsub(al, dt, rd, rn, rm);
10418 }
10419
10420 void Vsub(
10421 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010422 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10423 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10424 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010425 VIXL_ASSERT(allow_macro_instructions_);
10426 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010427 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010428 ITScope it_scope(this, &cond);
10429 vsub(cond, dt, rd, rn, rm);
10430 }
10431 void Vsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
10432 Vsub(al, dt, rd, rn, rm);
10433 }
10434
10435 void Vsub(
10436 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010437 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10438 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10439 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010440 VIXL_ASSERT(allow_macro_instructions_);
10441 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010442 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010443 ITScope it_scope(this, &cond);
10444 vsub(cond, dt, rd, rn, rm);
10445 }
10446 void Vsub(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
10447 Vsub(al, dt, rd, rn, rm);
10448 }
10449
10450 void Vsubhn(
10451 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010452 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10453 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10454 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010455 VIXL_ASSERT(allow_macro_instructions_);
10456 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010457 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010458 ITScope it_scope(this, &cond);
10459 vsubhn(cond, dt, rd, rn, rm);
10460 }
10461 void Vsubhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
10462 Vsubhn(al, dt, rd, rn, rm);
10463 }
10464
10465 void Vsubl(
10466 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010467 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10468 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10469 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010470 VIXL_ASSERT(allow_macro_instructions_);
10471 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010472 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010473 ITScope it_scope(this, &cond);
10474 vsubl(cond, dt, rd, rn, rm);
10475 }
10476 void Vsubl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
10477 Vsubl(al, dt, rd, rn, rm);
10478 }
10479
10480 void Vsubw(
10481 Condition cond, DataType dt, QRegister rd, QRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010482 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10483 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010485 VIXL_ASSERT(allow_macro_instructions_);
10486 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010487 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010488 ITScope it_scope(this, &cond);
10489 vsubw(cond, dt, rd, rn, rm);
10490 }
10491 void Vsubw(DataType dt, QRegister rd, QRegister rn, DRegister rm) {
10492 Vsubw(al, dt, rd, rn, rm);
10493 }
10494
10495 void Vswp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010496 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10497 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010498 VIXL_ASSERT(allow_macro_instructions_);
10499 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010500 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010501 ITScope it_scope(this, &cond);
10502 vswp(cond, dt, rd, rm);
10503 }
10504 void Vswp(DataType dt, DRegister rd, DRegister rm) { Vswp(al, dt, rd, rm); }
10505 void Vswp(Condition cond, DRegister rd, DRegister rm) {
10506 Vswp(cond, kDataTypeValueNone, rd, rm);
10507 }
10508 void Vswp(DRegister rd, DRegister rm) {
10509 Vswp(al, kDataTypeValueNone, rd, rm);
10510 }
10511
10512 void Vswp(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010513 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10514 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010515 VIXL_ASSERT(allow_macro_instructions_);
10516 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010517 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010518 ITScope it_scope(this, &cond);
10519 vswp(cond, dt, rd, rm);
10520 }
10521 void Vswp(DataType dt, QRegister rd, QRegister rm) { Vswp(al, dt, rd, rm); }
10522 void Vswp(Condition cond, QRegister rd, QRegister rm) {
10523 Vswp(cond, kDataTypeValueNone, rd, rm);
10524 }
10525 void Vswp(QRegister rd, QRegister rm) {
10526 Vswp(al, kDataTypeValueNone, rd, rm);
10527 }
10528
10529 void Vtbl(Condition cond,
10530 DataType dt,
10531 DRegister rd,
10532 const NeonRegisterList& nreglist,
10533 DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010534 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10535 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10536 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010537 VIXL_ASSERT(allow_macro_instructions_);
10538 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010539 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010540 ITScope it_scope(this, &cond);
10541 vtbl(cond, dt, rd, nreglist, rm);
10542 }
10543 void Vtbl(DataType dt,
10544 DRegister rd,
10545 const NeonRegisterList& nreglist,
10546 DRegister rm) {
10547 Vtbl(al, dt, rd, nreglist, rm);
10548 }
10549
10550 void Vtbx(Condition cond,
10551 DataType dt,
10552 DRegister rd,
10553 const NeonRegisterList& nreglist,
10554 DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010555 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10556 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10557 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010558 VIXL_ASSERT(allow_macro_instructions_);
10559 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010560 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010561 ITScope it_scope(this, &cond);
10562 vtbx(cond, dt, rd, nreglist, rm);
10563 }
10564 void Vtbx(DataType dt,
10565 DRegister rd,
10566 const NeonRegisterList& nreglist,
10567 DRegister rm) {
10568 Vtbx(al, dt, rd, nreglist, rm);
10569 }
10570
10571 void Vtrn(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010572 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10573 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010574 VIXL_ASSERT(allow_macro_instructions_);
10575 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010576 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010577 ITScope it_scope(this, &cond);
10578 vtrn(cond, dt, rd, rm);
10579 }
10580 void Vtrn(DataType dt, DRegister rd, DRegister rm) { Vtrn(al, dt, rd, rm); }
10581
10582 void Vtrn(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010583 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10584 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010585 VIXL_ASSERT(allow_macro_instructions_);
10586 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010587 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010588 ITScope it_scope(this, &cond);
10589 vtrn(cond, dt, rd, rm);
10590 }
10591 void Vtrn(DataType dt, QRegister rd, QRegister rm) { Vtrn(al, dt, rd, rm); }
10592
10593 void Vtst(
10594 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010595 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10596 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10597 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010598 VIXL_ASSERT(allow_macro_instructions_);
10599 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010600 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010601 ITScope it_scope(this, &cond);
10602 vtst(cond, dt, rd, rn, rm);
10603 }
10604 void Vtst(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
10605 Vtst(al, dt, rd, rn, rm);
10606 }
10607
10608 void Vtst(
10609 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010610 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10611 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10612 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010613 VIXL_ASSERT(allow_macro_instructions_);
10614 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010615 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010616 ITScope it_scope(this, &cond);
10617 vtst(cond, dt, rd, rn, rm);
10618 }
10619 void Vtst(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
10620 Vtst(al, dt, rd, rn, rm);
10621 }
10622
10623 void Vuzp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010624 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10625 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010626 VIXL_ASSERT(allow_macro_instructions_);
10627 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010628 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010629 ITScope it_scope(this, &cond);
10630 vuzp(cond, dt, rd, rm);
10631 }
10632 void Vuzp(DataType dt, DRegister rd, DRegister rm) { Vuzp(al, dt, rd, rm); }
10633
10634 void Vuzp(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010635 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10636 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010637 VIXL_ASSERT(allow_macro_instructions_);
10638 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010639 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010640 ITScope it_scope(this, &cond);
10641 vuzp(cond, dt, rd, rm);
10642 }
10643 void Vuzp(DataType dt, QRegister rd, QRegister rm) { Vuzp(al, dt, rd, rm); }
10644
10645 void Vzip(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010646 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10647 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010648 VIXL_ASSERT(allow_macro_instructions_);
10649 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010650 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010651 ITScope it_scope(this, &cond);
10652 vzip(cond, dt, rd, rm);
10653 }
10654 void Vzip(DataType dt, DRegister rd, DRegister rm) { Vzip(al, dt, rd, rm); }
10655
10656 void Vzip(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010657 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10658 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010659 VIXL_ASSERT(allow_macro_instructions_);
10660 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010661 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010662 ITScope it_scope(this, &cond);
10663 vzip(cond, dt, rd, rm);
10664 }
10665 void Vzip(DataType dt, QRegister rd, QRegister rm) { Vzip(al, dt, rd, rm); }
10666
10667 void Yield(Condition cond) {
10668 VIXL_ASSERT(allow_macro_instructions_);
10669 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010670 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010671 ITScope it_scope(this, &cond);
10672 yield(cond);
10673 }
10674 void Yield() { Yield(al); }
Vincent Belliardf6786182016-09-21 11:55:28 +010010675 void Vabs(Condition cond, VRegister rd, VRegister rm) {
10676 VIXL_ASSERT(rd.IsS() || rd.IsD());
10677 VIXL_ASSERT(rd.GetType() == rm.GetType());
10678 if (rd.IsS()) {
10679 Vabs(cond, F32, rd.S(), rm.S());
10680 } else {
10681 Vabs(cond, F64, rd.D(), rm.D());
10682 }
10683 }
10684 void Vabs(VRegister rd, VRegister rm) { Vabs(al, rd, rm); }
10685 void Vadd(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10686 VIXL_ASSERT(rd.IsS() || rd.IsD());
10687 VIXL_ASSERT(rd.GetType() == rn.GetType());
10688 VIXL_ASSERT(rd.GetType() == rm.GetType());
10689 if (rd.IsS()) {
10690 Vadd(cond, F32, rd.S(), rn.S(), rm.S());
10691 } else {
10692 Vadd(cond, F64, rd.D(), rn.D(), rm.D());
10693 }
10694 }
10695 void Vadd(VRegister rd, VRegister rn, VRegister rm) { Vadd(al, rd, rn, rm); }
10696 void Vcmp(Condition cond, VRegister rd, VRegister rm) {
10697 VIXL_ASSERT(rd.IsS() || rd.IsD());
10698 VIXL_ASSERT(rd.GetType() == rm.GetType());
10699 if (rd.IsS()) {
10700 Vcmp(cond, F32, rd.S(), rm.S());
10701 } else {
10702 Vcmp(cond, F64, rd.D(), rm.D());
10703 }
10704 }
10705 void Vcmp(VRegister rd, VRegister rm) { Vcmp(al, rd, rm); }
10706 void Vcmpe(Condition cond, VRegister rd, VRegister rm) {
10707 VIXL_ASSERT(rd.IsS() || rd.IsD());
10708 VIXL_ASSERT(rd.GetType() == rm.GetType());
10709 if (rd.IsS()) {
10710 Vcmpe(cond, F32, rd.S(), rm.S());
10711 } else {
10712 Vcmpe(cond, F64, rd.D(), rm.D());
10713 }
10714 }
10715 void Vcmpe(VRegister rd, VRegister rm) { Vcmpe(al, rd, rm); }
10716 void Vdiv(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10717 VIXL_ASSERT(rd.IsS() || rd.IsD());
10718 VIXL_ASSERT(rd.GetType() == rn.GetType());
10719 VIXL_ASSERT(rd.GetType() == rm.GetType());
10720 if (rd.IsS()) {
10721 Vdiv(cond, F32, rd.S(), rn.S(), rm.S());
10722 } else {
10723 Vdiv(cond, F64, rd.D(), rn.D(), rm.D());
10724 }
10725 }
10726 void Vdiv(VRegister rd, VRegister rn, VRegister rm) { Vdiv(al, rd, rn, rm); }
10727 void Vfma(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10728 VIXL_ASSERT(rd.IsS() || rd.IsD());
10729 VIXL_ASSERT(rd.GetType() == rn.GetType());
10730 VIXL_ASSERT(rd.GetType() == rm.GetType());
10731 if (rd.IsS()) {
10732 Vfma(cond, F32, rd.S(), rn.S(), rm.S());
10733 } else {
10734 Vfma(cond, F64, rd.D(), rn.D(), rm.D());
10735 }
10736 }
10737 void Vfma(VRegister rd, VRegister rn, VRegister rm) { Vfma(al, rd, rn, rm); }
10738 void Vfms(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10739 VIXL_ASSERT(rd.IsS() || rd.IsD());
10740 VIXL_ASSERT(rd.GetType() == rn.GetType());
10741 VIXL_ASSERT(rd.GetType() == rm.GetType());
10742 if (rd.IsS()) {
10743 Vfms(cond, F32, rd.S(), rn.S(), rm.S());
10744 } else {
10745 Vfms(cond, F64, rd.D(), rn.D(), rm.D());
10746 }
10747 }
10748 void Vfms(VRegister rd, VRegister rn, VRegister rm) { Vfms(al, rd, rn, rm); }
10749 void Vfnma(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10750 VIXL_ASSERT(rd.IsS() || rd.IsD());
10751 VIXL_ASSERT(rd.GetType() == rn.GetType());
10752 VIXL_ASSERT(rd.GetType() == rm.GetType());
10753 if (rd.IsS()) {
10754 Vfnma(cond, F32, rd.S(), rn.S(), rm.S());
10755 } else {
10756 Vfnma(cond, F64, rd.D(), rn.D(), rm.D());
10757 }
10758 }
10759 void Vfnma(VRegister rd, VRegister rn, VRegister rm) {
10760 Vfnma(al, rd, rn, rm);
10761 }
10762 void Vfnms(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10763 VIXL_ASSERT(rd.IsS() || rd.IsD());
10764 VIXL_ASSERT(rd.GetType() == rn.GetType());
10765 VIXL_ASSERT(rd.GetType() == rm.GetType());
10766 if (rd.IsS()) {
10767 Vfnms(cond, F32, rd.S(), rn.S(), rm.S());
10768 } else {
10769 Vfnms(cond, F64, rd.D(), rn.D(), rm.D());
10770 }
10771 }
10772 void Vfnms(VRegister rd, VRegister rn, VRegister rm) {
10773 Vfnms(al, rd, rn, rm);
10774 }
10775 void Vmaxnm(VRegister rd, VRegister rn, VRegister rm) {
10776 VIXL_ASSERT(rd.IsS() || rd.IsD());
10777 VIXL_ASSERT(rd.GetType() == rn.GetType());
10778 VIXL_ASSERT(rd.GetType() == rm.GetType());
10779 if (rd.IsS()) {
10780 Vmaxnm(F32, rd.S(), rn.S(), rm.S());
10781 } else {
10782 Vmaxnm(F64, rd.D(), rn.D(), rm.D());
10783 }
10784 }
10785 void Vminnm(VRegister rd, VRegister rn, VRegister rm) {
10786 VIXL_ASSERT(rd.IsS() || rd.IsD());
10787 VIXL_ASSERT(rd.GetType() == rn.GetType());
10788 VIXL_ASSERT(rd.GetType() == rm.GetType());
10789 if (rd.IsS()) {
10790 Vminnm(F32, rd.S(), rn.S(), rm.S());
10791 } else {
10792 Vminnm(F64, rd.D(), rn.D(), rm.D());
10793 }
10794 }
10795 void Vmla(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10796 VIXL_ASSERT(rd.IsS() || rd.IsD());
10797 VIXL_ASSERT(rd.GetType() == rn.GetType());
10798 VIXL_ASSERT(rd.GetType() == rm.GetType());
10799 if (rd.IsS()) {
10800 Vmla(cond, F32, rd.S(), rn.S(), rm.S());
10801 } else {
10802 Vmla(cond, F64, rd.D(), rn.D(), rm.D());
10803 }
10804 }
10805 void Vmla(VRegister rd, VRegister rn, VRegister rm) { Vmla(al, rd, rn, rm); }
10806 void Vmls(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10807 VIXL_ASSERT(rd.IsS() || rd.IsD());
10808 VIXL_ASSERT(rd.GetType() == rn.GetType());
10809 VIXL_ASSERT(rd.GetType() == rm.GetType());
10810 if (rd.IsS()) {
10811 Vmls(cond, F32, rd.S(), rn.S(), rm.S());
10812 } else {
10813 Vmls(cond, F64, rd.D(), rn.D(), rm.D());
10814 }
10815 }
10816 void Vmls(VRegister rd, VRegister rn, VRegister rm) { Vmls(al, rd, rn, rm); }
10817 void Vmov(Condition cond, VRegister rd, VRegister rm) {
10818 VIXL_ASSERT(rd.IsS() || rd.IsD());
10819 VIXL_ASSERT(rd.GetType() == rm.GetType());
10820 if (rd.IsS()) {
10821 Vmov(cond, F32, rd.S(), rm.S());
10822 } else {
10823 Vmov(cond, F64, rd.D(), rm.D());
10824 }
10825 }
10826 void Vmov(VRegister rd, VRegister rm) { Vmov(al, rd, rm); }
10827 void Vmul(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10828 VIXL_ASSERT(rd.IsS() || rd.IsD());
10829 VIXL_ASSERT(rd.GetType() == rn.GetType());
10830 VIXL_ASSERT(rd.GetType() == rm.GetType());
10831 if (rd.IsS()) {
10832 Vmul(cond, F32, rd.S(), rn.S(), rm.S());
10833 } else {
10834 Vmul(cond, F64, rd.D(), rn.D(), rm.D());
10835 }
10836 }
10837 void Vmul(VRegister rd, VRegister rn, VRegister rm) { Vmul(al, rd, rn, rm); }
10838 void Vneg(Condition cond, VRegister rd, VRegister rm) {
10839 VIXL_ASSERT(rd.IsS() || rd.IsD());
10840 VIXL_ASSERT(rd.GetType() == rm.GetType());
10841 if (rd.IsS()) {
10842 Vneg(cond, F32, rd.S(), rm.S());
10843 } else {
10844 Vneg(cond, F64, rd.D(), rm.D());
10845 }
10846 }
10847 void Vneg(VRegister rd, VRegister rm) { Vneg(al, rd, rm); }
10848 void Vnmla(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10849 VIXL_ASSERT(rd.IsS() || rd.IsD());
10850 VIXL_ASSERT(rd.GetType() == rn.GetType());
10851 VIXL_ASSERT(rd.GetType() == rm.GetType());
10852 if (rd.IsS()) {
10853 Vnmla(cond, F32, rd.S(), rn.S(), rm.S());
10854 } else {
10855 Vnmla(cond, F64, rd.D(), rn.D(), rm.D());
10856 }
10857 }
10858 void Vnmla(VRegister rd, VRegister rn, VRegister rm) {
10859 Vnmla(al, rd, rn, rm);
10860 }
10861 void Vnmls(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10862 VIXL_ASSERT(rd.IsS() || rd.IsD());
10863 VIXL_ASSERT(rd.GetType() == rn.GetType());
10864 VIXL_ASSERT(rd.GetType() == rm.GetType());
10865 if (rd.IsS()) {
10866 Vnmls(cond, F32, rd.S(), rn.S(), rm.S());
10867 } else {
10868 Vnmls(cond, F64, rd.D(), rn.D(), rm.D());
10869 }
10870 }
10871 void Vnmls(VRegister rd, VRegister rn, VRegister rm) {
10872 Vnmls(al, rd, rn, rm);
10873 }
10874 void Vnmul(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10875 VIXL_ASSERT(rd.IsS() || rd.IsD());
10876 VIXL_ASSERT(rd.GetType() == rn.GetType());
10877 VIXL_ASSERT(rd.GetType() == rm.GetType());
10878 if (rd.IsS()) {
10879 Vnmul(cond, F32, rd.S(), rn.S(), rm.S());
10880 } else {
10881 Vnmul(cond, F64, rd.D(), rn.D(), rm.D());
10882 }
10883 }
10884 void Vnmul(VRegister rd, VRegister rn, VRegister rm) {
10885 Vnmul(al, rd, rn, rm);
10886 }
10887 void Vseleq(VRegister rd, VRegister rn, VRegister rm) {
10888 VIXL_ASSERT(rd.IsS() || rd.IsD());
10889 VIXL_ASSERT(rd.GetType() == rn.GetType());
10890 VIXL_ASSERT(rd.GetType() == rm.GetType());
10891 if (rd.IsS()) {
10892 Vseleq(F32, rd.S(), rn.S(), rm.S());
10893 } else {
10894 Vseleq(F64, rd.D(), rn.D(), rm.D());
10895 }
10896 }
10897 void Vselge(VRegister rd, VRegister rn, VRegister rm) {
10898 VIXL_ASSERT(rd.IsS() || rd.IsD());
10899 VIXL_ASSERT(rd.GetType() == rn.GetType());
10900 VIXL_ASSERT(rd.GetType() == rm.GetType());
10901 if (rd.IsS()) {
10902 Vselge(F32, rd.S(), rn.S(), rm.S());
10903 } else {
10904 Vselge(F64, rd.D(), rn.D(), rm.D());
10905 }
10906 }
10907 void Vselgt(VRegister rd, VRegister rn, VRegister rm) {
10908 VIXL_ASSERT(rd.IsS() || rd.IsD());
10909 VIXL_ASSERT(rd.GetType() == rn.GetType());
10910 VIXL_ASSERT(rd.GetType() == rm.GetType());
10911 if (rd.IsS()) {
10912 Vselgt(F32, rd.S(), rn.S(), rm.S());
10913 } else {
10914 Vselgt(F64, rd.D(), rn.D(), rm.D());
10915 }
10916 }
10917 void Vselvs(VRegister rd, VRegister rn, VRegister rm) {
10918 VIXL_ASSERT(rd.IsS() || rd.IsD());
10919 VIXL_ASSERT(rd.GetType() == rn.GetType());
10920 VIXL_ASSERT(rd.GetType() == rm.GetType());
10921 if (rd.IsS()) {
10922 Vselvs(F32, rd.S(), rn.S(), rm.S());
10923 } else {
10924 Vselvs(F64, rd.D(), rn.D(), rm.D());
10925 }
10926 }
10927 void Vsqrt(Condition cond, VRegister rd, VRegister rm) {
10928 VIXL_ASSERT(rd.IsS() || rd.IsD());
10929 VIXL_ASSERT(rd.GetType() == rm.GetType());
10930 if (rd.IsS()) {
10931 Vsqrt(cond, F32, rd.S(), rm.S());
10932 } else {
10933 Vsqrt(cond, F64, rd.D(), rm.D());
10934 }
10935 }
10936 void Vsqrt(VRegister rd, VRegister rm) { Vsqrt(al, rd, rm); }
10937 void Vsub(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10938 VIXL_ASSERT(rd.IsS() || rd.IsD());
10939 VIXL_ASSERT(rd.GetType() == rn.GetType());
10940 VIXL_ASSERT(rd.GetType() == rm.GetType());
10941 if (rd.IsS()) {
10942 Vsub(cond, F32, rd.S(), rn.S(), rm.S());
10943 } else {
10944 Vsub(cond, F64, rd.D(), rn.D(), rm.D());
10945 }
10946 }
10947 void Vsub(VRegister rd, VRegister rn, VRegister rm) { Vsub(al, rd, rn, rm); }
Alexandre Ramesd3832962016-07-04 15:03:43 +010010948 // End of generated code.
Vincent Belliardd17e3482016-11-22 15:46:43 -080010949
Pierre Langlois0cc43be2016-12-22 15:17:50 +000010950 virtual bool AllowUnpredictable() VIXL_OVERRIDE {
10951 VIXL_ABORT_WITH_MSG("Unpredictable instruction.\n");
10952 return false;
10953 }
10954 virtual bool AllowStronglyDiscouraged() VIXL_OVERRIDE {
10955 VIXL_ABORT_WITH_MSG(
10956 "ARM strongly recommends to not use this instruction.\n");
10957 return false;
10958 }
10959
Alexandre Ramesd3832962016-07-04 15:03:43 +010010960 private:
10961 RegisterList available_;
10962 VRegisterList available_vfp_;
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000010963 UseScratchRegisterScope* current_scratch_scope_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010010964 MacroAssemblerContext context_;
10965 Label::Offset checkpoint_;
10966 LiteralPoolManager literal_pool_manager_;
10967 VeneerPoolManager veneer_pool_manager_;
Pierre Langlois1e85b7f2016-08-05 14:20:36 +010010968 bool generate_simulator_code_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010010969 bool allow_macro_instructions_;
Vincent Belliardbd087d82016-11-29 10:40:03 -080010970 bool doing_veneer_pool_generation_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010010971};
10972
Alexandre Ramesd3832962016-07-04 15:03:43 +010010973// This scope utility allows scratch registers to be managed safely. The
10974// MacroAssembler's GetScratchRegisterList() is used as a pool of scratch
10975// registers. These registers can be allocated on demand, and will be returned
10976// at the end of the scope.
10977//
10978// When the scope ends, the MacroAssembler's lists will be restored to their
10979// original state, even if the lists were modified by some other means.
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000010980//
10981// Scopes must nest perfectly. That is, they must be destructed in reverse
10982// construction order. Otherwise, it is not clear how to handle cases where one
10983// scope acquires a register that was included in a now-closing scope. With
10984// perfect nesting, this cannot occur.
Alexandre Ramesd3832962016-07-04 15:03:43 +010010985class UseScratchRegisterScope {
10986 public:
10987 // This constructor implicitly calls the `Open` function to initialise the
10988 // scope, so it is ready to use immediately after it has been constructed.
10989 explicit UseScratchRegisterScope(MacroAssembler* masm)
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000010990 : masm_(NULL), parent_(NULL), old_available_(0), old_available_vfp_(0) {
Alexandre Ramesd3832962016-07-04 15:03:43 +010010991 Open(masm);
10992 }
10993 // This constructor allows deferred and optional initialisation of the scope.
10994 // The user is required to explicitly call the `Open` function before using
10995 // the scope.
10996 UseScratchRegisterScope()
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000010997 : masm_(NULL), parent_(NULL), old_available_(0), old_available_vfp_(0) {}
Alexandre Ramesd3832962016-07-04 15:03:43 +010010998
10999 // This function performs the actual initialisation work.
11000 void Open(MacroAssembler* masm);
11001
11002 // The destructor always implicitly calls the `Close` function.
11003 ~UseScratchRegisterScope() { Close(); }
11004
11005 // This function performs the cleaning-up work. It must succeed even if the
11006 // scope has not been opened. It is safe to call multiple times.
11007 void Close();
11008
11009 bool IsAvailable(const Register& reg) const;
11010 bool IsAvailable(const VRegister& reg) const;
11011
11012 // Take a register from the temp list. It will be returned automatically when
11013 // the scope ends.
11014 Register Acquire();
11015 VRegister AcquireV(unsigned size_in_bits);
11016 QRegister AcquireQ();
11017 DRegister AcquireD();
11018 SRegister AcquireS();
11019
11020 // Explicitly release an acquired (or excluded) register, putting it back in
11021 // the temp list.
11022 void Release(const Register& reg);
11023 void Release(const VRegister& reg);
11024
11025 // Make the specified registers available as scratch registers for the
11026 // duration of this scope.
11027 void Include(const RegisterList& list);
11028 void Include(const Register& reg1,
11029 const Register& reg2 = NoReg,
11030 const Register& reg3 = NoReg,
11031 const Register& reg4 = NoReg) {
11032 Include(RegisterList(reg1, reg2, reg3, reg4));
11033 }
11034 void Include(const VRegisterList& list);
11035 void Include(const VRegister& reg1,
11036 const VRegister& reg2 = NoVReg,
11037 const VRegister& reg3 = NoVReg,
11038 const VRegister& reg4 = NoVReg) {
11039 Include(VRegisterList(reg1, reg2, reg3, reg4));
11040 }
11041
11042 // Make sure that the specified registers are not available in this scope.
11043 // This can be used to prevent helper functions from using sensitive
11044 // registers, for example.
11045 void Exclude(const RegisterList& list);
11046 void Exclude(const Register& reg1,
11047 const Register& reg2 = NoReg,
11048 const Register& reg3 = NoReg,
11049 const Register& reg4 = NoReg) {
11050 Exclude(RegisterList(reg1, reg2, reg3, reg4));
11051 }
11052 void Exclude(const VRegisterList& list);
11053 void Exclude(const VRegister& reg1,
11054 const VRegister& reg2 = NoVReg,
11055 const VRegister& reg3 = NoVReg,
11056 const VRegister& reg4 = NoVReg) {
11057 Exclude(VRegisterList(reg1, reg2, reg3, reg4));
11058 }
11059
Jacob Bramley9ee25b52016-12-02 10:58:09 +000011060 // A convenience helper to exclude any registers used by the operand.
11061 void Exclude(const Operand& operand);
11062
Alexandre Ramesd3832962016-07-04 15:03:43 +010011063 // Prevent any scratch registers from being used in this scope.
11064 void ExcludeAll();
11065
11066 private:
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000011067 // The MacroAssembler maintains a list of available scratch registers, and
11068 // also keeps track of the most recently-opened scope so that on destruction
11069 // we can check that scopes do not outlive their parents.
11070 MacroAssembler* masm_;
11071 UseScratchRegisterScope* parent_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010011072
11073 // The state of the available lists at the start of this scope.
11074 uint32_t old_available_; // kRRegister
11075 uint64_t old_available_vfp_; // kVRegister
11076
11077 VIXL_DEBUG_NO_RETURN UseScratchRegisterScope(const UseScratchRegisterScope&) {
11078 VIXL_UNREACHABLE();
11079 }
11080 VIXL_DEBUG_NO_RETURN void operator=(const UseScratchRegisterScope&) {
11081 VIXL_UNREACHABLE();
11082 }
11083};
11084
11085class JumpTableBase {
11086 protected:
11087 JumpTableBase(int len, int offset_size)
11088 : table_location_(Label::kMaxOffset),
11089 branch_location_(Label::kMaxOffset),
11090 length_(len),
11091 offset_shift_(WhichPowerOf2(offset_size)),
11092 presence_(length_) {
11093 VIXL_ASSERT((length_ >= 0) && (offset_size <= 4));
11094 }
11095 virtual ~JumpTableBase() {}
11096
11097 public:
11098 int GetTableSizeInBytes() const { return length_ * (1 << offset_shift_); }
11099 int GetOffsetShift() const { return offset_shift_; }
11100 int GetLength() const { return length_; }
11101 Label* GetDefaultLabel() { return &default_; }
11102 Label* GetEndLabel() { return &end_; }
11103 void SetBranchLocation(uint32_t branch_location) {
11104 branch_location_ = branch_location;
11105 }
11106 uint32_t GetBranchLocation() const { return branch_location_; }
11107 void BindTable(uint32_t location) { table_location_ = location; }
11108 virtual void Link(MacroAssembler* masm,
11109 int case_index,
11110 uint32_t location) = 0;
11111
11112 uint32_t GetLocationForCase(int i) {
11113 VIXL_ASSERT((i >= 0) && (i < length_));
11114 return table_location_ + (i * (1 << offset_shift_));
11115 }
11116 void SetPresenceBitForCase(int i) {
11117 VIXL_ASSERT((i >= 0) && (i < length_));
11118 presence_.Set(i);
11119 }
11120
11121 void Finalize(MacroAssembler* masm) {
11122 if (!default_.IsBound()) {
11123 masm->Bind(&default_);
11124 }
11125 masm->Bind(&end_);
11126
11127 presence_.ForEachBitNotSet(LinkIt(this, masm, default_.GetLocation()));
11128 }
11129
11130 private:
11131 uint32_t table_location_;
11132 uint32_t branch_location_;
11133 const int length_;
11134 const int offset_shift_;
11135 BitField presence_;
11136 Label default_;
11137 Label end_;
11138 struct LinkIt {
11139 JumpTableBase* table_;
11140 MacroAssembler* const masm_;
11141 const uint32_t location_;
11142 LinkIt(JumpTableBase* table, MacroAssembler* const masm, uint32_t location)
11143 : table_(table), masm_(masm), location_(location) {}
11144 bool execute(int id) const {
11145 VIXL_ASSERT(id < table_->GetLength());
11146 table_->Link(masm_, static_cast<int>(id), location_);
11147 return true;
11148 }
11149 };
11150};
11151
11152// JumpTable<T>(len): Helper to describe a jump table
11153// len here describes the number of possible case. Values in [0, n[ can have a
11154// jump offset. Any other value will assert.
11155template <typename T>
11156class JumpTable : public JumpTableBase {
11157 protected:
11158 explicit JumpTable(int length) : JumpTableBase(length, sizeof(T)) {}
11159
11160 public:
Pierre Langlois3fac43c2016-10-31 13:38:47 +000011161 virtual void Link(MacroAssembler* masm,
11162 int case_index,
11163 uint32_t location) VIXL_OVERRIDE {
Alexandre Ramesd3832962016-07-04 15:03:43 +010011164 uint32_t position_in_table = GetLocationForCase(case_index);
11165 uint32_t from = GetBranchLocation();
11166 int offset = location - from;
Alexandre Rames919e3fe2016-10-14 09:07:54 +010011167 T* case_offset = masm->GetBuffer()->GetOffsetAddress<T*>(position_in_table);
Jacob Bramley10dae1a2016-07-27 09:45:13 +010011168 if (masm->IsUsingT32()) {
Alexandre Ramesd3832962016-07-04 15:03:43 +010011169 *case_offset = offset >> 1;
11170 } else {
11171 *case_offset = offset >> 2;
11172 }
11173 }
11174};
11175
11176class JumpTable8bitOffset : public JumpTable<uint8_t> {
11177 public:
11178 explicit JumpTable8bitOffset(int length) : JumpTable<uint8_t>(length) {}
11179};
11180
11181class JumpTable16bitOffset : public JumpTable<uint16_t> {
11182 public:
11183 explicit JumpTable16bitOffset(int length) : JumpTable<uint16_t>(length) {}
11184};
11185
11186class JumpTable32bitOffset : public JumpTable<uint32_t> {
11187 public:
11188 explicit JumpTable32bitOffset(int length) : JumpTable<uint32_t>(length) {}
11189};
11190
11191} // namespace aarch32
11192} // namespace vixl
11193
11194#endif // VIXL_AARCH32_MACRO_ASSEMBLER_AARCH32_H_