blob: 5f6bf04cbf695c9f0ce843da2c1582c928d308a7 [file] [log] [blame]
Alexandre Ramesd3832962016-07-04 15:03:43 +01001// Copyright 2015, VIXL authors
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are met:
6//
7// * Redistributions of source code must retain the above copyright notice,
8// this list of conditions and the following disclaimer.
9// * Redistributions in binary form must reproduce the above copyright
10// notice, this list of conditions and the following disclaimer in the
11// documentation and/or other materials provided with the distribution.
12// * Neither the name of ARM Limited nor the names of its contributors may
13// be used to endorse or promote products derived from this software
14// without specific prior written permission.
15//
16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND
17// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26// POSSIBILITY OF SUCH DAMAGE.
27
28#ifndef VIXL_AARCH32_MACRO_ASSEMBLER_AARCH32_H_
29#define VIXL_AARCH32_MACRO_ASSEMBLER_AARCH32_H_
30
31#include "utils-vixl.h"
32#include "aarch32/instructions-aarch32.h"
33#include "aarch32/assembler-aarch32.h"
Pierre Langlois989663e2016-11-24 13:11:08 +000034#include "aarch32/operands-aarch32.h"
Alexandre Ramesd3832962016-07-04 15:03:43 +010035
36namespace vixl {
37namespace aarch32 {
38
39class JumpTableBase;
40
Vincent Belliard934696d2016-08-18 11:03:56 -070041enum FlagsUpdate { LeaveFlags = 0, SetFlags = 1, DontCare = 2 };
42
Alexandre Ramesd3832962016-07-04 15:03:43 +010043// LiteralPool class, defined as a container for literals
44class LiteralPool {
45 public:
46 typedef std::list<RawLiteral*>::iterator RawLiteralListIterator;
47
48 public:
49 LiteralPool() : size_(0) {}
50 ~LiteralPool() {
51 VIXL_ASSERT(literals_.empty() && (size_ == 0));
52 for (RawLiteralListIterator literal_it = keep_until_delete_.begin();
53 literal_it != keep_until_delete_.end();
54 literal_it++) {
55 delete *literal_it;
56 }
57 keep_until_delete_.clear();
58 }
59
60 unsigned GetSize() const { return size_; }
61
62 // Add a literal to the literal container.
Vincent Belliard51d1ccc2016-09-22 10:17:11 -070063 void AddLiteral(RawLiteral* literal) {
64 if (literal->GetPositionInPool() == Label::kMaxOffset) {
65 uint32_t position = GetSize();
66 literal->SetPositionInPool(position);
67 literals_.push_back(literal);
68 size_ += literal->GetAlignedSize();
69 }
Alexandre Ramesd3832962016-07-04 15:03:43 +010070 }
71
72 // First literal to be emitted.
73 RawLiteralListIterator GetFirst() { return literals_.begin(); }
74
75 // Mark the end of the literal container.
76 RawLiteralListIterator GetEnd() { return literals_.end(); }
77
78 // Remove all the literals from the container.
79 // If the literal's memory management has been delegated to the container
80 // it will be delete'd.
81 void Clear() {
82 for (RawLiteralListIterator literal_it = GetFirst(); literal_it != GetEnd();
83 literal_it++) {
84 RawLiteral* literal = *literal_it;
85 switch (literal->GetDeletionPolicy()) {
86 case RawLiteral::kDeletedOnPlacementByPool:
87 delete literal;
88 break;
89 case RawLiteral::kDeletedOnPoolDestruction:
90 keep_until_delete_.push_back(literal);
91 break;
92 case RawLiteral::kManuallyDeleted:
93 break;
94 }
95 }
96 literals_.clear();
97 size_ = 0;
98 }
99
100 private:
101 // Size (in bytes and including alignments) of the literal pool.
102 unsigned size_;
103
104 // Literal container.
105 std::list<RawLiteral*> literals_;
106 // Already bound Literal container the app requested this pool to keep.
107 std::list<RawLiteral*> keep_until_delete_;
108};
109
110// Macro assembler for aarch32 instruction set.
111class MacroAssembler : public Assembler {
112 public:
113 enum EmitOption { kBranchRequired, kNoBranchRequired };
114
115 private:
Vincent Belliard8885c172016-08-24 11:33:19 -0700116 class AllowAssemblerEmissionScope {
117 MacroAssembler* masm_;
118
119 public:
120 AllowAssemblerEmissionScope(MacroAssembler* masm, uint32_t size)
121 : masm_(masm) {
122 VIXL_ASSERT(!masm->AllowAssembler());
123 masm->EnsureEmitFor(size);
124#ifdef VIXL_DEBUG
125 masm->SetAllowAssembler(true);
126#else
127 USE(masm_);
128#endif
129 }
130 ~AllowAssemblerEmissionScope() {
131#ifdef VIXL_DEBUG
132 VIXL_ASSERT(masm_->AllowAssembler());
133 masm_->SetAllowAssembler(false);
134#endif
135 }
136 };
137
Alexandre Ramesd3832962016-07-04 15:03:43 +0100138 class MacroAssemblerContext {
139 public:
140 MacroAssemblerContext() : count_(0) {}
141 ~MacroAssemblerContext() {}
142 unsigned GetRecursiveCount() const { return count_; }
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000143 void Up(const char* loc) {
144 location_stack_[count_] = loc;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100145 count_++;
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000146 if (count_ >= kMaxRecursion) {
147 printf(
148 "Recursion limit reached; unable to resolve macro assembler "
149 "call.\n");
150 printf("Macro assembler context stack:\n");
151 for (unsigned i = 0; i < kMaxRecursion; i++) {
152 printf("%10s %s\n", (i == 0) ? "oldest -> " : "", location_stack_[i]);
153 }
154 VIXL_ABORT();
155 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100156 }
157 void Down() {
158 VIXL_ASSERT((count_ > 0) && (count_ < kMaxRecursion));
159 count_--;
160 }
161
162 private:
163 unsigned count_;
164 static const uint32_t kMaxRecursion = 5;
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000165 const char* location_stack_[kMaxRecursion];
Alexandre Ramesd3832962016-07-04 15:03:43 +0100166 };
167
Vincent Belliard76887c12016-11-10 12:54:09 -0800168 // This scope is used at each Delegate entry to avoid infinite recursion of
169 // Delegate calls. The limit is defined by
170 // MacroAssemblerContext::kMaxRecursion.
Alexandre Ramesd3832962016-07-04 15:03:43 +0100171 class ContextScope {
172 public:
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000173 explicit ContextScope(MacroAssembler* const masm, const char* loc)
174 : masm_(masm) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100175 VIXL_ASSERT(masm_->AllowMacroInstructions());
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000176 masm_->GetContext()->Up(loc);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100177 }
178 ~ContextScope() { masm_->GetContext()->Down(); }
179
180 private:
181 MacroAssembler* const masm_;
182 };
183
184 MacroAssemblerContext* GetContext() { return &context_; }
185
186 class ITScope {
187 public:
188 ITScope(MacroAssembler* masm, Condition* cond, bool can_use_it = false)
189 : masm_(masm), cond_(*cond), can_use_it_(can_use_it) {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100190 if (!cond_.Is(al) && masm->IsUsingT32()) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100191 if (can_use_it_) {
192 // IT is not deprecated (that implies a 16 bit T32 instruction).
193 // We generate an IT instruction and a conditional instruction.
194 masm->it(cond_);
195 } else {
196 // The usage of IT is deprecated for the instruction.
197 // We generate a conditional branch and an unconditional instruction.
Jacob Bramleyaaac3972016-11-09 15:59:18 +0000198 // TODO: Use a scope utility with a size check. To do that, we'd need
199 // one with Open() and Close() implemented.
Alexandre Ramesd3832962016-07-04 15:03:43 +0100200 masm_->EnsureEmitFor(k16BitT32InstructionSizeInBytes +
201 kMaxT32MacroInstructionSizeInBytes);
202 // Generate the branch.
203 masm_->b(cond_.Negate(), Narrow, &label_);
204 // Tell the macro-assembler to generate unconditional instructions.
205 *cond = al;
206 }
207 }
208#ifdef VIXL_DEBUG
209 initial_cursor_offset_ = masm->GetCursorOffset();
Alexandre Ramesfd098172016-08-09 10:29:53 +0100210#else
211 USE(initial_cursor_offset_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100212#endif
213 }
214 ~ITScope() {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100215 if (!cond_.Is(al) && masm_->IsUsingT32() && !can_use_it_) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100216 VIXL_ASSERT(masm_->GetCursorOffset() - initial_cursor_offset_ <=
217 kMaxT32MacroInstructionSizeInBytes);
Vincent Belliarde42218c2016-10-19 13:24:28 -0700218 masm_->BindHelper(&label_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100219 }
220 }
221
222 private:
223 MacroAssembler* masm_;
224 Condition cond_;
225 Label label_;
226 bool can_use_it_;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100227 uint32_t initial_cursor_offset_;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100228 };
229
230 template <Assembler::InstructionCondDtDL asmfn>
231 class EmitLiteralCondDtDL {
232 public:
233 EmitLiteralCondDtDL(Condition cond, DataType dt, DRegister rt)
234 : cond_(cond), dt_(dt), rt_(rt) {}
235 void emit(MacroAssembler* const masm, RawLiteral* const literal) {
236 (masm->*asmfn)(cond_, dt_, rt_, literal);
237 }
238
239 private:
240 Condition cond_;
241 DataType dt_;
242 DRegister rt_;
243 };
244
245 template <Assembler::InstructionCondDtSL asmfn>
246 class EmitLiteralCondDtSL {
247 public:
248 EmitLiteralCondDtSL(Condition cond, DataType dt, SRegister rt)
249 : cond_(cond), dt_(dt), rt_(rt) {}
250 void emit(MacroAssembler* const masm, RawLiteral* const literal) {
251 (masm->*asmfn)(cond_, dt_, rt_, literal);
252 }
253
254 private:
255 Condition cond_;
256 DataType dt_;
257 SRegister rt_;
258 };
259
260 template <Assembler::InstructionCondRL asmfn>
261 class EmitLiteralCondRL {
262 public:
263 EmitLiteralCondRL(Condition cond, Register rt) : cond_(cond), rt_(rt) {}
264 void emit(MacroAssembler* const masm, RawLiteral* const literal) {
265 (masm->*asmfn)(cond_, rt_, literal);
266 }
267
268 private:
269 Condition cond_;
270 Register rt_;
271 };
272
273 template <Assembler::InstructionCondRRL asmfn>
274 class EmitLiteralCondRRL {
275 public:
276 EmitLiteralCondRRL(Condition cond, Register rt, Register rt2)
277 : cond_(cond), rt_(rt), rt2_(rt2) {}
278 void emit(MacroAssembler* const masm, RawLiteral* const literal) {
279 (masm->*asmfn)(cond_, rt_, rt2_, literal);
280 }
281
282 private:
283 Condition cond_;
284 Register rt_, rt2_;
285 };
286
287 class LiteralPoolManager {
288 public:
289 explicit LiteralPoolManager(MacroAssembler* const masm) : masm_(masm) {
290 ResetCheckpoint();
291 }
292
293 void ResetCheckpoint() { checkpoint_ = Label::kMaxOffset; }
294
295 LiteralPool* GetLiteralPool() { return &literal_pool_; }
296 Label::Offset GetCheckpoint() const {
297 // Make room for a branch over the pools.
298 return checkpoint_ - kMaxInstructionSizeInBytes;
299 }
300 size_t GetLiteralPoolSize() const { return literal_pool_.GetSize(); }
301
302 // Checks if the insertion of the literal will put the forward reference
303 // too far in the literal pool.
304 bool IsInsertTooFar(RawLiteral* literal, uint32_t from) const {
305 uint32_t checkpoint = from + literal->GetLastInsertForwardDistance();
306 checkpoint =
307 std::min(checkpoint, static_cast<uint32_t>(literal->GetCheckpoint()));
308 bool too_far = AlignDown(checkpoint, 4) < from + literal_pool_.GetSize() +
309 kMaxInstructionSizeInBytes;
310 return too_far;
311 }
312
313 // Set the different checkpoints where the literal pool has to be emited.
314 void UpdateCheckpoint(RawLiteral* literal) {
315 // The literal should have been placed somewhere in the literal pool
316 VIXL_ASSERT(literal->GetPositionInPool() != Label::kMaxOffset);
317 // TODO(all): Consider AddForwardRef as a virtual so the checkpoint is
318 // updated when inserted. Or move checkpoint_ into Label,
319 literal->UpdateCheckpoint();
320 Label::Offset tmp =
321 literal->GetAlignedCheckpoint(4) - literal->GetPositionInPool();
322 if (checkpoint_ > tmp) {
323 checkpoint_ = tmp;
324 masm_->ComputeCheckpoint();
325 }
326 }
327
Alexandre Rames4e6b4af2016-11-08 16:04:55 +0000328 bool IsEmpty() const { return GetLiteralPoolSize() == 0; }
329
Alexandre Ramesd3832962016-07-04 15:03:43 +0100330 private:
331 MacroAssembler* const masm_;
332 LiteralPool literal_pool_;
333
334 // Max offset in the code buffer where the literal needs to be
335 // emitted. A default value of Label::kMaxOffset means that the checkpoint
336 // is invalid.
337 Label::Offset checkpoint_;
338 };
339
Alexandre Ramesd3832962016-07-04 15:03:43 +0100340 void PerformEnsureEmit(Label::Offset target, uint32_t extra_size);
341
342 protected:
343 void HandleOutOfBoundsImmediate(Condition cond, Register tmp, uint32_t imm);
Vincent Belliardf8833fa2016-11-08 15:01:57 -0800344 void PadToMinimumBranchRange(Label* label);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100345
346 // Generate the instruction and if it's not possible revert the whole thing.
347 // emit the literal pool and regenerate the instruction.
348 // Note: The instruction is generated via
349 // void T::emit(MacroAssembler* const, RawLiteral* const)
350 template <typename T>
351 void GenerateInstruction(T instr_callback, RawLiteral* const literal) {
Pierre Langloisf5348ce2016-09-22 11:15:35 +0100352 int32_t cursor = GetCursorOffset();
Alexandre Ramesd3832962016-07-04 15:03:43 +0100353 uint32_t where = cursor + GetArchitectureStatePCOffset();
354 // Emit the instruction, via the assembler
Vincent Belliard8885c172016-08-24 11:33:19 -0700355 {
356 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
357 instr_callback.emit(this, literal);
358 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700359 if (!literal->IsManuallyPlaced()) {
360 if (IsInsertTooFar(literal, where)) {
361 // The instruction's data is too far: revert the emission
Alexandre Rames919e3fe2016-10-14 09:07:54 +0100362 GetBuffer()->Rewind(cursor);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700363 literal->InvalidateLastForwardReference(RawLiteral::kNoUpdateNecessary);
364 EmitLiteralPool(kBranchRequired);
365 AllowAssemblerEmissionScope allow_scope(this,
366 kMaxInstructionSizeInBytes);
367 instr_callback.emit(this, literal);
368 }
369 literal_pool_manager_.GetLiteralPool()->AddLiteral(literal);
370 literal_pool_manager_.UpdateCheckpoint(literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100371 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100372 }
373
374 public:
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100375 explicit MacroAssembler(InstructionSet isa = A32)
376 : Assembler(isa),
Alexandre Ramesd3832962016-07-04 15:03:43 +0100377 available_(r12),
378 checkpoint_(Label::kMaxOffset),
379 literal_pool_manager_(this),
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100380 veneer_pool_manager_(this),
381 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE) {
Vincent Belliard8885c172016-08-24 11:33:19 -0700382 SetAllowAssembler(false);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100383#ifdef VIXL_DEBUG
384 SetAllowMacroInstructions(true);
Alexandre Ramesfd098172016-08-09 10:29:53 +0100385#else
386 USE(literal_pool_manager_);
387 USE(allow_macro_instructions_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100388#endif
389 ComputeCheckpoint();
390 }
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100391 explicit MacroAssembler(size_t size, InstructionSet isa = A32)
392 : Assembler(size, isa),
393 available_(r12),
394 checkpoint_(Label::kMaxOffset),
395 literal_pool_manager_(this),
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100396 veneer_pool_manager_(this),
397 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE) {
Vincent Belliard8885c172016-08-24 11:33:19 -0700398 SetAllowAssembler(false);
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100399#ifdef VIXL_DEBUG
400 SetAllowMacroInstructions(true);
401#endif
402 ComputeCheckpoint();
403 }
Alexandre Rames919e3fe2016-10-14 09:07:54 +0100404 MacroAssembler(byte* buffer, size_t size, InstructionSet isa = A32)
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100405 : Assembler(buffer, size, isa),
Alexandre Ramesd3832962016-07-04 15:03:43 +0100406 available_(r12),
407 checkpoint_(Label::kMaxOffset),
408 literal_pool_manager_(this),
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100409 veneer_pool_manager_(this),
410 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE) {
Vincent Belliard8885c172016-08-24 11:33:19 -0700411 SetAllowAssembler(false);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100412#ifdef VIXL_DEBUG
413 SetAllowMacroInstructions(true);
414#endif
415 ComputeCheckpoint();
416 }
417
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100418 bool GenerateSimulatorCode() const { return generate_simulator_code_; }
419
Alexandre Ramesd3832962016-07-04 15:03:43 +0100420#ifdef VIXL_DEBUG
421 // Tell whether any of the macro instruction can be used. When false the
422 // MacroAssembler will assert if a method which can emit a variable number
423 // of instructions is called.
424 void SetAllowMacroInstructions(bool value) {
425 allow_macro_instructions_ = value;
426 }
427 bool AllowMacroInstructions() const { return allow_macro_instructions_; }
428#endif
429
430 void FinalizeCode() {
431 EmitLiteralPool(kNoBranchRequired);
432 Assembler::FinalizeCode();
433 }
434
435 RegisterList* GetScratchRegisterList() { return &available_; }
436 VRegisterList* GetScratchVRegisterList() { return &available_vfp_; }
437
438 // State and type helpers.
439 bool IsModifiedImmediate(uint32_t imm) {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100440 return (IsUsingT32() && ImmediateT32(imm).IsValid()) ||
Alexandre Ramesd3832962016-07-04 15:03:43 +0100441 ImmediateA32(imm).IsValid();
442 }
443
444 void Bind(Label* label) {
445 VIXL_ASSERT(allow_macro_instructions_);
Vincent Belliardf8833fa2016-11-08 15:01:57 -0800446 PadToMinimumBranchRange(label);
Vincent Belliarde42218c2016-10-19 13:24:28 -0700447 BindHelper(label);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100448 }
449
450 void AddBranchLabel(Label* label) {
451 if (label->IsBound()) return;
452 veneer_pool_manager_.AddLabel(label);
453 }
454
455 void Place(RawLiteral* literal) {
456 VIXL_ASSERT(allow_macro_instructions_);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700457 VIXL_ASSERT(literal->IsManuallyPlaced());
Alexandre Ramesfd7a00d2016-11-09 14:38:04 +0000458 // We have two calls to `GetBuffer()->Align()` below, that aligns on word
459 // (4 bytes) boundaries. Only one is taken into account in
460 // `GetAlignedSize()`.
461 static const size_t kMaxAlignSize = 3;
462 size_t size = literal->GetAlignedSize() + kMaxAlignSize;
463 VIXL_ASSERT(IsUint32(size));
464 // TODO: We should use a scope here to check the size of data emitted. We
465 // currently cannot because `aarch32::CodeBufferCheckScope` currently checks
466 // for pools, so that could lead to an infinite loop.
467 EnsureEmitFor(static_cast<uint32_t>(size));
468 // Literals must be emitted aligned on word (4 bytes) boundaries.
469 GetBuffer()->Align();
Vincent Belliarde42218c2016-10-19 13:24:28 -0700470 PlaceHelper(literal);
471 GetBuffer()->Align();
Alexandre Ramesd3832962016-07-04 15:03:43 +0100472 }
473
474 void ComputeCheckpoint();
475
Vincent Belliarddcffac42016-10-19 11:31:20 -0700476 int32_t GetMarginBeforeVeneerEmission() const {
477 return veneer_pool_manager_.GetCheckpoint() - GetCursorOffset();
478 }
479
Alexandre Rames0eb25b02016-11-22 16:35:55 +0000480 int32_t GetMarginBeforeLiteralEmission() const {
Vincent Belliarddcffac42016-10-19 11:31:20 -0700481 return literal_pool_manager_.GetCheckpoint() - GetCursorOffset();
482 }
483
Alexandre Rames4e6b4af2016-11-08 16:04:55 +0000484 bool VeneerPoolIsEmpty() const { return veneer_pool_manager_.IsEmpty(); }
485 bool LiteralPoolIsEmpty() const { return literal_pool_manager_.IsEmpty(); }
Vincent Belliarddcffac42016-10-19 11:31:20 -0700486
Alexandre Ramesd3832962016-07-04 15:03:43 +0100487 void EnsureEmitFor(uint32_t size) {
Alexandre Ramesfd7a00d2016-11-09 14:38:04 +0000488 Label::Offset target = GetCursorOffset() + size;
Vincent Belliard40b7e472016-11-09 09:46:30 -0800489 if (target <= checkpoint_) return;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100490 PerformEnsureEmit(target, size);
491 }
492
493 bool IsInsertTooFar(RawLiteral* literal, uint32_t where) {
494 return literal_pool_manager_.IsInsertTooFar(literal, where);
495 }
496
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000497 bool AliasesAvailableScratchRegister(Register reg) {
498 return GetScratchRegisterList()->Includes(reg);
499 }
500
501 bool AliasesAvailableScratchRegister(VRegister reg) {
502 return GetScratchVRegisterList()->IncludesAliasOf(reg);
503 }
504
505 bool AliasesAvailableScratchRegister(const Operand& operand) {
506 if (operand.IsImmediate()) return false;
507 return AliasesAvailableScratchRegister(operand.GetBaseRegister()) ||
508 (operand.IsRegisterShiftedRegister() &&
509 AliasesAvailableScratchRegister(operand.GetShiftRegister()));
510 }
511
512 bool AliasesAvailableScratchRegister(const NeonOperand& operand) {
513 if (operand.IsImmediate()) return false;
514 return AliasesAvailableScratchRegister(operand.GetRegister());
515 }
516
517 bool AliasesAvailableScratchRegister(SRegisterList list) {
518 for (int n = 0; n < list.GetLength(); n++) {
519 if (AliasesAvailableScratchRegister(list.GetSRegister(n))) return true;
520 }
521 return false;
522 }
523
524 bool AliasesAvailableScratchRegister(DRegisterList list) {
525 for (int n = 0; n < list.GetLength(); n++) {
526 if (AliasesAvailableScratchRegister(list.GetDRegister(n))) return true;
527 }
528 return false;
529 }
530
531 bool AliasesAvailableScratchRegister(NeonRegisterList list) {
532 for (int n = 0; n < list.GetLength(); n++) {
533 if (AliasesAvailableScratchRegister(list.GetDRegister(n))) return true;
534 }
535 return false;
536 }
537
538 bool AliasesAvailableScratchRegister(RegisterList list) {
539 return GetScratchRegisterList()->Overlaps(list);
540 }
541
542 bool AliasesAvailableScratchRegister(const MemOperand& operand) {
543 return AliasesAvailableScratchRegister(operand.GetBaseRegister()) ||
544 (operand.IsShiftedRegister() &&
545 AliasesAvailableScratchRegister(operand.GetOffsetRegister()));
546 }
547
Alexandre Ramesd3832962016-07-04 15:03:43 +0100548 // Emit the literal pool in the code buffer.
549 // Every literal is placed on a 32bit boundary
550 // All the literals in the pool will be removed from the pool and potentially
551 // delete'd.
552 void EmitLiteralPool(LiteralPool* const literal_pool, EmitOption option) {
553 if (literal_pool->GetSize() > 0) {
554#ifdef VIXL_DEBUG
555 for (LiteralPool::RawLiteralListIterator literal_it =
556 literal_pool->GetFirst();
557 literal_it != literal_pool->GetEnd();
558 literal_it++) {
559 RawLiteral* literal = *literal_it;
Pierre Langloisf5348ce2016-09-22 11:15:35 +0100560 VIXL_ASSERT(GetCursorOffset() < literal->GetCheckpoint());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100561 }
562#endif
563 Label after_literal;
564 if (option == kBranchRequired) {
Alexandre Rames919e3fe2016-10-14 09:07:54 +0100565 GetBuffer()->EnsureSpaceFor(kMaxInstructionSizeInBytes);
Vincent Belliard8885c172016-08-24 11:33:19 -0700566#ifdef VIXL_DEBUG
Vincent Belliarddcffac42016-10-19 11:31:20 -0700567 bool save_assembler_state = AllowAssembler();
Vincent Belliard8885c172016-08-24 11:33:19 -0700568 SetAllowAssembler(true);
569#endif
Alexandre Ramesd3832962016-07-04 15:03:43 +0100570 b(&after_literal);
Vincent Belliard8885c172016-08-24 11:33:19 -0700571#ifdef VIXL_DEBUG
Vincent Belliarddcffac42016-10-19 11:31:20 -0700572 SetAllowAssembler(save_assembler_state);
Vincent Belliard8885c172016-08-24 11:33:19 -0700573#endif
Alexandre Ramesd3832962016-07-04 15:03:43 +0100574 }
Alexandre Rames919e3fe2016-10-14 09:07:54 +0100575 GetBuffer()->Align();
576 GetBuffer()->EnsureSpaceFor(literal_pool->GetSize());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100577 for (LiteralPool::RawLiteralListIterator it = literal_pool->GetFirst();
578 it != literal_pool->GetEnd();
579 it++) {
Vincent Belliarde42218c2016-10-19 13:24:28 -0700580 PlaceHelper(*it);
581 GetBuffer()->Align();
Alexandre Ramesd3832962016-07-04 15:03:43 +0100582 }
Vincent Belliarde42218c2016-10-19 13:24:28 -0700583 if (option == kBranchRequired) BindHelper(&after_literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100584 literal_pool->Clear();
585 }
586 }
587 void EmitLiteralPool(EmitOption option = kBranchRequired) {
588 EmitLiteralPool(literal_pool_manager_.GetLiteralPool(), option);
589 literal_pool_manager_.ResetCheckpoint();
590 ComputeCheckpoint();
591 }
592
Pierre Langloisf5348ce2016-09-22 11:15:35 +0100593 size_t GetLiteralPoolSize() const {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100594 return literal_pool_manager_.GetLiteralPoolSize();
595 }
596
Pierre Langlois25e39872016-10-20 17:14:21 +0100597 // Adr with a literal already constructed. Add the literal to the pool if it
598 // is not already done.
599 void Adr(Condition cond, Register rd, RawLiteral* literal) {
600 EmitLiteralCondRL<&Assembler::adr> emit_helper(cond, rd);
601 GenerateInstruction(emit_helper, literal);
602 }
603 void Adr(Register rd, RawLiteral* literal) { Adr(al, rd, literal); }
604
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700605 // Loads with literals already constructed. Add the literal to the pool
606 // if it is not already done.
607 void Ldr(Condition cond, Register rt, RawLiteral* literal) {
608 EmitLiteralCondRL<&Assembler::ldr> emit_helper(cond, rt);
609 GenerateInstruction(emit_helper, literal);
610 }
611 void Ldr(Register rt, RawLiteral* literal) { Ldr(al, rt, literal); }
612
613 void Ldrb(Condition cond, Register rt, RawLiteral* literal) {
614 EmitLiteralCondRL<&Assembler::ldrb> emit_helper(cond, rt);
615 GenerateInstruction(emit_helper, literal);
616 }
617 void Ldrb(Register rt, RawLiteral* literal) { Ldrb(al, rt, literal); }
618
619 void Ldrd(Condition cond, Register rt, Register rt2, RawLiteral* literal) {
620 EmitLiteralCondRRL<&Assembler::ldrd> emit_helper(cond, rt, rt2);
621 GenerateInstruction(emit_helper, literal);
622 }
623 void Ldrd(Register rt, Register rt2, RawLiteral* literal) {
624 Ldrd(al, rt, rt2, literal);
625 }
626
627 void Ldrh(Condition cond, Register rt, RawLiteral* literal) {
628 EmitLiteralCondRL<&Assembler::ldrh> emit_helper(cond, rt);
629 GenerateInstruction(emit_helper, literal);
630 }
631 void Ldrh(Register rt, RawLiteral* literal) { Ldrh(al, rt, literal); }
632
633 void Ldrsb(Condition cond, Register rt, RawLiteral* literal) {
634 EmitLiteralCondRL<&Assembler::ldrsb> emit_helper(cond, rt);
635 GenerateInstruction(emit_helper, literal);
636 }
637 void Ldrsb(Register rt, RawLiteral* literal) { Ldrsb(al, rt, literal); }
638
639 void Ldrsh(Condition cond, Register rt, RawLiteral* literal) {
640 EmitLiteralCondRL<&Assembler::ldrsh> emit_helper(cond, rt);
641 GenerateInstruction(emit_helper, literal);
642 }
643 void Ldrsh(Register rt, RawLiteral* literal) { Ldrsh(al, rt, literal); }
644
645 void Vldr(Condition cond, DataType dt, DRegister rd, RawLiteral* literal) {
646 EmitLiteralCondDtDL<&Assembler::vldr> emit_helper(cond, dt, rd);
647 GenerateInstruction(emit_helper, literal);
648 }
649 void Vldr(DataType dt, DRegister rd, RawLiteral* literal) {
650 Vldr(al, dt, rd, literal);
651 }
652 void Vldr(Condition cond, DRegister rd, RawLiteral* literal) {
653 Vldr(cond, Untyped64, rd, literal);
654 }
655 void Vldr(DRegister rd, RawLiteral* literal) {
656 Vldr(al, Untyped64, rd, literal);
657 }
658
659 void Vldr(Condition cond, DataType dt, SRegister rd, RawLiteral* literal) {
660 EmitLiteralCondDtSL<&Assembler::vldr> emit_helper(cond, dt, rd);
661 GenerateInstruction(emit_helper, literal);
662 }
663 void Vldr(DataType dt, SRegister rd, RawLiteral* literal) {
664 Vldr(al, dt, rd, literal);
665 }
666 void Vldr(Condition cond, SRegister rd, RawLiteral* literal) {
667 Vldr(cond, Untyped32, rd, literal);
668 }
669 void Vldr(SRegister rd, RawLiteral* literal) {
670 Vldr(al, Untyped32, rd, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100671 }
672
673 // Generic Ldr(register, data)
674 void Ldr(Condition cond, Register rt, uint32_t v) {
675 RawLiteral* literal =
676 new Literal<uint32_t>(v, RawLiteral::kDeletedOnPlacementByPool);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100677 EmitLiteralCondRL<&Assembler::ldr> emit_helper(cond, rt);
678 GenerateInstruction(emit_helper, literal);
679 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100680 template <typename T>
681 void Ldr(Register rt, T v) {
682 Ldr(al, rt, v);
683 }
684
685 // Generic Ldrd(rt, rt2, data)
686 void Ldrd(Condition cond, Register rt, Register rt2, uint64_t v) {
687 RawLiteral* literal =
688 new Literal<uint64_t>(v, RawLiteral::kDeletedOnPlacementByPool);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100689 EmitLiteralCondRRL<&Assembler::ldrd> emit_helper(cond, rt, rt2);
690 GenerateInstruction(emit_helper, literal);
691 }
692 template <typename T>
693 void Ldrd(Register rt, Register rt2, T v) {
694 Ldrd(al, rt, rt2, v);
695 }
696
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700697 void Vldr(Condition cond, SRegister rd, float v) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100698 RawLiteral* literal =
699 new Literal<float>(v, RawLiteral::kDeletedOnPlacementByPool);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700700 EmitLiteralCondDtSL<&Assembler::vldr> emit_helper(cond, Untyped32, rd);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100701 GenerateInstruction(emit_helper, literal);
702 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700703 void Vldr(SRegister rd, float v) { Vldr(al, rd, v); }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100704
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700705 void Vldr(Condition cond, DRegister rd, double v) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100706 RawLiteral* literal =
707 new Literal<double>(v, RawLiteral::kDeletedOnPlacementByPool);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700708 EmitLiteralCondDtDL<&Assembler::vldr> emit_helper(cond, Untyped64, rd);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100709 GenerateInstruction(emit_helper, literal);
710 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700711 void Vldr(DRegister rd, double v) { Vldr(al, rd, v); }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100712
713 void Vmov(Condition cond, DRegister rt, double v) { Vmov(cond, F64, rt, v); }
714 void Vmov(DRegister rt, double v) { Vmov(al, F64, rt, v); }
715 void Vmov(Condition cond, SRegister rt, float v) { Vmov(cond, F32, rt, v); }
716 void Vmov(SRegister rt, float v) { Vmov(al, F32, rt, v); }
717
718 void Switch(Register reg, JumpTableBase* table);
Vincent Belliard8885c172016-08-24 11:33:19 -0700719 void GenerateSwitchTable(JumpTableBase* table, int table_size);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100720 void Case(JumpTableBase* table, int case_index);
721 void Break(JumpTableBase* table);
722 void Default(JumpTableBase* table);
723 void EndSwitch(JumpTableBase* table);
724
Alexandre Ramesad91cee2016-07-26 09:31:34 +0100725 // Claim memory on the stack.
726 // Note that the Claim, Drop, and Peek helpers below ensure that offsets used
727 // are multiples of 32 bits to help maintain 32-bit SP alignment.
728 // We could `Align{Up,Down}(size, 4)`, but that's potentially problematic:
Alexandre Ramesd3832962016-07-04 15:03:43 +0100729 // Claim(3)
730 // Claim(1)
731 // Drop(4)
732 // would seem correct, when in fact:
733 // Claim(3) -> sp = sp - 4
Alexandre Ramesad91cee2016-07-26 09:31:34 +0100734 // Claim(1) -> sp = sp - 4
Alexandre Ramesd3832962016-07-04 15:03:43 +0100735 // Drop(4) -> sp = sp + 4
736 //
737 void Claim(int32_t size) {
738 if (size == 0) return;
739 // The stack must be kept 32bit aligned.
740 VIXL_ASSERT((size > 0) && ((size % 4) == 0));
741 Sub(sp, sp, size);
742 }
743 // Release memory on the stack
744 void Drop(int32_t size) {
745 if (size == 0) return;
746 // The stack must be kept 32bit aligned.
747 VIXL_ASSERT((size > 0) && ((size % 4) == 0));
748 Add(sp, sp, size);
749 }
750 void Peek(Register dst, int32_t offset) {
751 VIXL_ASSERT((offset >= 0) && ((offset % 4) == 0));
752 Ldr(dst, MemOperand(sp, offset));
753 }
754 void Poke(Register src, int32_t offset) {
755 VIXL_ASSERT((offset >= 0) && ((offset % 4) == 0));
756 Str(src, MemOperand(sp, offset));
757 }
758 void Printf(const char* format,
759 CPURegister reg1 = NoReg,
760 CPURegister reg2 = NoReg,
761 CPURegister reg3 = NoReg,
762 CPURegister reg4 = NoReg);
763 // Functions used by Printf for generation.
764 void PushRegister(CPURegister reg);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100765 void PreparePrintfArgument(CPURegister reg,
766 int* core_count,
767 int* vfp_count,
768 uint32_t* printf_type);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100769 // Handlers for cases not handled by the assembler.
770 virtual void Delegate(InstructionType type,
771 InstructionCondROp instruction,
772 Condition cond,
773 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000774 const Operand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100775 virtual void Delegate(InstructionType type,
776 InstructionCondSizeROp instruction,
777 Condition cond,
778 EncodingSize size,
779 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000780 const Operand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100781 virtual void Delegate(InstructionType type,
782 InstructionCondRROp instruction,
783 Condition cond,
784 Register rd,
785 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000786 const Operand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100787 virtual void Delegate(InstructionType type,
788 InstructionCondSizeRROp instruction,
789 Condition cond,
790 EncodingSize size,
791 Register rd,
792 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000793 const Operand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100794 virtual void Delegate(InstructionType type,
795 InstructionRL instruction,
796 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000797 Label* label) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100798 virtual void Delegate(InstructionType type,
799 InstructionCondDtSSop instruction,
800 Condition cond,
801 DataType dt,
802 SRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000803 const SOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100804 virtual void Delegate(InstructionType type,
805 InstructionCondDtDDop instruction,
806 Condition cond,
807 DataType dt,
808 DRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000809 const DOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100810 virtual void Delegate(InstructionType type,
811 InstructionCondDtQQop instruction,
812 Condition cond,
813 DataType dt,
814 QRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000815 const QOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100816 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100817 InstructionCondSizeRMop instruction,
818 Condition cond,
819 EncodingSize size,
820 Register rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000821 const MemOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100822 virtual void Delegate(InstructionType type,
823 InstructionCondRRMop instruction,
824 Condition cond,
825 Register rt,
826 Register rt2,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000827 const MemOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100828 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100829 InstructionCondDtSMop instruction,
830 Condition cond,
831 DataType dt,
832 SRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000833 const MemOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100834 virtual void Delegate(InstructionType type,
835 InstructionCondDtDMop instruction,
836 Condition cond,
837 DataType dt,
838 DRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000839 const MemOperand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100840 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100841 InstructionCondMsrOp instruction,
842 Condition cond,
843 MaskedSpecialRegister spec_reg,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000844 const Operand& operand) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100845
846 // Start of generated code.
847
848 void Adc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000849 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
850 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
851 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +0100852 VIXL_ASSERT(allow_macro_instructions_);
853 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -0700854 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100855 bool can_use_it =
856 // ADC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
857 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) &&
858 operand.GetBaseRegister().IsLow();
859 ITScope it_scope(this, &cond, can_use_it);
860 adc(cond, rd, rn, operand);
861 }
862 void Adc(Register rd, Register rn, const Operand& operand) {
863 Adc(al, rd, rn, operand);
864 }
Vincent Belliard934696d2016-08-18 11:03:56 -0700865 void Adc(FlagsUpdate flags,
866 Condition cond,
867 Register rd,
868 Register rn,
869 const Operand& operand) {
870 switch (flags) {
871 case LeaveFlags:
872 Adc(cond, rd, rn, operand);
873 break;
874 case SetFlags:
875 Adcs(cond, rd, rn, operand);
876 break;
877 case DontCare:
878 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
879 rn.Is(rd) && operand.IsPlainRegister() &&
880 operand.GetBaseRegister().IsLow();
881 if (can_be_16bit_encoded) {
882 Adcs(cond, rd, rn, operand);
883 } else {
884 Adc(cond, rd, rn, operand);
885 }
886 break;
887 }
888 }
889 void Adc(FlagsUpdate flags,
890 Register rd,
891 Register rn,
892 const Operand& operand) {
893 Adc(flags, al, rd, rn, operand);
894 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100895
896 void Adcs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000897 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
898 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
899 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +0100900 VIXL_ASSERT(allow_macro_instructions_);
901 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -0700902 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100903 ITScope it_scope(this, &cond);
904 adcs(cond, rd, rn, operand);
905 }
906 void Adcs(Register rd, Register rn, const Operand& operand) {
907 Adcs(al, rd, rn, operand);
908 }
909
910 void Add(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000911 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
912 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
913 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +0100914 VIXL_ASSERT(allow_macro_instructions_);
915 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -0700916 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Rames628c5262016-09-21 11:52:30 +0100917 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
918 uint32_t immediate = operand.GetImmediate();
919 if (immediate == 0) {
920 return;
921 }
922 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100923 bool can_use_it =
924 // ADD<c>{<q>} <Rd>, <Rn>, #<imm3> ; T1
925 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() &&
926 rd.IsLow()) ||
927 // ADD<c>{<q>} {<Rdn>,} <Rdn>, #<imm8> ; T2
928 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
929 rd.IsLow() && rn.Is(rd)) ||
930 // ADD{<c>}{<q>} <Rd>, SP, #<imm8> ; T1
931 (operand.IsImmediate() && (operand.GetImmediate() <= 508) &&
932 ((operand.GetImmediate() & 0x3) == 0) && rd.IsLow() && rn.IsSP()) ||
933 // ADD<c>{<q>} <Rd>, <Rn>, <Rm>
934 (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
935 operand.GetBaseRegister().IsLow()) ||
936 // ADD<c>{<q>} <Rdn>, <Rm> ; T2
937 (operand.IsPlainRegister() && !rd.IsPC() && rn.Is(rd) &&
938 !operand.GetBaseRegister().IsSP() &&
939 !operand.GetBaseRegister().IsPC()) ||
940 // ADD{<c>}{<q>} {<Rdm>,} SP, <Rdm> ; T1
941 (operand.IsPlainRegister() && !rd.IsPC() && rn.IsSP() &&
942 operand.GetBaseRegister().Is(rd));
943 ITScope it_scope(this, &cond, can_use_it);
944 add(cond, rd, rn, operand);
945 }
946 void Add(Register rd, Register rn, const Operand& operand) {
947 Add(al, rd, rn, operand);
948 }
Vincent Belliard934696d2016-08-18 11:03:56 -0700949 void Add(FlagsUpdate flags,
950 Condition cond,
951 Register rd,
952 Register rn,
953 const Operand& operand) {
954 switch (flags) {
955 case LeaveFlags:
956 Add(cond, rd, rn, operand);
957 break;
958 case SetFlags:
959 Adds(cond, rd, rn, operand);
960 break;
961 case DontCare:
962 bool can_be_16bit_encoded =
963 IsUsingT32() && cond.Is(al) &&
964 ((operand.IsPlainRegister() &&
965 ((rd.IsLow() && rn.IsLow() &&
966 operand.GetBaseRegister().IsLow()) ||
967 rd.Is(rn))) ||
968 (operand.IsImmediate() &&
969 ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) ||
970 (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256)))));
971 if (can_be_16bit_encoded) {
972 Adds(cond, rd, rn, operand);
973 } else {
974 Add(cond, rd, rn, operand);
975 }
976 break;
977 }
978 }
979 void Add(FlagsUpdate flags,
980 Register rd,
981 Register rn,
982 const Operand& operand) {
983 Add(flags, al, rd, rn, operand);
984 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100985
986 void Adds(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000987 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
988 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
989 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +0100990 VIXL_ASSERT(allow_macro_instructions_);
991 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -0700992 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100993 ITScope it_scope(this, &cond);
994 adds(cond, rd, rn, operand);
995 }
996 void Adds(Register rd, Register rn, const Operand& operand) {
997 Adds(al, rd, rn, operand);
998 }
999
Alexandre Ramesd3832962016-07-04 15:03:43 +01001000
1001 void Adr(Condition cond, Register rd, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001002 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001003 VIXL_ASSERT(allow_macro_instructions_);
1004 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001005 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001006 ITScope it_scope(this, &cond);
1007 adr(cond, rd, label);
1008 }
1009 void Adr(Register rd, Label* label) { Adr(al, rd, label); }
1010
1011 void And(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001012 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1013 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1014 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001015 VIXL_ASSERT(allow_macro_instructions_);
1016 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001017 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001018 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001019 uint32_t immediate = operand.GetImmediate();
1020 if (immediate == 0) {
1021 mov(rd, 0);
1022 return;
1023 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001024 if ((immediate == 0xffffffff) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001025 return;
1026 }
1027 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001028 bool can_use_it =
1029 // AND<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1030 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1031 operand.GetBaseRegister().IsLow();
1032 ITScope it_scope(this, &cond, can_use_it);
1033 and_(cond, rd, rn, operand);
1034 }
1035 void And(Register rd, Register rn, const Operand& operand) {
1036 And(al, rd, rn, operand);
1037 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001038 void And(FlagsUpdate flags,
1039 Condition cond,
1040 Register rd,
1041 Register rn,
1042 const Operand& operand) {
1043 switch (flags) {
1044 case LeaveFlags:
1045 And(cond, rd, rn, operand);
1046 break;
1047 case SetFlags:
1048 Ands(cond, rd, rn, operand);
1049 break;
1050 case DontCare:
1051 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1052 rn.Is(rd) && operand.IsPlainRegister() &&
1053 operand.GetBaseRegister().IsLow();
1054 if (can_be_16bit_encoded) {
1055 Ands(cond, rd, rn, operand);
1056 } else {
1057 And(cond, rd, rn, operand);
1058 }
1059 break;
1060 }
1061 }
1062 void And(FlagsUpdate flags,
1063 Register rd,
1064 Register rn,
1065 const Operand& operand) {
1066 And(flags, al, rd, rn, operand);
1067 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001068
1069 void Ands(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001070 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1071 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1072 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001073 VIXL_ASSERT(allow_macro_instructions_);
1074 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001075 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001076 ITScope it_scope(this, &cond);
1077 ands(cond, rd, rn, operand);
1078 }
1079 void Ands(Register rd, Register rn, const Operand& operand) {
1080 Ands(al, rd, rn, operand);
1081 }
1082
1083 void Asr(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001084 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1085 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
1086 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001087 VIXL_ASSERT(allow_macro_instructions_);
1088 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001089 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001090 bool can_use_it =
1091 // ASR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
1092 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
1093 (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) ||
1094 // ASR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
1095 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
1096 operand.GetBaseRegister().IsLow());
1097 ITScope it_scope(this, &cond, can_use_it);
1098 asr(cond, rd, rm, operand);
1099 }
1100 void Asr(Register rd, Register rm, const Operand& operand) {
1101 Asr(al, rd, rm, operand);
1102 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001103 void Asr(FlagsUpdate flags,
1104 Condition cond,
1105 Register rd,
1106 Register rm,
1107 const Operand& operand) {
1108 switch (flags) {
1109 case LeaveFlags:
1110 Asr(cond, rd, rm, operand);
1111 break;
1112 case SetFlags:
1113 Asrs(cond, rd, rm, operand);
1114 break;
1115 case DontCare:
1116 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1117 rm.IsLow() && operand.IsImmediate() &&
1118 (operand.GetImmediate() < 32);
1119 if (can_be_16bit_encoded) {
1120 Asrs(cond, rd, rm, operand);
1121 } else {
1122 Asr(cond, rd, rm, operand);
1123 }
1124 break;
1125 }
1126 }
1127 void Asr(FlagsUpdate flags,
1128 Register rd,
1129 Register rm,
1130 const Operand& operand) {
1131 Asr(flags, al, rd, rm, operand);
1132 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001133
1134 void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001135 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1136 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
1137 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001138 VIXL_ASSERT(allow_macro_instructions_);
1139 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001140 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001141 ITScope it_scope(this, &cond);
1142 asrs(cond, rd, rm, operand);
1143 }
1144 void Asrs(Register rd, Register rm, const Operand& operand) {
1145 Asrs(al, rd, rm, operand);
1146 }
1147
1148 void B(Condition cond, Label* label) {
1149 VIXL_ASSERT(allow_macro_instructions_);
1150 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001151 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001152 b(cond, label);
1153 AddBranchLabel(label);
1154 }
1155 void B(Label* label) { B(al, label); }
1156
1157 void Bfc(Condition cond, Register rd, uint32_t lsb, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001158 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1159 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001160 VIXL_ASSERT(allow_macro_instructions_);
1161 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001162 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001163 ITScope it_scope(this, &cond);
1164 bfc(cond, rd, lsb, operand);
1165 }
1166 void Bfc(Register rd, uint32_t lsb, const Operand& operand) {
1167 Bfc(al, rd, lsb, operand);
1168 }
1169
1170 void Bfi(Condition cond,
1171 Register rd,
1172 Register rn,
1173 uint32_t lsb,
1174 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001175 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1176 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1177 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001178 VIXL_ASSERT(allow_macro_instructions_);
1179 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001180 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001181 ITScope it_scope(this, &cond);
1182 bfi(cond, rd, rn, lsb, operand);
1183 }
1184 void Bfi(Register rd, Register rn, uint32_t lsb, const Operand& operand) {
1185 Bfi(al, rd, rn, lsb, operand);
1186 }
1187
1188 void Bic(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001189 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1190 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1191 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001192 VIXL_ASSERT(allow_macro_instructions_);
1193 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001194 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001195 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001196 uint32_t immediate = operand.GetImmediate();
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001197 if ((immediate == 0) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001198 return;
1199 }
1200 if (immediate == 0xffffffff) {
1201 mov(rd, 0);
1202 return;
1203 }
1204 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001205 bool can_use_it =
1206 // BIC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1207 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1208 operand.GetBaseRegister().IsLow();
1209 ITScope it_scope(this, &cond, can_use_it);
1210 bic(cond, rd, rn, operand);
1211 }
1212 void Bic(Register rd, Register rn, const Operand& operand) {
1213 Bic(al, rd, rn, operand);
1214 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001215 void Bic(FlagsUpdate flags,
1216 Condition cond,
1217 Register rd,
1218 Register rn,
1219 const Operand& operand) {
1220 switch (flags) {
1221 case LeaveFlags:
1222 Bic(cond, rd, rn, operand);
1223 break;
1224 case SetFlags:
1225 Bics(cond, rd, rn, operand);
1226 break;
1227 case DontCare:
1228 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1229 rn.Is(rd) && operand.IsPlainRegister() &&
1230 operand.GetBaseRegister().IsLow();
1231 if (can_be_16bit_encoded) {
1232 Bics(cond, rd, rn, operand);
1233 } else {
1234 Bic(cond, rd, rn, operand);
1235 }
1236 break;
1237 }
1238 }
1239 void Bic(FlagsUpdate flags,
1240 Register rd,
1241 Register rn,
1242 const Operand& operand) {
1243 Bic(flags, al, rd, rn, operand);
1244 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001245
1246 void Bics(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001247 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1248 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1249 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001250 VIXL_ASSERT(allow_macro_instructions_);
1251 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001252 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001253 ITScope it_scope(this, &cond);
1254 bics(cond, rd, rn, operand);
1255 }
1256 void Bics(Register rd, Register rn, const Operand& operand) {
1257 Bics(al, rd, rn, operand);
1258 }
1259
1260 void Bkpt(Condition cond, uint32_t imm) {
1261 VIXL_ASSERT(allow_macro_instructions_);
1262 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001263 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001264 ITScope it_scope(this, &cond);
1265 bkpt(cond, imm);
1266 }
1267 void Bkpt(uint32_t imm) { Bkpt(al, imm); }
1268
1269 void Bl(Condition cond, Label* label) {
1270 VIXL_ASSERT(allow_macro_instructions_);
1271 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001272 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001273 ITScope it_scope(this, &cond);
1274 bl(cond, label);
1275 AddBranchLabel(label);
1276 }
1277 void Bl(Label* label) { Bl(al, label); }
1278
1279 void Blx(Condition cond, Label* label) {
1280 VIXL_ASSERT(allow_macro_instructions_);
1281 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001282 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001283 ITScope it_scope(this, &cond);
1284 blx(cond, label);
1285 AddBranchLabel(label);
1286 }
1287 void Blx(Label* label) { Blx(al, label); }
1288
1289 void Blx(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001290 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001291 VIXL_ASSERT(allow_macro_instructions_);
1292 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001293 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001294 bool can_use_it =
1295 // BLX{<c>}{<q>} <Rm> ; T1
1296 !rm.IsPC();
1297 ITScope it_scope(this, &cond, can_use_it);
1298 blx(cond, rm);
1299 }
1300 void Blx(Register rm) { Blx(al, rm); }
1301
1302 void Bx(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001303 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001304 VIXL_ASSERT(allow_macro_instructions_);
1305 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001306 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001307 bool can_use_it =
1308 // BX{<c>}{<q>} <Rm> ; T1
1309 !rm.IsPC();
1310 ITScope it_scope(this, &cond, can_use_it);
1311 bx(cond, rm);
1312 }
1313 void Bx(Register rm) { Bx(al, rm); }
1314
1315 void Bxj(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001316 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001317 VIXL_ASSERT(allow_macro_instructions_);
1318 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001319 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001320 ITScope it_scope(this, &cond);
1321 bxj(cond, rm);
1322 }
1323 void Bxj(Register rm) { Bxj(al, rm); }
1324
1325 void Cbnz(Register rn, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001326 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001327 VIXL_ASSERT(allow_macro_instructions_);
1328 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001329 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001330 cbnz(rn, label);
1331 AddBranchLabel(label);
1332 }
1333
1334 void Cbz(Register rn, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001335 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001336 VIXL_ASSERT(allow_macro_instructions_);
1337 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001338 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001339 cbz(rn, label);
1340 AddBranchLabel(label);
1341 }
1342
1343 void Clrex(Condition cond) {
1344 VIXL_ASSERT(allow_macro_instructions_);
1345 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001346 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001347 ITScope it_scope(this, &cond);
1348 clrex(cond);
1349 }
1350 void Clrex() { Clrex(al); }
1351
1352 void Clz(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001353 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1354 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001355 VIXL_ASSERT(allow_macro_instructions_);
1356 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001357 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001358 ITScope it_scope(this, &cond);
1359 clz(cond, rd, rm);
1360 }
1361 void Clz(Register rd, Register rm) { Clz(al, rd, rm); }
1362
1363 void Cmn(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001364 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1365 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001366 VIXL_ASSERT(allow_macro_instructions_);
1367 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001368 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001369 bool can_use_it =
1370 // CMN{<c>}{<q>} <Rn>, <Rm> ; T1
1371 operand.IsPlainRegister() && rn.IsLow() &&
1372 operand.GetBaseRegister().IsLow();
1373 ITScope it_scope(this, &cond, can_use_it);
1374 cmn(cond, rn, operand);
1375 }
1376 void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); }
1377
1378 void Cmp(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001379 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1380 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001381 VIXL_ASSERT(allow_macro_instructions_);
1382 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001383 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001384 bool can_use_it =
1385 // CMP{<c>}{<q>} <Rn>, #<imm8> ; T1
1386 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
1387 rn.IsLow()) ||
1388 // CMP{<c>}{<q>} <Rn>, <Rm> ; T1 T2
1389 (operand.IsPlainRegister() && !rn.IsPC() &&
1390 !operand.GetBaseRegister().IsPC());
1391 ITScope it_scope(this, &cond, can_use_it);
1392 cmp(cond, rn, operand);
1393 }
1394 void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); }
1395
1396 void Crc32b(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001397 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1398 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1399 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001400 VIXL_ASSERT(allow_macro_instructions_);
1401 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001402 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001403 ITScope it_scope(this, &cond);
1404 crc32b(cond, rd, rn, rm);
1405 }
1406 void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); }
1407
1408 void Crc32cb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001409 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1410 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1411 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001412 VIXL_ASSERT(allow_macro_instructions_);
1413 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001414 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001415 ITScope it_scope(this, &cond);
1416 crc32cb(cond, rd, rn, rm);
1417 }
1418 void Crc32cb(Register rd, Register rn, Register rm) {
1419 Crc32cb(al, rd, rn, rm);
1420 }
1421
1422 void Crc32ch(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001423 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1424 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1425 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001426 VIXL_ASSERT(allow_macro_instructions_);
1427 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001428 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001429 ITScope it_scope(this, &cond);
1430 crc32ch(cond, rd, rn, rm);
1431 }
1432 void Crc32ch(Register rd, Register rn, Register rm) {
1433 Crc32ch(al, rd, rn, rm);
1434 }
1435
1436 void Crc32cw(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001437 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1438 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1439 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001440 VIXL_ASSERT(allow_macro_instructions_);
1441 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001442 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001443 ITScope it_scope(this, &cond);
1444 crc32cw(cond, rd, rn, rm);
1445 }
1446 void Crc32cw(Register rd, Register rn, Register rm) {
1447 Crc32cw(al, rd, rn, rm);
1448 }
1449
1450 void Crc32h(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001451 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1452 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1453 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001454 VIXL_ASSERT(allow_macro_instructions_);
1455 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001456 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001457 ITScope it_scope(this, &cond);
1458 crc32h(cond, rd, rn, rm);
1459 }
1460 void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); }
1461
1462 void Crc32w(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001463 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1464 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1465 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001466 VIXL_ASSERT(allow_macro_instructions_);
1467 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001468 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001469 ITScope it_scope(this, &cond);
1470 crc32w(cond, rd, rn, rm);
1471 }
1472 void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); }
1473
1474 void Dmb(Condition cond, MemoryBarrier option) {
1475 VIXL_ASSERT(allow_macro_instructions_);
1476 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001477 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001478 ITScope it_scope(this, &cond);
1479 dmb(cond, option);
1480 }
1481 void Dmb(MemoryBarrier option) { Dmb(al, option); }
1482
1483 void Dsb(Condition cond, MemoryBarrier option) {
1484 VIXL_ASSERT(allow_macro_instructions_);
1485 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001486 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001487 ITScope it_scope(this, &cond);
1488 dsb(cond, option);
1489 }
1490 void Dsb(MemoryBarrier option) { Dsb(al, option); }
1491
1492 void Eor(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001493 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1494 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1495 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001496 VIXL_ASSERT(allow_macro_instructions_);
1497 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001498 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Rames628c5262016-09-21 11:52:30 +01001499 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
1500 uint32_t immediate = operand.GetImmediate();
1501 if (immediate == 0) {
1502 return;
1503 }
1504 if (immediate == 0xffffffff) {
1505 mvn(rd, rn);
1506 return;
1507 }
1508 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001509 bool can_use_it =
1510 // EOR<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1511 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1512 operand.GetBaseRegister().IsLow();
1513 ITScope it_scope(this, &cond, can_use_it);
1514 eor(cond, rd, rn, operand);
1515 }
1516 void Eor(Register rd, Register rn, const Operand& operand) {
1517 Eor(al, rd, rn, operand);
1518 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001519 void Eor(FlagsUpdate flags,
1520 Condition cond,
1521 Register rd,
1522 Register rn,
1523 const Operand& operand) {
1524 switch (flags) {
1525 case LeaveFlags:
1526 Eor(cond, rd, rn, operand);
1527 break;
1528 case SetFlags:
1529 Eors(cond, rd, rn, operand);
1530 break;
1531 case DontCare:
1532 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1533 rn.Is(rd) && operand.IsPlainRegister() &&
1534 operand.GetBaseRegister().IsLow();
1535 if (can_be_16bit_encoded) {
1536 Eors(cond, rd, rn, operand);
1537 } else {
1538 Eor(cond, rd, rn, operand);
1539 }
1540 break;
1541 }
1542 }
1543 void Eor(FlagsUpdate flags,
1544 Register rd,
1545 Register rn,
1546 const Operand& operand) {
1547 Eor(flags, al, rd, rn, operand);
1548 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001549
1550 void Eors(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001551 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1552 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1553 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001554 VIXL_ASSERT(allow_macro_instructions_);
1555 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001556 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001557 ITScope it_scope(this, &cond);
1558 eors(cond, rd, rn, operand);
1559 }
1560 void Eors(Register rd, Register rn, const Operand& operand) {
1561 Eors(al, rd, rn, operand);
1562 }
1563
1564 void Fldmdbx(Condition cond,
1565 Register rn,
1566 WriteBack write_back,
1567 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001568 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1569 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001570 VIXL_ASSERT(allow_macro_instructions_);
1571 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001572 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001573 ITScope it_scope(this, &cond);
1574 fldmdbx(cond, rn, write_back, dreglist);
1575 }
1576 void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) {
1577 Fldmdbx(al, rn, write_back, dreglist);
1578 }
1579
1580 void Fldmiax(Condition cond,
1581 Register rn,
1582 WriteBack write_back,
1583 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001584 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1585 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001586 VIXL_ASSERT(allow_macro_instructions_);
1587 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001588 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001589 ITScope it_scope(this, &cond);
1590 fldmiax(cond, rn, write_back, dreglist);
1591 }
1592 void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) {
1593 Fldmiax(al, rn, write_back, dreglist);
1594 }
1595
1596 void Fstmdbx(Condition cond,
1597 Register rn,
1598 WriteBack write_back,
1599 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001600 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1601 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001602 VIXL_ASSERT(allow_macro_instructions_);
1603 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001604 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001605 ITScope it_scope(this, &cond);
1606 fstmdbx(cond, rn, write_back, dreglist);
1607 }
1608 void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) {
1609 Fstmdbx(al, rn, write_back, dreglist);
1610 }
1611
1612 void Fstmiax(Condition cond,
1613 Register rn,
1614 WriteBack write_back,
1615 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001616 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1617 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001618 VIXL_ASSERT(allow_macro_instructions_);
1619 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001620 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001621 ITScope it_scope(this, &cond);
1622 fstmiax(cond, rn, write_back, dreglist);
1623 }
1624 void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) {
1625 Fstmiax(al, rn, write_back, dreglist);
1626 }
1627
1628 void Hlt(Condition cond, uint32_t imm) {
1629 VIXL_ASSERT(allow_macro_instructions_);
1630 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001631 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001632 ITScope it_scope(this, &cond);
1633 hlt(cond, imm);
1634 }
1635 void Hlt(uint32_t imm) { Hlt(al, imm); }
1636
1637 void Hvc(Condition cond, uint32_t imm) {
1638 VIXL_ASSERT(allow_macro_instructions_);
1639 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001640 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001641 ITScope it_scope(this, &cond);
1642 hvc(cond, imm);
1643 }
1644 void Hvc(uint32_t imm) { Hvc(al, imm); }
1645
1646 void Isb(Condition cond, MemoryBarrier option) {
1647 VIXL_ASSERT(allow_macro_instructions_);
1648 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001649 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001650 ITScope it_scope(this, &cond);
1651 isb(cond, option);
1652 }
1653 void Isb(MemoryBarrier option) { Isb(al, option); }
1654
Alexandre Rames628c5262016-09-21 11:52:30 +01001655
Alexandre Ramesd3832962016-07-04 15:03:43 +01001656 void Lda(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001657 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1658 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001659 VIXL_ASSERT(allow_macro_instructions_);
1660 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001661 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001662 ITScope it_scope(this, &cond);
1663 lda(cond, rt, operand);
1664 }
1665 void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); }
1666
1667 void Ldab(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001668 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1669 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001670 VIXL_ASSERT(allow_macro_instructions_);
1671 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001672 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001673 ITScope it_scope(this, &cond);
1674 ldab(cond, rt, operand);
1675 }
1676 void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); }
1677
1678 void Ldaex(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001679 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1680 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001681 VIXL_ASSERT(allow_macro_instructions_);
1682 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001683 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001684 ITScope it_scope(this, &cond);
1685 ldaex(cond, rt, operand);
1686 }
1687 void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); }
1688
1689 void Ldaexb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001690 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1691 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001692 VIXL_ASSERT(allow_macro_instructions_);
1693 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001694 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001695 ITScope it_scope(this, &cond);
1696 ldaexb(cond, rt, operand);
1697 }
1698 void Ldaexb(Register rt, const MemOperand& operand) {
1699 Ldaexb(al, rt, operand);
1700 }
1701
1702 void Ldaexd(Condition cond,
1703 Register rt,
1704 Register rt2,
1705 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001706 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1707 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
1708 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001709 VIXL_ASSERT(allow_macro_instructions_);
1710 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001711 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001712 ITScope it_scope(this, &cond);
1713 ldaexd(cond, rt, rt2, operand);
1714 }
1715 void Ldaexd(Register rt, Register rt2, const MemOperand& operand) {
1716 Ldaexd(al, rt, rt2, operand);
1717 }
1718
1719 void Ldaexh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001720 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1721 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001722 VIXL_ASSERT(allow_macro_instructions_);
1723 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001724 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001725 ITScope it_scope(this, &cond);
1726 ldaexh(cond, rt, operand);
1727 }
1728 void Ldaexh(Register rt, const MemOperand& operand) {
1729 Ldaexh(al, rt, operand);
1730 }
1731
1732 void Ldah(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001733 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1734 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001735 VIXL_ASSERT(allow_macro_instructions_);
1736 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001737 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001738 ITScope it_scope(this, &cond);
1739 ldah(cond, rt, operand);
1740 }
1741 void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); }
1742
1743 void Ldm(Condition cond,
1744 Register rn,
1745 WriteBack write_back,
1746 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001747 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1748 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001749 VIXL_ASSERT(allow_macro_instructions_);
1750 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001751 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001752 ITScope it_scope(this, &cond);
1753 ldm(cond, rn, write_back, registers);
1754 }
1755 void Ldm(Register rn, WriteBack write_back, RegisterList registers) {
1756 Ldm(al, rn, write_back, registers);
1757 }
1758
1759 void Ldmda(Condition cond,
1760 Register rn,
1761 WriteBack write_back,
1762 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001763 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1764 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001765 VIXL_ASSERT(allow_macro_instructions_);
1766 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001767 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001768 ITScope it_scope(this, &cond);
1769 ldmda(cond, rn, write_back, registers);
1770 }
1771 void Ldmda(Register rn, WriteBack write_back, RegisterList registers) {
1772 Ldmda(al, rn, write_back, registers);
1773 }
1774
1775 void Ldmdb(Condition cond,
1776 Register rn,
1777 WriteBack write_back,
1778 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001779 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1780 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001781 VIXL_ASSERT(allow_macro_instructions_);
1782 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001783 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001784 ITScope it_scope(this, &cond);
1785 ldmdb(cond, rn, write_back, registers);
1786 }
1787 void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) {
1788 Ldmdb(al, rn, write_back, registers);
1789 }
1790
1791 void Ldmea(Condition cond,
1792 Register rn,
1793 WriteBack write_back,
1794 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001795 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1796 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001797 VIXL_ASSERT(allow_macro_instructions_);
1798 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001799 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001800 ITScope it_scope(this, &cond);
1801 ldmea(cond, rn, write_back, registers);
1802 }
1803 void Ldmea(Register rn, WriteBack write_back, RegisterList registers) {
1804 Ldmea(al, rn, write_back, registers);
1805 }
1806
1807 void Ldmed(Condition cond,
1808 Register rn,
1809 WriteBack write_back,
1810 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001811 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1812 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001813 VIXL_ASSERT(allow_macro_instructions_);
1814 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001815 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001816 ITScope it_scope(this, &cond);
1817 ldmed(cond, rn, write_back, registers);
1818 }
1819 void Ldmed(Register rn, WriteBack write_back, RegisterList registers) {
1820 Ldmed(al, rn, write_back, registers);
1821 }
1822
1823 void Ldmfa(Condition cond,
1824 Register rn,
1825 WriteBack write_back,
1826 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001827 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1828 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001829 VIXL_ASSERT(allow_macro_instructions_);
1830 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001831 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001832 ITScope it_scope(this, &cond);
1833 ldmfa(cond, rn, write_back, registers);
1834 }
1835 void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) {
1836 Ldmfa(al, rn, write_back, registers);
1837 }
1838
1839 void Ldmfd(Condition cond,
1840 Register rn,
1841 WriteBack write_back,
1842 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001843 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1844 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001845 VIXL_ASSERT(allow_macro_instructions_);
1846 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001847 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001848 ITScope it_scope(this, &cond);
1849 ldmfd(cond, rn, write_back, registers);
1850 }
1851 void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) {
1852 Ldmfd(al, rn, write_back, registers);
1853 }
1854
1855 void Ldmib(Condition cond,
1856 Register rn,
1857 WriteBack write_back,
1858 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001859 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1860 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001861 VIXL_ASSERT(allow_macro_instructions_);
1862 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001863 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001864 ITScope it_scope(this, &cond);
1865 ldmib(cond, rn, write_back, registers);
1866 }
1867 void Ldmib(Register rn, WriteBack write_back, RegisterList registers) {
1868 Ldmib(al, rn, write_back, registers);
1869 }
1870
1871 void Ldr(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001872 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1873 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001874 VIXL_ASSERT(allow_macro_instructions_);
1875 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001876 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001877 bool can_use_it =
1878 // LDR{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
1879 (operand.IsImmediate() && rt.IsLow() &&
1880 operand.GetBaseRegister().IsLow() &&
1881 operand.IsOffsetImmediateWithinRange(0, 124, 4) &&
1882 (operand.GetAddrMode() == Offset)) ||
1883 // LDR{<c>}{<q>} <Rt>, [SP{, #{+}<imm>}] ; T2
1884 (operand.IsImmediate() && rt.IsLow() &&
1885 operand.GetBaseRegister().IsSP() &&
1886 operand.IsOffsetImmediateWithinRange(0, 1020, 4) &&
1887 (operand.GetAddrMode() == Offset)) ||
1888 // LDR{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
1889 (operand.IsPlainRegister() && rt.IsLow() &&
1890 operand.GetBaseRegister().IsLow() &&
1891 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
1892 (operand.GetAddrMode() == Offset));
1893 ITScope it_scope(this, &cond, can_use_it);
1894 ldr(cond, rt, operand);
1895 }
1896 void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); }
1897
1898 void Ldr(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001899 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001900 VIXL_ASSERT(allow_macro_instructions_);
1901 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001902 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001903 ITScope it_scope(this, &cond);
1904 ldr(cond, rt, label);
1905 }
1906 void Ldr(Register rt, Label* label) { Ldr(al, rt, label); }
1907
1908 void Ldrb(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());
Vincent Belliard8885c172016-08-24 11:33:19 -07001913 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001914 bool can_use_it =
1915 // LDRB{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
1916 (operand.IsImmediate() && rt.IsLow() &&
1917 operand.GetBaseRegister().IsLow() &&
1918 operand.IsOffsetImmediateWithinRange(0, 31) &&
1919 (operand.GetAddrMode() == Offset)) ||
1920 // LDRB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
1921 (operand.IsPlainRegister() && rt.IsLow() &&
1922 operand.GetBaseRegister().IsLow() &&
1923 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
1924 (operand.GetAddrMode() == Offset));
1925 ITScope it_scope(this, &cond, can_use_it);
1926 ldrb(cond, rt, operand);
1927 }
1928 void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); }
1929
1930 void Ldrb(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001931 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001932 VIXL_ASSERT(allow_macro_instructions_);
1933 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001934 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001935 ITScope it_scope(this, &cond);
1936 ldrb(cond, rt, label);
1937 }
1938 void Ldrb(Register rt, Label* label) { Ldrb(al, rt, label); }
1939
1940 void Ldrd(Condition cond,
1941 Register rt,
1942 Register rt2,
1943 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1945 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
1946 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001947 VIXL_ASSERT(allow_macro_instructions_);
1948 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001949 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001950 ITScope it_scope(this, &cond);
1951 ldrd(cond, rt, rt2, operand);
1952 }
1953 void Ldrd(Register rt, Register rt2, const MemOperand& operand) {
1954 Ldrd(al, rt, rt2, operand);
1955 }
1956
1957 void Ldrd(Condition cond, Register rt, Register rt2, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001958 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1959 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001960 VIXL_ASSERT(allow_macro_instructions_);
1961 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001962 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001963 ITScope it_scope(this, &cond);
1964 ldrd(cond, rt, rt2, label);
1965 }
1966 void Ldrd(Register rt, Register rt2, Label* label) {
1967 Ldrd(al, rt, rt2, label);
1968 }
1969
1970 void Ldrex(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001971 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1972 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001973 VIXL_ASSERT(allow_macro_instructions_);
1974 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001975 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001976 ITScope it_scope(this, &cond);
1977 ldrex(cond, rt, operand);
1978 }
1979 void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); }
1980
1981 void Ldrexb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001982 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1983 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001984 VIXL_ASSERT(allow_macro_instructions_);
1985 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07001986 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001987 ITScope it_scope(this, &cond);
1988 ldrexb(cond, rt, operand);
1989 }
1990 void Ldrexb(Register rt, const MemOperand& operand) {
1991 Ldrexb(al, rt, operand);
1992 }
1993
1994 void Ldrexd(Condition cond,
1995 Register rt,
1996 Register rt2,
1997 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001998 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1999 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
2000 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002001 VIXL_ASSERT(allow_macro_instructions_);
2002 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002003 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002004 ITScope it_scope(this, &cond);
2005 ldrexd(cond, rt, rt2, operand);
2006 }
2007 void Ldrexd(Register rt, Register rt2, const MemOperand& operand) {
2008 Ldrexd(al, rt, rt2, operand);
2009 }
2010
2011 void Ldrexh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002012 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2013 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002014 VIXL_ASSERT(allow_macro_instructions_);
2015 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002016 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002017 ITScope it_scope(this, &cond);
2018 ldrexh(cond, rt, operand);
2019 }
2020 void Ldrexh(Register rt, const MemOperand& operand) {
2021 Ldrexh(al, rt, operand);
2022 }
2023
2024 void Ldrh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002025 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2026 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002027 VIXL_ASSERT(allow_macro_instructions_);
2028 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002029 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002030 bool can_use_it =
2031 // LDRH{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
2032 (operand.IsImmediate() && rt.IsLow() &&
2033 operand.GetBaseRegister().IsLow() &&
2034 operand.IsOffsetImmediateWithinRange(0, 62, 2) &&
2035 (operand.GetAddrMode() == Offset)) ||
2036 // LDRH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2037 (operand.IsPlainRegister() && rt.IsLow() &&
2038 operand.GetBaseRegister().IsLow() &&
2039 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2040 (operand.GetAddrMode() == Offset));
2041 ITScope it_scope(this, &cond, can_use_it);
2042 ldrh(cond, rt, operand);
2043 }
2044 void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); }
2045
2046 void Ldrh(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002047 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002048 VIXL_ASSERT(allow_macro_instructions_);
2049 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002050 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002051 ITScope it_scope(this, &cond);
2052 ldrh(cond, rt, label);
2053 }
2054 void Ldrh(Register rt, Label* label) { Ldrh(al, rt, label); }
2055
2056 void Ldrsb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002057 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2058 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002059 VIXL_ASSERT(allow_macro_instructions_);
2060 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002061 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002062 bool can_use_it =
2063 // LDRSB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2064 operand.IsPlainRegister() && rt.IsLow() &&
2065 operand.GetBaseRegister().IsLow() &&
2066 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2067 (operand.GetAddrMode() == Offset);
2068 ITScope it_scope(this, &cond, can_use_it);
2069 ldrsb(cond, rt, operand);
2070 }
2071 void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); }
2072
2073 void Ldrsb(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002074 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002075 VIXL_ASSERT(allow_macro_instructions_);
2076 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002077 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002078 ITScope it_scope(this, &cond);
2079 ldrsb(cond, rt, label);
2080 }
2081 void Ldrsb(Register rt, Label* label) { Ldrsb(al, rt, label); }
2082
2083 void Ldrsh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002084 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2085 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002086 VIXL_ASSERT(allow_macro_instructions_);
2087 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002088 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002089 bool can_use_it =
2090 // LDRSH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2091 operand.IsPlainRegister() && rt.IsLow() &&
2092 operand.GetBaseRegister().IsLow() &&
2093 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2094 (operand.GetAddrMode() == Offset);
2095 ITScope it_scope(this, &cond, can_use_it);
2096 ldrsh(cond, rt, operand);
2097 }
2098 void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); }
2099
2100 void Ldrsh(Condition cond, Register rt, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002101 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002102 VIXL_ASSERT(allow_macro_instructions_);
2103 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002104 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002105 ITScope it_scope(this, &cond);
2106 ldrsh(cond, rt, label);
2107 }
2108 void Ldrsh(Register rt, Label* label) { Ldrsh(al, rt, label); }
2109
2110 void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002111 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2112 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2113 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002114 VIXL_ASSERT(allow_macro_instructions_);
2115 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002116 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002117 bool can_use_it =
2118 // LSL<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
2119 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2120 (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) ||
2121 // LSL<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
2122 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
2123 operand.GetBaseRegister().IsLow());
2124 ITScope it_scope(this, &cond, can_use_it);
2125 lsl(cond, rd, rm, operand);
2126 }
2127 void Lsl(Register rd, Register rm, const Operand& operand) {
2128 Lsl(al, rd, rm, operand);
2129 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002130 void Lsl(FlagsUpdate flags,
2131 Condition cond,
2132 Register rd,
2133 Register rm,
2134 const Operand& operand) {
2135 switch (flags) {
2136 case LeaveFlags:
2137 Lsl(cond, rd, rm, operand);
2138 break;
2139 case SetFlags:
2140 Lsls(cond, rd, rm, operand);
2141 break;
2142 case DontCare:
2143 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2144 rm.IsLow() && operand.IsImmediate() &&
2145 (operand.GetImmediate() < 32) &&
2146 (operand.GetImmediate() != 0);
2147 if (can_be_16bit_encoded) {
2148 Lsls(cond, rd, rm, operand);
2149 } else {
2150 Lsl(cond, rd, rm, operand);
2151 }
2152 break;
2153 }
2154 }
2155 void Lsl(FlagsUpdate flags,
2156 Register rd,
2157 Register rm,
2158 const Operand& operand) {
2159 Lsl(flags, al, rd, rm, operand);
2160 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002161
2162 void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002163 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2164 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2165 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002166 VIXL_ASSERT(allow_macro_instructions_);
2167 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002168 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002169 ITScope it_scope(this, &cond);
2170 lsls(cond, rd, rm, operand);
2171 }
2172 void Lsls(Register rd, Register rm, const Operand& operand) {
2173 Lsls(al, rd, rm, operand);
2174 }
2175
2176 void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002177 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2178 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2179 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002180 VIXL_ASSERT(allow_macro_instructions_);
2181 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002182 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002183 bool can_use_it =
2184 // LSR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
2185 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2186 (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) ||
2187 // LSR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
2188 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
2189 operand.GetBaseRegister().IsLow());
2190 ITScope it_scope(this, &cond, can_use_it);
2191 lsr(cond, rd, rm, operand);
2192 }
2193 void Lsr(Register rd, Register rm, const Operand& operand) {
2194 Lsr(al, rd, rm, operand);
2195 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002196 void Lsr(FlagsUpdate flags,
2197 Condition cond,
2198 Register rd,
2199 Register rm,
2200 const Operand& operand) {
2201 switch (flags) {
2202 case LeaveFlags:
2203 Lsr(cond, rd, rm, operand);
2204 break;
2205 case SetFlags:
2206 Lsrs(cond, rd, rm, operand);
2207 break;
2208 case DontCare:
2209 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2210 rm.IsLow() && operand.IsImmediate() &&
2211 (operand.GetImmediate() < 32);
2212 if (can_be_16bit_encoded) {
2213 Lsrs(cond, rd, rm, operand);
2214 } else {
2215 Lsr(cond, rd, rm, operand);
2216 }
2217 break;
2218 }
2219 }
2220 void Lsr(FlagsUpdate flags,
2221 Register rd,
2222 Register rm,
2223 const Operand& operand) {
2224 Lsr(flags, al, rd, rm, operand);
2225 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002226
2227 void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002228 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2229 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2230 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002231 VIXL_ASSERT(allow_macro_instructions_);
2232 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002233 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002234 ITScope it_scope(this, &cond);
2235 lsrs(cond, rd, rm, operand);
2236 }
2237 void Lsrs(Register rd, Register rm, const Operand& operand) {
2238 Lsrs(al, rd, rm, operand);
2239 }
2240
2241 void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002242 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2243 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2244 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2245 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002246 VIXL_ASSERT(allow_macro_instructions_);
2247 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002248 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002249 ITScope it_scope(this, &cond);
2250 mla(cond, rd, rn, rm, ra);
2251 }
2252 void Mla(Register rd, Register rn, Register rm, Register ra) {
2253 Mla(al, rd, rn, rm, ra);
2254 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002255 void Mla(FlagsUpdate flags,
2256 Condition cond,
2257 Register rd,
2258 Register rn,
2259 Register rm,
2260 Register ra) {
2261 switch (flags) {
2262 case LeaveFlags:
2263 Mla(cond, rd, rn, rm, ra);
2264 break;
2265 case SetFlags:
2266 Mlas(cond, rd, rn, rm, ra);
2267 break;
2268 case DontCare:
2269 Mla(cond, rd, rn, rm, ra);
2270 break;
2271 }
2272 }
2273 void Mla(
2274 FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) {
2275 Mla(flags, al, rd, rn, rm, ra);
2276 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002277
2278 void Mlas(
2279 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002280 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2281 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2282 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2283 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002284 VIXL_ASSERT(allow_macro_instructions_);
2285 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002286 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002287 ITScope it_scope(this, &cond);
2288 mlas(cond, rd, rn, rm, ra);
2289 }
2290 void Mlas(Register rd, Register rn, Register rm, Register ra) {
2291 Mlas(al, rd, rn, rm, ra);
2292 }
2293
2294 void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002295 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2296 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2297 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2298 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002299 VIXL_ASSERT(allow_macro_instructions_);
2300 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002301 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002302 ITScope it_scope(this, &cond);
2303 mls(cond, rd, rn, rm, ra);
2304 }
2305 void Mls(Register rd, Register rn, Register rm, Register ra) {
2306 Mls(al, rd, rn, rm, ra);
2307 }
2308
2309 void Mov(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002310 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2311 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002312 VIXL_ASSERT(allow_macro_instructions_);
2313 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002314 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002315 bool can_use_it =
2316 // MOV<c>{<q>} <Rd>, #<imm8> ; T1
2317 (operand.IsImmediate() && rd.IsLow() &&
2318 (operand.GetImmediate() <= 255)) ||
2319 // MOV{<c>}{<q>} <Rd>, <Rm> ; T1
2320 (operand.IsPlainRegister() && !rd.IsPC() &&
2321 !operand.GetBaseRegister().IsPC()) ||
2322 // MOV<c>{<q>} <Rd>, <Rm> {, <shift> #<amount>} ; T2
2323 (operand.IsImmediateShiftedRegister() && rd.IsLow() &&
2324 operand.GetBaseRegister().IsLow() &&
2325 (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) ||
2326 operand.GetShift().Is(ASR))) ||
2327 // MOV<c>{<q>} <Rdm>, <Rdm>, LSL <Rs> ; T1
2328 // MOV<c>{<q>} <Rdm>, <Rdm>, LSR <Rs> ; T1
2329 // MOV<c>{<q>} <Rdm>, <Rdm>, ASR <Rs> ; T1
2330 // MOV<c>{<q>} <Rdm>, <Rdm>, ROR <Rs> ; T1
2331 (operand.IsRegisterShiftedRegister() &&
2332 rd.Is(operand.GetBaseRegister()) && rd.IsLow() &&
2333 (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) ||
2334 operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) &&
2335 operand.GetShiftRegister().IsLow());
2336 ITScope it_scope(this, &cond, can_use_it);
2337 mov(cond, rd, operand);
2338 }
2339 void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002340 void Mov(FlagsUpdate flags,
2341 Condition cond,
2342 Register rd,
2343 const Operand& operand) {
2344 switch (flags) {
2345 case LeaveFlags:
2346 Mov(cond, rd, operand);
2347 break;
2348 case SetFlags:
2349 Movs(cond, rd, operand);
2350 break;
2351 case DontCare:
2352 bool can_be_16bit_encoded =
2353 IsUsingT32() && cond.Is(al) &&
2354 ((operand.IsImmediateShiftedRegister() && rd.IsLow() &&
2355 operand.GetBaseRegister().IsLow() &&
2356 (operand.GetShiftAmount() < 32) &&
2357 (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() ||
2358 operand.GetShift().IsASR())) ||
2359 (operand.IsRegisterShiftedRegister() && rd.IsLow() &&
2360 operand.GetBaseRegister().Is(rd) &&
2361 operand.GetShiftRegister().IsLow() &&
2362 (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() ||
2363 operand.GetShift().IsASR() || operand.GetShift().IsROR())) ||
2364 (operand.IsImmediate() && rd.IsLow() &&
2365 (operand.GetImmediate() < 256)));
2366 if (can_be_16bit_encoded) {
2367 Movs(cond, rd, operand);
2368 } else {
2369 Mov(cond, rd, operand);
2370 }
2371 break;
2372 }
2373 }
2374 void Mov(FlagsUpdate flags, Register rd, const Operand& operand) {
2375 Mov(flags, al, rd, operand);
2376 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002377
2378 void Movs(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002379 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2380 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002381 VIXL_ASSERT(allow_macro_instructions_);
2382 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002383 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002384 ITScope it_scope(this, &cond);
2385 movs(cond, rd, operand);
2386 }
2387 void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); }
2388
2389 void Movt(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002390 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2391 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002392 VIXL_ASSERT(allow_macro_instructions_);
2393 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002394 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002395 ITScope it_scope(this, &cond);
2396 movt(cond, rd, operand);
2397 }
2398 void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); }
2399
Alexandre Ramesd3832962016-07-04 15:03:43 +01002400
2401 void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002402 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002403 VIXL_ASSERT(allow_macro_instructions_);
2404 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002405 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002406 ITScope it_scope(this, &cond);
2407 mrs(cond, rd, spec_reg);
2408 }
2409 void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); }
2410
2411 void Msr(Condition cond,
2412 MaskedSpecialRegister spec_reg,
2413 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002414 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002415 VIXL_ASSERT(allow_macro_instructions_);
2416 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002417 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002418 ITScope it_scope(this, &cond);
2419 msr(cond, spec_reg, operand);
2420 }
2421 void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) {
2422 Msr(al, spec_reg, operand);
2423 }
2424
2425 void Mul(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002426 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2427 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2428 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002429 VIXL_ASSERT(allow_macro_instructions_);
2430 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002431 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002432 bool can_use_it =
2433 // MUL<c>{<q>} <Rdm>, <Rn>{, <Rdm>} ; T1
2434 rd.Is(rm) && rn.IsLow() && rm.IsLow();
2435 ITScope it_scope(this, &cond, can_use_it);
2436 mul(cond, rd, rn, rm);
2437 }
2438 void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002439 void Mul(FlagsUpdate flags,
2440 Condition cond,
2441 Register rd,
2442 Register rn,
2443 Register rm) {
2444 switch (flags) {
2445 case LeaveFlags:
2446 Mul(cond, rd, rn, rm);
2447 break;
2448 case SetFlags:
2449 Muls(cond, rd, rn, rm);
2450 break;
2451 case DontCare:
2452 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2453 rn.IsLow() && rm.Is(rd);
2454 if (can_be_16bit_encoded) {
2455 Muls(cond, rd, rn, rm);
2456 } else {
2457 Mul(cond, rd, rn, rm);
2458 }
2459 break;
2460 }
2461 }
2462 void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) {
2463 Mul(flags, al, rd, rn, rm);
2464 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002465
2466 void Muls(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002467 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2468 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2469 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002470 VIXL_ASSERT(allow_macro_instructions_);
2471 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002472 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002473 ITScope it_scope(this, &cond);
2474 muls(cond, rd, rn, rm);
2475 }
2476 void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); }
2477
2478 void Mvn(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002479 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2480 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002481 VIXL_ASSERT(allow_macro_instructions_);
2482 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002483 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002484 bool can_use_it =
2485 // MVN<c>{<q>} <Rd>, <Rm> ; T1
2486 operand.IsPlainRegister() && rd.IsLow() &&
2487 operand.GetBaseRegister().IsLow();
2488 ITScope it_scope(this, &cond, can_use_it);
2489 mvn(cond, rd, operand);
2490 }
2491 void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002492 void Mvn(FlagsUpdate flags,
2493 Condition cond,
2494 Register rd,
2495 const Operand& operand) {
2496 switch (flags) {
2497 case LeaveFlags:
2498 Mvn(cond, rd, operand);
2499 break;
2500 case SetFlags:
2501 Mvns(cond, rd, operand);
2502 break;
2503 case DontCare:
2504 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2505 operand.IsPlainRegister() &&
2506 operand.GetBaseRegister().IsLow();
2507 if (can_be_16bit_encoded) {
2508 Mvns(cond, rd, operand);
2509 } else {
2510 Mvn(cond, rd, operand);
2511 }
2512 break;
2513 }
2514 }
2515 void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) {
2516 Mvn(flags, al, rd, operand);
2517 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002518
2519 void Mvns(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002520 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2521 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002522 VIXL_ASSERT(allow_macro_instructions_);
2523 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002524 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002525 ITScope it_scope(this, &cond);
2526 mvns(cond, rd, operand);
2527 }
2528 void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); }
2529
2530 void Nop(Condition cond) {
2531 VIXL_ASSERT(allow_macro_instructions_);
2532 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002533 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002534 ITScope it_scope(this, &cond);
2535 nop(cond);
2536 }
2537 void Nop() { Nop(al); }
2538
2539 void Orn(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002540 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2541 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2542 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002543 VIXL_ASSERT(allow_macro_instructions_);
2544 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002545 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002546 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002547 uint32_t immediate = operand.GetImmediate();
2548 if (immediate == 0) {
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002549 mvn(rd, 0);
Alexandre Rames628c5262016-09-21 11:52:30 +01002550 return;
2551 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002552 if ((immediate == 0xffffffff) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002553 return;
2554 }
2555 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002556 ITScope it_scope(this, &cond);
2557 orn(cond, rd, rn, operand);
2558 }
2559 void Orn(Register rd, Register rn, const Operand& operand) {
2560 Orn(al, rd, rn, operand);
2561 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002562 void Orn(FlagsUpdate flags,
2563 Condition cond,
2564 Register rd,
2565 Register rn,
2566 const Operand& operand) {
2567 switch (flags) {
2568 case LeaveFlags:
2569 Orn(cond, rd, rn, operand);
2570 break;
2571 case SetFlags:
2572 Orns(cond, rd, rn, operand);
2573 break;
2574 case DontCare:
2575 Orn(cond, rd, rn, operand);
2576 break;
2577 }
2578 }
2579 void Orn(FlagsUpdate flags,
2580 Register rd,
2581 Register rn,
2582 const Operand& operand) {
2583 Orn(flags, al, rd, rn, operand);
2584 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002585
2586 void Orns(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002587 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2588 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2589 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002590 VIXL_ASSERT(allow_macro_instructions_);
2591 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002592 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002593 ITScope it_scope(this, &cond);
2594 orns(cond, rd, rn, operand);
2595 }
2596 void Orns(Register rd, Register rn, const Operand& operand) {
2597 Orns(al, rd, rn, operand);
2598 }
2599
2600 void Orr(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002601 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2602 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2603 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002604 VIXL_ASSERT(allow_macro_instructions_);
2605 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002606 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002607 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002608 uint32_t immediate = operand.GetImmediate();
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002609 if ((immediate == 0) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002610 return;
2611 }
2612 if (immediate == 0xffffffff) {
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002613 mvn(rd, 0);
Alexandre Rames628c5262016-09-21 11:52:30 +01002614 return;
2615 }
2616 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002617 bool can_use_it =
2618 // ORR<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
2619 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
2620 operand.GetBaseRegister().IsLow();
2621 ITScope it_scope(this, &cond, can_use_it);
2622 orr(cond, rd, rn, operand);
2623 }
2624 void Orr(Register rd, Register rn, const Operand& operand) {
2625 Orr(al, rd, rn, operand);
2626 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002627 void Orr(FlagsUpdate flags,
2628 Condition cond,
2629 Register rd,
2630 Register rn,
2631 const Operand& operand) {
2632 switch (flags) {
2633 case LeaveFlags:
2634 Orr(cond, rd, rn, operand);
2635 break;
2636 case SetFlags:
2637 Orrs(cond, rd, rn, operand);
2638 break;
2639 case DontCare:
2640 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2641 rn.Is(rd) && operand.IsPlainRegister() &&
2642 operand.GetBaseRegister().IsLow();
2643 if (can_be_16bit_encoded) {
2644 Orrs(cond, rd, rn, operand);
2645 } else {
2646 Orr(cond, rd, rn, operand);
2647 }
2648 break;
2649 }
2650 }
2651 void Orr(FlagsUpdate flags,
2652 Register rd,
2653 Register rn,
2654 const Operand& operand) {
2655 Orr(flags, al, rd, rn, operand);
2656 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002657
2658 void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002659 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2660 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2661 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002662 VIXL_ASSERT(allow_macro_instructions_);
2663 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002664 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002665 ITScope it_scope(this, &cond);
2666 orrs(cond, rd, rn, operand);
2667 }
2668 void Orrs(Register rd, Register rn, const Operand& operand) {
2669 Orrs(al, rd, rn, operand);
2670 }
2671
2672 void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002673 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2674 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2675 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002676 VIXL_ASSERT(allow_macro_instructions_);
2677 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002678 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002679 ITScope it_scope(this, &cond);
2680 pkhbt(cond, rd, rn, operand);
2681 }
2682 void Pkhbt(Register rd, Register rn, const Operand& operand) {
2683 Pkhbt(al, rd, rn, operand);
2684 }
2685
2686 void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002687 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2688 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2689 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002690 VIXL_ASSERT(allow_macro_instructions_);
2691 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002692 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002693 ITScope it_scope(this, &cond);
2694 pkhtb(cond, rd, rn, operand);
2695 }
2696 void Pkhtb(Register rd, Register rn, const Operand& operand) {
2697 Pkhtb(al, rd, rn, operand);
2698 }
2699
2700 void Pld(Condition cond, Label* label) {
2701 VIXL_ASSERT(allow_macro_instructions_);
2702 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002703 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002704 ITScope it_scope(this, &cond);
2705 pld(cond, label);
2706 }
2707 void Pld(Label* label) { Pld(al, label); }
2708
2709 void Pld(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002710 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002711 VIXL_ASSERT(allow_macro_instructions_);
2712 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002713 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002714 ITScope it_scope(this, &cond);
2715 pld(cond, operand);
2716 }
2717 void Pld(const MemOperand& operand) { Pld(al, operand); }
2718
2719 void Pldw(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002720 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002721 VIXL_ASSERT(allow_macro_instructions_);
2722 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002723 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002724 ITScope it_scope(this, &cond);
2725 pldw(cond, operand);
2726 }
2727 void Pldw(const MemOperand& operand) { Pldw(al, operand); }
2728
2729 void Pli(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002730 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002731 VIXL_ASSERT(allow_macro_instructions_);
2732 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002733 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002734 ITScope it_scope(this, &cond);
2735 pli(cond, operand);
2736 }
2737 void Pli(const MemOperand& operand) { Pli(al, operand); }
2738
2739 void Pli(Condition cond, Label* label) {
2740 VIXL_ASSERT(allow_macro_instructions_);
2741 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002742 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002743 ITScope it_scope(this, &cond);
2744 pli(cond, label);
2745 }
2746 void Pli(Label* label) { Pli(al, label); }
2747
2748 void Pop(Condition cond, RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002749 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002750 VIXL_ASSERT(allow_macro_instructions_);
2751 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002752 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002753 ITScope it_scope(this, &cond);
2754 pop(cond, registers);
2755 }
2756 void Pop(RegisterList registers) { Pop(al, registers); }
2757
2758 void Pop(Condition cond, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002759 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002760 VIXL_ASSERT(allow_macro_instructions_);
2761 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002762 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002763 ITScope it_scope(this, &cond);
2764 pop(cond, rt);
2765 }
2766 void Pop(Register rt) { Pop(al, rt); }
2767
2768 void Push(Condition cond, RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002769 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002770 VIXL_ASSERT(allow_macro_instructions_);
2771 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002772 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002773 ITScope it_scope(this, &cond);
2774 push(cond, registers);
2775 }
2776 void Push(RegisterList registers) { Push(al, registers); }
2777
2778 void Push(Condition cond, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002779 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002780 VIXL_ASSERT(allow_macro_instructions_);
2781 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002782 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002783 ITScope it_scope(this, &cond);
2784 push(cond, rt);
2785 }
2786 void Push(Register rt) { Push(al, rt); }
2787
2788 void Qadd(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002789 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2790 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2791 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002792 VIXL_ASSERT(allow_macro_instructions_);
2793 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002794 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002795 ITScope it_scope(this, &cond);
2796 qadd(cond, rd, rm, rn);
2797 }
2798 void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); }
2799
2800 void Qadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002801 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2802 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2803 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002804 VIXL_ASSERT(allow_macro_instructions_);
2805 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002806 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002807 ITScope it_scope(this, &cond);
2808 qadd16(cond, rd, rn, rm);
2809 }
2810 void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); }
2811
2812 void Qadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002813 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2814 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2815 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002816 VIXL_ASSERT(allow_macro_instructions_);
2817 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002818 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002819 ITScope it_scope(this, &cond);
2820 qadd8(cond, rd, rn, rm);
2821 }
2822 void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); }
2823
2824 void Qasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002825 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2826 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2827 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002828 VIXL_ASSERT(allow_macro_instructions_);
2829 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002830 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002831 ITScope it_scope(this, &cond);
2832 qasx(cond, rd, rn, rm);
2833 }
2834 void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); }
2835
2836 void Qdadd(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002837 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2838 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2839 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002840 VIXL_ASSERT(allow_macro_instructions_);
2841 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002842 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002843 ITScope it_scope(this, &cond);
2844 qdadd(cond, rd, rm, rn);
2845 }
2846 void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); }
2847
2848 void Qdsub(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002849 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2850 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2851 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002852 VIXL_ASSERT(allow_macro_instructions_);
2853 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002854 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002855 ITScope it_scope(this, &cond);
2856 qdsub(cond, rd, rm, rn);
2857 }
2858 void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); }
2859
2860 void Qsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002861 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2862 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2863 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002864 VIXL_ASSERT(allow_macro_instructions_);
2865 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002866 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002867 ITScope it_scope(this, &cond);
2868 qsax(cond, rd, rn, rm);
2869 }
2870 void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); }
2871
2872 void Qsub(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002873 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2874 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2875 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002876 VIXL_ASSERT(allow_macro_instructions_);
2877 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002878 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002879 ITScope it_scope(this, &cond);
2880 qsub(cond, rd, rm, rn);
2881 }
2882 void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); }
2883
2884 void Qsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002885 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2886 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2887 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002888 VIXL_ASSERT(allow_macro_instructions_);
2889 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002890 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002891 ITScope it_scope(this, &cond);
2892 qsub16(cond, rd, rn, rm);
2893 }
2894 void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); }
2895
2896 void Qsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002897 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2898 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2899 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002900 VIXL_ASSERT(allow_macro_instructions_);
2901 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002902 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002903 ITScope it_scope(this, &cond);
2904 qsub8(cond, rd, rn, rm);
2905 }
2906 void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); }
2907
2908 void Rbit(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002909 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2910 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002911 VIXL_ASSERT(allow_macro_instructions_);
2912 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002913 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002914 ITScope it_scope(this, &cond);
2915 rbit(cond, rd, rm);
2916 }
2917 void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); }
2918
2919 void Rev(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002920 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2921 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002922 VIXL_ASSERT(allow_macro_instructions_);
2923 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002924 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002925 ITScope it_scope(this, &cond);
2926 rev(cond, rd, rm);
2927 }
2928 void Rev(Register rd, Register rm) { Rev(al, rd, rm); }
2929
2930 void Rev16(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002931 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2932 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002933 VIXL_ASSERT(allow_macro_instructions_);
2934 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002935 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002936 ITScope it_scope(this, &cond);
2937 rev16(cond, rd, rm);
2938 }
2939 void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); }
2940
2941 void Revsh(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002942 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2943 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002944 VIXL_ASSERT(allow_macro_instructions_);
2945 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002946 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002947 ITScope it_scope(this, &cond);
2948 revsh(cond, rd, rm);
2949 }
2950 void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); }
2951
2952 void Ror(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002953 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2954 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2955 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002956 VIXL_ASSERT(allow_macro_instructions_);
2957 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07002958 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002959 bool can_use_it =
2960 // ROR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
2961 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2962 (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) ||
2963 // ROR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
2964 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
2965 operand.GetBaseRegister().IsLow());
2966 ITScope it_scope(this, &cond, can_use_it);
2967 ror(cond, rd, rm, operand);
2968 }
2969 void Ror(Register rd, Register rm, const Operand& operand) {
2970 Ror(al, rd, rm, operand);
2971 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002972 void Ror(FlagsUpdate flags,
2973 Condition cond,
2974 Register rd,
2975 Register rm,
2976 const Operand& operand) {
2977 switch (flags) {
2978 case LeaveFlags:
2979 Ror(cond, rd, rm, operand);
2980 break;
2981 case SetFlags:
2982 Rors(cond, rd, rm, operand);
2983 break;
2984 case DontCare:
2985 Ror(cond, rd, rm, operand);
2986 break;
2987 }
2988 }
2989 void Ror(FlagsUpdate flags,
2990 Register rd,
2991 Register rm,
2992 const Operand& operand) {
2993 Ror(flags, al, rd, rm, operand);
2994 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002995
2996 void Rors(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002997 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2998 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2999 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003000 VIXL_ASSERT(allow_macro_instructions_);
3001 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003002 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003003 ITScope it_scope(this, &cond);
3004 rors(cond, rd, rm, operand);
3005 }
3006 void Rors(Register rd, Register rm, const Operand& operand) {
3007 Rors(al, rd, rm, operand);
3008 }
3009
3010 void Rrx(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003011 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3012 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003013 VIXL_ASSERT(allow_macro_instructions_);
3014 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003015 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003016 ITScope it_scope(this, &cond);
3017 rrx(cond, rd, rm);
3018 }
3019 void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); }
Vincent Belliard934696d2016-08-18 11:03:56 -07003020 void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) {
3021 switch (flags) {
3022 case LeaveFlags:
3023 Rrx(cond, rd, rm);
3024 break;
3025 case SetFlags:
3026 Rrxs(cond, rd, rm);
3027 break;
3028 case DontCare:
3029 Rrx(cond, rd, rm);
3030 break;
3031 }
3032 }
3033 void Rrx(FlagsUpdate flags, Register rd, Register rm) {
3034 Rrx(flags, al, rd, rm);
3035 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003036
3037 void Rrxs(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003038 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3039 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003040 VIXL_ASSERT(allow_macro_instructions_);
3041 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003042 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003043 ITScope it_scope(this, &cond);
3044 rrxs(cond, rd, rm);
3045 }
3046 void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); }
3047
3048 void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003049 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3050 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3051 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003052 VIXL_ASSERT(allow_macro_instructions_);
3053 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003054 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003055 bool can_use_it =
3056 // RSB<c>{<q>} {<Rd>, }<Rn>, #0 ; T1
3057 operand.IsImmediate() && rd.IsLow() && rn.IsLow() &&
3058 (operand.GetImmediate() == 0);
3059 ITScope it_scope(this, &cond, can_use_it);
3060 rsb(cond, rd, rn, operand);
3061 }
3062 void Rsb(Register rd, Register rn, const Operand& operand) {
3063 Rsb(al, rd, rn, operand);
3064 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003065 void Rsb(FlagsUpdate flags,
3066 Condition cond,
3067 Register rd,
3068 Register rn,
3069 const Operand& operand) {
3070 switch (flags) {
3071 case LeaveFlags:
3072 Rsb(cond, rd, rn, operand);
3073 break;
3074 case SetFlags:
3075 Rsbs(cond, rd, rn, operand);
3076 break;
3077 case DontCare:
3078 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
3079 rn.IsLow() && operand.IsImmediate() &&
3080 (operand.GetImmediate() == 0);
3081 if (can_be_16bit_encoded) {
3082 Rsbs(cond, rd, rn, operand);
3083 } else {
3084 Rsb(cond, rd, rn, operand);
3085 }
3086 break;
3087 }
3088 }
3089 void Rsb(FlagsUpdate flags,
3090 Register rd,
3091 Register rn,
3092 const Operand& operand) {
3093 Rsb(flags, al, rd, rn, operand);
3094 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003095
3096 void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003097 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3098 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3099 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003100 VIXL_ASSERT(allow_macro_instructions_);
3101 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003102 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003103 ITScope it_scope(this, &cond);
3104 rsbs(cond, rd, rn, operand);
3105 }
3106 void Rsbs(Register rd, Register rn, const Operand& operand) {
3107 Rsbs(al, rd, rn, operand);
3108 }
3109
3110 void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003111 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3112 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3113 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003114 VIXL_ASSERT(allow_macro_instructions_);
3115 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003116 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003117 ITScope it_scope(this, &cond);
3118 rsc(cond, rd, rn, operand);
3119 }
3120 void Rsc(Register rd, Register rn, const Operand& operand) {
3121 Rsc(al, rd, rn, operand);
3122 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003123 void Rsc(FlagsUpdate flags,
3124 Condition cond,
3125 Register rd,
3126 Register rn,
3127 const Operand& operand) {
3128 switch (flags) {
3129 case LeaveFlags:
3130 Rsc(cond, rd, rn, operand);
3131 break;
3132 case SetFlags:
3133 Rscs(cond, rd, rn, operand);
3134 break;
3135 case DontCare:
3136 Rsc(cond, rd, rn, operand);
3137 break;
3138 }
3139 }
3140 void Rsc(FlagsUpdate flags,
3141 Register rd,
3142 Register rn,
3143 const Operand& operand) {
3144 Rsc(flags, al, rd, rn, operand);
3145 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003146
3147 void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003148 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3149 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3150 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003151 VIXL_ASSERT(allow_macro_instructions_);
3152 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003153 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003154 ITScope it_scope(this, &cond);
3155 rscs(cond, rd, rn, operand);
3156 }
3157 void Rscs(Register rd, Register rn, const Operand& operand) {
3158 Rscs(al, rd, rn, operand);
3159 }
3160
3161 void Sadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003162 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3163 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3164 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003165 VIXL_ASSERT(allow_macro_instructions_);
3166 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003167 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003168 ITScope it_scope(this, &cond);
3169 sadd16(cond, rd, rn, rm);
3170 }
3171 void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); }
3172
3173 void Sadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003174 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3175 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3176 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003177 VIXL_ASSERT(allow_macro_instructions_);
3178 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003179 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003180 ITScope it_scope(this, &cond);
3181 sadd8(cond, rd, rn, rm);
3182 }
3183 void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); }
3184
3185 void Sasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003186 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3187 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3188 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003189 VIXL_ASSERT(allow_macro_instructions_);
3190 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003191 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003192 ITScope it_scope(this, &cond);
3193 sasx(cond, rd, rn, rm);
3194 }
3195 void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); }
3196
3197 void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003198 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3199 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3200 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003201 VIXL_ASSERT(allow_macro_instructions_);
3202 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003203 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003204 bool can_use_it =
3205 // SBC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
3206 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) &&
3207 operand.GetBaseRegister().IsLow();
3208 ITScope it_scope(this, &cond, can_use_it);
3209 sbc(cond, rd, rn, operand);
3210 }
3211 void Sbc(Register rd, Register rn, const Operand& operand) {
3212 Sbc(al, rd, rn, operand);
3213 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003214 void Sbc(FlagsUpdate flags,
3215 Condition cond,
3216 Register rd,
3217 Register rn,
3218 const Operand& operand) {
3219 switch (flags) {
3220 case LeaveFlags:
3221 Sbc(cond, rd, rn, operand);
3222 break;
3223 case SetFlags:
3224 Sbcs(cond, rd, rn, operand);
3225 break;
3226 case DontCare:
3227 bool can_be_16bit_encoded = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
3228 rn.Is(rd) && operand.IsPlainRegister() &&
3229 operand.GetBaseRegister().IsLow();
3230 if (can_be_16bit_encoded) {
3231 Sbcs(cond, rd, rn, operand);
3232 } else {
3233 Sbc(cond, rd, rn, operand);
3234 }
3235 break;
3236 }
3237 }
3238 void Sbc(FlagsUpdate flags,
3239 Register rd,
3240 Register rn,
3241 const Operand& operand) {
3242 Sbc(flags, al, rd, rn, operand);
3243 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003244
3245 void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003246 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3247 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3248 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003249 VIXL_ASSERT(allow_macro_instructions_);
3250 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003251 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003252 ITScope it_scope(this, &cond);
3253 sbcs(cond, rd, rn, operand);
3254 }
3255 void Sbcs(Register rd, Register rn, const Operand& operand) {
3256 Sbcs(al, rd, rn, operand);
3257 }
3258
3259 void Sbfx(Condition cond,
3260 Register rd,
3261 Register rn,
3262 uint32_t lsb,
3263 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003264 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3265 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3266 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003267 VIXL_ASSERT(allow_macro_instructions_);
3268 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003269 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003270 ITScope it_scope(this, &cond);
3271 sbfx(cond, rd, rn, lsb, operand);
3272 }
3273 void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) {
3274 Sbfx(al, rd, rn, lsb, operand);
3275 }
3276
3277 void Sdiv(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003278 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3279 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3280 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003281 VIXL_ASSERT(allow_macro_instructions_);
3282 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003283 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003284 ITScope it_scope(this, &cond);
3285 sdiv(cond, rd, rn, rm);
3286 }
3287 void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); }
3288
3289 void Sel(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003290 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3291 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3292 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003293 VIXL_ASSERT(allow_macro_instructions_);
3294 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003295 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003296 ITScope it_scope(this, &cond);
3297 sel(cond, rd, rn, rm);
3298 }
3299 void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); }
3300
3301 void Shadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003302 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3303 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3304 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003305 VIXL_ASSERT(allow_macro_instructions_);
3306 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003307 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003308 ITScope it_scope(this, &cond);
3309 shadd16(cond, rd, rn, rm);
3310 }
3311 void Shadd16(Register rd, Register rn, Register rm) {
3312 Shadd16(al, rd, rn, rm);
3313 }
3314
3315 void Shadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003316 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3317 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3318 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003319 VIXL_ASSERT(allow_macro_instructions_);
3320 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003321 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003322 ITScope it_scope(this, &cond);
3323 shadd8(cond, rd, rn, rm);
3324 }
3325 void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); }
3326
3327 void Shasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003328 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3329 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3330 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003331 VIXL_ASSERT(allow_macro_instructions_);
3332 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003333 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003334 ITScope it_scope(this, &cond);
3335 shasx(cond, rd, rn, rm);
3336 }
3337 void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); }
3338
3339 void Shsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003340 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3341 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3342 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003343 VIXL_ASSERT(allow_macro_instructions_);
3344 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003345 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003346 ITScope it_scope(this, &cond);
3347 shsax(cond, rd, rn, rm);
3348 }
3349 void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); }
3350
3351 void Shsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003352 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3353 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3354 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003355 VIXL_ASSERT(allow_macro_instructions_);
3356 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003357 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003358 ITScope it_scope(this, &cond);
3359 shsub16(cond, rd, rn, rm);
3360 }
3361 void Shsub16(Register rd, Register rn, Register rm) {
3362 Shsub16(al, rd, rn, rm);
3363 }
3364
3365 void Shsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003366 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3367 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3368 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003369 VIXL_ASSERT(allow_macro_instructions_);
3370 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003371 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003372 ITScope it_scope(this, &cond);
3373 shsub8(cond, rd, rn, rm);
3374 }
3375 void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); }
3376
3377 void Smlabb(
3378 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003379 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3380 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3381 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3382 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003383 VIXL_ASSERT(allow_macro_instructions_);
3384 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003385 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003386 ITScope it_scope(this, &cond);
3387 smlabb(cond, rd, rn, rm, ra);
3388 }
3389 void Smlabb(Register rd, Register rn, Register rm, Register ra) {
3390 Smlabb(al, rd, rn, rm, ra);
3391 }
3392
3393 void Smlabt(
3394 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003395 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3396 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3397 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3398 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003399 VIXL_ASSERT(allow_macro_instructions_);
3400 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003401 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003402 ITScope it_scope(this, &cond);
3403 smlabt(cond, rd, rn, rm, ra);
3404 }
3405 void Smlabt(Register rd, Register rn, Register rm, Register ra) {
3406 Smlabt(al, rd, rn, rm, ra);
3407 }
3408
3409 void Smlad(
3410 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003411 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3412 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3413 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3414 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003415 VIXL_ASSERT(allow_macro_instructions_);
3416 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003417 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003418 ITScope it_scope(this, &cond);
3419 smlad(cond, rd, rn, rm, ra);
3420 }
3421 void Smlad(Register rd, Register rn, Register rm, Register ra) {
3422 Smlad(al, rd, rn, rm, ra);
3423 }
3424
3425 void Smladx(
3426 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003427 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3428 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3429 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3430 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003431 VIXL_ASSERT(allow_macro_instructions_);
3432 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003433 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003434 ITScope it_scope(this, &cond);
3435 smladx(cond, rd, rn, rm, ra);
3436 }
3437 void Smladx(Register rd, Register rn, Register rm, Register ra) {
3438 Smladx(al, rd, rn, rm, ra);
3439 }
3440
3441 void Smlal(
3442 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003443 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3444 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3445 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3446 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003447 VIXL_ASSERT(allow_macro_instructions_);
3448 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003449 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003450 ITScope it_scope(this, &cond);
3451 smlal(cond, rdlo, rdhi, rn, rm);
3452 }
3453 void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) {
3454 Smlal(al, rdlo, rdhi, rn, rm);
3455 }
3456
3457 void Smlalbb(
3458 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003459 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3460 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
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());
Vincent Belliard8885c172016-08-24 11:33:19 -07003465 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003466 ITScope it_scope(this, &cond);
3467 smlalbb(cond, rdlo, rdhi, rn, rm);
3468 }
3469 void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) {
3470 Smlalbb(al, rdlo, rdhi, rn, rm);
3471 }
3472
3473 void Smlalbt(
3474 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003475 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3476 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3477 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3478 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003479 VIXL_ASSERT(allow_macro_instructions_);
3480 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003481 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003482 ITScope it_scope(this, &cond);
3483 smlalbt(cond, rdlo, rdhi, rn, rm);
3484 }
3485 void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) {
3486 Smlalbt(al, rdlo, rdhi, rn, rm);
3487 }
3488
3489 void Smlald(
3490 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003491 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3492 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3493 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3494 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003495 VIXL_ASSERT(allow_macro_instructions_);
3496 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003497 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003498 ITScope it_scope(this, &cond);
3499 smlald(cond, rdlo, rdhi, rn, rm);
3500 }
3501 void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) {
3502 Smlald(al, rdlo, rdhi, rn, rm);
3503 }
3504
3505 void Smlaldx(
3506 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003507 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3508 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3509 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3510 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003511 VIXL_ASSERT(allow_macro_instructions_);
3512 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003513 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003514 ITScope it_scope(this, &cond);
3515 smlaldx(cond, rdlo, rdhi, rn, rm);
3516 }
3517 void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) {
3518 Smlaldx(al, rdlo, rdhi, rn, rm);
3519 }
3520
3521 void Smlals(
3522 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003523 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3524 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3525 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3526 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003527 VIXL_ASSERT(allow_macro_instructions_);
3528 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003529 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003530 ITScope it_scope(this, &cond);
3531 smlals(cond, rdlo, rdhi, rn, rm);
3532 }
3533 void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) {
3534 Smlals(al, rdlo, rdhi, rn, rm);
3535 }
3536
3537 void Smlaltb(
3538 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003539 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3540 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3541 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3542 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003543 VIXL_ASSERT(allow_macro_instructions_);
3544 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003545 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003546 ITScope it_scope(this, &cond);
3547 smlaltb(cond, rdlo, rdhi, rn, rm);
3548 }
3549 void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) {
3550 Smlaltb(al, rdlo, rdhi, rn, rm);
3551 }
3552
3553 void Smlaltt(
3554 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003555 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3556 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3557 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3558 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003559 VIXL_ASSERT(allow_macro_instructions_);
3560 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003561 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003562 ITScope it_scope(this, &cond);
3563 smlaltt(cond, rdlo, rdhi, rn, rm);
3564 }
3565 void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) {
3566 Smlaltt(al, rdlo, rdhi, rn, rm);
3567 }
3568
3569 void Smlatb(
3570 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003571 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3572 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3573 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3574 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003575 VIXL_ASSERT(allow_macro_instructions_);
3576 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003577 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003578 ITScope it_scope(this, &cond);
3579 smlatb(cond, rd, rn, rm, ra);
3580 }
3581 void Smlatb(Register rd, Register rn, Register rm, Register ra) {
3582 Smlatb(al, rd, rn, rm, ra);
3583 }
3584
3585 void Smlatt(
3586 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003587 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3588 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3589 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3590 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003591 VIXL_ASSERT(allow_macro_instructions_);
3592 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003593 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003594 ITScope it_scope(this, &cond);
3595 smlatt(cond, rd, rn, rm, ra);
3596 }
3597 void Smlatt(Register rd, Register rn, Register rm, Register ra) {
3598 Smlatt(al, rd, rn, rm, ra);
3599 }
3600
3601 void Smlawb(
3602 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003603 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3604 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3605 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3606 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003607 VIXL_ASSERT(allow_macro_instructions_);
3608 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003609 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003610 ITScope it_scope(this, &cond);
3611 smlawb(cond, rd, rn, rm, ra);
3612 }
3613 void Smlawb(Register rd, Register rn, Register rm, Register ra) {
3614 Smlawb(al, rd, rn, rm, ra);
3615 }
3616
3617 void Smlawt(
3618 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003619 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3620 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3621 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3622 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003623 VIXL_ASSERT(allow_macro_instructions_);
3624 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003625 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003626 ITScope it_scope(this, &cond);
3627 smlawt(cond, rd, rn, rm, ra);
3628 }
3629 void Smlawt(Register rd, Register rn, Register rm, Register ra) {
3630 Smlawt(al, rd, rn, rm, ra);
3631 }
3632
3633 void Smlsd(
3634 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003635 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3636 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3637 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3638 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003639 VIXL_ASSERT(allow_macro_instructions_);
3640 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003641 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003642 ITScope it_scope(this, &cond);
3643 smlsd(cond, rd, rn, rm, ra);
3644 }
3645 void Smlsd(Register rd, Register rn, Register rm, Register ra) {
3646 Smlsd(al, rd, rn, rm, ra);
3647 }
3648
3649 void Smlsdx(
3650 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003651 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3652 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3653 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3654 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003655 VIXL_ASSERT(allow_macro_instructions_);
3656 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003657 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003658 ITScope it_scope(this, &cond);
3659 smlsdx(cond, rd, rn, rm, ra);
3660 }
3661 void Smlsdx(Register rd, Register rn, Register rm, Register ra) {
3662 Smlsdx(al, rd, rn, rm, ra);
3663 }
3664
3665 void Smlsld(
3666 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003667 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3668 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3669 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3670 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003671 VIXL_ASSERT(allow_macro_instructions_);
3672 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003673 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003674 ITScope it_scope(this, &cond);
3675 smlsld(cond, rdlo, rdhi, rn, rm);
3676 }
3677 void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) {
3678 Smlsld(al, rdlo, rdhi, rn, rm);
3679 }
3680
3681 void Smlsldx(
3682 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003683 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3684 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3685 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3686 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003687 VIXL_ASSERT(allow_macro_instructions_);
3688 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003689 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003690 ITScope it_scope(this, &cond);
3691 smlsldx(cond, rdlo, rdhi, rn, rm);
3692 }
3693 void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) {
3694 Smlsldx(al, rdlo, rdhi, rn, rm);
3695 }
3696
3697 void Smmla(
3698 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003699 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3700 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3701 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3702 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003703 VIXL_ASSERT(allow_macro_instructions_);
3704 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003705 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003706 ITScope it_scope(this, &cond);
3707 smmla(cond, rd, rn, rm, ra);
3708 }
3709 void Smmla(Register rd, Register rn, Register rm, Register ra) {
3710 Smmla(al, rd, rn, rm, ra);
3711 }
3712
3713 void Smmlar(
3714 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003715 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3716 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3717 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3718 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003719 VIXL_ASSERT(allow_macro_instructions_);
3720 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003721 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003722 ITScope it_scope(this, &cond);
3723 smmlar(cond, rd, rn, rm, ra);
3724 }
3725 void Smmlar(Register rd, Register rn, Register rm, Register ra) {
3726 Smmlar(al, rd, rn, rm, ra);
3727 }
3728
3729 void Smmls(
3730 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003731 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3732 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3733 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3734 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003735 VIXL_ASSERT(allow_macro_instructions_);
3736 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003737 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003738 ITScope it_scope(this, &cond);
3739 smmls(cond, rd, rn, rm, ra);
3740 }
3741 void Smmls(Register rd, Register rn, Register rm, Register ra) {
3742 Smmls(al, rd, rn, rm, ra);
3743 }
3744
3745 void Smmlsr(
3746 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003747 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3748 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3749 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3750 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003751 VIXL_ASSERT(allow_macro_instructions_);
3752 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003753 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003754 ITScope it_scope(this, &cond);
3755 smmlsr(cond, rd, rn, rm, ra);
3756 }
3757 void Smmlsr(Register rd, Register rn, Register rm, Register ra) {
3758 Smmlsr(al, rd, rn, rm, ra);
3759 }
3760
3761 void Smmul(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003762 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3763 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3764 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003765 VIXL_ASSERT(allow_macro_instructions_);
3766 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003767 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003768 ITScope it_scope(this, &cond);
3769 smmul(cond, rd, rn, rm);
3770 }
3771 void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); }
3772
3773 void Smmulr(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003774 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3775 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3776 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003777 VIXL_ASSERT(allow_macro_instructions_);
3778 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003779 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003780 ITScope it_scope(this, &cond);
3781 smmulr(cond, rd, rn, rm);
3782 }
3783 void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); }
3784
3785 void Smuad(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003786 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3787 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3788 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003789 VIXL_ASSERT(allow_macro_instructions_);
3790 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003791 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003792 ITScope it_scope(this, &cond);
3793 smuad(cond, rd, rn, rm);
3794 }
3795 void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); }
3796
3797 void Smuadx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003798 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
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());
Vincent Belliard8885c172016-08-24 11:33:19 -07003803 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003804 ITScope it_scope(this, &cond);
3805 smuadx(cond, rd, rn, rm);
3806 }
3807 void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); }
3808
3809 void Smulbb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003810 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3811 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3812 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003813 VIXL_ASSERT(allow_macro_instructions_);
3814 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003815 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003816 ITScope it_scope(this, &cond);
3817 smulbb(cond, rd, rn, rm);
3818 }
3819 void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); }
3820
3821 void Smulbt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003822 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3823 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3824 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003825 VIXL_ASSERT(allow_macro_instructions_);
3826 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003827 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003828 ITScope it_scope(this, &cond);
3829 smulbt(cond, rd, rn, rm);
3830 }
3831 void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); }
3832
3833 void Smull(
3834 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003835 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3836 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3837 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3838 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003839 VIXL_ASSERT(allow_macro_instructions_);
3840 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003841 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003842 ITScope it_scope(this, &cond);
3843 smull(cond, rdlo, rdhi, rn, rm);
3844 }
3845 void Smull(Register rdlo, Register rdhi, Register rn, Register rm) {
3846 Smull(al, rdlo, rdhi, rn, rm);
3847 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003848 void Smull(FlagsUpdate flags,
3849 Condition cond,
3850 Register rdlo,
3851 Register rdhi,
3852 Register rn,
3853 Register rm) {
3854 switch (flags) {
3855 case LeaveFlags:
3856 Smull(cond, rdlo, rdhi, rn, rm);
3857 break;
3858 case SetFlags:
3859 Smulls(cond, rdlo, rdhi, rn, rm);
3860 break;
3861 case DontCare:
3862 Smull(cond, rdlo, rdhi, rn, rm);
3863 break;
3864 }
3865 }
3866 void Smull(FlagsUpdate flags,
3867 Register rdlo,
3868 Register rdhi,
3869 Register rn,
3870 Register rm) {
3871 Smull(flags, al, rdlo, rdhi, rn, rm);
3872 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003873
3874 void Smulls(
3875 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003876 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3877 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3878 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3879 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003880 VIXL_ASSERT(allow_macro_instructions_);
3881 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003882 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003883 ITScope it_scope(this, &cond);
3884 smulls(cond, rdlo, rdhi, rn, rm);
3885 }
3886 void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) {
3887 Smulls(al, rdlo, rdhi, rn, rm);
3888 }
3889
3890 void Smultb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003891 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3892 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3893 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003894 VIXL_ASSERT(allow_macro_instructions_);
3895 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003896 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003897 ITScope it_scope(this, &cond);
3898 smultb(cond, rd, rn, rm);
3899 }
3900 void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); }
3901
3902 void Smultt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003903 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3904 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3905 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003906 VIXL_ASSERT(allow_macro_instructions_);
3907 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003908 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003909 ITScope it_scope(this, &cond);
3910 smultt(cond, rd, rn, rm);
3911 }
3912 void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); }
3913
3914 void Smulwb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003915 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3916 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3917 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003918 VIXL_ASSERT(allow_macro_instructions_);
3919 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003920 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003921 ITScope it_scope(this, &cond);
3922 smulwb(cond, rd, rn, rm);
3923 }
3924 void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); }
3925
3926 void Smulwt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003927 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3928 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3929 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003930 VIXL_ASSERT(allow_macro_instructions_);
3931 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003932 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003933 ITScope it_scope(this, &cond);
3934 smulwt(cond, rd, rn, rm);
3935 }
3936 void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); }
3937
3938 void Smusd(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003939 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3940 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3941 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003942 VIXL_ASSERT(allow_macro_instructions_);
3943 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003944 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003945 ITScope it_scope(this, &cond);
3946 smusd(cond, rd, rn, rm);
3947 }
3948 void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); }
3949
3950 void Smusdx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003951 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3952 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3953 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003954 VIXL_ASSERT(allow_macro_instructions_);
3955 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003956 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003957 ITScope it_scope(this, &cond);
3958 smusdx(cond, rd, rn, rm);
3959 }
3960 void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); }
3961
3962 void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003963 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3964 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003965 VIXL_ASSERT(allow_macro_instructions_);
3966 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003967 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003968 ITScope it_scope(this, &cond);
3969 ssat(cond, rd, imm, operand);
3970 }
3971 void Ssat(Register rd, uint32_t imm, const Operand& operand) {
3972 Ssat(al, rd, imm, operand);
3973 }
3974
3975 void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003976 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3977 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003978 VIXL_ASSERT(allow_macro_instructions_);
3979 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003980 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003981 ITScope it_scope(this, &cond);
3982 ssat16(cond, rd, imm, rn);
3983 }
3984 void Ssat16(Register rd, uint32_t imm, Register rn) {
3985 Ssat16(al, rd, imm, rn);
3986 }
3987
3988 void Ssax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003989 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3990 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3991 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003992 VIXL_ASSERT(allow_macro_instructions_);
3993 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07003994 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003995 ITScope it_scope(this, &cond);
3996 ssax(cond, rd, rn, rm);
3997 }
3998 void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); }
3999
4000 void Ssub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004001 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4002 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4003 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004004 VIXL_ASSERT(allow_macro_instructions_);
4005 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004006 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004007 ITScope it_scope(this, &cond);
4008 ssub16(cond, rd, rn, rm);
4009 }
4010 void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); }
4011
4012 void Ssub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004013 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4014 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4015 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004016 VIXL_ASSERT(allow_macro_instructions_);
4017 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004018 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004019 ITScope it_scope(this, &cond);
4020 ssub8(cond, rd, rn, rm);
4021 }
4022 void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); }
4023
4024 void Stl(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004025 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4026 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004027 VIXL_ASSERT(allow_macro_instructions_);
4028 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004029 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004030 ITScope it_scope(this, &cond);
4031 stl(cond, rt, operand);
4032 }
4033 void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); }
4034
4035 void Stlb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004036 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4037 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004038 VIXL_ASSERT(allow_macro_instructions_);
4039 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004040 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004041 ITScope it_scope(this, &cond);
4042 stlb(cond, rt, operand);
4043 }
4044 void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); }
4045
4046 void Stlex(Condition cond,
4047 Register rd,
4048 Register rt,
4049 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004050 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4051 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4052 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004053 VIXL_ASSERT(allow_macro_instructions_);
4054 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004055 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004056 ITScope it_scope(this, &cond);
4057 stlex(cond, rd, rt, operand);
4058 }
4059 void Stlex(Register rd, Register rt, const MemOperand& operand) {
4060 Stlex(al, rd, rt, operand);
4061 }
4062
4063 void Stlexb(Condition cond,
4064 Register rd,
4065 Register rt,
4066 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004067 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4068 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4069 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004070 VIXL_ASSERT(allow_macro_instructions_);
4071 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004072 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004073 ITScope it_scope(this, &cond);
4074 stlexb(cond, rd, rt, operand);
4075 }
4076 void Stlexb(Register rd, Register rt, const MemOperand& operand) {
4077 Stlexb(al, rd, rt, operand);
4078 }
4079
4080 void Stlexd(Condition cond,
4081 Register rd,
4082 Register rt,
4083 Register rt2,
4084 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004085 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4086 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4087 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4088 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004089 VIXL_ASSERT(allow_macro_instructions_);
4090 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004091 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004092 ITScope it_scope(this, &cond);
4093 stlexd(cond, rd, rt, rt2, operand);
4094 }
4095 void Stlexd(Register rd,
4096 Register rt,
4097 Register rt2,
4098 const MemOperand& operand) {
4099 Stlexd(al, rd, rt, rt2, operand);
4100 }
4101
4102 void Stlexh(Condition cond,
4103 Register rd,
4104 Register rt,
4105 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004106 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4107 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4108 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004109 VIXL_ASSERT(allow_macro_instructions_);
4110 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004111 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004112 ITScope it_scope(this, &cond);
4113 stlexh(cond, rd, rt, operand);
4114 }
4115 void Stlexh(Register rd, Register rt, const MemOperand& operand) {
4116 Stlexh(al, rd, rt, operand);
4117 }
4118
4119 void Stlh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004120 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4121 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004122 VIXL_ASSERT(allow_macro_instructions_);
4123 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004124 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004125 ITScope it_scope(this, &cond);
4126 stlh(cond, rt, operand);
4127 }
4128 void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); }
4129
4130 void Stm(Condition cond,
4131 Register rn,
4132 WriteBack write_back,
4133 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004134 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4135 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004136 VIXL_ASSERT(allow_macro_instructions_);
4137 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004138 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004139 ITScope it_scope(this, &cond);
4140 stm(cond, rn, write_back, registers);
4141 }
4142 void Stm(Register rn, WriteBack write_back, RegisterList registers) {
4143 Stm(al, rn, write_back, registers);
4144 }
4145
4146 void Stmda(Condition cond,
4147 Register rn,
4148 WriteBack write_back,
4149 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004150 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4151 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004152 VIXL_ASSERT(allow_macro_instructions_);
4153 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004154 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004155 ITScope it_scope(this, &cond);
4156 stmda(cond, rn, write_back, registers);
4157 }
4158 void Stmda(Register rn, WriteBack write_back, RegisterList registers) {
4159 Stmda(al, rn, write_back, registers);
4160 }
4161
4162 void Stmdb(Condition cond,
4163 Register rn,
4164 WriteBack write_back,
4165 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004166 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4167 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004168 VIXL_ASSERT(allow_macro_instructions_);
4169 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004170 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004171 ITScope it_scope(this, &cond);
4172 stmdb(cond, rn, write_back, registers);
4173 }
4174 void Stmdb(Register rn, WriteBack write_back, RegisterList registers) {
4175 Stmdb(al, rn, write_back, registers);
4176 }
4177
4178 void Stmea(Condition cond,
4179 Register rn,
4180 WriteBack write_back,
4181 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004182 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4183 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004184 VIXL_ASSERT(allow_macro_instructions_);
4185 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004186 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004187 ITScope it_scope(this, &cond);
4188 stmea(cond, rn, write_back, registers);
4189 }
4190 void Stmea(Register rn, WriteBack write_back, RegisterList registers) {
4191 Stmea(al, rn, write_back, registers);
4192 }
4193
4194 void Stmed(Condition cond,
4195 Register rn,
4196 WriteBack write_back,
4197 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004198 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4199 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004200 VIXL_ASSERT(allow_macro_instructions_);
4201 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004202 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004203 ITScope it_scope(this, &cond);
4204 stmed(cond, rn, write_back, registers);
4205 }
4206 void Stmed(Register rn, WriteBack write_back, RegisterList registers) {
4207 Stmed(al, rn, write_back, registers);
4208 }
4209
4210 void Stmfa(Condition cond,
4211 Register rn,
4212 WriteBack write_back,
4213 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004214 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4215 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004216 VIXL_ASSERT(allow_macro_instructions_);
4217 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004218 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004219 ITScope it_scope(this, &cond);
4220 stmfa(cond, rn, write_back, registers);
4221 }
4222 void Stmfa(Register rn, WriteBack write_back, RegisterList registers) {
4223 Stmfa(al, rn, write_back, registers);
4224 }
4225
4226 void Stmfd(Condition cond,
4227 Register rn,
4228 WriteBack write_back,
4229 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004230 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4231 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004232 VIXL_ASSERT(allow_macro_instructions_);
4233 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004234 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004235 ITScope it_scope(this, &cond);
4236 stmfd(cond, rn, write_back, registers);
4237 }
4238 void Stmfd(Register rn, WriteBack write_back, RegisterList registers) {
4239 Stmfd(al, rn, write_back, registers);
4240 }
4241
4242 void Stmib(Condition cond,
4243 Register rn,
4244 WriteBack write_back,
4245 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004246 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4247 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004248 VIXL_ASSERT(allow_macro_instructions_);
4249 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004250 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004251 ITScope it_scope(this, &cond);
4252 stmib(cond, rn, write_back, registers);
4253 }
4254 void Stmib(Register rn, WriteBack write_back, RegisterList registers) {
4255 Stmib(al, rn, write_back, registers);
4256 }
4257
4258 void Str(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004259 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4260 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004261 VIXL_ASSERT(allow_macro_instructions_);
4262 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004263 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004264 bool can_use_it =
4265 // STR{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4266 (operand.IsImmediate() && rt.IsLow() &&
4267 operand.GetBaseRegister().IsLow() &&
4268 operand.IsOffsetImmediateWithinRange(0, 124, 4) &&
4269 (operand.GetAddrMode() == Offset)) ||
4270 // STR{<c>}{<q>} <Rt>, [SP{, #{+}<imm>}] ; T2
4271 (operand.IsImmediate() && rt.IsLow() &&
4272 operand.GetBaseRegister().IsSP() &&
4273 operand.IsOffsetImmediateWithinRange(0, 1020, 4) &&
4274 (operand.GetAddrMode() == Offset)) ||
4275 // STR{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4276 (operand.IsPlainRegister() && rt.IsLow() &&
4277 operand.GetBaseRegister().IsLow() &&
4278 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4279 (operand.GetAddrMode() == Offset));
4280 ITScope it_scope(this, &cond, can_use_it);
4281 str(cond, rt, operand);
4282 }
4283 void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); }
4284
4285 void Strb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004286 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4287 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004288 VIXL_ASSERT(allow_macro_instructions_);
4289 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004290 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004291 bool can_use_it =
4292 // STRB{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4293 (operand.IsImmediate() && rt.IsLow() &&
4294 operand.GetBaseRegister().IsLow() &&
4295 operand.IsOffsetImmediateWithinRange(0, 31) &&
4296 (operand.GetAddrMode() == Offset)) ||
4297 // STRB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4298 (operand.IsPlainRegister() && rt.IsLow() &&
4299 operand.GetBaseRegister().IsLow() &&
4300 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4301 (operand.GetAddrMode() == Offset));
4302 ITScope it_scope(this, &cond, can_use_it);
4303 strb(cond, rt, operand);
4304 }
4305 void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); }
4306
4307 void Strd(Condition cond,
4308 Register rt,
4309 Register rt2,
4310 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004311 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4312 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4313 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004314 VIXL_ASSERT(allow_macro_instructions_);
4315 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004316 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004317 ITScope it_scope(this, &cond);
4318 strd(cond, rt, rt2, operand);
4319 }
4320 void Strd(Register rt, Register rt2, const MemOperand& operand) {
4321 Strd(al, rt, rt2, operand);
4322 }
4323
4324 void Strex(Condition cond,
4325 Register rd,
4326 Register rt,
4327 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004328 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4329 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4330 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004331 VIXL_ASSERT(allow_macro_instructions_);
4332 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004333 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004334 ITScope it_scope(this, &cond);
4335 strex(cond, rd, rt, operand);
4336 }
4337 void Strex(Register rd, Register rt, const MemOperand& operand) {
4338 Strex(al, rd, rt, operand);
4339 }
4340
4341 void Strexb(Condition cond,
4342 Register rd,
4343 Register rt,
4344 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004345 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4346 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4347 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004348 VIXL_ASSERT(allow_macro_instructions_);
4349 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004350 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004351 ITScope it_scope(this, &cond);
4352 strexb(cond, rd, rt, operand);
4353 }
4354 void Strexb(Register rd, Register rt, const MemOperand& operand) {
4355 Strexb(al, rd, rt, operand);
4356 }
4357
4358 void Strexd(Condition cond,
4359 Register rd,
4360 Register rt,
4361 Register rt2,
4362 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004363 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4364 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4365 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4366 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004367 VIXL_ASSERT(allow_macro_instructions_);
4368 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004369 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004370 ITScope it_scope(this, &cond);
4371 strexd(cond, rd, rt, rt2, operand);
4372 }
4373 void Strexd(Register rd,
4374 Register rt,
4375 Register rt2,
4376 const MemOperand& operand) {
4377 Strexd(al, rd, rt, rt2, operand);
4378 }
4379
4380 void Strexh(Condition cond,
4381 Register rd,
4382 Register rt,
4383 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004384 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4385 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4386 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004387 VIXL_ASSERT(allow_macro_instructions_);
4388 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004389 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004390 ITScope it_scope(this, &cond);
4391 strexh(cond, rd, rt, operand);
4392 }
4393 void Strexh(Register rd, Register rt, const MemOperand& operand) {
4394 Strexh(al, rd, rt, operand);
4395 }
4396
4397 void Strh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004398 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4399 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004400 VIXL_ASSERT(allow_macro_instructions_);
4401 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004402 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004403 bool can_use_it =
4404 // STRH{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4405 (operand.IsImmediate() && rt.IsLow() &&
4406 operand.GetBaseRegister().IsLow() &&
4407 operand.IsOffsetImmediateWithinRange(0, 62, 2) &&
4408 (operand.GetAddrMode() == Offset)) ||
4409 // STRH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4410 (operand.IsPlainRegister() && rt.IsLow() &&
4411 operand.GetBaseRegister().IsLow() &&
4412 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4413 (operand.GetAddrMode() == Offset));
4414 ITScope it_scope(this, &cond, can_use_it);
4415 strh(cond, rt, operand);
4416 }
4417 void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); }
4418
4419 void Sub(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004420 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4421 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4422 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004423 VIXL_ASSERT(allow_macro_instructions_);
4424 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004425 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Rames628c5262016-09-21 11:52:30 +01004426 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
4427 uint32_t immediate = operand.GetImmediate();
4428 if (immediate == 0) {
4429 return;
4430 }
4431 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004432 bool can_use_it =
4433 // SUB<c>{<q>} <Rd>, <Rn>, #<imm3> ; T1
4434 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() &&
4435 rd.IsLow()) ||
4436 // SUB<c>{<q>} {<Rdn>,} <Rdn>, #<imm8> ; T2
4437 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
4438 rd.IsLow() && rn.Is(rd)) ||
4439 // SUB<c>{<q>} <Rd>, <Rn>, <Rm>
4440 (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
4441 operand.GetBaseRegister().IsLow());
4442 ITScope it_scope(this, &cond, can_use_it);
4443 sub(cond, rd, rn, operand);
4444 }
4445 void Sub(Register rd, Register rn, const Operand& operand) {
4446 Sub(al, rd, rn, operand);
4447 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004448 void Sub(FlagsUpdate flags,
4449 Condition cond,
4450 Register rd,
4451 Register rn,
4452 const Operand& operand) {
4453 switch (flags) {
4454 case LeaveFlags:
4455 Sub(cond, rd, rn, operand);
4456 break;
4457 case SetFlags:
4458 Subs(cond, rd, rn, operand);
4459 break;
4460 case DontCare:
4461 bool can_be_16bit_encoded =
4462 IsUsingT32() && cond.Is(al) &&
4463 ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
4464 operand.GetBaseRegister().IsLow()) ||
4465 (operand.IsImmediate() &&
4466 ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) ||
4467 (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256)))));
4468 if (can_be_16bit_encoded) {
4469 Subs(cond, rd, rn, operand);
4470 } else {
4471 Sub(cond, rd, rn, operand);
4472 }
4473 break;
4474 }
4475 }
4476 void Sub(FlagsUpdate flags,
4477 Register rd,
4478 Register rn,
4479 const Operand& operand) {
4480 Sub(flags, al, rd, rn, operand);
4481 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004482
4483 void Subs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4485 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4486 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004487 VIXL_ASSERT(allow_macro_instructions_);
4488 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004489 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004490 ITScope it_scope(this, &cond);
4491 subs(cond, rd, rn, operand);
4492 }
4493 void Subs(Register rd, Register rn, const Operand& operand) {
4494 Subs(al, rd, rn, operand);
4495 }
4496
Alexandre Ramesd3832962016-07-04 15:03:43 +01004497
4498 void Svc(Condition cond, uint32_t imm) {
4499 VIXL_ASSERT(allow_macro_instructions_);
4500 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004501 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004502 ITScope it_scope(this, &cond);
4503 svc(cond, imm);
4504 }
4505 void Svc(uint32_t imm) { Svc(al, imm); }
4506
4507 void Sxtab(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004508 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4509 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4510 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004511 VIXL_ASSERT(allow_macro_instructions_);
4512 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004513 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004514 ITScope it_scope(this, &cond);
4515 sxtab(cond, rd, rn, operand);
4516 }
4517 void Sxtab(Register rd, Register rn, const Operand& operand) {
4518 Sxtab(al, rd, rn, operand);
4519 }
4520
4521 void Sxtab16(Condition cond,
4522 Register rd,
4523 Register rn,
4524 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004525 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4526 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4527 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004528 VIXL_ASSERT(allow_macro_instructions_);
4529 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004530 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004531 ITScope it_scope(this, &cond);
4532 sxtab16(cond, rd, rn, operand);
4533 }
4534 void Sxtab16(Register rd, Register rn, const Operand& operand) {
4535 Sxtab16(al, rd, rn, operand);
4536 }
4537
4538 void Sxtah(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004539 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4540 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4541 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004542 VIXL_ASSERT(allow_macro_instructions_);
4543 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004544 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004545 ITScope it_scope(this, &cond);
4546 sxtah(cond, rd, rn, operand);
4547 }
4548 void Sxtah(Register rd, Register rn, const Operand& operand) {
4549 Sxtah(al, rd, rn, operand);
4550 }
4551
4552 void Sxtb(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004553 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4554 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004555 VIXL_ASSERT(allow_macro_instructions_);
4556 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004557 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004558 ITScope it_scope(this, &cond);
4559 sxtb(cond, rd, operand);
4560 }
4561 void Sxtb(Register rd, const Operand& operand) { Sxtb(al, rd, operand); }
4562
4563 void Sxtb16(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004564 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4565 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004566 VIXL_ASSERT(allow_macro_instructions_);
4567 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004568 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004569 ITScope it_scope(this, &cond);
4570 sxtb16(cond, rd, operand);
4571 }
4572 void Sxtb16(Register rd, const Operand& operand) { Sxtb16(al, rd, operand); }
4573
4574 void Sxth(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004575 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4576 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004577 VIXL_ASSERT(allow_macro_instructions_);
4578 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004579 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004580 ITScope it_scope(this, &cond);
4581 sxth(cond, rd, operand);
4582 }
4583 void Sxth(Register rd, const Operand& operand) { Sxth(al, rd, operand); }
4584
Alexandre Ramesd3832962016-07-04 15:03:43 +01004585
4586 void Teq(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004587 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4588 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004589 VIXL_ASSERT(allow_macro_instructions_);
4590 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004591 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004592 ITScope it_scope(this, &cond);
4593 teq(cond, rn, operand);
4594 }
4595 void Teq(Register rn, const Operand& operand) { Teq(al, rn, operand); }
4596
4597 void Tst(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004598 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4599 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004600 VIXL_ASSERT(allow_macro_instructions_);
4601 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004602 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004603 bool can_use_it =
4604 // TST{<c>}{<q>} <Rn>, <Rm> ; T1
4605 operand.IsPlainRegister() && rn.IsLow() &&
4606 operand.GetBaseRegister().IsLow();
4607 ITScope it_scope(this, &cond, can_use_it);
4608 tst(cond, rn, operand);
4609 }
4610 void Tst(Register rn, const Operand& operand) { Tst(al, rn, operand); }
4611
4612 void Uadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004613 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4614 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4615 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004616 VIXL_ASSERT(allow_macro_instructions_);
4617 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004618 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004619 ITScope it_scope(this, &cond);
4620 uadd16(cond, rd, rn, rm);
4621 }
4622 void Uadd16(Register rd, Register rn, Register rm) { Uadd16(al, rd, rn, rm); }
4623
4624 void Uadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004625 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4626 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4627 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004628 VIXL_ASSERT(allow_macro_instructions_);
4629 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004630 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004631 ITScope it_scope(this, &cond);
4632 uadd8(cond, rd, rn, rm);
4633 }
4634 void Uadd8(Register rd, Register rn, Register rm) { Uadd8(al, rd, rn, rm); }
4635
4636 void Uasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004637 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4638 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4639 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004640 VIXL_ASSERT(allow_macro_instructions_);
4641 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004642 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004643 ITScope it_scope(this, &cond);
4644 uasx(cond, rd, rn, rm);
4645 }
4646 void Uasx(Register rd, Register rn, Register rm) { Uasx(al, rd, rn, rm); }
4647
4648 void Ubfx(Condition cond,
4649 Register rd,
4650 Register rn,
4651 uint32_t lsb,
4652 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004653 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4654 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4655 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004656 VIXL_ASSERT(allow_macro_instructions_);
4657 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004658 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004659 ITScope it_scope(this, &cond);
4660 ubfx(cond, rd, rn, lsb, operand);
4661 }
4662 void Ubfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) {
4663 Ubfx(al, rd, rn, lsb, operand);
4664 }
4665
4666 void Udf(Condition cond, uint32_t imm) {
4667 VIXL_ASSERT(allow_macro_instructions_);
4668 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004669 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004670 ITScope it_scope(this, &cond);
4671 udf(cond, imm);
4672 }
4673 void Udf(uint32_t imm) { Udf(al, imm); }
4674
4675 void Udiv(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004676 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4677 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4678 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004679 VIXL_ASSERT(allow_macro_instructions_);
4680 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004681 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004682 ITScope it_scope(this, &cond);
4683 udiv(cond, rd, rn, rm);
4684 }
4685 void Udiv(Register rd, Register rn, Register rm) { Udiv(al, rd, rn, rm); }
4686
4687 void Uhadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004688 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4689 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4690 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004691 VIXL_ASSERT(allow_macro_instructions_);
4692 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004693 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004694 ITScope it_scope(this, &cond);
4695 uhadd16(cond, rd, rn, rm);
4696 }
4697 void Uhadd16(Register rd, Register rn, Register rm) {
4698 Uhadd16(al, rd, rn, rm);
4699 }
4700
4701 void Uhadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004702 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4703 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4704 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004705 VIXL_ASSERT(allow_macro_instructions_);
4706 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004707 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004708 ITScope it_scope(this, &cond);
4709 uhadd8(cond, rd, rn, rm);
4710 }
4711 void Uhadd8(Register rd, Register rn, Register rm) { Uhadd8(al, rd, rn, rm); }
4712
4713 void Uhasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004714 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4715 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4716 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004717 VIXL_ASSERT(allow_macro_instructions_);
4718 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004719 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004720 ITScope it_scope(this, &cond);
4721 uhasx(cond, rd, rn, rm);
4722 }
4723 void Uhasx(Register rd, Register rn, Register rm) { Uhasx(al, rd, rn, rm); }
4724
4725 void Uhsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004726 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4727 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4728 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004729 VIXL_ASSERT(allow_macro_instructions_);
4730 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004731 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004732 ITScope it_scope(this, &cond);
4733 uhsax(cond, rd, rn, rm);
4734 }
4735 void Uhsax(Register rd, Register rn, Register rm) { Uhsax(al, rd, rn, rm); }
4736
4737 void Uhsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004738 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4739 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4740 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004741 VIXL_ASSERT(allow_macro_instructions_);
4742 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004743 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004744 ITScope it_scope(this, &cond);
4745 uhsub16(cond, rd, rn, rm);
4746 }
4747 void Uhsub16(Register rd, Register rn, Register rm) {
4748 Uhsub16(al, rd, rn, rm);
4749 }
4750
4751 void Uhsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004752 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4753 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4754 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004755 VIXL_ASSERT(allow_macro_instructions_);
4756 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004757 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004758 ITScope it_scope(this, &cond);
4759 uhsub8(cond, rd, rn, rm);
4760 }
4761 void Uhsub8(Register rd, Register rn, Register rm) { Uhsub8(al, rd, rn, rm); }
4762
4763 void Umaal(
4764 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004765 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4766 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4767 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4768 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004769 VIXL_ASSERT(allow_macro_instructions_);
4770 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004771 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004772 ITScope it_scope(this, &cond);
4773 umaal(cond, rdlo, rdhi, rn, rm);
4774 }
4775 void Umaal(Register rdlo, Register rdhi, Register rn, Register rm) {
4776 Umaal(al, rdlo, rdhi, rn, rm);
4777 }
4778
4779 void Umlal(
4780 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004781 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4782 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4783 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4784 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004785 VIXL_ASSERT(allow_macro_instructions_);
4786 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004787 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004788 ITScope it_scope(this, &cond);
4789 umlal(cond, rdlo, rdhi, rn, rm);
4790 }
4791 void Umlal(Register rdlo, Register rdhi, Register rn, Register rm) {
4792 Umlal(al, rdlo, rdhi, rn, rm);
4793 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004794 void Umlal(FlagsUpdate flags,
4795 Condition cond,
4796 Register rdlo,
4797 Register rdhi,
4798 Register rn,
4799 Register rm) {
4800 switch (flags) {
4801 case LeaveFlags:
4802 Umlal(cond, rdlo, rdhi, rn, rm);
4803 break;
4804 case SetFlags:
4805 Umlals(cond, rdlo, rdhi, rn, rm);
4806 break;
4807 case DontCare:
4808 Umlal(cond, rdlo, rdhi, rn, rm);
4809 break;
4810 }
4811 }
4812 void Umlal(FlagsUpdate flags,
4813 Register rdlo,
4814 Register rdhi,
4815 Register rn,
4816 Register rm) {
4817 Umlal(flags, al, rdlo, rdhi, rn, rm);
4818 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004819
4820 void Umlals(
4821 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004822 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4823 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4824 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4825 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004826 VIXL_ASSERT(allow_macro_instructions_);
4827 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004828 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004829 ITScope it_scope(this, &cond);
4830 umlals(cond, rdlo, rdhi, rn, rm);
4831 }
4832 void Umlals(Register rdlo, Register rdhi, Register rn, Register rm) {
4833 Umlals(al, rdlo, rdhi, rn, rm);
4834 }
4835
4836 void Umull(
4837 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004838 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4839 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4840 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4841 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004842 VIXL_ASSERT(allow_macro_instructions_);
4843 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004844 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004845 ITScope it_scope(this, &cond);
4846 umull(cond, rdlo, rdhi, rn, rm);
4847 }
4848 void Umull(Register rdlo, Register rdhi, Register rn, Register rm) {
4849 Umull(al, rdlo, rdhi, rn, rm);
4850 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004851 void Umull(FlagsUpdate flags,
4852 Condition cond,
4853 Register rdlo,
4854 Register rdhi,
4855 Register rn,
4856 Register rm) {
4857 switch (flags) {
4858 case LeaveFlags:
4859 Umull(cond, rdlo, rdhi, rn, rm);
4860 break;
4861 case SetFlags:
4862 Umulls(cond, rdlo, rdhi, rn, rm);
4863 break;
4864 case DontCare:
4865 Umull(cond, rdlo, rdhi, rn, rm);
4866 break;
4867 }
4868 }
4869 void Umull(FlagsUpdate flags,
4870 Register rdlo,
4871 Register rdhi,
4872 Register rn,
4873 Register rm) {
4874 Umull(flags, al, rdlo, rdhi, rn, rm);
4875 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004876
4877 void Umulls(
4878 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004879 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4880 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4881 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4882 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004883 VIXL_ASSERT(allow_macro_instructions_);
4884 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004885 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004886 ITScope it_scope(this, &cond);
4887 umulls(cond, rdlo, rdhi, rn, rm);
4888 }
4889 void Umulls(Register rdlo, Register rdhi, Register rn, Register rm) {
4890 Umulls(al, rdlo, rdhi, rn, rm);
4891 }
4892
4893 void Uqadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004894 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4895 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4896 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004897 VIXL_ASSERT(allow_macro_instructions_);
4898 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004899 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004900 ITScope it_scope(this, &cond);
4901 uqadd16(cond, rd, rn, rm);
4902 }
4903 void Uqadd16(Register rd, Register rn, Register rm) {
4904 Uqadd16(al, rd, rn, rm);
4905 }
4906
4907 void Uqadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004908 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4909 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4910 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004911 VIXL_ASSERT(allow_macro_instructions_);
4912 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004913 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004914 ITScope it_scope(this, &cond);
4915 uqadd8(cond, rd, rn, rm);
4916 }
4917 void Uqadd8(Register rd, Register rn, Register rm) { Uqadd8(al, rd, rn, rm); }
4918
4919 void Uqasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004920 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4921 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4922 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004923 VIXL_ASSERT(allow_macro_instructions_);
4924 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004925 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004926 ITScope it_scope(this, &cond);
4927 uqasx(cond, rd, rn, rm);
4928 }
4929 void Uqasx(Register rd, Register rn, Register rm) { Uqasx(al, rd, rn, rm); }
4930
4931 void Uqsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004932 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4933 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4934 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004935 VIXL_ASSERT(allow_macro_instructions_);
4936 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004937 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004938 ITScope it_scope(this, &cond);
4939 uqsax(cond, rd, rn, rm);
4940 }
4941 void Uqsax(Register rd, Register rn, Register rm) { Uqsax(al, rd, rn, rm); }
4942
4943 void Uqsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4945 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4946 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004947 VIXL_ASSERT(allow_macro_instructions_);
4948 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004949 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004950 ITScope it_scope(this, &cond);
4951 uqsub16(cond, rd, rn, rm);
4952 }
4953 void Uqsub16(Register rd, Register rn, Register rm) {
4954 Uqsub16(al, rd, rn, rm);
4955 }
4956
4957 void Uqsub8(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());
Vincent Belliard8885c172016-08-24 11:33:19 -07004963 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004964 ITScope it_scope(this, &cond);
4965 uqsub8(cond, rd, rn, rm);
4966 }
4967 void Uqsub8(Register rd, Register rn, Register rm) { Uqsub8(al, rd, rn, rm); }
4968
4969 void Usad8(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());
Vincent Belliard8885c172016-08-24 11:33:19 -07004975 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004976 ITScope it_scope(this, &cond);
4977 usad8(cond, rd, rn, rm);
4978 }
4979 void Usad8(Register rd, Register rn, Register rm) { Usad8(al, rd, rn, rm); }
4980
4981 void Usada8(
4982 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004983 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4984 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4985 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
4986 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004987 VIXL_ASSERT(allow_macro_instructions_);
4988 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07004989 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004990 ITScope it_scope(this, &cond);
4991 usada8(cond, rd, rn, rm, ra);
4992 }
4993 void Usada8(Register rd, Register rn, Register rm, Register ra) {
4994 Usada8(al, rd, rn, rm, ra);
4995 }
4996
4997 void Usat(Condition cond, Register rd, uint32_t imm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004998 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4999 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005000 VIXL_ASSERT(allow_macro_instructions_);
5001 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005002 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005003 ITScope it_scope(this, &cond);
5004 usat(cond, rd, imm, operand);
5005 }
5006 void Usat(Register rd, uint32_t imm, const Operand& operand) {
5007 Usat(al, rd, imm, operand);
5008 }
5009
5010 void Usat16(Condition cond, Register rd, uint32_t imm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005011 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5012 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005013 VIXL_ASSERT(allow_macro_instructions_);
5014 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005015 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005016 ITScope it_scope(this, &cond);
5017 usat16(cond, rd, imm, rn);
5018 }
5019 void Usat16(Register rd, uint32_t imm, Register rn) {
5020 Usat16(al, rd, imm, rn);
5021 }
5022
5023 void Usax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005024 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5025 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5026 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005027 VIXL_ASSERT(allow_macro_instructions_);
5028 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005029 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005030 ITScope it_scope(this, &cond);
5031 usax(cond, rd, rn, rm);
5032 }
5033 void Usax(Register rd, Register rn, Register rm) { Usax(al, rd, rn, rm); }
5034
5035 void Usub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005036 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5037 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5038 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005039 VIXL_ASSERT(allow_macro_instructions_);
5040 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005041 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005042 ITScope it_scope(this, &cond);
5043 usub16(cond, rd, rn, rm);
5044 }
5045 void Usub16(Register rd, Register rn, Register rm) { Usub16(al, rd, rn, rm); }
5046
5047 void Usub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005048 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
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());
Vincent Belliard8885c172016-08-24 11:33:19 -07005053 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005054 ITScope it_scope(this, &cond);
5055 usub8(cond, rd, rn, rm);
5056 }
5057 void Usub8(Register rd, Register rn, Register rm) { Usub8(al, rd, rn, rm); }
5058
5059 void Uxtab(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005060 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5061 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5062 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005063 VIXL_ASSERT(allow_macro_instructions_);
5064 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005065 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005066 ITScope it_scope(this, &cond);
5067 uxtab(cond, rd, rn, operand);
5068 }
5069 void Uxtab(Register rd, Register rn, const Operand& operand) {
5070 Uxtab(al, rd, rn, operand);
5071 }
5072
5073 void Uxtab16(Condition cond,
5074 Register rd,
5075 Register rn,
5076 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005077 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5078 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5079 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005080 VIXL_ASSERT(allow_macro_instructions_);
5081 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005082 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005083 ITScope it_scope(this, &cond);
5084 uxtab16(cond, rd, rn, operand);
5085 }
5086 void Uxtab16(Register rd, Register rn, const Operand& operand) {
5087 Uxtab16(al, rd, rn, operand);
5088 }
5089
5090 void Uxtah(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005091 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5092 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5093 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005094 VIXL_ASSERT(allow_macro_instructions_);
5095 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005096 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005097 ITScope it_scope(this, &cond);
5098 uxtah(cond, rd, rn, operand);
5099 }
5100 void Uxtah(Register rd, Register rn, const Operand& operand) {
5101 Uxtah(al, rd, rn, operand);
5102 }
5103
5104 void Uxtb(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005105 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5106 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005107 VIXL_ASSERT(allow_macro_instructions_);
5108 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005109 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005110 ITScope it_scope(this, &cond);
5111 uxtb(cond, rd, operand);
5112 }
5113 void Uxtb(Register rd, const Operand& operand) { Uxtb(al, rd, operand); }
5114
5115 void Uxtb16(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005116 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5117 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005118 VIXL_ASSERT(allow_macro_instructions_);
5119 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005120 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005121 ITScope it_scope(this, &cond);
5122 uxtb16(cond, rd, operand);
5123 }
5124 void Uxtb16(Register rd, const Operand& operand) { Uxtb16(al, rd, operand); }
5125
5126 void Uxth(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005127 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5128 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005129 VIXL_ASSERT(allow_macro_instructions_);
5130 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005131 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005132 ITScope it_scope(this, &cond);
5133 uxth(cond, rd, operand);
5134 }
5135 void Uxth(Register rd, const Operand& operand) { Uxth(al, rd, operand); }
5136
5137 void Vaba(
5138 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005139 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5140 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5141 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005142 VIXL_ASSERT(allow_macro_instructions_);
5143 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005144 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005145 ITScope it_scope(this, &cond);
5146 vaba(cond, dt, rd, rn, rm);
5147 }
5148 void Vaba(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5149 Vaba(al, dt, rd, rn, rm);
5150 }
5151
5152 void Vaba(
5153 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005154 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5155 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5156 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005157 VIXL_ASSERT(allow_macro_instructions_);
5158 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005159 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005160 ITScope it_scope(this, &cond);
5161 vaba(cond, dt, rd, rn, rm);
5162 }
5163 void Vaba(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5164 Vaba(al, dt, rd, rn, rm);
5165 }
5166
5167 void Vabal(
5168 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005169 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5170 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5171 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005172 VIXL_ASSERT(allow_macro_instructions_);
5173 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005174 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005175 ITScope it_scope(this, &cond);
5176 vabal(cond, dt, rd, rn, rm);
5177 }
5178 void Vabal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5179 Vabal(al, dt, rd, rn, rm);
5180 }
5181
5182 void Vabd(
5183 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005184 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5185 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5186 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005187 VIXL_ASSERT(allow_macro_instructions_);
5188 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005189 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005190 ITScope it_scope(this, &cond);
5191 vabd(cond, dt, rd, rn, rm);
5192 }
5193 void Vabd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5194 Vabd(al, dt, rd, rn, rm);
5195 }
5196
5197 void Vabd(
5198 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005199 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5200 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5201 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005202 VIXL_ASSERT(allow_macro_instructions_);
5203 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005204 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005205 ITScope it_scope(this, &cond);
5206 vabd(cond, dt, rd, rn, rm);
5207 }
5208 void Vabd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5209 Vabd(al, dt, rd, rn, rm);
5210 }
5211
5212 void Vabdl(
5213 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister 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());
Vincent Belliard8885c172016-08-24 11:33:19 -07005219 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005220 ITScope it_scope(this, &cond);
5221 vabdl(cond, dt, rd, rn, rm);
5222 }
5223 void Vabdl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5224 Vabdl(al, dt, rd, rn, rm);
5225 }
5226
5227 void Vabs(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005228 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5229 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005230 VIXL_ASSERT(allow_macro_instructions_);
5231 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005232 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005233 ITScope it_scope(this, &cond);
5234 vabs(cond, dt, rd, rm);
5235 }
5236 void Vabs(DataType dt, DRegister rd, DRegister rm) { Vabs(al, dt, rd, rm); }
5237
5238 void Vabs(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005239 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5240 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005241 VIXL_ASSERT(allow_macro_instructions_);
5242 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005243 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005244 ITScope it_scope(this, &cond);
5245 vabs(cond, dt, rd, rm);
5246 }
5247 void Vabs(DataType dt, QRegister rd, QRegister rm) { Vabs(al, dt, rd, rm); }
5248
5249 void Vabs(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005250 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5251 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005252 VIXL_ASSERT(allow_macro_instructions_);
5253 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005254 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005255 ITScope it_scope(this, &cond);
5256 vabs(cond, dt, rd, rm);
5257 }
5258 void Vabs(DataType dt, SRegister rd, SRegister rm) { Vabs(al, dt, rd, rm); }
5259
5260 void Vacge(
5261 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005262 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5263 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5264 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005265 VIXL_ASSERT(allow_macro_instructions_);
5266 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005267 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005268 ITScope it_scope(this, &cond);
5269 vacge(cond, dt, rd, rn, rm);
5270 }
5271 void Vacge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5272 Vacge(al, dt, rd, rn, rm);
5273 }
5274
5275 void Vacge(
5276 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005277 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5278 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5279 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005280 VIXL_ASSERT(allow_macro_instructions_);
5281 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005282 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005283 ITScope it_scope(this, &cond);
5284 vacge(cond, dt, rd, rn, rm);
5285 }
5286 void Vacge(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5287 Vacge(al, dt, rd, rn, rm);
5288 }
5289
5290 void Vacgt(
5291 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005292 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5293 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5294 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005295 VIXL_ASSERT(allow_macro_instructions_);
5296 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005297 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005298 ITScope it_scope(this, &cond);
5299 vacgt(cond, dt, rd, rn, rm);
5300 }
5301 void Vacgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5302 Vacgt(al, dt, rd, rn, rm);
5303 }
5304
5305 void Vacgt(
5306 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005307 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5308 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5309 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005310 VIXL_ASSERT(allow_macro_instructions_);
5311 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005312 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005313 ITScope it_scope(this, &cond);
5314 vacgt(cond, dt, rd, rn, rm);
5315 }
5316 void Vacgt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5317 Vacgt(al, dt, rd, rn, rm);
5318 }
5319
5320 void Vacle(
5321 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005322 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5323 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5324 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005325 VIXL_ASSERT(allow_macro_instructions_);
5326 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005327 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005328 ITScope it_scope(this, &cond);
5329 vacle(cond, dt, rd, rn, rm);
5330 }
5331 void Vacle(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5332 Vacle(al, dt, rd, rn, rm);
5333 }
5334
5335 void Vacle(
5336 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005337 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5338 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5339 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005340 VIXL_ASSERT(allow_macro_instructions_);
5341 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005342 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005343 ITScope it_scope(this, &cond);
5344 vacle(cond, dt, rd, rn, rm);
5345 }
5346 void Vacle(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5347 Vacle(al, dt, rd, rn, rm);
5348 }
5349
5350 void Vaclt(
5351 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005352 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5353 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5354 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005355 VIXL_ASSERT(allow_macro_instructions_);
5356 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005357 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005358 ITScope it_scope(this, &cond);
5359 vaclt(cond, dt, rd, rn, rm);
5360 }
5361 void Vaclt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5362 Vaclt(al, dt, rd, rn, rm);
5363 }
5364
5365 void Vaclt(
5366 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005367 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5368 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5369 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005370 VIXL_ASSERT(allow_macro_instructions_);
5371 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005372 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005373 ITScope it_scope(this, &cond);
5374 vaclt(cond, dt, rd, rn, rm);
5375 }
5376 void Vaclt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5377 Vaclt(al, dt, rd, rn, rm);
5378 }
5379
5380 void Vadd(
5381 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005382 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5383 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5384 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005385 VIXL_ASSERT(allow_macro_instructions_);
5386 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005387 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005388 ITScope it_scope(this, &cond);
5389 vadd(cond, dt, rd, rn, rm);
5390 }
5391 void Vadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5392 Vadd(al, dt, rd, rn, rm);
5393 }
5394
5395 void Vadd(
5396 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005397 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5398 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5399 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005400 VIXL_ASSERT(allow_macro_instructions_);
5401 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005402 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005403 ITScope it_scope(this, &cond);
5404 vadd(cond, dt, rd, rn, rm);
5405 }
5406 void Vadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5407 Vadd(al, dt, rd, rn, rm);
5408 }
5409
5410 void Vadd(
5411 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005412 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5413 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5414 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005415 VIXL_ASSERT(allow_macro_instructions_);
5416 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005417 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005418 ITScope it_scope(this, &cond);
5419 vadd(cond, dt, rd, rn, rm);
5420 }
5421 void Vadd(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
5422 Vadd(al, dt, rd, rn, rm);
5423 }
5424
5425 void Vaddhn(
5426 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005427 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5428 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5429 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005430 VIXL_ASSERT(allow_macro_instructions_);
5431 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005432 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005433 ITScope it_scope(this, &cond);
5434 vaddhn(cond, dt, rd, rn, rm);
5435 }
5436 void Vaddhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
5437 Vaddhn(al, dt, rd, rn, rm);
5438 }
5439
5440 void Vaddl(
5441 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005442 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5443 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5444 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005445 VIXL_ASSERT(allow_macro_instructions_);
5446 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005447 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005448 ITScope it_scope(this, &cond);
5449 vaddl(cond, dt, rd, rn, rm);
5450 }
5451 void Vaddl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5452 Vaddl(al, dt, rd, rn, rm);
5453 }
5454
5455 void Vaddw(
5456 Condition cond, DataType dt, QRegister rd, QRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005457 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5458 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5459 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005460 VIXL_ASSERT(allow_macro_instructions_);
5461 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005462 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005463 ITScope it_scope(this, &cond);
5464 vaddw(cond, dt, rd, rn, rm);
5465 }
5466 void Vaddw(DataType dt, QRegister rd, QRegister rn, DRegister rm) {
5467 Vaddw(al, dt, rd, rn, rm);
5468 }
5469
5470 void Vand(Condition cond,
5471 DataType dt,
5472 DRegister rd,
5473 DRegister rn,
5474 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005475 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5476 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5477 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005478 VIXL_ASSERT(allow_macro_instructions_);
5479 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005480 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005481 ITScope it_scope(this, &cond);
5482 vand(cond, dt, rd, rn, operand);
5483 }
5484 void Vand(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
5485 Vand(al, dt, rd, rn, operand);
5486 }
5487
5488 void Vand(Condition cond,
5489 DataType dt,
5490 QRegister rd,
5491 QRegister rn,
5492 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005493 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5494 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5495 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005496 VIXL_ASSERT(allow_macro_instructions_);
5497 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005498 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005499 ITScope it_scope(this, &cond);
5500 vand(cond, dt, rd, rn, operand);
5501 }
5502 void Vand(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
5503 Vand(al, dt, rd, rn, operand);
5504 }
5505
5506 void Vbic(Condition cond,
5507 DataType dt,
5508 DRegister rd,
5509 DRegister rn,
5510 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005511 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5512 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5513 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005514 VIXL_ASSERT(allow_macro_instructions_);
5515 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005516 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005517 ITScope it_scope(this, &cond);
5518 vbic(cond, dt, rd, rn, operand);
5519 }
5520 void Vbic(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
5521 Vbic(al, dt, rd, rn, operand);
5522 }
5523
5524 void Vbic(Condition cond,
5525 DataType dt,
5526 QRegister rd,
5527 QRegister rn,
5528 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005529 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5530 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5531 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005532 VIXL_ASSERT(allow_macro_instructions_);
5533 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005534 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005535 ITScope it_scope(this, &cond);
5536 vbic(cond, dt, rd, rn, operand);
5537 }
5538 void Vbic(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
5539 Vbic(al, dt, rd, rn, operand);
5540 }
5541
5542 void Vbif(
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());
Vincent Belliard8885c172016-08-24 11:33:19 -07005549 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005550 ITScope it_scope(this, &cond);
5551 vbif(cond, dt, rd, rn, rm);
5552 }
5553 void Vbif(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5554 Vbif(al, dt, rd, rn, rm);
5555 }
5556 void Vbif(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5557 Vbif(cond, kDataTypeValueNone, rd, rn, rm);
5558 }
5559 void Vbif(DRegister rd, DRegister rn, DRegister rm) {
5560 Vbif(al, kDataTypeValueNone, rd, rn, rm);
5561 }
5562
5563 void Vbif(
5564 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005565 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5566 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5567 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005568 VIXL_ASSERT(allow_macro_instructions_);
5569 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005570 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005571 ITScope it_scope(this, &cond);
5572 vbif(cond, dt, rd, rn, rm);
5573 }
5574 void Vbif(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5575 Vbif(al, dt, rd, rn, rm);
5576 }
5577 void Vbif(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5578 Vbif(cond, kDataTypeValueNone, rd, rn, rm);
5579 }
5580 void Vbif(QRegister rd, QRegister rn, QRegister rm) {
5581 Vbif(al, kDataTypeValueNone, rd, rn, rm);
5582 }
5583
5584 void Vbit(
5585 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005586 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5587 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5588 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005589 VIXL_ASSERT(allow_macro_instructions_);
5590 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005591 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005592 ITScope it_scope(this, &cond);
5593 vbit(cond, dt, rd, rn, rm);
5594 }
5595 void Vbit(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5596 Vbit(al, dt, rd, rn, rm);
5597 }
5598 void Vbit(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5599 Vbit(cond, kDataTypeValueNone, rd, rn, rm);
5600 }
5601 void Vbit(DRegister rd, DRegister rn, DRegister rm) {
5602 Vbit(al, kDataTypeValueNone, rd, rn, rm);
5603 }
5604
5605 void Vbit(
5606 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005607 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5608 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5609 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005610 VIXL_ASSERT(allow_macro_instructions_);
5611 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005612 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005613 ITScope it_scope(this, &cond);
5614 vbit(cond, dt, rd, rn, rm);
5615 }
5616 void Vbit(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5617 Vbit(al, dt, rd, rn, rm);
5618 }
5619 void Vbit(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5620 Vbit(cond, kDataTypeValueNone, rd, rn, rm);
5621 }
5622 void Vbit(QRegister rd, QRegister rn, QRegister rm) {
5623 Vbit(al, kDataTypeValueNone, rd, rn, rm);
5624 }
5625
5626 void Vbsl(
5627 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005628 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5629 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5630 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005631 VIXL_ASSERT(allow_macro_instructions_);
5632 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005633 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005634 ITScope it_scope(this, &cond);
5635 vbsl(cond, dt, rd, rn, rm);
5636 }
5637 void Vbsl(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5638 Vbsl(al, dt, rd, rn, rm);
5639 }
5640 void Vbsl(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5641 Vbsl(cond, kDataTypeValueNone, rd, rn, rm);
5642 }
5643 void Vbsl(DRegister rd, DRegister rn, DRegister rm) {
5644 Vbsl(al, kDataTypeValueNone, rd, rn, rm);
5645 }
5646
5647 void Vbsl(
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());
Vincent Belliard8885c172016-08-24 11:33:19 -07005654 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005655 ITScope it_scope(this, &cond);
5656 vbsl(cond, dt, rd, rn, rm);
5657 }
5658 void Vbsl(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5659 Vbsl(al, dt, rd, rn, rm);
5660 }
5661 void Vbsl(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5662 Vbsl(cond, kDataTypeValueNone, rd, rn, rm);
5663 }
5664 void Vbsl(QRegister rd, QRegister rn, QRegister rm) {
5665 Vbsl(al, kDataTypeValueNone, rd, rn, rm);
5666 }
5667
5668 void Vceq(Condition cond,
5669 DataType dt,
5670 DRegister rd,
5671 DRegister rm,
5672 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005673 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5674 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5675 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005676 VIXL_ASSERT(allow_macro_instructions_);
5677 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005678 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005679 ITScope it_scope(this, &cond);
5680 vceq(cond, dt, rd, rm, operand);
5681 }
5682 void Vceq(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5683 Vceq(al, dt, rd, rm, operand);
5684 }
5685
5686 void Vceq(Condition cond,
5687 DataType dt,
5688 QRegister rd,
5689 QRegister rm,
5690 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005691 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5693 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005694 VIXL_ASSERT(allow_macro_instructions_);
5695 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005696 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005697 ITScope it_scope(this, &cond);
5698 vceq(cond, dt, rd, rm, operand);
5699 }
5700 void Vceq(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5701 Vceq(al, dt, rd, rm, operand);
5702 }
5703
5704 void Vceq(
5705 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005706 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5707 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5708 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005709 VIXL_ASSERT(allow_macro_instructions_);
5710 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005711 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005712 ITScope it_scope(this, &cond);
5713 vceq(cond, dt, rd, rn, rm);
5714 }
5715 void Vceq(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5716 Vceq(al, dt, rd, rn, rm);
5717 }
5718
5719 void Vceq(
5720 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005721 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5722 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5723 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005724 VIXL_ASSERT(allow_macro_instructions_);
5725 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005726 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005727 ITScope it_scope(this, &cond);
5728 vceq(cond, dt, rd, rn, rm);
5729 }
5730 void Vceq(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5731 Vceq(al, dt, rd, rn, rm);
5732 }
5733
5734 void Vcge(Condition cond,
5735 DataType dt,
5736 DRegister rd,
5737 DRegister rm,
5738 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005739 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5740 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5741 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005742 VIXL_ASSERT(allow_macro_instructions_);
5743 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005744 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005745 ITScope it_scope(this, &cond);
5746 vcge(cond, dt, rd, rm, operand);
5747 }
5748 void Vcge(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5749 Vcge(al, dt, rd, rm, operand);
5750 }
5751
5752 void Vcge(Condition cond,
5753 DataType dt,
5754 QRegister rd,
5755 QRegister rm,
5756 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005757 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5758 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5759 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005760 VIXL_ASSERT(allow_macro_instructions_);
5761 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005762 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005763 ITScope it_scope(this, &cond);
5764 vcge(cond, dt, rd, rm, operand);
5765 }
5766 void Vcge(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5767 Vcge(al, dt, rd, rm, operand);
5768 }
5769
5770 void Vcge(
5771 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005772 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5773 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5774 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005775 VIXL_ASSERT(allow_macro_instructions_);
5776 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005777 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005778 ITScope it_scope(this, &cond);
5779 vcge(cond, dt, rd, rn, rm);
5780 }
5781 void Vcge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5782 Vcge(al, dt, rd, rn, rm);
5783 }
5784
5785 void Vcge(
5786 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005787 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5788 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5789 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005790 VIXL_ASSERT(allow_macro_instructions_);
5791 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005792 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005793 ITScope it_scope(this, &cond);
5794 vcge(cond, dt, rd, rn, rm);
5795 }
5796 void Vcge(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5797 Vcge(al, dt, rd, rn, rm);
5798 }
5799
5800 void Vcgt(Condition cond,
5801 DataType dt,
5802 DRegister rd,
5803 DRegister rm,
5804 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005805 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5806 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5807 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005808 VIXL_ASSERT(allow_macro_instructions_);
5809 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005810 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005811 ITScope it_scope(this, &cond);
5812 vcgt(cond, dt, rd, rm, operand);
5813 }
5814 void Vcgt(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5815 Vcgt(al, dt, rd, rm, operand);
5816 }
5817
5818 void Vcgt(Condition cond,
5819 DataType dt,
5820 QRegister rd,
5821 QRegister rm,
5822 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005823 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5824 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5825 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005826 VIXL_ASSERT(allow_macro_instructions_);
5827 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005828 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005829 ITScope it_scope(this, &cond);
5830 vcgt(cond, dt, rd, rm, operand);
5831 }
5832 void Vcgt(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5833 Vcgt(al, dt, rd, rm, operand);
5834 }
5835
5836 void Vcgt(
5837 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005838 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5839 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5840 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005841 VIXL_ASSERT(allow_macro_instructions_);
5842 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005843 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005844 ITScope it_scope(this, &cond);
5845 vcgt(cond, dt, rd, rn, rm);
5846 }
5847 void Vcgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5848 Vcgt(al, dt, rd, rn, rm);
5849 }
5850
5851 void Vcgt(
5852 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005853 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5854 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5855 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005856 VIXL_ASSERT(allow_macro_instructions_);
5857 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005858 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005859 ITScope it_scope(this, &cond);
5860 vcgt(cond, dt, rd, rn, rm);
5861 }
5862 void Vcgt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5863 Vcgt(al, dt, rd, rn, rm);
5864 }
5865
5866 void Vcle(Condition cond,
5867 DataType dt,
5868 DRegister rd,
5869 DRegister rm,
5870 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005871 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5872 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5873 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005874 VIXL_ASSERT(allow_macro_instructions_);
5875 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005876 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005877 ITScope it_scope(this, &cond);
5878 vcle(cond, dt, rd, rm, operand);
5879 }
5880 void Vcle(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5881 Vcle(al, dt, rd, rm, operand);
5882 }
5883
5884 void Vcle(Condition cond,
5885 DataType dt,
5886 QRegister rd,
5887 QRegister rm,
5888 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005889 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5890 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5891 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005892 VIXL_ASSERT(allow_macro_instructions_);
5893 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005894 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005895 ITScope it_scope(this, &cond);
5896 vcle(cond, dt, rd, rm, operand);
5897 }
5898 void Vcle(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5899 Vcle(al, dt, rd, rm, operand);
5900 }
5901
5902 void Vcle(
5903 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005904 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5905 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5906 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005907 VIXL_ASSERT(allow_macro_instructions_);
5908 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005909 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005910 ITScope it_scope(this, &cond);
5911 vcle(cond, dt, rd, rn, rm);
5912 }
5913 void Vcle(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5914 Vcle(al, dt, rd, rn, rm);
5915 }
5916
5917 void Vcle(
5918 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005919 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5920 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5921 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005922 VIXL_ASSERT(allow_macro_instructions_);
5923 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005924 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005925 ITScope it_scope(this, &cond);
5926 vcle(cond, dt, rd, rn, rm);
5927 }
5928 void Vcle(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5929 Vcle(al, dt, rd, rn, rm);
5930 }
5931
5932 void Vcls(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005933 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5934 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005935 VIXL_ASSERT(allow_macro_instructions_);
5936 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005937 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005938 ITScope it_scope(this, &cond);
5939 vcls(cond, dt, rd, rm);
5940 }
5941 void Vcls(DataType dt, DRegister rd, DRegister rm) { Vcls(al, dt, rd, rm); }
5942
5943 void Vcls(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5945 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005946 VIXL_ASSERT(allow_macro_instructions_);
5947 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005948 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005949 ITScope it_scope(this, &cond);
5950 vcls(cond, dt, rd, rm);
5951 }
5952 void Vcls(DataType dt, QRegister rd, QRegister rm) { Vcls(al, dt, rd, rm); }
5953
5954 void Vclt(Condition cond,
5955 DataType dt,
5956 DRegister rd,
5957 DRegister rm,
5958 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005959 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5960 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5961 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005962 VIXL_ASSERT(allow_macro_instructions_);
5963 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005964 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005965 ITScope it_scope(this, &cond);
5966 vclt(cond, dt, rd, rm, operand);
5967 }
5968 void Vclt(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5969 Vclt(al, dt, rd, rm, operand);
5970 }
5971
5972 void Vclt(Condition cond,
5973 DataType dt,
5974 QRegister rd,
5975 QRegister rm,
5976 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005977 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5978 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5979 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005980 VIXL_ASSERT(allow_macro_instructions_);
5981 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005982 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005983 ITScope it_scope(this, &cond);
5984 vclt(cond, dt, rd, rm, operand);
5985 }
5986 void Vclt(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5987 Vclt(al, dt, rd, rm, operand);
5988 }
5989
5990 void Vclt(
5991 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005992 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5993 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5994 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005995 VIXL_ASSERT(allow_macro_instructions_);
5996 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07005997 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005998 ITScope it_scope(this, &cond);
5999 vclt(cond, dt, rd, rn, rm);
6000 }
6001 void Vclt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6002 Vclt(al, dt, rd, rn, rm);
6003 }
6004
6005 void Vclt(
6006 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006007 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6008 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6009 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006010 VIXL_ASSERT(allow_macro_instructions_);
6011 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006012 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006013 ITScope it_scope(this, &cond);
6014 vclt(cond, dt, rd, rn, rm);
6015 }
6016 void Vclt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6017 Vclt(al, dt, rd, rn, rm);
6018 }
6019
6020 void Vclz(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006021 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6022 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006023 VIXL_ASSERT(allow_macro_instructions_);
6024 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006025 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006026 ITScope it_scope(this, &cond);
6027 vclz(cond, dt, rd, rm);
6028 }
6029 void Vclz(DataType dt, DRegister rd, DRegister rm) { Vclz(al, dt, rd, rm); }
6030
6031 void Vclz(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006032 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6033 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006034 VIXL_ASSERT(allow_macro_instructions_);
6035 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006036 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006037 ITScope it_scope(this, &cond);
6038 vclz(cond, dt, rd, rm);
6039 }
6040 void Vclz(DataType dt, QRegister rd, QRegister rm) { Vclz(al, dt, rd, rm); }
6041
6042 void Vcmp(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006043 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6044 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006045 VIXL_ASSERT(allow_macro_instructions_);
6046 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006047 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006048 ITScope it_scope(this, &cond);
6049 vcmp(cond, dt, rd, rm);
6050 }
6051 void Vcmp(DataType dt, SRegister rd, SRegister rm) { Vcmp(al, dt, rd, rm); }
6052
6053 void Vcmp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006054 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6055 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006056 VIXL_ASSERT(allow_macro_instructions_);
6057 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006058 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006059 ITScope it_scope(this, &cond);
6060 vcmp(cond, dt, rd, rm);
6061 }
6062 void Vcmp(DataType dt, DRegister rd, DRegister rm) { Vcmp(al, dt, rd, rm); }
6063
6064 void Vcmp(Condition cond, DataType dt, SRegister rd, double imm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006065 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006066 VIXL_ASSERT(allow_macro_instructions_);
6067 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006068 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006069 ITScope it_scope(this, &cond);
6070 vcmp(cond, dt, rd, imm);
6071 }
6072 void Vcmp(DataType dt, SRegister rd, double imm) { Vcmp(al, dt, rd, imm); }
6073
6074 void Vcmp(Condition cond, DataType dt, DRegister rd, double imm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006075 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006076 VIXL_ASSERT(allow_macro_instructions_);
6077 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006078 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006079 ITScope it_scope(this, &cond);
6080 vcmp(cond, dt, rd, imm);
6081 }
6082 void Vcmp(DataType dt, DRegister rd, double imm) { Vcmp(al, dt, rd, imm); }
6083
6084 void Vcmpe(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006085 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6086 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006087 VIXL_ASSERT(allow_macro_instructions_);
6088 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006089 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006090 ITScope it_scope(this, &cond);
6091 vcmpe(cond, dt, rd, rm);
6092 }
6093 void Vcmpe(DataType dt, SRegister rd, SRegister rm) { Vcmpe(al, dt, rd, rm); }
6094
6095 void Vcmpe(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006096 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6097 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006098 VIXL_ASSERT(allow_macro_instructions_);
6099 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006100 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006101 ITScope it_scope(this, &cond);
6102 vcmpe(cond, dt, rd, rm);
6103 }
6104 void Vcmpe(DataType dt, DRegister rd, DRegister rm) { Vcmpe(al, dt, rd, rm); }
6105
6106 void Vcmpe(Condition cond, DataType dt, SRegister rd, double imm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006107 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006108 VIXL_ASSERT(allow_macro_instructions_);
6109 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006110 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006111 ITScope it_scope(this, &cond);
6112 vcmpe(cond, dt, rd, imm);
6113 }
6114 void Vcmpe(DataType dt, SRegister rd, double imm) { Vcmpe(al, dt, rd, imm); }
6115
6116 void Vcmpe(Condition cond, DataType dt, DRegister rd, double imm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006117 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006118 VIXL_ASSERT(allow_macro_instructions_);
6119 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006120 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006121 ITScope it_scope(this, &cond);
6122 vcmpe(cond, dt, rd, imm);
6123 }
6124 void Vcmpe(DataType dt, DRegister rd, double imm) { Vcmpe(al, dt, rd, imm); }
6125
6126 void Vcnt(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006127 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6128 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006129 VIXL_ASSERT(allow_macro_instructions_);
6130 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006131 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006132 ITScope it_scope(this, &cond);
6133 vcnt(cond, dt, rd, rm);
6134 }
6135 void Vcnt(DataType dt, DRegister rd, DRegister rm) { Vcnt(al, dt, rd, rm); }
6136
6137 void Vcnt(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006138 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6139 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006140 VIXL_ASSERT(allow_macro_instructions_);
6141 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006142 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006143 ITScope it_scope(this, &cond);
6144 vcnt(cond, dt, rd, rm);
6145 }
6146 void Vcnt(DataType dt, QRegister rd, QRegister rm) { Vcnt(al, dt, rd, rm); }
6147
6148 void Vcvt(
6149 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006150 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6151 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006152 VIXL_ASSERT(allow_macro_instructions_);
6153 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006154 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006155 ITScope it_scope(this, &cond);
6156 vcvt(cond, dt1, dt2, rd, rm);
6157 }
6158 void Vcvt(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6159 Vcvt(al, dt1, dt2, rd, rm);
6160 }
6161
6162 void Vcvt(
6163 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006164 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6165 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006166 VIXL_ASSERT(allow_macro_instructions_);
6167 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006168 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006169 ITScope it_scope(this, &cond);
6170 vcvt(cond, dt1, dt2, rd, rm);
6171 }
6172 void Vcvt(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6173 Vcvt(al, dt1, dt2, rd, rm);
6174 }
6175
6176 void Vcvt(Condition cond,
6177 DataType dt1,
6178 DataType dt2,
6179 DRegister rd,
6180 DRegister rm,
6181 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006182 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6183 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006184 VIXL_ASSERT(allow_macro_instructions_);
6185 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006186 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006187 ITScope it_scope(this, &cond);
6188 vcvt(cond, dt1, dt2, rd, rm, fbits);
6189 }
6190 void Vcvt(
6191 DataType dt1, DataType dt2, DRegister rd, DRegister rm, int32_t fbits) {
6192 Vcvt(al, dt1, dt2, rd, rm, fbits);
6193 }
6194
6195 void Vcvt(Condition cond,
6196 DataType dt1,
6197 DataType dt2,
6198 QRegister rd,
6199 QRegister rm,
6200 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006201 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6202 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006203 VIXL_ASSERT(allow_macro_instructions_);
6204 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006205 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006206 ITScope it_scope(this, &cond);
6207 vcvt(cond, dt1, dt2, rd, rm, fbits);
6208 }
6209 void Vcvt(
6210 DataType dt1, DataType dt2, QRegister rd, QRegister rm, int32_t fbits) {
6211 Vcvt(al, dt1, dt2, rd, rm, fbits);
6212 }
6213
6214 void Vcvt(Condition cond,
6215 DataType dt1,
6216 DataType dt2,
6217 SRegister rd,
6218 SRegister rm,
6219 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006220 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6221 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006222 VIXL_ASSERT(allow_macro_instructions_);
6223 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006224 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006225 ITScope it_scope(this, &cond);
6226 vcvt(cond, dt1, dt2, rd, rm, fbits);
6227 }
6228 void Vcvt(
6229 DataType dt1, DataType dt2, SRegister rd, SRegister rm, int32_t fbits) {
6230 Vcvt(al, dt1, dt2, rd, rm, fbits);
6231 }
6232
6233 void Vcvt(
6234 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006235 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6236 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006237 VIXL_ASSERT(allow_macro_instructions_);
6238 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006239 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006240 ITScope it_scope(this, &cond);
6241 vcvt(cond, dt1, dt2, rd, rm);
6242 }
6243 void Vcvt(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
6244 Vcvt(al, dt1, dt2, rd, rm);
6245 }
6246
6247 void Vcvt(
6248 Condition cond, DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006249 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6250 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006251 VIXL_ASSERT(allow_macro_instructions_);
6252 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006253 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006254 ITScope it_scope(this, &cond);
6255 vcvt(cond, dt1, dt2, rd, rm);
6256 }
6257 void Vcvt(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
6258 Vcvt(al, dt1, dt2, rd, rm);
6259 }
6260
6261 void Vcvt(
6262 Condition cond, DataType dt1, DataType dt2, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006263 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6264 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006265 VIXL_ASSERT(allow_macro_instructions_);
6266 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006267 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006268 ITScope it_scope(this, &cond);
6269 vcvt(cond, dt1, dt2, rd, rm);
6270 }
6271 void Vcvt(DataType dt1, DataType dt2, DRegister rd, QRegister rm) {
6272 Vcvt(al, dt1, dt2, rd, rm);
6273 }
6274
6275 void Vcvt(
6276 Condition cond, DataType dt1, DataType dt2, QRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006277 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6278 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006279 VIXL_ASSERT(allow_macro_instructions_);
6280 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006281 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006282 ITScope it_scope(this, &cond);
6283 vcvt(cond, dt1, dt2, rd, rm);
6284 }
6285 void Vcvt(DataType dt1, DataType dt2, QRegister rd, DRegister rm) {
6286 Vcvt(al, dt1, dt2, rd, rm);
6287 }
6288
6289 void Vcvt(
6290 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006291 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6292 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006293 VIXL_ASSERT(allow_macro_instructions_);
6294 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006295 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006296 ITScope it_scope(this, &cond);
6297 vcvt(cond, dt1, dt2, rd, rm);
6298 }
6299 void Vcvt(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6300 Vcvt(al, dt1, dt2, rd, rm);
6301 }
6302
6303 void Vcvta(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006304 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6305 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006306 VIXL_ASSERT(allow_macro_instructions_);
6307 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006308 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006309 vcvta(dt1, dt2, rd, rm);
6310 }
6311
6312 void Vcvta(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006313 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6314 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006315 VIXL_ASSERT(allow_macro_instructions_);
6316 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006317 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006318 vcvta(dt1, dt2, rd, rm);
6319 }
6320
6321 void Vcvta(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006322 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6323 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006324 VIXL_ASSERT(allow_macro_instructions_);
6325 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006326 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006327 vcvta(dt1, dt2, rd, rm);
6328 }
6329
6330 void Vcvta(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006331 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6332 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006333 VIXL_ASSERT(allow_macro_instructions_);
6334 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006335 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006336 vcvta(dt1, dt2, rd, rm);
6337 }
6338
6339 void Vcvtb(
6340 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006341 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6342 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006343 VIXL_ASSERT(allow_macro_instructions_);
6344 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006345 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006346 ITScope it_scope(this, &cond);
6347 vcvtb(cond, dt1, dt2, rd, rm);
6348 }
6349 void Vcvtb(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6350 Vcvtb(al, dt1, dt2, rd, rm);
6351 }
6352
6353 void Vcvtb(
6354 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006355 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6356 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006357 VIXL_ASSERT(allow_macro_instructions_);
6358 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006359 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006360 ITScope it_scope(this, &cond);
6361 vcvtb(cond, dt1, dt2, rd, rm);
6362 }
6363 void Vcvtb(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6364 Vcvtb(al, dt1, dt2, rd, rm);
6365 }
6366
6367 void Vcvtb(
6368 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006369 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6370 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006371 VIXL_ASSERT(allow_macro_instructions_);
6372 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006373 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006374 ITScope it_scope(this, &cond);
6375 vcvtb(cond, dt1, dt2, rd, rm);
6376 }
6377 void Vcvtb(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6378 Vcvtb(al, dt1, dt2, rd, rm);
6379 }
6380
6381 void Vcvtm(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006382 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6383 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006384 VIXL_ASSERT(allow_macro_instructions_);
6385 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006386 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006387 vcvtm(dt1, dt2, rd, rm);
6388 }
6389
6390 void Vcvtm(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006391 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6392 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006393 VIXL_ASSERT(allow_macro_instructions_);
6394 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006395 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006396 vcvtm(dt1, dt2, rd, rm);
6397 }
6398
6399 void Vcvtm(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006400 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6401 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006402 VIXL_ASSERT(allow_macro_instructions_);
6403 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006404 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006405 vcvtm(dt1, dt2, rd, rm);
6406 }
6407
6408 void Vcvtm(DataType dt1, DataType dt2, SRegister 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());
Vincent Belliard8885c172016-08-24 11:33:19 -07006413 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006414 vcvtm(dt1, dt2, rd, rm);
6415 }
6416
6417 void Vcvtn(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006418 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6419 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006420 VIXL_ASSERT(allow_macro_instructions_);
6421 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006422 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006423 vcvtn(dt1, dt2, rd, rm);
6424 }
6425
6426 void Vcvtn(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006427 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6428 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006429 VIXL_ASSERT(allow_macro_instructions_);
6430 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006431 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006432 vcvtn(dt1, dt2, rd, rm);
6433 }
6434
6435 void Vcvtn(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006436 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6437 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006438 VIXL_ASSERT(allow_macro_instructions_);
6439 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006440 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006441 vcvtn(dt1, dt2, rd, rm);
6442 }
6443
6444 void Vcvtn(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006445 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6446 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006447 VIXL_ASSERT(allow_macro_instructions_);
6448 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006449 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006450 vcvtn(dt1, dt2, rd, rm);
6451 }
6452
6453 void Vcvtp(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006454 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6455 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006456 VIXL_ASSERT(allow_macro_instructions_);
6457 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006458 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006459 vcvtp(dt1, dt2, rd, rm);
6460 }
6461
6462 void Vcvtp(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006463 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6464 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006465 VIXL_ASSERT(allow_macro_instructions_);
6466 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006467 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006468 vcvtp(dt1, dt2, rd, rm);
6469 }
6470
6471 void Vcvtp(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006472 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6473 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006474 VIXL_ASSERT(allow_macro_instructions_);
6475 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006476 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006477 vcvtp(dt1, dt2, rd, rm);
6478 }
6479
6480 void Vcvtp(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006481 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6482 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006483 VIXL_ASSERT(allow_macro_instructions_);
6484 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006485 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006486 vcvtp(dt1, dt2, rd, rm);
6487 }
6488
6489 void Vcvtr(
6490 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006491 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6492 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006493 VIXL_ASSERT(allow_macro_instructions_);
6494 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006495 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006496 ITScope it_scope(this, &cond);
6497 vcvtr(cond, dt1, dt2, rd, rm);
6498 }
6499 void Vcvtr(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6500 Vcvtr(al, dt1, dt2, rd, rm);
6501 }
6502
6503 void Vcvtr(
6504 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006505 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6506 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006507 VIXL_ASSERT(allow_macro_instructions_);
6508 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006509 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006510 ITScope it_scope(this, &cond);
6511 vcvtr(cond, dt1, dt2, rd, rm);
6512 }
6513 void Vcvtr(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6514 Vcvtr(al, dt1, dt2, rd, rm);
6515 }
6516
6517 void Vcvtt(
6518 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006519 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6520 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006521 VIXL_ASSERT(allow_macro_instructions_);
6522 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006523 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006524 ITScope it_scope(this, &cond);
6525 vcvtt(cond, dt1, dt2, rd, rm);
6526 }
6527 void Vcvtt(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6528 Vcvtt(al, dt1, dt2, rd, rm);
6529 }
6530
6531 void Vcvtt(
6532 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006533 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6534 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006535 VIXL_ASSERT(allow_macro_instructions_);
6536 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006537 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006538 ITScope it_scope(this, &cond);
6539 vcvtt(cond, dt1, dt2, rd, rm);
6540 }
6541 void Vcvtt(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6542 Vcvtt(al, dt1, dt2, rd, rm);
6543 }
6544
6545 void Vcvtt(
6546 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006547 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6548 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006549 VIXL_ASSERT(allow_macro_instructions_);
6550 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006551 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006552 ITScope it_scope(this, &cond);
6553 vcvtt(cond, dt1, dt2, rd, rm);
6554 }
6555 void Vcvtt(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6556 Vcvtt(al, dt1, dt2, rd, rm);
6557 }
6558
6559 void Vdiv(
6560 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006561 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6562 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006564 VIXL_ASSERT(allow_macro_instructions_);
6565 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006566 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006567 ITScope it_scope(this, &cond);
6568 vdiv(cond, dt, rd, rn, rm);
6569 }
6570 void Vdiv(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6571 Vdiv(al, dt, rd, rn, rm);
6572 }
6573
6574 void Vdiv(
6575 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006576 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6577 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6578 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006579 VIXL_ASSERT(allow_macro_instructions_);
6580 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006581 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006582 ITScope it_scope(this, &cond);
6583 vdiv(cond, dt, rd, rn, rm);
6584 }
6585 void Vdiv(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6586 Vdiv(al, dt, rd, rn, rm);
6587 }
6588
6589 void Vdup(Condition cond, DataType dt, QRegister rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006590 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6591 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006592 VIXL_ASSERT(allow_macro_instructions_);
6593 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006594 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006595 ITScope it_scope(this, &cond);
6596 vdup(cond, dt, rd, rt);
6597 }
6598 void Vdup(DataType dt, QRegister rd, Register rt) { Vdup(al, dt, rd, rt); }
6599
6600 void Vdup(Condition cond, DataType dt, DRegister rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006601 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6602 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006603 VIXL_ASSERT(allow_macro_instructions_);
6604 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006605 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006606 ITScope it_scope(this, &cond);
6607 vdup(cond, dt, rd, rt);
6608 }
6609 void Vdup(DataType dt, DRegister rd, Register rt) { Vdup(al, dt, rd, rt); }
6610
6611 void Vdup(Condition cond, DataType dt, DRegister rd, DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006612 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6613 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006614 VIXL_ASSERT(allow_macro_instructions_);
6615 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006616 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006617 ITScope it_scope(this, &cond);
6618 vdup(cond, dt, rd, rm);
6619 }
6620 void Vdup(DataType dt, DRegister rd, DRegisterLane rm) {
6621 Vdup(al, dt, rd, rm);
6622 }
6623
6624 void Vdup(Condition cond, DataType dt, QRegister rd, DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006625 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6626 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006627 VIXL_ASSERT(allow_macro_instructions_);
6628 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006629 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006630 ITScope it_scope(this, &cond);
6631 vdup(cond, dt, rd, rm);
6632 }
6633 void Vdup(DataType dt, QRegister rd, DRegisterLane rm) {
6634 Vdup(al, dt, rd, rm);
6635 }
6636
6637 void Veor(
6638 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006639 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6640 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6641 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006642 VIXL_ASSERT(allow_macro_instructions_);
6643 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006644 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006645 ITScope it_scope(this, &cond);
6646 veor(cond, dt, rd, rn, rm);
6647 }
6648 void Veor(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6649 Veor(al, dt, rd, rn, rm);
6650 }
6651 void Veor(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
6652 Veor(cond, kDataTypeValueNone, rd, rn, rm);
6653 }
6654 void Veor(DRegister rd, DRegister rn, DRegister rm) {
6655 Veor(al, kDataTypeValueNone, rd, rn, rm);
6656 }
6657
6658 void Veor(
6659 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006660 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6661 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6662 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006663 VIXL_ASSERT(allow_macro_instructions_);
6664 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006665 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006666 ITScope it_scope(this, &cond);
6667 veor(cond, dt, rd, rn, rm);
6668 }
6669 void Veor(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6670 Veor(al, dt, rd, rn, rm);
6671 }
6672 void Veor(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
6673 Veor(cond, kDataTypeValueNone, rd, rn, rm);
6674 }
6675 void Veor(QRegister rd, QRegister rn, QRegister rm) {
6676 Veor(al, kDataTypeValueNone, rd, rn, rm);
6677 }
6678
6679 void Vext(Condition cond,
6680 DataType dt,
6681 DRegister rd,
6682 DRegister rn,
6683 DRegister rm,
6684 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006685 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6686 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6687 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6688 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006689 VIXL_ASSERT(allow_macro_instructions_);
6690 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006691 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006692 ITScope it_scope(this, &cond);
6693 vext(cond, dt, rd, rn, rm, operand);
6694 }
6695 void Vext(DataType dt,
6696 DRegister rd,
6697 DRegister rn,
6698 DRegister rm,
6699 const DOperand& operand) {
6700 Vext(al, dt, rd, rn, rm, operand);
6701 }
6702
6703 void Vext(Condition cond,
6704 DataType dt,
6705 QRegister rd,
6706 QRegister rn,
6707 QRegister rm,
6708 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006709 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6710 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6711 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6712 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006713 VIXL_ASSERT(allow_macro_instructions_);
6714 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006715 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006716 ITScope it_scope(this, &cond);
6717 vext(cond, dt, rd, rn, rm, operand);
6718 }
6719 void Vext(DataType dt,
6720 QRegister rd,
6721 QRegister rn,
6722 QRegister rm,
6723 const QOperand& operand) {
6724 Vext(al, dt, rd, rn, rm, operand);
6725 }
6726
6727 void Vfma(
6728 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006729 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6730 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6731 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006732 VIXL_ASSERT(allow_macro_instructions_);
6733 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006734 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006735 ITScope it_scope(this, &cond);
6736 vfma(cond, dt, rd, rn, rm);
6737 }
6738 void Vfma(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6739 Vfma(al, dt, rd, rn, rm);
6740 }
6741
6742 void Vfma(
6743 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006744 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6745 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6746 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006747 VIXL_ASSERT(allow_macro_instructions_);
6748 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006749 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006750 ITScope it_scope(this, &cond);
6751 vfma(cond, dt, rd, rn, rm);
6752 }
6753 void Vfma(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6754 Vfma(al, dt, rd, rn, rm);
6755 }
6756
6757 void Vfma(
6758 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006759 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6760 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6761 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006762 VIXL_ASSERT(allow_macro_instructions_);
6763 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006764 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006765 ITScope it_scope(this, &cond);
6766 vfma(cond, dt, rd, rn, rm);
6767 }
6768 void Vfma(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6769 Vfma(al, dt, rd, rn, rm);
6770 }
6771
6772 void Vfms(
6773 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006774 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6775 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6776 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006777 VIXL_ASSERT(allow_macro_instructions_);
6778 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006779 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006780 ITScope it_scope(this, &cond);
6781 vfms(cond, dt, rd, rn, rm);
6782 }
6783 void Vfms(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6784 Vfms(al, dt, rd, rn, rm);
6785 }
6786
6787 void Vfms(
6788 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006789 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6790 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6791 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006792 VIXL_ASSERT(allow_macro_instructions_);
6793 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006794 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006795 ITScope it_scope(this, &cond);
6796 vfms(cond, dt, rd, rn, rm);
6797 }
6798 void Vfms(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6799 Vfms(al, dt, rd, rn, rm);
6800 }
6801
6802 void Vfms(
6803 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006804 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6805 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6806 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006807 VIXL_ASSERT(allow_macro_instructions_);
6808 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006809 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006810 ITScope it_scope(this, &cond);
6811 vfms(cond, dt, rd, rn, rm);
6812 }
6813 void Vfms(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6814 Vfms(al, dt, rd, rn, rm);
6815 }
6816
6817 void Vfnma(
6818 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006819 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6820 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6821 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006822 VIXL_ASSERT(allow_macro_instructions_);
6823 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006824 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006825 ITScope it_scope(this, &cond);
6826 vfnma(cond, dt, rd, rn, rm);
6827 }
6828 void Vfnma(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6829 Vfnma(al, dt, rd, rn, rm);
6830 }
6831
6832 void Vfnma(
6833 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006834 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6835 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6836 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006837 VIXL_ASSERT(allow_macro_instructions_);
6838 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006839 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006840 ITScope it_scope(this, &cond);
6841 vfnma(cond, dt, rd, rn, rm);
6842 }
6843 void Vfnma(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6844 Vfnma(al, dt, rd, rn, rm);
6845 }
6846
6847 void Vfnms(
6848 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006849 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6850 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6851 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006852 VIXL_ASSERT(allow_macro_instructions_);
6853 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006854 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006855 ITScope it_scope(this, &cond);
6856 vfnms(cond, dt, rd, rn, rm);
6857 }
6858 void Vfnms(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6859 Vfnms(al, dt, rd, rn, rm);
6860 }
6861
6862 void Vfnms(
6863 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006864 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6865 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6866 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006867 VIXL_ASSERT(allow_macro_instructions_);
6868 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006869 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006870 ITScope it_scope(this, &cond);
6871 vfnms(cond, dt, rd, rn, rm);
6872 }
6873 void Vfnms(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6874 Vfnms(al, dt, rd, rn, rm);
6875 }
6876
6877 void Vhadd(
6878 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006879 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6880 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6881 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006882 VIXL_ASSERT(allow_macro_instructions_);
6883 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006884 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006885 ITScope it_scope(this, &cond);
6886 vhadd(cond, dt, rd, rn, rm);
6887 }
6888 void Vhadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6889 Vhadd(al, dt, rd, rn, rm);
6890 }
6891
6892 void Vhadd(
6893 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006894 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6895 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6896 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006897 VIXL_ASSERT(allow_macro_instructions_);
6898 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006899 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006900 ITScope it_scope(this, &cond);
6901 vhadd(cond, dt, rd, rn, rm);
6902 }
6903 void Vhadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6904 Vhadd(al, dt, rd, rn, rm);
6905 }
6906
6907 void Vhsub(
6908 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006909 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6910 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6911 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006912 VIXL_ASSERT(allow_macro_instructions_);
6913 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006914 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006915 ITScope it_scope(this, &cond);
6916 vhsub(cond, dt, rd, rn, rm);
6917 }
6918 void Vhsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6919 Vhsub(al, dt, rd, rn, rm);
6920 }
6921
6922 void Vhsub(
6923 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006924 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6925 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6926 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006927 VIXL_ASSERT(allow_macro_instructions_);
6928 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006929 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006930 ITScope it_scope(this, &cond);
6931 vhsub(cond, dt, rd, rn, rm);
6932 }
6933 void Vhsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6934 Vhsub(al, dt, rd, rn, rm);
6935 }
6936
6937 void Vld1(Condition cond,
6938 DataType dt,
6939 const NeonRegisterList& nreglist,
6940 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006941 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
6942 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006943 VIXL_ASSERT(allow_macro_instructions_);
6944 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006945 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006946 ITScope it_scope(this, &cond);
6947 vld1(cond, dt, nreglist, operand);
6948 }
6949 void Vld1(DataType dt,
6950 const NeonRegisterList& nreglist,
6951 const AlignedMemOperand& operand) {
6952 Vld1(al, dt, nreglist, operand);
6953 }
6954
6955 void Vld2(Condition cond,
6956 DataType dt,
6957 const NeonRegisterList& nreglist,
6958 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006959 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
6960 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006961 VIXL_ASSERT(allow_macro_instructions_);
6962 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006963 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006964 ITScope it_scope(this, &cond);
6965 vld2(cond, dt, nreglist, operand);
6966 }
6967 void Vld2(DataType dt,
6968 const NeonRegisterList& nreglist,
6969 const AlignedMemOperand& operand) {
6970 Vld2(al, dt, nreglist, operand);
6971 }
6972
6973 void Vld3(Condition cond,
6974 DataType dt,
6975 const NeonRegisterList& nreglist,
6976 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006977 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
6978 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006979 VIXL_ASSERT(allow_macro_instructions_);
6980 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006981 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006982 ITScope it_scope(this, &cond);
6983 vld3(cond, dt, nreglist, operand);
6984 }
6985 void Vld3(DataType dt,
6986 const NeonRegisterList& nreglist,
6987 const AlignedMemOperand& operand) {
6988 Vld3(al, dt, nreglist, operand);
6989 }
6990
6991 void Vld3(Condition cond,
6992 DataType dt,
6993 const NeonRegisterList& nreglist,
6994 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006995 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
6996 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006997 VIXL_ASSERT(allow_macro_instructions_);
6998 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07006999 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007000 ITScope it_scope(this, &cond);
7001 vld3(cond, dt, nreglist, operand);
7002 }
7003 void Vld3(DataType dt,
7004 const NeonRegisterList& nreglist,
7005 const MemOperand& operand) {
7006 Vld3(al, dt, nreglist, operand);
7007 }
7008
7009 void Vld4(Condition cond,
7010 DataType dt,
7011 const NeonRegisterList& nreglist,
7012 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007013 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7014 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007015 VIXL_ASSERT(allow_macro_instructions_);
7016 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007017 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007018 ITScope it_scope(this, &cond);
7019 vld4(cond, dt, nreglist, operand);
7020 }
7021 void Vld4(DataType dt,
7022 const NeonRegisterList& nreglist,
7023 const AlignedMemOperand& operand) {
7024 Vld4(al, dt, nreglist, operand);
7025 }
7026
7027 void Vldm(Condition cond,
7028 DataType dt,
7029 Register rn,
7030 WriteBack write_back,
7031 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007032 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7033 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007034 VIXL_ASSERT(allow_macro_instructions_);
7035 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007036 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007037 ITScope it_scope(this, &cond);
7038 vldm(cond, dt, rn, write_back, dreglist);
7039 }
7040 void Vldm(DataType dt,
7041 Register rn,
7042 WriteBack write_back,
7043 DRegisterList dreglist) {
7044 Vldm(al, dt, rn, write_back, dreglist);
7045 }
7046 void Vldm(Condition cond,
7047 Register rn,
7048 WriteBack write_back,
7049 DRegisterList dreglist) {
7050 Vldm(cond, kDataTypeValueNone, rn, write_back, dreglist);
7051 }
7052 void Vldm(Register rn, WriteBack write_back, DRegisterList dreglist) {
7053 Vldm(al, kDataTypeValueNone, rn, write_back, dreglist);
7054 }
7055
7056 void Vldm(Condition cond,
7057 DataType dt,
7058 Register rn,
7059 WriteBack write_back,
7060 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007061 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7062 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007063 VIXL_ASSERT(allow_macro_instructions_);
7064 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007065 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007066 ITScope it_scope(this, &cond);
7067 vldm(cond, dt, rn, write_back, sreglist);
7068 }
7069 void Vldm(DataType dt,
7070 Register rn,
7071 WriteBack write_back,
7072 SRegisterList sreglist) {
7073 Vldm(al, dt, rn, write_back, sreglist);
7074 }
7075 void Vldm(Condition cond,
7076 Register rn,
7077 WriteBack write_back,
7078 SRegisterList sreglist) {
7079 Vldm(cond, kDataTypeValueNone, rn, write_back, sreglist);
7080 }
7081 void Vldm(Register rn, WriteBack write_back, SRegisterList sreglist) {
7082 Vldm(al, kDataTypeValueNone, rn, write_back, sreglist);
7083 }
7084
7085 void Vldmdb(Condition cond,
7086 DataType dt,
7087 Register rn,
7088 WriteBack write_back,
7089 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007090 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7091 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007092 VIXL_ASSERT(allow_macro_instructions_);
7093 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007094 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007095 ITScope it_scope(this, &cond);
7096 vldmdb(cond, dt, rn, write_back, dreglist);
7097 }
7098 void Vldmdb(DataType dt,
7099 Register rn,
7100 WriteBack write_back,
7101 DRegisterList dreglist) {
7102 Vldmdb(al, dt, rn, write_back, dreglist);
7103 }
7104 void Vldmdb(Condition cond,
7105 Register rn,
7106 WriteBack write_back,
7107 DRegisterList dreglist) {
7108 Vldmdb(cond, kDataTypeValueNone, rn, write_back, dreglist);
7109 }
7110 void Vldmdb(Register rn, WriteBack write_back, DRegisterList dreglist) {
7111 Vldmdb(al, kDataTypeValueNone, rn, write_back, dreglist);
7112 }
7113
7114 void Vldmdb(Condition cond,
7115 DataType dt,
7116 Register rn,
7117 WriteBack write_back,
7118 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007119 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7120 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007121 VIXL_ASSERT(allow_macro_instructions_);
7122 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007123 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007124 ITScope it_scope(this, &cond);
7125 vldmdb(cond, dt, rn, write_back, sreglist);
7126 }
7127 void Vldmdb(DataType dt,
7128 Register rn,
7129 WriteBack write_back,
7130 SRegisterList sreglist) {
7131 Vldmdb(al, dt, rn, write_back, sreglist);
7132 }
7133 void Vldmdb(Condition cond,
7134 Register rn,
7135 WriteBack write_back,
7136 SRegisterList sreglist) {
7137 Vldmdb(cond, kDataTypeValueNone, rn, write_back, sreglist);
7138 }
7139 void Vldmdb(Register rn, WriteBack write_back, SRegisterList sreglist) {
7140 Vldmdb(al, kDataTypeValueNone, rn, write_back, sreglist);
7141 }
7142
7143 void Vldmia(Condition cond,
7144 DataType dt,
7145 Register rn,
7146 WriteBack write_back,
7147 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007148 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7149 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007150 VIXL_ASSERT(allow_macro_instructions_);
7151 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007152 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007153 ITScope it_scope(this, &cond);
7154 vldmia(cond, dt, rn, write_back, dreglist);
7155 }
7156 void Vldmia(DataType dt,
7157 Register rn,
7158 WriteBack write_back,
7159 DRegisterList dreglist) {
7160 Vldmia(al, dt, rn, write_back, dreglist);
7161 }
7162 void Vldmia(Condition cond,
7163 Register rn,
7164 WriteBack write_back,
7165 DRegisterList dreglist) {
7166 Vldmia(cond, kDataTypeValueNone, rn, write_back, dreglist);
7167 }
7168 void Vldmia(Register rn, WriteBack write_back, DRegisterList dreglist) {
7169 Vldmia(al, kDataTypeValueNone, rn, write_back, dreglist);
7170 }
7171
7172 void Vldmia(Condition cond,
7173 DataType dt,
7174 Register rn,
7175 WriteBack write_back,
7176 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007177 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7178 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007179 VIXL_ASSERT(allow_macro_instructions_);
7180 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007181 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007182 ITScope it_scope(this, &cond);
7183 vldmia(cond, dt, rn, write_back, sreglist);
7184 }
7185 void Vldmia(DataType dt,
7186 Register rn,
7187 WriteBack write_back,
7188 SRegisterList sreglist) {
7189 Vldmia(al, dt, rn, write_back, sreglist);
7190 }
7191 void Vldmia(Condition cond,
7192 Register rn,
7193 WriteBack write_back,
7194 SRegisterList sreglist) {
7195 Vldmia(cond, kDataTypeValueNone, rn, write_back, sreglist);
7196 }
7197 void Vldmia(Register rn, WriteBack write_back, SRegisterList sreglist) {
7198 Vldmia(al, kDataTypeValueNone, rn, write_back, sreglist);
7199 }
7200
7201 void Vldr(Condition cond, DataType dt, DRegister rd, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007202 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007203 VIXL_ASSERT(allow_macro_instructions_);
7204 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007205 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007206 ITScope it_scope(this, &cond);
7207 vldr(cond, dt, rd, label);
7208 }
7209 void Vldr(DataType dt, DRegister rd, Label* label) {
7210 Vldr(al, dt, rd, label);
7211 }
7212 void Vldr(Condition cond, DRegister rd, Label* label) {
7213 Vldr(cond, Untyped64, rd, label);
7214 }
7215 void Vldr(DRegister rd, Label* label) { Vldr(al, Untyped64, rd, label); }
7216
7217 void Vldr(Condition cond,
7218 DataType dt,
7219 DRegister rd,
7220 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007221 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7222 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007223 VIXL_ASSERT(allow_macro_instructions_);
7224 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007225 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007226 ITScope it_scope(this, &cond);
7227 vldr(cond, dt, rd, operand);
7228 }
7229 void Vldr(DataType dt, DRegister rd, const MemOperand& operand) {
7230 Vldr(al, dt, rd, operand);
7231 }
7232 void Vldr(Condition cond, DRegister rd, const MemOperand& operand) {
7233 Vldr(cond, Untyped64, rd, operand);
7234 }
7235 void Vldr(DRegister rd, const MemOperand& operand) {
7236 Vldr(al, Untyped64, rd, operand);
7237 }
7238
7239 void Vldr(Condition cond, DataType dt, SRegister rd, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007240 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007241 VIXL_ASSERT(allow_macro_instructions_);
7242 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007243 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007244 ITScope it_scope(this, &cond);
7245 vldr(cond, dt, rd, label);
7246 }
7247 void Vldr(DataType dt, SRegister rd, Label* label) {
7248 Vldr(al, dt, rd, label);
7249 }
7250 void Vldr(Condition cond, SRegister rd, Label* label) {
7251 Vldr(cond, Untyped32, rd, label);
7252 }
7253 void Vldr(SRegister rd, Label* label) { Vldr(al, Untyped32, rd, label); }
7254
7255 void Vldr(Condition cond,
7256 DataType dt,
7257 SRegister rd,
7258 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007259 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7260 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007261 VIXL_ASSERT(allow_macro_instructions_);
7262 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007263 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007264 ITScope it_scope(this, &cond);
7265 vldr(cond, dt, rd, operand);
7266 }
7267 void Vldr(DataType dt, SRegister rd, const MemOperand& operand) {
7268 Vldr(al, dt, rd, operand);
7269 }
7270 void Vldr(Condition cond, SRegister rd, const MemOperand& operand) {
7271 Vldr(cond, Untyped32, rd, operand);
7272 }
7273 void Vldr(SRegister rd, const MemOperand& operand) {
7274 Vldr(al, Untyped32, rd, operand);
7275 }
7276
7277 void Vmax(
7278 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007279 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7280 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7281 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007282 VIXL_ASSERT(allow_macro_instructions_);
7283 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007284 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007285 ITScope it_scope(this, &cond);
7286 vmax(cond, dt, rd, rn, rm);
7287 }
7288 void Vmax(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7289 Vmax(al, dt, rd, rn, rm);
7290 }
7291
7292 void Vmax(
7293 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007294 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7295 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7296 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007297 VIXL_ASSERT(allow_macro_instructions_);
7298 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007299 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007300 ITScope it_scope(this, &cond);
7301 vmax(cond, dt, rd, rn, rm);
7302 }
7303 void Vmax(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7304 Vmax(al, dt, rd, rn, rm);
7305 }
7306
7307 void Vmaxnm(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007308 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7309 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7310 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007311 VIXL_ASSERT(allow_macro_instructions_);
7312 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007313 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007314 vmaxnm(dt, rd, rn, rm);
7315 }
7316
7317 void Vmaxnm(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007318 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7319 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7320 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007321 VIXL_ASSERT(allow_macro_instructions_);
7322 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007323 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007324 vmaxnm(dt, rd, rn, rm);
7325 }
7326
7327 void Vmaxnm(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007328 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7329 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7330 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007331 VIXL_ASSERT(allow_macro_instructions_);
7332 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007333 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007334 vmaxnm(dt, rd, rn, rm);
7335 }
7336
7337 void Vmin(
7338 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007339 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7340 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7341 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007342 VIXL_ASSERT(allow_macro_instructions_);
7343 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007344 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007345 ITScope it_scope(this, &cond);
7346 vmin(cond, dt, rd, rn, rm);
7347 }
7348 void Vmin(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7349 Vmin(al, dt, rd, rn, rm);
7350 }
7351
7352 void Vmin(
7353 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007354 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7355 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7356 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007357 VIXL_ASSERT(allow_macro_instructions_);
7358 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007359 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007360 ITScope it_scope(this, &cond);
7361 vmin(cond, dt, rd, rn, rm);
7362 }
7363 void Vmin(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7364 Vmin(al, dt, rd, rn, rm);
7365 }
7366
7367 void Vminnm(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007368 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7369 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7370 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007371 VIXL_ASSERT(allow_macro_instructions_);
7372 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007373 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007374 vminnm(dt, rd, rn, rm);
7375 }
7376
7377 void Vminnm(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007378 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7379 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7380 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007381 VIXL_ASSERT(allow_macro_instructions_);
7382 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007383 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007384 vminnm(dt, rd, rn, rm);
7385 }
7386
7387 void Vminnm(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007388 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7389 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7390 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007391 VIXL_ASSERT(allow_macro_instructions_);
7392 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007393 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007394 vminnm(dt, rd, rn, rm);
7395 }
7396
7397 void Vmla(Condition cond,
7398 DataType dt,
7399 DRegister rd,
7400 DRegister rn,
7401 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007402 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7403 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7404 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007405 VIXL_ASSERT(allow_macro_instructions_);
7406 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007407 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007408 ITScope it_scope(this, &cond);
7409 vmla(cond, dt, rd, rn, rm);
7410 }
7411 void Vmla(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
7412 Vmla(al, dt, rd, rn, rm);
7413 }
7414
7415 void Vmla(Condition cond,
7416 DataType dt,
7417 QRegister rd,
7418 QRegister rn,
7419 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007420 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7421 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7422 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007423 VIXL_ASSERT(allow_macro_instructions_);
7424 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007425 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007426 ITScope it_scope(this, &cond);
7427 vmla(cond, dt, rd, rn, rm);
7428 }
7429 void Vmla(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
7430 Vmla(al, dt, rd, rn, rm);
7431 }
7432
7433 void Vmla(
7434 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007435 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7436 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7437 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007438 VIXL_ASSERT(allow_macro_instructions_);
7439 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007440 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007441 ITScope it_scope(this, &cond);
7442 vmla(cond, dt, rd, rn, rm);
7443 }
7444 void Vmla(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7445 Vmla(al, dt, rd, rn, rm);
7446 }
7447
7448 void Vmla(
7449 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007450 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7451 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7452 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007453 VIXL_ASSERT(allow_macro_instructions_);
7454 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007455 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007456 ITScope it_scope(this, &cond);
7457 vmla(cond, dt, rd, rn, rm);
7458 }
7459 void Vmla(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7460 Vmla(al, dt, rd, rn, rm);
7461 }
7462
7463 void Vmla(
7464 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007465 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7466 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7467 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007468 VIXL_ASSERT(allow_macro_instructions_);
7469 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007470 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007471 ITScope it_scope(this, &cond);
7472 vmla(cond, dt, rd, rn, rm);
7473 }
7474 void Vmla(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7475 Vmla(al, dt, rd, rn, rm);
7476 }
7477
7478 void Vmlal(Condition cond,
7479 DataType dt,
7480 QRegister rd,
7481 DRegister rn,
7482 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007483 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7485 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007486 VIXL_ASSERT(allow_macro_instructions_);
7487 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007488 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007489 ITScope it_scope(this, &cond);
7490 vmlal(cond, dt, rd, rn, rm);
7491 }
7492 void Vmlal(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
7493 Vmlal(al, dt, rd, rn, rm);
7494 }
7495
7496 void Vmlal(
7497 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007498 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7499 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7500 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007501 VIXL_ASSERT(allow_macro_instructions_);
7502 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007503 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007504 ITScope it_scope(this, &cond);
7505 vmlal(cond, dt, rd, rn, rm);
7506 }
7507 void Vmlal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7508 Vmlal(al, dt, rd, rn, rm);
7509 }
7510
7511 void Vmls(Condition cond,
7512 DataType dt,
7513 DRegister rd,
7514 DRegister rn,
7515 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007516 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7517 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7518 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007519 VIXL_ASSERT(allow_macro_instructions_);
7520 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007521 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007522 ITScope it_scope(this, &cond);
7523 vmls(cond, dt, rd, rn, rm);
7524 }
7525 void Vmls(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
7526 Vmls(al, dt, rd, rn, rm);
7527 }
7528
7529 void Vmls(Condition cond,
7530 DataType dt,
7531 QRegister rd,
7532 QRegister rn,
7533 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007534 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7535 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7536 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007537 VIXL_ASSERT(allow_macro_instructions_);
7538 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007539 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007540 ITScope it_scope(this, &cond);
7541 vmls(cond, dt, rd, rn, rm);
7542 }
7543 void Vmls(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
7544 Vmls(al, dt, rd, rn, rm);
7545 }
7546
7547 void Vmls(
7548 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007549 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7550 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7551 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007552 VIXL_ASSERT(allow_macro_instructions_);
7553 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007554 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007555 ITScope it_scope(this, &cond);
7556 vmls(cond, dt, rd, rn, rm);
7557 }
7558 void Vmls(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7559 Vmls(al, dt, rd, rn, rm);
7560 }
7561
7562 void Vmls(
7563 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007564 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7565 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7566 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007567 VIXL_ASSERT(allow_macro_instructions_);
7568 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007569 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007570 ITScope it_scope(this, &cond);
7571 vmls(cond, dt, rd, rn, rm);
7572 }
7573 void Vmls(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7574 Vmls(al, dt, rd, rn, rm);
7575 }
7576
7577 void Vmls(
7578 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007579 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7580 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7581 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007582 VIXL_ASSERT(allow_macro_instructions_);
7583 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007584 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007585 ITScope it_scope(this, &cond);
7586 vmls(cond, dt, rd, rn, rm);
7587 }
7588 void Vmls(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7589 Vmls(al, dt, rd, rn, rm);
7590 }
7591
7592 void Vmlsl(Condition cond,
7593 DataType dt,
7594 QRegister rd,
7595 DRegister rn,
7596 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007597 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7598 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7599 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007600 VIXL_ASSERT(allow_macro_instructions_);
7601 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007602 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007603 ITScope it_scope(this, &cond);
7604 vmlsl(cond, dt, rd, rn, rm);
7605 }
7606 void Vmlsl(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
7607 Vmlsl(al, dt, rd, rn, rm);
7608 }
7609
7610 void Vmlsl(
7611 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007612 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7613 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7614 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007615 VIXL_ASSERT(allow_macro_instructions_);
7616 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007617 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007618 ITScope it_scope(this, &cond);
7619 vmlsl(cond, dt, rd, rn, rm);
7620 }
7621 void Vmlsl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7622 Vmlsl(al, dt, rd, rn, rm);
7623 }
7624
7625 void Vmov(Condition cond, Register rt, SRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007626 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7627 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007628 VIXL_ASSERT(allow_macro_instructions_);
7629 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007630 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007631 ITScope it_scope(this, &cond);
7632 vmov(cond, rt, rn);
7633 }
7634 void Vmov(Register rt, SRegister rn) { Vmov(al, rt, rn); }
7635
7636 void Vmov(Condition cond, SRegister rn, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007637 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7638 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007639 VIXL_ASSERT(allow_macro_instructions_);
7640 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007641 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007642 ITScope it_scope(this, &cond);
7643 vmov(cond, rn, rt);
7644 }
7645 void Vmov(SRegister rn, Register rt) { Vmov(al, rn, rt); }
7646
7647 void Vmov(Condition cond, Register rt, Register rt2, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007648 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7649 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
7650 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007651 VIXL_ASSERT(allow_macro_instructions_);
7652 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007653 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007654 ITScope it_scope(this, &cond);
7655 vmov(cond, rt, rt2, rm);
7656 }
7657 void Vmov(Register rt, Register rt2, DRegister rm) { Vmov(al, rt, rt2, rm); }
7658
7659 void Vmov(Condition cond, DRegister rm, Register rt, Register rt2) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007660 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7661 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7662 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007663 VIXL_ASSERT(allow_macro_instructions_);
7664 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007665 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007666 ITScope it_scope(this, &cond);
7667 vmov(cond, rm, rt, rt2);
7668 }
7669 void Vmov(DRegister rm, Register rt, Register rt2) { Vmov(al, rm, rt, rt2); }
7670
7671 void Vmov(
7672 Condition cond, Register rt, Register rt2, SRegister rm, SRegister rm1) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007673 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7674 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
7675 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7676 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm1));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007677 VIXL_ASSERT(allow_macro_instructions_);
7678 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007679 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007680 ITScope it_scope(this, &cond);
7681 vmov(cond, rt, rt2, rm, rm1);
7682 }
7683 void Vmov(Register rt, Register rt2, SRegister rm, SRegister rm1) {
7684 Vmov(al, rt, rt2, rm, rm1);
7685 }
7686
7687 void Vmov(
7688 Condition cond, SRegister rm, SRegister rm1, Register rt, Register rt2) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007689 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7690 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm1));
7691 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007693 VIXL_ASSERT(allow_macro_instructions_);
7694 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007695 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007696 ITScope it_scope(this, &cond);
7697 vmov(cond, rm, rm1, rt, rt2);
7698 }
7699 void Vmov(SRegister rm, SRegister rm1, Register rt, Register rt2) {
7700 Vmov(al, rm, rm1, rt, rt2);
7701 }
7702
7703 void Vmov(Condition cond, DataType dt, DRegisterLane rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007704 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7705 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007706 VIXL_ASSERT(allow_macro_instructions_);
7707 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007708 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007709 ITScope it_scope(this, &cond);
7710 vmov(cond, dt, rd, rt);
7711 }
7712 void Vmov(DataType dt, DRegisterLane rd, Register rt) {
7713 Vmov(al, dt, rd, rt);
7714 }
7715 void Vmov(Condition cond, DRegisterLane rd, Register rt) {
7716 Vmov(cond, kDataTypeValueNone, rd, rt);
7717 }
7718 void Vmov(DRegisterLane rd, Register rt) {
7719 Vmov(al, kDataTypeValueNone, rd, rt);
7720 }
7721
7722 void Vmov(Condition cond,
7723 DataType dt,
7724 DRegister rd,
7725 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007726 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7727 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007728 VIXL_ASSERT(allow_macro_instructions_);
7729 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007730 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007731 ITScope it_scope(this, &cond);
7732 vmov(cond, dt, rd, operand);
7733 }
7734 void Vmov(DataType dt, DRegister rd, const DOperand& operand) {
7735 Vmov(al, dt, rd, operand);
7736 }
7737
7738 void Vmov(Condition cond,
7739 DataType dt,
7740 QRegister rd,
7741 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007742 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7743 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007744 VIXL_ASSERT(allow_macro_instructions_);
7745 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007746 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007747 ITScope it_scope(this, &cond);
7748 vmov(cond, dt, rd, operand);
7749 }
7750 void Vmov(DataType dt, QRegister rd, const QOperand& operand) {
7751 Vmov(al, dt, rd, operand);
7752 }
7753
7754 void Vmov(Condition cond,
7755 DataType dt,
7756 SRegister rd,
7757 const SOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007758 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7759 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007760 VIXL_ASSERT(allow_macro_instructions_);
7761 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007762 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007763 ITScope it_scope(this, &cond);
7764 vmov(cond, dt, rd, operand);
7765 }
7766 void Vmov(DataType dt, SRegister rd, const SOperand& operand) {
7767 Vmov(al, dt, rd, operand);
7768 }
7769
7770 void Vmov(Condition cond, DataType dt, Register rt, DRegisterLane rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007771 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7772 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007773 VIXL_ASSERT(allow_macro_instructions_);
7774 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007775 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007776 ITScope it_scope(this, &cond);
7777 vmov(cond, dt, rt, rn);
7778 }
7779 void Vmov(DataType dt, Register rt, DRegisterLane rn) {
7780 Vmov(al, dt, rt, rn);
7781 }
7782 void Vmov(Condition cond, Register rt, DRegisterLane rn) {
7783 Vmov(cond, kDataTypeValueNone, rt, rn);
7784 }
7785 void Vmov(Register rt, DRegisterLane rn) {
7786 Vmov(al, kDataTypeValueNone, rt, rn);
7787 }
7788
7789 void Vmovl(Condition cond, DataType dt, QRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007790 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7791 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007792 VIXL_ASSERT(allow_macro_instructions_);
7793 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007794 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007795 ITScope it_scope(this, &cond);
7796 vmovl(cond, dt, rd, rm);
7797 }
7798 void Vmovl(DataType dt, QRegister rd, DRegister rm) { Vmovl(al, dt, rd, rm); }
7799
7800 void Vmovn(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007801 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7802 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007803 VIXL_ASSERT(allow_macro_instructions_);
7804 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007805 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007806 ITScope it_scope(this, &cond);
7807 vmovn(cond, dt, rd, rm);
7808 }
7809 void Vmovn(DataType dt, DRegister rd, QRegister rm) { Vmovn(al, dt, rd, rm); }
7810
7811 void Vmrs(Condition cond,
7812 RegisterOrAPSR_nzcv rt,
7813 SpecialFPRegister spec_reg) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007814 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007815 VIXL_ASSERT(allow_macro_instructions_);
7816 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007817 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007818 ITScope it_scope(this, &cond);
7819 vmrs(cond, rt, spec_reg);
7820 }
7821 void Vmrs(RegisterOrAPSR_nzcv rt, SpecialFPRegister spec_reg) {
7822 Vmrs(al, rt, spec_reg);
7823 }
7824
7825 void Vmsr(Condition cond, SpecialFPRegister spec_reg, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007826 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007827 VIXL_ASSERT(allow_macro_instructions_);
7828 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007829 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007830 ITScope it_scope(this, &cond);
7831 vmsr(cond, spec_reg, rt);
7832 }
7833 void Vmsr(SpecialFPRegister spec_reg, Register rt) { Vmsr(al, spec_reg, rt); }
7834
7835 void Vmul(Condition cond,
7836 DataType dt,
7837 DRegister rd,
7838 DRegister rn,
7839 DRegister dm,
7840 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007841 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7842 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7843 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007844 VIXL_ASSERT(allow_macro_instructions_);
7845 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007846 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007847 ITScope it_scope(this, &cond);
7848 vmul(cond, dt, rd, rn, dm, index);
7849 }
7850 void Vmul(
7851 DataType dt, DRegister rd, DRegister rn, DRegister dm, unsigned index) {
7852 Vmul(al, dt, rd, rn, dm, index);
7853 }
7854
7855 void Vmul(Condition cond,
7856 DataType dt,
7857 QRegister rd,
7858 QRegister rn,
7859 DRegister dm,
7860 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007861 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7862 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7863 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007864 VIXL_ASSERT(allow_macro_instructions_);
7865 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007866 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007867 ITScope it_scope(this, &cond);
7868 vmul(cond, dt, rd, rn, dm, index);
7869 }
7870 void Vmul(
7871 DataType dt, QRegister rd, QRegister rn, DRegister dm, unsigned index) {
7872 Vmul(al, dt, rd, rn, dm, index);
7873 }
7874
7875 void Vmul(
7876 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007877 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7878 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7879 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007880 VIXL_ASSERT(allow_macro_instructions_);
7881 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007882 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007883 ITScope it_scope(this, &cond);
7884 vmul(cond, dt, rd, rn, rm);
7885 }
7886 void Vmul(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7887 Vmul(al, dt, rd, rn, rm);
7888 }
7889
7890 void Vmul(
7891 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007892 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7893 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7894 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007895 VIXL_ASSERT(allow_macro_instructions_);
7896 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007897 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007898 ITScope it_scope(this, &cond);
7899 vmul(cond, dt, rd, rn, rm);
7900 }
7901 void Vmul(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7902 Vmul(al, dt, rd, rn, rm);
7903 }
7904
7905 void Vmul(
7906 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007907 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7908 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7909 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007910 VIXL_ASSERT(allow_macro_instructions_);
7911 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007912 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007913 ITScope it_scope(this, &cond);
7914 vmul(cond, dt, rd, rn, rm);
7915 }
7916 void Vmul(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7917 Vmul(al, dt, rd, rn, rm);
7918 }
7919
7920 void Vmull(Condition cond,
7921 DataType dt,
7922 QRegister rd,
7923 DRegister rn,
7924 DRegister dm,
7925 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007926 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7927 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7928 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007929 VIXL_ASSERT(allow_macro_instructions_);
7930 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007931 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007932 ITScope it_scope(this, &cond);
7933 vmull(cond, dt, rd, rn, dm, index);
7934 }
7935 void Vmull(
7936 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
7937 Vmull(al, dt, rd, rn, dm, index);
7938 }
7939
7940 void Vmull(
7941 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007942 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7943 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007945 VIXL_ASSERT(allow_macro_instructions_);
7946 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007947 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007948 ITScope it_scope(this, &cond);
7949 vmull(cond, dt, rd, rn, rm);
7950 }
7951 void Vmull(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7952 Vmull(al, dt, rd, rn, rm);
7953 }
7954
7955 void Vmvn(Condition cond,
7956 DataType dt,
7957 DRegister rd,
7958 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007959 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7960 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007961 VIXL_ASSERT(allow_macro_instructions_);
7962 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007963 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007964 ITScope it_scope(this, &cond);
7965 vmvn(cond, dt, rd, operand);
7966 }
7967 void Vmvn(DataType dt, DRegister rd, const DOperand& operand) {
7968 Vmvn(al, dt, rd, operand);
7969 }
7970
7971 void Vmvn(Condition cond,
7972 DataType dt,
7973 QRegister rd,
7974 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007975 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7976 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007977 VIXL_ASSERT(allow_macro_instructions_);
7978 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007979 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007980 ITScope it_scope(this, &cond);
7981 vmvn(cond, dt, rd, operand);
7982 }
7983 void Vmvn(DataType dt, QRegister rd, const QOperand& operand) {
7984 Vmvn(al, dt, rd, operand);
7985 }
7986
7987 void Vneg(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007988 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7989 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007990 VIXL_ASSERT(allow_macro_instructions_);
7991 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07007992 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007993 ITScope it_scope(this, &cond);
7994 vneg(cond, dt, rd, rm);
7995 }
7996 void Vneg(DataType dt, DRegister rd, DRegister rm) { Vneg(al, dt, rd, rm); }
7997
7998 void Vneg(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007999 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8000 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008001 VIXL_ASSERT(allow_macro_instructions_);
8002 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008003 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008004 ITScope it_scope(this, &cond);
8005 vneg(cond, dt, rd, rm);
8006 }
8007 void Vneg(DataType dt, QRegister rd, QRegister rm) { Vneg(al, dt, rd, rm); }
8008
8009 void Vneg(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008010 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8011 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008012 VIXL_ASSERT(allow_macro_instructions_);
8013 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008014 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008015 ITScope it_scope(this, &cond);
8016 vneg(cond, dt, rd, rm);
8017 }
8018 void Vneg(DataType dt, SRegister rd, SRegister rm) { Vneg(al, dt, rd, rm); }
8019
8020 void Vnmla(
8021 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008022 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8023 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8024 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008025 VIXL_ASSERT(allow_macro_instructions_);
8026 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008027 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008028 ITScope it_scope(this, &cond);
8029 vnmla(cond, dt, rd, rn, rm);
8030 }
8031 void Vnmla(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8032 Vnmla(al, dt, rd, rn, rm);
8033 }
8034
8035 void Vnmla(
8036 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008037 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8038 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8039 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008040 VIXL_ASSERT(allow_macro_instructions_);
8041 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008042 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008043 ITScope it_scope(this, &cond);
8044 vnmla(cond, dt, rd, rn, rm);
8045 }
8046 void Vnmla(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8047 Vnmla(al, dt, rd, rn, rm);
8048 }
8049
8050 void Vnmls(
8051 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008052 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8053 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8054 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008055 VIXL_ASSERT(allow_macro_instructions_);
8056 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008057 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008058 ITScope it_scope(this, &cond);
8059 vnmls(cond, dt, rd, rn, rm);
8060 }
8061 void Vnmls(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8062 Vnmls(al, dt, rd, rn, rm);
8063 }
8064
8065 void Vnmls(
8066 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008067 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8068 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8069 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008070 VIXL_ASSERT(allow_macro_instructions_);
8071 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008072 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008073 ITScope it_scope(this, &cond);
8074 vnmls(cond, dt, rd, rn, rm);
8075 }
8076 void Vnmls(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8077 Vnmls(al, dt, rd, rn, rm);
8078 }
8079
8080 void Vnmul(
8081 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008082 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8083 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8084 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008085 VIXL_ASSERT(allow_macro_instructions_);
8086 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008087 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008088 ITScope it_scope(this, &cond);
8089 vnmul(cond, dt, rd, rn, rm);
8090 }
8091 void Vnmul(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8092 Vnmul(al, dt, rd, rn, rm);
8093 }
8094
8095 void Vnmul(
8096 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008097 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8098 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8099 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008100 VIXL_ASSERT(allow_macro_instructions_);
8101 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008102 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008103 ITScope it_scope(this, &cond);
8104 vnmul(cond, dt, rd, rn, rm);
8105 }
8106 void Vnmul(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8107 Vnmul(al, dt, rd, rn, rm);
8108 }
8109
8110 void Vorn(Condition cond,
8111 DataType dt,
8112 DRegister rd,
8113 DRegister rn,
8114 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008115 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8116 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8117 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008118 VIXL_ASSERT(allow_macro_instructions_);
8119 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008120 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008121 ITScope it_scope(this, &cond);
8122 vorn(cond, dt, rd, rn, operand);
8123 }
8124 void Vorn(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
8125 Vorn(al, dt, rd, rn, operand);
8126 }
8127
8128 void Vorn(Condition cond,
8129 DataType dt,
8130 QRegister rd,
8131 QRegister rn,
8132 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008133 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8134 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8135 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008136 VIXL_ASSERT(allow_macro_instructions_);
8137 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008138 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008139 ITScope it_scope(this, &cond);
8140 vorn(cond, dt, rd, rn, operand);
8141 }
8142 void Vorn(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
8143 Vorn(al, dt, rd, rn, operand);
8144 }
8145
8146 void Vorr(Condition cond,
8147 DataType dt,
8148 DRegister rd,
8149 DRegister rn,
8150 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008151 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8152 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8153 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008154 VIXL_ASSERT(allow_macro_instructions_);
8155 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008156 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008157 ITScope it_scope(this, &cond);
8158 vorr(cond, dt, rd, rn, operand);
8159 }
8160 void Vorr(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
8161 Vorr(al, dt, rd, rn, operand);
8162 }
8163 void Vorr(Condition cond,
8164 DRegister rd,
8165 DRegister rn,
8166 const DOperand& operand) {
8167 Vorr(cond, kDataTypeValueNone, rd, rn, operand);
8168 }
8169 void Vorr(DRegister rd, DRegister rn, const DOperand& operand) {
8170 Vorr(al, kDataTypeValueNone, rd, rn, operand);
8171 }
8172
8173 void Vorr(Condition cond,
8174 DataType dt,
8175 QRegister rd,
8176 QRegister rn,
8177 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008178 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8179 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8180 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008181 VIXL_ASSERT(allow_macro_instructions_);
8182 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008183 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008184 ITScope it_scope(this, &cond);
8185 vorr(cond, dt, rd, rn, operand);
8186 }
8187 void Vorr(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
8188 Vorr(al, dt, rd, rn, operand);
8189 }
8190 void Vorr(Condition cond,
8191 QRegister rd,
8192 QRegister rn,
8193 const QOperand& operand) {
8194 Vorr(cond, kDataTypeValueNone, rd, rn, operand);
8195 }
8196 void Vorr(QRegister rd, QRegister rn, const QOperand& operand) {
8197 Vorr(al, kDataTypeValueNone, rd, rn, operand);
8198 }
8199
8200 void Vpadal(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008201 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8202 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008203 VIXL_ASSERT(allow_macro_instructions_);
8204 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008205 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008206 ITScope it_scope(this, &cond);
8207 vpadal(cond, dt, rd, rm);
8208 }
8209 void Vpadal(DataType dt, DRegister rd, DRegister rm) {
8210 Vpadal(al, dt, rd, rm);
8211 }
8212
8213 void Vpadal(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008214 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8215 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008216 VIXL_ASSERT(allow_macro_instructions_);
8217 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008218 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008219 ITScope it_scope(this, &cond);
8220 vpadal(cond, dt, rd, rm);
8221 }
8222 void Vpadal(DataType dt, QRegister rd, QRegister rm) {
8223 Vpadal(al, dt, rd, rm);
8224 }
8225
8226 void Vpadd(
8227 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008228 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8229 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8230 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008231 VIXL_ASSERT(allow_macro_instructions_);
8232 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008233 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008234 ITScope it_scope(this, &cond);
8235 vpadd(cond, dt, rd, rn, rm);
8236 }
8237 void Vpadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8238 Vpadd(al, dt, rd, rn, rm);
8239 }
8240
8241 void Vpaddl(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008242 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8243 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008244 VIXL_ASSERT(allow_macro_instructions_);
8245 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008246 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008247 ITScope it_scope(this, &cond);
8248 vpaddl(cond, dt, rd, rm);
8249 }
8250 void Vpaddl(DataType dt, DRegister rd, DRegister rm) {
8251 Vpaddl(al, dt, rd, rm);
8252 }
8253
8254 void Vpaddl(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008255 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8256 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008257 VIXL_ASSERT(allow_macro_instructions_);
8258 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008259 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008260 ITScope it_scope(this, &cond);
8261 vpaddl(cond, dt, rd, rm);
8262 }
8263 void Vpaddl(DataType dt, QRegister rd, QRegister rm) {
8264 Vpaddl(al, dt, rd, rm);
8265 }
8266
8267 void Vpmax(
8268 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008269 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8270 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8271 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008272 VIXL_ASSERT(allow_macro_instructions_);
8273 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008274 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008275 ITScope it_scope(this, &cond);
8276 vpmax(cond, dt, rd, rn, rm);
8277 }
8278 void Vpmax(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8279 Vpmax(al, dt, rd, rn, rm);
8280 }
8281
8282 void Vpmin(
8283 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008284 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8285 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8286 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008287 VIXL_ASSERT(allow_macro_instructions_);
8288 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008289 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008290 ITScope it_scope(this, &cond);
8291 vpmin(cond, dt, rd, rn, rm);
8292 }
8293 void Vpmin(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8294 Vpmin(al, dt, rd, rn, rm);
8295 }
8296
8297 void Vpop(Condition cond, DataType dt, DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008298 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008299 VIXL_ASSERT(allow_macro_instructions_);
8300 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008301 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008302 ITScope it_scope(this, &cond);
8303 vpop(cond, dt, dreglist);
8304 }
8305 void Vpop(DataType dt, DRegisterList dreglist) { Vpop(al, dt, dreglist); }
8306 void Vpop(Condition cond, DRegisterList dreglist) {
8307 Vpop(cond, kDataTypeValueNone, dreglist);
8308 }
8309 void Vpop(DRegisterList dreglist) { Vpop(al, kDataTypeValueNone, dreglist); }
8310
8311 void Vpop(Condition cond, DataType dt, SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008312 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008313 VIXL_ASSERT(allow_macro_instructions_);
8314 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008315 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008316 ITScope it_scope(this, &cond);
8317 vpop(cond, dt, sreglist);
8318 }
8319 void Vpop(DataType dt, SRegisterList sreglist) { Vpop(al, dt, sreglist); }
8320 void Vpop(Condition cond, SRegisterList sreglist) {
8321 Vpop(cond, kDataTypeValueNone, sreglist);
8322 }
8323 void Vpop(SRegisterList sreglist) { Vpop(al, kDataTypeValueNone, sreglist); }
8324
8325 void Vpush(Condition cond, DataType dt, DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008326 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008327 VIXL_ASSERT(allow_macro_instructions_);
8328 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008329 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008330 ITScope it_scope(this, &cond);
8331 vpush(cond, dt, dreglist);
8332 }
8333 void Vpush(DataType dt, DRegisterList dreglist) { Vpush(al, dt, dreglist); }
8334 void Vpush(Condition cond, DRegisterList dreglist) {
8335 Vpush(cond, kDataTypeValueNone, dreglist);
8336 }
8337 void Vpush(DRegisterList dreglist) {
8338 Vpush(al, kDataTypeValueNone, dreglist);
8339 }
8340
8341 void Vpush(Condition cond, DataType dt, SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008342 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008343 VIXL_ASSERT(allow_macro_instructions_);
8344 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008345 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008346 ITScope it_scope(this, &cond);
8347 vpush(cond, dt, sreglist);
8348 }
8349 void Vpush(DataType dt, SRegisterList sreglist) { Vpush(al, dt, sreglist); }
8350 void Vpush(Condition cond, SRegisterList sreglist) {
8351 Vpush(cond, kDataTypeValueNone, sreglist);
8352 }
8353 void Vpush(SRegisterList sreglist) {
8354 Vpush(al, kDataTypeValueNone, sreglist);
8355 }
8356
8357 void Vqabs(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008358 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8359 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008360 VIXL_ASSERT(allow_macro_instructions_);
8361 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008362 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008363 ITScope it_scope(this, &cond);
8364 vqabs(cond, dt, rd, rm);
8365 }
8366 void Vqabs(DataType dt, DRegister rd, DRegister rm) { Vqabs(al, dt, rd, rm); }
8367
8368 void Vqabs(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008369 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8370 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008371 VIXL_ASSERT(allow_macro_instructions_);
8372 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008373 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008374 ITScope it_scope(this, &cond);
8375 vqabs(cond, dt, rd, rm);
8376 }
8377 void Vqabs(DataType dt, QRegister rd, QRegister rm) { Vqabs(al, dt, rd, rm); }
8378
8379 void Vqadd(
8380 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008381 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8382 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8383 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008384 VIXL_ASSERT(allow_macro_instructions_);
8385 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008386 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008387 ITScope it_scope(this, &cond);
8388 vqadd(cond, dt, rd, rn, rm);
8389 }
8390 void Vqadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8391 Vqadd(al, dt, rd, rn, rm);
8392 }
8393
8394 void Vqadd(
8395 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008396 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8397 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8398 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008399 VIXL_ASSERT(allow_macro_instructions_);
8400 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008401 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008402 ITScope it_scope(this, &cond);
8403 vqadd(cond, dt, rd, rn, rm);
8404 }
8405 void Vqadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8406 Vqadd(al, dt, rd, rn, rm);
8407 }
8408
8409 void Vqdmlal(
8410 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008411 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8412 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8413 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008414 VIXL_ASSERT(allow_macro_instructions_);
8415 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008416 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008417 ITScope it_scope(this, &cond);
8418 vqdmlal(cond, dt, rd, rn, rm);
8419 }
8420 void Vqdmlal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8421 Vqdmlal(al, dt, rd, rn, rm);
8422 }
8423
8424 void Vqdmlal(Condition cond,
8425 DataType dt,
8426 QRegister rd,
8427 DRegister rn,
8428 DRegister dm,
8429 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008430 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8431 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8432 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008433 VIXL_ASSERT(allow_macro_instructions_);
8434 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008435 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008436 ITScope it_scope(this, &cond);
8437 vqdmlal(cond, dt, rd, rn, dm, index);
8438 }
8439 void Vqdmlal(
8440 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
8441 Vqdmlal(al, dt, rd, rn, dm, index);
8442 }
8443
8444 void Vqdmlsl(
8445 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008446 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8447 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8448 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008449 VIXL_ASSERT(allow_macro_instructions_);
8450 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008451 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008452 ITScope it_scope(this, &cond);
8453 vqdmlsl(cond, dt, rd, rn, rm);
8454 }
8455 void Vqdmlsl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8456 Vqdmlsl(al, dt, rd, rn, rm);
8457 }
8458
8459 void Vqdmlsl(Condition cond,
8460 DataType dt,
8461 QRegister rd,
8462 DRegister rn,
8463 DRegister dm,
8464 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008465 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8466 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8467 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008468 VIXL_ASSERT(allow_macro_instructions_);
8469 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008470 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008471 ITScope it_scope(this, &cond);
8472 vqdmlsl(cond, dt, rd, rn, dm, index);
8473 }
8474 void Vqdmlsl(
8475 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
8476 Vqdmlsl(al, dt, rd, rn, dm, index);
8477 }
8478
8479 void Vqdmulh(
8480 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008481 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8482 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8483 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008484 VIXL_ASSERT(allow_macro_instructions_);
8485 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008486 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008487 ITScope it_scope(this, &cond);
8488 vqdmulh(cond, dt, rd, rn, rm);
8489 }
8490 void Vqdmulh(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8491 Vqdmulh(al, dt, rd, rn, rm);
8492 }
8493
8494 void Vqdmulh(
8495 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008496 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8497 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8498 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008499 VIXL_ASSERT(allow_macro_instructions_);
8500 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008501 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008502 ITScope it_scope(this, &cond);
8503 vqdmulh(cond, dt, rd, rn, rm);
8504 }
8505 void Vqdmulh(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8506 Vqdmulh(al, dt, rd, rn, rm);
8507 }
8508
8509 void Vqdmulh(Condition cond,
8510 DataType dt,
8511 DRegister rd,
8512 DRegister rn,
8513 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008514 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8515 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8516 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008517 VIXL_ASSERT(allow_macro_instructions_);
8518 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008519 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008520 ITScope it_scope(this, &cond);
8521 vqdmulh(cond, dt, rd, rn, rm);
8522 }
8523 void Vqdmulh(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
8524 Vqdmulh(al, dt, rd, rn, rm);
8525 }
8526
8527 void Vqdmulh(Condition cond,
8528 DataType dt,
8529 QRegister rd,
8530 QRegister rn,
8531 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008532 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8533 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8534 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008535 VIXL_ASSERT(allow_macro_instructions_);
8536 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008537 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008538 ITScope it_scope(this, &cond);
8539 vqdmulh(cond, dt, rd, rn, rm);
8540 }
8541 void Vqdmulh(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
8542 Vqdmulh(al, dt, rd, rn, rm);
8543 }
8544
8545 void Vqdmull(
8546 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008547 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8548 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8549 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008550 VIXL_ASSERT(allow_macro_instructions_);
8551 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008552 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008553 ITScope it_scope(this, &cond);
8554 vqdmull(cond, dt, rd, rn, rm);
8555 }
8556 void Vqdmull(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8557 Vqdmull(al, dt, rd, rn, rm);
8558 }
8559
8560 void Vqdmull(Condition cond,
8561 DataType dt,
8562 QRegister rd,
8563 DRegister rn,
8564 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008565 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8566 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8567 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008568 VIXL_ASSERT(allow_macro_instructions_);
8569 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008570 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008571 ITScope it_scope(this, &cond);
8572 vqdmull(cond, dt, rd, rn, rm);
8573 }
8574 void Vqdmull(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
8575 Vqdmull(al, dt, rd, rn, rm);
8576 }
8577
8578 void Vqmovn(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008579 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8580 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008581 VIXL_ASSERT(allow_macro_instructions_);
8582 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008583 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008584 ITScope it_scope(this, &cond);
8585 vqmovn(cond, dt, rd, rm);
8586 }
8587 void Vqmovn(DataType dt, DRegister rd, QRegister rm) {
8588 Vqmovn(al, dt, rd, rm);
8589 }
8590
8591 void Vqmovun(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008592 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8593 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008594 VIXL_ASSERT(allow_macro_instructions_);
8595 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008596 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008597 ITScope it_scope(this, &cond);
8598 vqmovun(cond, dt, rd, rm);
8599 }
8600 void Vqmovun(DataType dt, DRegister rd, QRegister rm) {
8601 Vqmovun(al, dt, rd, rm);
8602 }
8603
8604 void Vqneg(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008605 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8606 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008607 VIXL_ASSERT(allow_macro_instructions_);
8608 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008609 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008610 ITScope it_scope(this, &cond);
8611 vqneg(cond, dt, rd, rm);
8612 }
8613 void Vqneg(DataType dt, DRegister rd, DRegister rm) { Vqneg(al, dt, rd, rm); }
8614
8615 void Vqneg(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008616 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8617 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008618 VIXL_ASSERT(allow_macro_instructions_);
8619 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008620 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008621 ITScope it_scope(this, &cond);
8622 vqneg(cond, dt, rd, rm);
8623 }
8624 void Vqneg(DataType dt, QRegister rd, QRegister rm) { Vqneg(al, dt, rd, rm); }
8625
8626 void Vqrdmulh(
8627 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008628 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8629 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8630 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008631 VIXL_ASSERT(allow_macro_instructions_);
8632 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008633 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008634 ITScope it_scope(this, &cond);
8635 vqrdmulh(cond, dt, rd, rn, rm);
8636 }
8637 void Vqrdmulh(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8638 Vqrdmulh(al, dt, rd, rn, rm);
8639 }
8640
8641 void Vqrdmulh(
8642 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008643 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8644 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8645 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008646 VIXL_ASSERT(allow_macro_instructions_);
8647 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008648 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008649 ITScope it_scope(this, &cond);
8650 vqrdmulh(cond, dt, rd, rn, rm);
8651 }
8652 void Vqrdmulh(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8653 Vqrdmulh(al, dt, rd, rn, rm);
8654 }
8655
8656 void Vqrdmulh(Condition cond,
8657 DataType dt,
8658 DRegister rd,
8659 DRegister rn,
8660 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008661 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8662 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8663 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008664 VIXL_ASSERT(allow_macro_instructions_);
8665 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008666 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008667 ITScope it_scope(this, &cond);
8668 vqrdmulh(cond, dt, rd, rn, rm);
8669 }
8670 void Vqrdmulh(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
8671 Vqrdmulh(al, dt, rd, rn, rm);
8672 }
8673
8674 void Vqrdmulh(Condition cond,
8675 DataType dt,
8676 QRegister rd,
8677 QRegister rn,
8678 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008679 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8680 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8681 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008682 VIXL_ASSERT(allow_macro_instructions_);
8683 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008684 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008685 ITScope it_scope(this, &cond);
8686 vqrdmulh(cond, dt, rd, rn, rm);
8687 }
8688 void Vqrdmulh(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
8689 Vqrdmulh(al, dt, rd, rn, rm);
8690 }
8691
8692 void Vqrshl(
8693 Condition cond, DataType dt, DRegister rd, DRegister rm, DRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008694 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8696 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008697 VIXL_ASSERT(allow_macro_instructions_);
8698 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008699 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008700 ITScope it_scope(this, &cond);
8701 vqrshl(cond, dt, rd, rm, rn);
8702 }
8703 void Vqrshl(DataType dt, DRegister rd, DRegister rm, DRegister rn) {
8704 Vqrshl(al, dt, rd, rm, rn);
8705 }
8706
8707 void Vqrshl(
8708 Condition cond, DataType dt, QRegister rd, QRegister rm, QRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008709 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8710 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8711 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008712 VIXL_ASSERT(allow_macro_instructions_);
8713 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008714 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008715 ITScope it_scope(this, &cond);
8716 vqrshl(cond, dt, rd, rm, rn);
8717 }
8718 void Vqrshl(DataType dt, QRegister rd, QRegister rm, QRegister rn) {
8719 Vqrshl(al, dt, rd, rm, rn);
8720 }
8721
8722 void Vqrshrn(Condition cond,
8723 DataType dt,
8724 DRegister rd,
8725 QRegister rm,
8726 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008727 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8728 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8729 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008730 VIXL_ASSERT(allow_macro_instructions_);
8731 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008732 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008733 ITScope it_scope(this, &cond);
8734 vqrshrn(cond, dt, rd, rm, operand);
8735 }
8736 void Vqrshrn(DataType dt,
8737 DRegister rd,
8738 QRegister rm,
8739 const QOperand& operand) {
8740 Vqrshrn(al, dt, rd, rm, operand);
8741 }
8742
8743 void Vqrshrun(Condition cond,
8744 DataType dt,
8745 DRegister rd,
8746 QRegister rm,
8747 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008748 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8749 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8750 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008751 VIXL_ASSERT(allow_macro_instructions_);
8752 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008753 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008754 ITScope it_scope(this, &cond);
8755 vqrshrun(cond, dt, rd, rm, operand);
8756 }
8757 void Vqrshrun(DataType dt,
8758 DRegister rd,
8759 QRegister rm,
8760 const QOperand& operand) {
8761 Vqrshrun(al, dt, rd, rm, operand);
8762 }
8763
8764 void Vqshl(Condition cond,
8765 DataType dt,
8766 DRegister rd,
8767 DRegister rm,
8768 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008769 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8770 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8771 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008772 VIXL_ASSERT(allow_macro_instructions_);
8773 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008774 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008775 ITScope it_scope(this, &cond);
8776 vqshl(cond, dt, rd, rm, operand);
8777 }
8778 void Vqshl(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
8779 Vqshl(al, dt, rd, rm, operand);
8780 }
8781
8782 void Vqshl(Condition cond,
8783 DataType dt,
8784 QRegister rd,
8785 QRegister rm,
8786 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008787 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8788 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8789 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008790 VIXL_ASSERT(allow_macro_instructions_);
8791 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008792 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008793 ITScope it_scope(this, &cond);
8794 vqshl(cond, dt, rd, rm, operand);
8795 }
8796 void Vqshl(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
8797 Vqshl(al, dt, rd, rm, operand);
8798 }
8799
8800 void Vqshlu(Condition cond,
8801 DataType dt,
8802 DRegister rd,
8803 DRegister rm,
8804 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008805 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8806 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8807 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008808 VIXL_ASSERT(allow_macro_instructions_);
8809 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008810 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008811 ITScope it_scope(this, &cond);
8812 vqshlu(cond, dt, rd, rm, operand);
8813 }
8814 void Vqshlu(DataType dt,
8815 DRegister rd,
8816 DRegister rm,
8817 const DOperand& operand) {
8818 Vqshlu(al, dt, rd, rm, operand);
8819 }
8820
8821 void Vqshlu(Condition cond,
8822 DataType dt,
8823 QRegister rd,
8824 QRegister rm,
8825 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008826 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8827 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8828 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008829 VIXL_ASSERT(allow_macro_instructions_);
8830 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008831 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008832 ITScope it_scope(this, &cond);
8833 vqshlu(cond, dt, rd, rm, operand);
8834 }
8835 void Vqshlu(DataType dt,
8836 QRegister rd,
8837 QRegister rm,
8838 const QOperand& operand) {
8839 Vqshlu(al, dt, rd, rm, operand);
8840 }
8841
8842 void Vqshrn(Condition cond,
8843 DataType dt,
8844 DRegister rd,
8845 QRegister rm,
8846 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008847 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8848 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8849 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008850 VIXL_ASSERT(allow_macro_instructions_);
8851 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008852 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008853 ITScope it_scope(this, &cond);
8854 vqshrn(cond, dt, rd, rm, operand);
8855 }
8856 void Vqshrn(DataType dt,
8857 DRegister rd,
8858 QRegister rm,
8859 const QOperand& operand) {
8860 Vqshrn(al, dt, rd, rm, operand);
8861 }
8862
8863 void Vqshrun(Condition cond,
8864 DataType dt,
8865 DRegister rd,
8866 QRegister rm,
8867 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008868 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8869 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8870 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008871 VIXL_ASSERT(allow_macro_instructions_);
8872 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008873 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008874 ITScope it_scope(this, &cond);
8875 vqshrun(cond, dt, rd, rm, operand);
8876 }
8877 void Vqshrun(DataType dt,
8878 DRegister rd,
8879 QRegister rm,
8880 const QOperand& operand) {
8881 Vqshrun(al, dt, rd, rm, operand);
8882 }
8883
8884 void Vqsub(
8885 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008886 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8887 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8888 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008889 VIXL_ASSERT(allow_macro_instructions_);
8890 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008891 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008892 ITScope it_scope(this, &cond);
8893 vqsub(cond, dt, rd, rn, rm);
8894 }
8895 void Vqsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8896 Vqsub(al, dt, rd, rn, rm);
8897 }
8898
8899 void Vqsub(
8900 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008901 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8902 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8903 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008904 VIXL_ASSERT(allow_macro_instructions_);
8905 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008906 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008907 ITScope it_scope(this, &cond);
8908 vqsub(cond, dt, rd, rn, rm);
8909 }
8910 void Vqsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8911 Vqsub(al, dt, rd, rn, rm);
8912 }
8913
8914 void Vraddhn(
8915 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008916 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8917 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8918 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008919 VIXL_ASSERT(allow_macro_instructions_);
8920 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008921 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008922 ITScope it_scope(this, &cond);
8923 vraddhn(cond, dt, rd, rn, rm);
8924 }
8925 void Vraddhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
8926 Vraddhn(al, dt, rd, rn, rm);
8927 }
8928
8929 void Vrecpe(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008930 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8931 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008932 VIXL_ASSERT(allow_macro_instructions_);
8933 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008934 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008935 ITScope it_scope(this, &cond);
8936 vrecpe(cond, dt, rd, rm);
8937 }
8938 void Vrecpe(DataType dt, DRegister rd, DRegister rm) {
8939 Vrecpe(al, dt, rd, rm);
8940 }
8941
8942 void Vrecpe(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008943 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008945 VIXL_ASSERT(allow_macro_instructions_);
8946 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008947 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008948 ITScope it_scope(this, &cond);
8949 vrecpe(cond, dt, rd, rm);
8950 }
8951 void Vrecpe(DataType dt, QRegister rd, QRegister rm) {
8952 Vrecpe(al, dt, rd, rm);
8953 }
8954
8955 void Vrecps(
8956 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008957 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8958 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8959 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008960 VIXL_ASSERT(allow_macro_instructions_);
8961 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008962 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008963 ITScope it_scope(this, &cond);
8964 vrecps(cond, dt, rd, rn, rm);
8965 }
8966 void Vrecps(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8967 Vrecps(al, dt, rd, rn, rm);
8968 }
8969
8970 void Vrecps(
8971 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008972 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8973 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8974 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008975 VIXL_ASSERT(allow_macro_instructions_);
8976 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008977 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008978 ITScope it_scope(this, &cond);
8979 vrecps(cond, dt, rd, rn, rm);
8980 }
8981 void Vrecps(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8982 Vrecps(al, dt, rd, rn, rm);
8983 }
8984
8985 void Vrev16(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008986 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8987 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008988 VIXL_ASSERT(allow_macro_instructions_);
8989 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07008990 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008991 ITScope it_scope(this, &cond);
8992 vrev16(cond, dt, rd, rm);
8993 }
8994 void Vrev16(DataType dt, DRegister rd, DRegister rm) {
8995 Vrev16(al, dt, rd, rm);
8996 }
8997
8998 void Vrev16(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008999 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9000 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009001 VIXL_ASSERT(allow_macro_instructions_);
9002 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009003 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009004 ITScope it_scope(this, &cond);
9005 vrev16(cond, dt, rd, rm);
9006 }
9007 void Vrev16(DataType dt, QRegister rd, QRegister rm) {
9008 Vrev16(al, dt, rd, rm);
9009 }
9010
9011 void Vrev32(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009012 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9013 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009014 VIXL_ASSERT(allow_macro_instructions_);
9015 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009016 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009017 ITScope it_scope(this, &cond);
9018 vrev32(cond, dt, rd, rm);
9019 }
9020 void Vrev32(DataType dt, DRegister rd, DRegister rm) {
9021 Vrev32(al, dt, rd, rm);
9022 }
9023
9024 void Vrev32(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009025 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9026 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009027 VIXL_ASSERT(allow_macro_instructions_);
9028 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009029 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009030 ITScope it_scope(this, &cond);
9031 vrev32(cond, dt, rd, rm);
9032 }
9033 void Vrev32(DataType dt, QRegister rd, QRegister rm) {
9034 Vrev32(al, dt, rd, rm);
9035 }
9036
9037 void Vrev64(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009038 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9039 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009040 VIXL_ASSERT(allow_macro_instructions_);
9041 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009042 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009043 ITScope it_scope(this, &cond);
9044 vrev64(cond, dt, rd, rm);
9045 }
9046 void Vrev64(DataType dt, DRegister rd, DRegister rm) {
9047 Vrev64(al, dt, rd, rm);
9048 }
9049
9050 void Vrev64(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009051 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9052 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009053 VIXL_ASSERT(allow_macro_instructions_);
9054 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009055 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009056 ITScope it_scope(this, &cond);
9057 vrev64(cond, dt, rd, rm);
9058 }
9059 void Vrev64(DataType dt, QRegister rd, QRegister rm) {
9060 Vrev64(al, dt, rd, rm);
9061 }
9062
9063 void Vrhadd(
9064 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009065 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9066 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9067 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009068 VIXL_ASSERT(allow_macro_instructions_);
9069 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009070 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009071 ITScope it_scope(this, &cond);
9072 vrhadd(cond, dt, rd, rn, rm);
9073 }
9074 void Vrhadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9075 Vrhadd(al, dt, rd, rn, rm);
9076 }
9077
9078 void Vrhadd(
9079 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009080 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9081 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9082 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009083 VIXL_ASSERT(allow_macro_instructions_);
9084 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009085 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009086 ITScope it_scope(this, &cond);
9087 vrhadd(cond, dt, rd, rn, rm);
9088 }
9089 void Vrhadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9090 Vrhadd(al, dt, rd, rn, rm);
9091 }
9092
9093 void Vrinta(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009094 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9095 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009096 VIXL_ASSERT(allow_macro_instructions_);
9097 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009098 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009099 vrinta(dt1, dt2, rd, rm);
9100 }
9101
9102 void Vrinta(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009103 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9104 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009105 VIXL_ASSERT(allow_macro_instructions_);
9106 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009107 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009108 vrinta(dt1, dt2, rd, rm);
9109 }
9110
9111 void Vrinta(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009112 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9113 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009114 VIXL_ASSERT(allow_macro_instructions_);
9115 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009116 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009117 vrinta(dt1, dt2, rd, rm);
9118 }
9119
9120 void Vrintm(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009121 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9122 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009123 VIXL_ASSERT(allow_macro_instructions_);
9124 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009125 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009126 vrintm(dt1, dt2, rd, rm);
9127 }
9128
9129 void Vrintm(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009130 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9131 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009132 VIXL_ASSERT(allow_macro_instructions_);
9133 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009134 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009135 vrintm(dt1, dt2, rd, rm);
9136 }
9137
9138 void Vrintm(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009139 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9140 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009141 VIXL_ASSERT(allow_macro_instructions_);
9142 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009143 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009144 vrintm(dt1, dt2, rd, rm);
9145 }
9146
9147 void Vrintn(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009148 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9149 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009150 VIXL_ASSERT(allow_macro_instructions_);
9151 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009152 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009153 vrintn(dt1, dt2, rd, rm);
9154 }
9155
9156 void Vrintn(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009157 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9158 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009159 VIXL_ASSERT(allow_macro_instructions_);
9160 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009161 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009162 vrintn(dt1, dt2, rd, rm);
9163 }
9164
9165 void Vrintn(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009166 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9167 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009168 VIXL_ASSERT(allow_macro_instructions_);
9169 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009170 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009171 vrintn(dt1, dt2, rd, rm);
9172 }
9173
9174 void Vrintp(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009175 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9176 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009177 VIXL_ASSERT(allow_macro_instructions_);
9178 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009179 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009180 vrintp(dt1, dt2, rd, rm);
9181 }
9182
9183 void Vrintp(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009184 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9185 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009186 VIXL_ASSERT(allow_macro_instructions_);
9187 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009188 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009189 vrintp(dt1, dt2, rd, rm);
9190 }
9191
9192 void Vrintp(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009193 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9194 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009195 VIXL_ASSERT(allow_macro_instructions_);
9196 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009197 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009198 vrintp(dt1, dt2, rd, rm);
9199 }
9200
9201 void Vrintr(
9202 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009203 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9204 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009205 VIXL_ASSERT(allow_macro_instructions_);
9206 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009207 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009208 ITScope it_scope(this, &cond);
9209 vrintr(cond, dt1, dt2, rd, rm);
9210 }
9211 void Vrintr(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
9212 Vrintr(al, dt1, dt2, rd, rm);
9213 }
9214
9215 void Vrintr(
9216 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009217 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9218 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009219 VIXL_ASSERT(allow_macro_instructions_);
9220 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009221 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009222 ITScope it_scope(this, &cond);
9223 vrintr(cond, dt1, dt2, rd, rm);
9224 }
9225 void Vrintr(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
9226 Vrintr(al, dt1, dt2, rd, rm);
9227 }
9228
9229 void Vrintx(
9230 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009231 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9232 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009233 VIXL_ASSERT(allow_macro_instructions_);
9234 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009235 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009236 ITScope it_scope(this, &cond);
9237 vrintx(cond, dt1, dt2, rd, rm);
9238 }
9239 void Vrintx(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
9240 Vrintx(al, dt1, dt2, rd, rm);
9241 }
9242
9243 void Vrintx(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009244 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9245 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009246 VIXL_ASSERT(allow_macro_instructions_);
9247 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009248 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009249 vrintx(dt1, dt2, rd, rm);
9250 }
9251
9252 void Vrintx(
9253 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009254 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9255 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009256 VIXL_ASSERT(allow_macro_instructions_);
9257 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009258 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009259 ITScope it_scope(this, &cond);
9260 vrintx(cond, dt1, dt2, rd, rm);
9261 }
9262 void Vrintx(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
9263 Vrintx(al, dt1, dt2, rd, rm);
9264 }
9265
9266 void Vrintz(
9267 Condition cond, DataType dt1, DataType dt2, 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());
Vincent Belliard8885c172016-08-24 11:33:19 -07009272 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009273 ITScope it_scope(this, &cond);
9274 vrintz(cond, dt1, dt2, rd, rm);
9275 }
9276 void Vrintz(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
9277 Vrintz(al, dt1, dt2, rd, rm);
9278 }
9279
9280 void Vrintz(DataType dt1, DataType dt2, 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());
Vincent Belliard8885c172016-08-24 11:33:19 -07009285 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009286 vrintz(dt1, dt2, rd, rm);
9287 }
9288
9289 void Vrintz(
9290 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009291 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9292 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009293 VIXL_ASSERT(allow_macro_instructions_);
9294 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009295 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009296 ITScope it_scope(this, &cond);
9297 vrintz(cond, dt1, dt2, rd, rm);
9298 }
9299 void Vrintz(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
9300 Vrintz(al, dt1, dt2, rd, rm);
9301 }
9302
9303 void Vrshl(
9304 Condition cond, DataType dt, DRegister rd, DRegister rm, DRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009305 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9306 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9307 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009308 VIXL_ASSERT(allow_macro_instructions_);
9309 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009310 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009311 ITScope it_scope(this, &cond);
9312 vrshl(cond, dt, rd, rm, rn);
9313 }
9314 void Vrshl(DataType dt, DRegister rd, DRegister rm, DRegister rn) {
9315 Vrshl(al, dt, rd, rm, rn);
9316 }
9317
9318 void Vrshl(
9319 Condition cond, DataType dt, QRegister rd, QRegister rm, QRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009320 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9321 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9322 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009323 VIXL_ASSERT(allow_macro_instructions_);
9324 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009325 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009326 ITScope it_scope(this, &cond);
9327 vrshl(cond, dt, rd, rm, rn);
9328 }
9329 void Vrshl(DataType dt, QRegister rd, QRegister rm, QRegister rn) {
9330 Vrshl(al, dt, rd, rm, rn);
9331 }
9332
9333 void Vrshr(Condition cond,
9334 DataType dt,
9335 DRegister rd,
9336 DRegister rm,
9337 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009338 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9339 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9340 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009341 VIXL_ASSERT(allow_macro_instructions_);
9342 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009343 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009344 ITScope it_scope(this, &cond);
9345 vrshr(cond, dt, rd, rm, operand);
9346 }
9347 void Vrshr(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9348 Vrshr(al, dt, rd, rm, operand);
9349 }
9350
9351 void Vrshr(Condition cond,
9352 DataType dt,
9353 QRegister rd,
9354 QRegister rm,
9355 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009356 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9357 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9358 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009359 VIXL_ASSERT(allow_macro_instructions_);
9360 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009361 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009362 ITScope it_scope(this, &cond);
9363 vrshr(cond, dt, rd, rm, operand);
9364 }
9365 void Vrshr(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9366 Vrshr(al, dt, rd, rm, operand);
9367 }
9368
9369 void Vrshrn(Condition cond,
9370 DataType dt,
9371 DRegister rd,
9372 QRegister rm,
9373 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009374 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9375 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9376 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009377 VIXL_ASSERT(allow_macro_instructions_);
9378 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009379 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009380 ITScope it_scope(this, &cond);
9381 vrshrn(cond, dt, rd, rm, operand);
9382 }
9383 void Vrshrn(DataType dt,
9384 DRegister rd,
9385 QRegister rm,
9386 const QOperand& operand) {
9387 Vrshrn(al, dt, rd, rm, operand);
9388 }
9389
9390 void Vrsqrte(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009391 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9392 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009393 VIXL_ASSERT(allow_macro_instructions_);
9394 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009395 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009396 ITScope it_scope(this, &cond);
9397 vrsqrte(cond, dt, rd, rm);
9398 }
9399 void Vrsqrte(DataType dt, DRegister rd, DRegister rm) {
9400 Vrsqrte(al, dt, rd, rm);
9401 }
9402
9403 void Vrsqrte(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009404 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9405 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009406 VIXL_ASSERT(allow_macro_instructions_);
9407 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009408 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009409 ITScope it_scope(this, &cond);
9410 vrsqrte(cond, dt, rd, rm);
9411 }
9412 void Vrsqrte(DataType dt, QRegister rd, QRegister rm) {
9413 Vrsqrte(al, dt, rd, rm);
9414 }
9415
9416 void Vrsqrts(
9417 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009418 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9419 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9420 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009421 VIXL_ASSERT(allow_macro_instructions_);
9422 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009423 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009424 ITScope it_scope(this, &cond);
9425 vrsqrts(cond, dt, rd, rn, rm);
9426 }
9427 void Vrsqrts(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9428 Vrsqrts(al, dt, rd, rn, rm);
9429 }
9430
9431 void Vrsqrts(
9432 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009433 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9434 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9435 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009436 VIXL_ASSERT(allow_macro_instructions_);
9437 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009438 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009439 ITScope it_scope(this, &cond);
9440 vrsqrts(cond, dt, rd, rn, rm);
9441 }
9442 void Vrsqrts(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9443 Vrsqrts(al, dt, rd, rn, rm);
9444 }
9445
9446 void Vrsra(Condition cond,
9447 DataType dt,
9448 DRegister rd,
9449 DRegister rm,
9450 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009451 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9452 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9453 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009454 VIXL_ASSERT(allow_macro_instructions_);
9455 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009456 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009457 ITScope it_scope(this, &cond);
9458 vrsra(cond, dt, rd, rm, operand);
9459 }
9460 void Vrsra(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9461 Vrsra(al, dt, rd, rm, operand);
9462 }
9463
9464 void Vrsra(Condition cond,
9465 DataType dt,
9466 QRegister rd,
9467 QRegister rm,
9468 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009469 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9470 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9471 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009472 VIXL_ASSERT(allow_macro_instructions_);
9473 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009474 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009475 ITScope it_scope(this, &cond);
9476 vrsra(cond, dt, rd, rm, operand);
9477 }
9478 void Vrsra(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9479 Vrsra(al, dt, rd, rm, operand);
9480 }
9481
9482 void Vrsubhn(
9483 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9485 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9486 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009487 VIXL_ASSERT(allow_macro_instructions_);
9488 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009489 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009490 ITScope it_scope(this, &cond);
9491 vrsubhn(cond, dt, rd, rn, rm);
9492 }
9493 void Vrsubhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
9494 Vrsubhn(al, dt, rd, rn, rm);
9495 }
9496
9497 void Vseleq(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009498 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9499 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9500 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009501 VIXL_ASSERT(allow_macro_instructions_);
9502 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009503 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009504 vseleq(dt, rd, rn, rm);
9505 }
9506
9507 void Vseleq(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009508 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9509 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9510 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009511 VIXL_ASSERT(allow_macro_instructions_);
9512 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009513 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009514 vseleq(dt, rd, rn, rm);
9515 }
9516
9517 void Vselge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009518 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9519 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9520 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009521 VIXL_ASSERT(allow_macro_instructions_);
9522 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009523 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009524 vselge(dt, rd, rn, rm);
9525 }
9526
9527 void Vselge(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009528 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9529 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9530 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009531 VIXL_ASSERT(allow_macro_instructions_);
9532 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009533 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009534 vselge(dt, rd, rn, rm);
9535 }
9536
9537 void Vselgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009538 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9539 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9540 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009541 VIXL_ASSERT(allow_macro_instructions_);
9542 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009543 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009544 vselgt(dt, rd, rn, rm);
9545 }
9546
9547 void Vselgt(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009548 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9549 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9550 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009551 VIXL_ASSERT(allow_macro_instructions_);
9552 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009553 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009554 vselgt(dt, rd, rn, rm);
9555 }
9556
9557 void Vselvs(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009558 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9559 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9560 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009561 VIXL_ASSERT(allow_macro_instructions_);
9562 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009563 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009564 vselvs(dt, rd, rn, rm);
9565 }
9566
9567 void Vselvs(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009568 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9569 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9570 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009571 VIXL_ASSERT(allow_macro_instructions_);
9572 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009573 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009574 vselvs(dt, rd, rn, rm);
9575 }
9576
9577 void Vshl(Condition cond,
9578 DataType dt,
9579 DRegister rd,
9580 DRegister rm,
9581 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009582 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9583 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9584 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009585 VIXL_ASSERT(allow_macro_instructions_);
9586 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009587 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009588 ITScope it_scope(this, &cond);
9589 vshl(cond, dt, rd, rm, operand);
9590 }
9591 void Vshl(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9592 Vshl(al, dt, rd, rm, operand);
9593 }
9594
9595 void Vshl(Condition cond,
9596 DataType dt,
9597 QRegister rd,
9598 QRegister rm,
9599 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009600 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9601 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9602 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009603 VIXL_ASSERT(allow_macro_instructions_);
9604 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009605 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009606 ITScope it_scope(this, &cond);
9607 vshl(cond, dt, rd, rm, operand);
9608 }
9609 void Vshl(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9610 Vshl(al, dt, rd, rm, operand);
9611 }
9612
9613 void Vshll(Condition cond,
9614 DataType dt,
9615 QRegister rd,
9616 DRegister rm,
9617 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009618 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9619 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9620 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009621 VIXL_ASSERT(allow_macro_instructions_);
9622 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009623 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009624 ITScope it_scope(this, &cond);
9625 vshll(cond, dt, rd, rm, operand);
9626 }
9627 void Vshll(DataType dt, QRegister rd, DRegister rm, const DOperand& operand) {
9628 Vshll(al, dt, rd, rm, operand);
9629 }
9630
9631 void Vshr(Condition cond,
9632 DataType dt,
9633 DRegister rd,
9634 DRegister rm,
9635 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009636 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9637 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9638 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009639 VIXL_ASSERT(allow_macro_instructions_);
9640 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009641 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009642 ITScope it_scope(this, &cond);
9643 vshr(cond, dt, rd, rm, operand);
9644 }
9645 void Vshr(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9646 Vshr(al, dt, rd, rm, operand);
9647 }
9648
9649 void Vshr(Condition cond,
9650 DataType dt,
9651 QRegister rd,
9652 QRegister rm,
9653 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009654 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9655 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9656 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009657 VIXL_ASSERT(allow_macro_instructions_);
9658 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009659 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009660 ITScope it_scope(this, &cond);
9661 vshr(cond, dt, rd, rm, operand);
9662 }
9663 void Vshr(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9664 Vshr(al, dt, rd, rm, operand);
9665 }
9666
9667 void Vshrn(Condition cond,
9668 DataType dt,
9669 DRegister rd,
9670 QRegister rm,
9671 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009672 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9673 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9674 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009675 VIXL_ASSERT(allow_macro_instructions_);
9676 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009677 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009678 ITScope it_scope(this, &cond);
9679 vshrn(cond, dt, rd, rm, operand);
9680 }
9681 void Vshrn(DataType dt, DRegister rd, QRegister rm, const QOperand& operand) {
9682 Vshrn(al, dt, rd, rm, operand);
9683 }
9684
9685 void Vsli(Condition cond,
9686 DataType dt,
9687 DRegister rd,
9688 DRegister rm,
9689 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009690 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9691 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9692 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009693 VIXL_ASSERT(allow_macro_instructions_);
9694 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009695 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009696 ITScope it_scope(this, &cond);
9697 vsli(cond, dt, rd, rm, operand);
9698 }
9699 void Vsli(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9700 Vsli(al, dt, rd, rm, operand);
9701 }
9702
9703 void Vsli(Condition cond,
9704 DataType dt,
9705 QRegister rd,
9706 QRegister rm,
9707 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009708 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9709 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9710 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009711 VIXL_ASSERT(allow_macro_instructions_);
9712 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009713 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009714 ITScope it_scope(this, &cond);
9715 vsli(cond, dt, rd, rm, operand);
9716 }
9717 void Vsli(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9718 Vsli(al, dt, rd, rm, operand);
9719 }
9720
9721 void Vsqrt(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009722 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9723 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009724 VIXL_ASSERT(allow_macro_instructions_);
9725 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009726 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009727 ITScope it_scope(this, &cond);
9728 vsqrt(cond, dt, rd, rm);
9729 }
9730 void Vsqrt(DataType dt, SRegister rd, SRegister rm) { Vsqrt(al, dt, rd, rm); }
9731
9732 void Vsqrt(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009733 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9734 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009735 VIXL_ASSERT(allow_macro_instructions_);
9736 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009737 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009738 ITScope it_scope(this, &cond);
9739 vsqrt(cond, dt, rd, rm);
9740 }
9741 void Vsqrt(DataType dt, DRegister rd, DRegister rm) { Vsqrt(al, dt, rd, rm); }
9742
9743 void Vsra(Condition cond,
9744 DataType dt,
9745 DRegister rd,
9746 DRegister rm,
9747 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009748 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9749 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9750 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009751 VIXL_ASSERT(allow_macro_instructions_);
9752 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009753 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009754 ITScope it_scope(this, &cond);
9755 vsra(cond, dt, rd, rm, operand);
9756 }
9757 void Vsra(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9758 Vsra(al, dt, rd, rm, operand);
9759 }
9760
9761 void Vsra(Condition cond,
9762 DataType dt,
9763 QRegister rd,
9764 QRegister rm,
9765 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009766 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9767 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9768 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009769 VIXL_ASSERT(allow_macro_instructions_);
9770 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009771 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009772 ITScope it_scope(this, &cond);
9773 vsra(cond, dt, rd, rm, operand);
9774 }
9775 void Vsra(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9776 Vsra(al, dt, rd, rm, operand);
9777 }
9778
9779 void Vsri(Condition cond,
9780 DataType dt,
9781 DRegister rd,
9782 DRegister rm,
9783 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009784 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9785 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9786 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009787 VIXL_ASSERT(allow_macro_instructions_);
9788 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009789 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009790 ITScope it_scope(this, &cond);
9791 vsri(cond, dt, rd, rm, operand);
9792 }
9793 void Vsri(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9794 Vsri(al, dt, rd, rm, operand);
9795 }
9796
9797 void Vsri(Condition cond,
9798 DataType dt,
9799 QRegister rd,
9800 QRegister rm,
9801 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009802 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9803 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9804 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009805 VIXL_ASSERT(allow_macro_instructions_);
9806 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009807 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009808 ITScope it_scope(this, &cond);
9809 vsri(cond, dt, rd, rm, operand);
9810 }
9811 void Vsri(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9812 Vsri(al, dt, rd, rm, operand);
9813 }
9814
9815 void Vst1(Condition cond,
9816 DataType dt,
9817 const NeonRegisterList& nreglist,
9818 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009819 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9820 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009821 VIXL_ASSERT(allow_macro_instructions_);
9822 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009823 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009824 ITScope it_scope(this, &cond);
9825 vst1(cond, dt, nreglist, operand);
9826 }
9827 void Vst1(DataType dt,
9828 const NeonRegisterList& nreglist,
9829 const AlignedMemOperand& operand) {
9830 Vst1(al, dt, nreglist, operand);
9831 }
9832
9833 void Vst2(Condition cond,
9834 DataType dt,
9835 const NeonRegisterList& nreglist,
9836 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009837 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9838 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009839 VIXL_ASSERT(allow_macro_instructions_);
9840 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009841 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009842 ITScope it_scope(this, &cond);
9843 vst2(cond, dt, nreglist, operand);
9844 }
9845 void Vst2(DataType dt,
9846 const NeonRegisterList& nreglist,
9847 const AlignedMemOperand& operand) {
9848 Vst2(al, dt, nreglist, operand);
9849 }
9850
9851 void Vst3(Condition cond,
9852 DataType dt,
9853 const NeonRegisterList& nreglist,
9854 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009855 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9856 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009857 VIXL_ASSERT(allow_macro_instructions_);
9858 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009859 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009860 ITScope it_scope(this, &cond);
9861 vst3(cond, dt, nreglist, operand);
9862 }
9863 void Vst3(DataType dt,
9864 const NeonRegisterList& nreglist,
9865 const AlignedMemOperand& operand) {
9866 Vst3(al, dt, nreglist, operand);
9867 }
9868
9869 void Vst3(Condition cond,
9870 DataType dt,
9871 const NeonRegisterList& nreglist,
9872 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009873 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9874 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009875 VIXL_ASSERT(allow_macro_instructions_);
9876 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009877 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009878 ITScope it_scope(this, &cond);
9879 vst3(cond, dt, nreglist, operand);
9880 }
9881 void Vst3(DataType dt,
9882 const NeonRegisterList& nreglist,
9883 const MemOperand& operand) {
9884 Vst3(al, dt, nreglist, operand);
9885 }
9886
9887 void Vst4(Condition cond,
9888 DataType dt,
9889 const NeonRegisterList& nreglist,
9890 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009891 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9892 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009893 VIXL_ASSERT(allow_macro_instructions_);
9894 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009895 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009896 ITScope it_scope(this, &cond);
9897 vst4(cond, dt, nreglist, operand);
9898 }
9899 void Vst4(DataType dt,
9900 const NeonRegisterList& nreglist,
9901 const AlignedMemOperand& operand) {
9902 Vst4(al, dt, nreglist, operand);
9903 }
9904
9905 void Vstm(Condition cond,
9906 DataType dt,
9907 Register rn,
9908 WriteBack write_back,
9909 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009910 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9911 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009912 VIXL_ASSERT(allow_macro_instructions_);
9913 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009914 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009915 ITScope it_scope(this, &cond);
9916 vstm(cond, dt, rn, write_back, dreglist);
9917 }
9918 void Vstm(DataType dt,
9919 Register rn,
9920 WriteBack write_back,
9921 DRegisterList dreglist) {
9922 Vstm(al, dt, rn, write_back, dreglist);
9923 }
9924 void Vstm(Condition cond,
9925 Register rn,
9926 WriteBack write_back,
9927 DRegisterList dreglist) {
9928 Vstm(cond, kDataTypeValueNone, rn, write_back, dreglist);
9929 }
9930 void Vstm(Register rn, WriteBack write_back, DRegisterList dreglist) {
9931 Vstm(al, kDataTypeValueNone, rn, write_back, dreglist);
9932 }
9933
9934 void Vstm(Condition cond,
9935 DataType dt,
9936 Register rn,
9937 WriteBack write_back,
9938 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009939 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9940 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009941 VIXL_ASSERT(allow_macro_instructions_);
9942 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009943 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009944 ITScope it_scope(this, &cond);
9945 vstm(cond, dt, rn, write_back, sreglist);
9946 }
9947 void Vstm(DataType dt,
9948 Register rn,
9949 WriteBack write_back,
9950 SRegisterList sreglist) {
9951 Vstm(al, dt, rn, write_back, sreglist);
9952 }
9953 void Vstm(Condition cond,
9954 Register rn,
9955 WriteBack write_back,
9956 SRegisterList sreglist) {
9957 Vstm(cond, kDataTypeValueNone, rn, write_back, sreglist);
9958 }
9959 void Vstm(Register rn, WriteBack write_back, SRegisterList sreglist) {
9960 Vstm(al, kDataTypeValueNone, rn, write_back, sreglist);
9961 }
9962
9963 void Vstmdb(Condition cond,
9964 DataType dt,
9965 Register rn,
9966 WriteBack write_back,
9967 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009968 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9969 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009970 VIXL_ASSERT(allow_macro_instructions_);
9971 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -07009972 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009973 ITScope it_scope(this, &cond);
9974 vstmdb(cond, dt, rn, write_back, dreglist);
9975 }
9976 void Vstmdb(DataType dt,
9977 Register rn,
9978 WriteBack write_back,
9979 DRegisterList dreglist) {
9980 Vstmdb(al, dt, rn, write_back, dreglist);
9981 }
9982 void Vstmdb(Condition cond,
9983 Register rn,
9984 WriteBack write_back,
9985 DRegisterList dreglist) {
9986 Vstmdb(cond, kDataTypeValueNone, rn, write_back, dreglist);
9987 }
9988 void Vstmdb(Register rn, WriteBack write_back, DRegisterList dreglist) {
9989 Vstmdb(al, kDataTypeValueNone, rn, write_back, dreglist);
9990 }
9991
9992 void Vstmdb(Condition cond,
9993 DataType dt,
9994 Register rn,
9995 WriteBack write_back,
9996 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009997 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9998 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009999 VIXL_ASSERT(allow_macro_instructions_);
10000 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010001 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010002 ITScope it_scope(this, &cond);
10003 vstmdb(cond, dt, rn, write_back, sreglist);
10004 }
10005 void Vstmdb(DataType dt,
10006 Register rn,
10007 WriteBack write_back,
10008 SRegisterList sreglist) {
10009 Vstmdb(al, dt, rn, write_back, sreglist);
10010 }
10011 void Vstmdb(Condition cond,
10012 Register rn,
10013 WriteBack write_back,
10014 SRegisterList sreglist) {
10015 Vstmdb(cond, kDataTypeValueNone, rn, write_back, sreglist);
10016 }
10017 void Vstmdb(Register rn, WriteBack write_back, SRegisterList sreglist) {
10018 Vstmdb(al, kDataTypeValueNone, rn, write_back, sreglist);
10019 }
10020
10021 void Vstmia(Condition cond,
10022 DataType dt,
10023 Register rn,
10024 WriteBack write_back,
10025 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010026 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10027 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010028 VIXL_ASSERT(allow_macro_instructions_);
10029 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010030 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010031 ITScope it_scope(this, &cond);
10032 vstmia(cond, dt, rn, write_back, dreglist);
10033 }
10034 void Vstmia(DataType dt,
10035 Register rn,
10036 WriteBack write_back,
10037 DRegisterList dreglist) {
10038 Vstmia(al, dt, rn, write_back, dreglist);
10039 }
10040 void Vstmia(Condition cond,
10041 Register rn,
10042 WriteBack write_back,
10043 DRegisterList dreglist) {
10044 Vstmia(cond, kDataTypeValueNone, rn, write_back, dreglist);
10045 }
10046 void Vstmia(Register rn, WriteBack write_back, DRegisterList dreglist) {
10047 Vstmia(al, kDataTypeValueNone, rn, write_back, dreglist);
10048 }
10049
10050 void Vstmia(Condition cond,
10051 DataType dt,
10052 Register rn,
10053 WriteBack write_back,
10054 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010055 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10056 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010057 VIXL_ASSERT(allow_macro_instructions_);
10058 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010059 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010060 ITScope it_scope(this, &cond);
10061 vstmia(cond, dt, rn, write_back, sreglist);
10062 }
10063 void Vstmia(DataType dt,
10064 Register rn,
10065 WriteBack write_back,
10066 SRegisterList sreglist) {
10067 Vstmia(al, dt, rn, write_back, sreglist);
10068 }
10069 void Vstmia(Condition cond,
10070 Register rn,
10071 WriteBack write_back,
10072 SRegisterList sreglist) {
10073 Vstmia(cond, kDataTypeValueNone, rn, write_back, sreglist);
10074 }
10075 void Vstmia(Register rn, WriteBack write_back, SRegisterList sreglist) {
10076 Vstmia(al, kDataTypeValueNone, rn, write_back, sreglist);
10077 }
10078
10079 void Vstr(Condition cond,
10080 DataType dt,
10081 DRegister rd,
10082 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010083 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10084 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010085 VIXL_ASSERT(allow_macro_instructions_);
10086 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010087 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010088 ITScope it_scope(this, &cond);
10089 vstr(cond, dt, rd, operand);
10090 }
10091 void Vstr(DataType dt, DRegister rd, const MemOperand& operand) {
10092 Vstr(al, dt, rd, operand);
10093 }
10094 void Vstr(Condition cond, DRegister rd, const MemOperand& operand) {
10095 Vstr(cond, Untyped64, rd, operand);
10096 }
10097 void Vstr(DRegister rd, const MemOperand& operand) {
10098 Vstr(al, Untyped64, rd, operand);
10099 }
10100
10101 void Vstr(Condition cond,
10102 DataType dt,
10103 SRegister rd,
10104 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010105 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10106 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010107 VIXL_ASSERT(allow_macro_instructions_);
10108 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010109 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010110 ITScope it_scope(this, &cond);
10111 vstr(cond, dt, rd, operand);
10112 }
10113 void Vstr(DataType dt, SRegister rd, const MemOperand& operand) {
10114 Vstr(al, dt, rd, operand);
10115 }
10116 void Vstr(Condition cond, SRegister rd, const MemOperand& operand) {
10117 Vstr(cond, Untyped32, rd, operand);
10118 }
10119 void Vstr(SRegister rd, const MemOperand& operand) {
10120 Vstr(al, Untyped32, rd, operand);
10121 }
10122
10123 void Vsub(
10124 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010125 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10126 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10127 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010128 VIXL_ASSERT(allow_macro_instructions_);
10129 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010130 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010131 ITScope it_scope(this, &cond);
10132 vsub(cond, dt, rd, rn, rm);
10133 }
10134 void Vsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
10135 Vsub(al, dt, rd, rn, rm);
10136 }
10137
10138 void Vsub(
10139 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010140 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10141 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10142 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010143 VIXL_ASSERT(allow_macro_instructions_);
10144 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010145 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010146 ITScope it_scope(this, &cond);
10147 vsub(cond, dt, rd, rn, rm);
10148 }
10149 void Vsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
10150 Vsub(al, dt, rd, rn, rm);
10151 }
10152
10153 void Vsub(
10154 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010155 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10156 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10157 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010158 VIXL_ASSERT(allow_macro_instructions_);
10159 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010160 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010161 ITScope it_scope(this, &cond);
10162 vsub(cond, dt, rd, rn, rm);
10163 }
10164 void Vsub(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
10165 Vsub(al, dt, rd, rn, rm);
10166 }
10167
10168 void Vsubhn(
10169 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010170 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10171 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10172 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010173 VIXL_ASSERT(allow_macro_instructions_);
10174 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010175 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010176 ITScope it_scope(this, &cond);
10177 vsubhn(cond, dt, rd, rn, rm);
10178 }
10179 void Vsubhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
10180 Vsubhn(al, dt, rd, rn, rm);
10181 }
10182
10183 void Vsubl(
10184 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010185 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10186 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10187 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010188 VIXL_ASSERT(allow_macro_instructions_);
10189 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010190 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010191 ITScope it_scope(this, &cond);
10192 vsubl(cond, dt, rd, rn, rm);
10193 }
10194 void Vsubl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
10195 Vsubl(al, dt, rd, rn, rm);
10196 }
10197
10198 void Vsubw(
10199 Condition cond, DataType dt, QRegister rd, QRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010200 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10201 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10202 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010203 VIXL_ASSERT(allow_macro_instructions_);
10204 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010205 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010206 ITScope it_scope(this, &cond);
10207 vsubw(cond, dt, rd, rn, rm);
10208 }
10209 void Vsubw(DataType dt, QRegister rd, QRegister rn, DRegister rm) {
10210 Vsubw(al, dt, rd, rn, rm);
10211 }
10212
10213 void Vswp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010214 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10215 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010216 VIXL_ASSERT(allow_macro_instructions_);
10217 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010218 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010219 ITScope it_scope(this, &cond);
10220 vswp(cond, dt, rd, rm);
10221 }
10222 void Vswp(DataType dt, DRegister rd, DRegister rm) { Vswp(al, dt, rd, rm); }
10223 void Vswp(Condition cond, DRegister rd, DRegister rm) {
10224 Vswp(cond, kDataTypeValueNone, rd, rm);
10225 }
10226 void Vswp(DRegister rd, DRegister rm) {
10227 Vswp(al, kDataTypeValueNone, rd, rm);
10228 }
10229
10230 void Vswp(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010231 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10232 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010233 VIXL_ASSERT(allow_macro_instructions_);
10234 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010235 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010236 ITScope it_scope(this, &cond);
10237 vswp(cond, dt, rd, rm);
10238 }
10239 void Vswp(DataType dt, QRegister rd, QRegister rm) { Vswp(al, dt, rd, rm); }
10240 void Vswp(Condition cond, QRegister rd, QRegister rm) {
10241 Vswp(cond, kDataTypeValueNone, rd, rm);
10242 }
10243 void Vswp(QRegister rd, QRegister rm) {
10244 Vswp(al, kDataTypeValueNone, rd, rm);
10245 }
10246
10247 void Vtbl(Condition cond,
10248 DataType dt,
10249 DRegister rd,
10250 const NeonRegisterList& nreglist,
10251 DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010252 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10253 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10254 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010255 VIXL_ASSERT(allow_macro_instructions_);
10256 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010257 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010258 ITScope it_scope(this, &cond);
10259 vtbl(cond, dt, rd, nreglist, rm);
10260 }
10261 void Vtbl(DataType dt,
10262 DRegister rd,
10263 const NeonRegisterList& nreglist,
10264 DRegister rm) {
10265 Vtbl(al, dt, rd, nreglist, rm);
10266 }
10267
10268 void Vtbx(Condition cond,
10269 DataType dt,
10270 DRegister rd,
10271 const NeonRegisterList& nreglist,
10272 DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010273 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10274 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10275 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010276 VIXL_ASSERT(allow_macro_instructions_);
10277 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010278 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010279 ITScope it_scope(this, &cond);
10280 vtbx(cond, dt, rd, nreglist, rm);
10281 }
10282 void Vtbx(DataType dt,
10283 DRegister rd,
10284 const NeonRegisterList& nreglist,
10285 DRegister rm) {
10286 Vtbx(al, dt, rd, nreglist, rm);
10287 }
10288
10289 void Vtrn(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010290 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10291 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010292 VIXL_ASSERT(allow_macro_instructions_);
10293 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010294 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010295 ITScope it_scope(this, &cond);
10296 vtrn(cond, dt, rd, rm);
10297 }
10298 void Vtrn(DataType dt, DRegister rd, DRegister rm) { Vtrn(al, dt, rd, rm); }
10299
10300 void Vtrn(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010301 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10302 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010303 VIXL_ASSERT(allow_macro_instructions_);
10304 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010305 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010306 ITScope it_scope(this, &cond);
10307 vtrn(cond, dt, rd, rm);
10308 }
10309 void Vtrn(DataType dt, QRegister rd, QRegister rm) { Vtrn(al, dt, rd, rm); }
10310
10311 void Vtst(
10312 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010313 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10314 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10315 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010316 VIXL_ASSERT(allow_macro_instructions_);
10317 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010318 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010319 ITScope it_scope(this, &cond);
10320 vtst(cond, dt, rd, rn, rm);
10321 }
10322 void Vtst(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
10323 Vtst(al, dt, rd, rn, rm);
10324 }
10325
10326 void Vtst(
10327 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010328 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10329 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10330 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010331 VIXL_ASSERT(allow_macro_instructions_);
10332 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010333 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010334 ITScope it_scope(this, &cond);
10335 vtst(cond, dt, rd, rn, rm);
10336 }
10337 void Vtst(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
10338 Vtst(al, dt, rd, rn, rm);
10339 }
10340
10341 void Vuzp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010342 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10343 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010344 VIXL_ASSERT(allow_macro_instructions_);
10345 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010346 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010347 ITScope it_scope(this, &cond);
10348 vuzp(cond, dt, rd, rm);
10349 }
10350 void Vuzp(DataType dt, DRegister rd, DRegister rm) { Vuzp(al, dt, rd, rm); }
10351
10352 void Vuzp(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010353 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10354 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010355 VIXL_ASSERT(allow_macro_instructions_);
10356 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010357 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010358 ITScope it_scope(this, &cond);
10359 vuzp(cond, dt, rd, rm);
10360 }
10361 void Vuzp(DataType dt, QRegister rd, QRegister rm) { Vuzp(al, dt, rd, rm); }
10362
10363 void Vzip(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010364 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10365 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010366 VIXL_ASSERT(allow_macro_instructions_);
10367 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010368 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010369 ITScope it_scope(this, &cond);
10370 vzip(cond, dt, rd, rm);
10371 }
10372 void Vzip(DataType dt, DRegister rd, DRegister rm) { Vzip(al, dt, rd, rm); }
10373
10374 void Vzip(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010375 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10376 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010377 VIXL_ASSERT(allow_macro_instructions_);
10378 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010379 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010380 ITScope it_scope(this, &cond);
10381 vzip(cond, dt, rd, rm);
10382 }
10383 void Vzip(DataType dt, QRegister rd, QRegister rm) { Vzip(al, dt, rd, rm); }
10384
10385 void Yield(Condition cond) {
10386 VIXL_ASSERT(allow_macro_instructions_);
10387 VIXL_ASSERT(OutsideITBlock());
Vincent Belliard8885c172016-08-24 11:33:19 -070010388 AllowAssemblerEmissionScope allow_scope(this, kMaxInstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010389 ITScope it_scope(this, &cond);
10390 yield(cond);
10391 }
10392 void Yield() { Yield(al); }
Vincent Belliardf6786182016-09-21 11:55:28 +010010393 void Vabs(Condition cond, VRegister rd, VRegister rm) {
10394 VIXL_ASSERT(rd.IsS() || rd.IsD());
10395 VIXL_ASSERT(rd.GetType() == rm.GetType());
10396 if (rd.IsS()) {
10397 Vabs(cond, F32, rd.S(), rm.S());
10398 } else {
10399 Vabs(cond, F64, rd.D(), rm.D());
10400 }
10401 }
10402 void Vabs(VRegister rd, VRegister rm) { Vabs(al, rd, rm); }
10403 void Vadd(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10404 VIXL_ASSERT(rd.IsS() || rd.IsD());
10405 VIXL_ASSERT(rd.GetType() == rn.GetType());
10406 VIXL_ASSERT(rd.GetType() == rm.GetType());
10407 if (rd.IsS()) {
10408 Vadd(cond, F32, rd.S(), rn.S(), rm.S());
10409 } else {
10410 Vadd(cond, F64, rd.D(), rn.D(), rm.D());
10411 }
10412 }
10413 void Vadd(VRegister rd, VRegister rn, VRegister rm) { Vadd(al, rd, rn, rm); }
10414 void Vcmp(Condition cond, VRegister rd, VRegister rm) {
10415 VIXL_ASSERT(rd.IsS() || rd.IsD());
10416 VIXL_ASSERT(rd.GetType() == rm.GetType());
10417 if (rd.IsS()) {
10418 Vcmp(cond, F32, rd.S(), rm.S());
10419 } else {
10420 Vcmp(cond, F64, rd.D(), rm.D());
10421 }
10422 }
10423 void Vcmp(VRegister rd, VRegister rm) { Vcmp(al, rd, rm); }
10424 void Vcmpe(Condition cond, VRegister rd, VRegister rm) {
10425 VIXL_ASSERT(rd.IsS() || rd.IsD());
10426 VIXL_ASSERT(rd.GetType() == rm.GetType());
10427 if (rd.IsS()) {
10428 Vcmpe(cond, F32, rd.S(), rm.S());
10429 } else {
10430 Vcmpe(cond, F64, rd.D(), rm.D());
10431 }
10432 }
10433 void Vcmpe(VRegister rd, VRegister rm) { Vcmpe(al, rd, rm); }
10434 void Vdiv(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10435 VIXL_ASSERT(rd.IsS() || rd.IsD());
10436 VIXL_ASSERT(rd.GetType() == rn.GetType());
10437 VIXL_ASSERT(rd.GetType() == rm.GetType());
10438 if (rd.IsS()) {
10439 Vdiv(cond, F32, rd.S(), rn.S(), rm.S());
10440 } else {
10441 Vdiv(cond, F64, rd.D(), rn.D(), rm.D());
10442 }
10443 }
10444 void Vdiv(VRegister rd, VRegister rn, VRegister rm) { Vdiv(al, rd, rn, rm); }
10445 void Vfma(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10446 VIXL_ASSERT(rd.IsS() || rd.IsD());
10447 VIXL_ASSERT(rd.GetType() == rn.GetType());
10448 VIXL_ASSERT(rd.GetType() == rm.GetType());
10449 if (rd.IsS()) {
10450 Vfma(cond, F32, rd.S(), rn.S(), rm.S());
10451 } else {
10452 Vfma(cond, F64, rd.D(), rn.D(), rm.D());
10453 }
10454 }
10455 void Vfma(VRegister rd, VRegister rn, VRegister rm) { Vfma(al, rd, rn, rm); }
10456 void Vfms(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10457 VIXL_ASSERT(rd.IsS() || rd.IsD());
10458 VIXL_ASSERT(rd.GetType() == rn.GetType());
10459 VIXL_ASSERT(rd.GetType() == rm.GetType());
10460 if (rd.IsS()) {
10461 Vfms(cond, F32, rd.S(), rn.S(), rm.S());
10462 } else {
10463 Vfms(cond, F64, rd.D(), rn.D(), rm.D());
10464 }
10465 }
10466 void Vfms(VRegister rd, VRegister rn, VRegister rm) { Vfms(al, rd, rn, rm); }
10467 void Vfnma(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10468 VIXL_ASSERT(rd.IsS() || rd.IsD());
10469 VIXL_ASSERT(rd.GetType() == rn.GetType());
10470 VIXL_ASSERT(rd.GetType() == rm.GetType());
10471 if (rd.IsS()) {
10472 Vfnma(cond, F32, rd.S(), rn.S(), rm.S());
10473 } else {
10474 Vfnma(cond, F64, rd.D(), rn.D(), rm.D());
10475 }
10476 }
10477 void Vfnma(VRegister rd, VRegister rn, VRegister rm) {
10478 Vfnma(al, rd, rn, rm);
10479 }
10480 void Vfnms(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10481 VIXL_ASSERT(rd.IsS() || rd.IsD());
10482 VIXL_ASSERT(rd.GetType() == rn.GetType());
10483 VIXL_ASSERT(rd.GetType() == rm.GetType());
10484 if (rd.IsS()) {
10485 Vfnms(cond, F32, rd.S(), rn.S(), rm.S());
10486 } else {
10487 Vfnms(cond, F64, rd.D(), rn.D(), rm.D());
10488 }
10489 }
10490 void Vfnms(VRegister rd, VRegister rn, VRegister rm) {
10491 Vfnms(al, rd, rn, rm);
10492 }
10493 void Vmaxnm(VRegister rd, VRegister rn, VRegister rm) {
10494 VIXL_ASSERT(rd.IsS() || rd.IsD());
10495 VIXL_ASSERT(rd.GetType() == rn.GetType());
10496 VIXL_ASSERT(rd.GetType() == rm.GetType());
10497 if (rd.IsS()) {
10498 Vmaxnm(F32, rd.S(), rn.S(), rm.S());
10499 } else {
10500 Vmaxnm(F64, rd.D(), rn.D(), rm.D());
10501 }
10502 }
10503 void Vminnm(VRegister rd, VRegister rn, VRegister rm) {
10504 VIXL_ASSERT(rd.IsS() || rd.IsD());
10505 VIXL_ASSERT(rd.GetType() == rn.GetType());
10506 VIXL_ASSERT(rd.GetType() == rm.GetType());
10507 if (rd.IsS()) {
10508 Vminnm(F32, rd.S(), rn.S(), rm.S());
10509 } else {
10510 Vminnm(F64, rd.D(), rn.D(), rm.D());
10511 }
10512 }
10513 void Vmla(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10514 VIXL_ASSERT(rd.IsS() || rd.IsD());
10515 VIXL_ASSERT(rd.GetType() == rn.GetType());
10516 VIXL_ASSERT(rd.GetType() == rm.GetType());
10517 if (rd.IsS()) {
10518 Vmla(cond, F32, rd.S(), rn.S(), rm.S());
10519 } else {
10520 Vmla(cond, F64, rd.D(), rn.D(), rm.D());
10521 }
10522 }
10523 void Vmla(VRegister rd, VRegister rn, VRegister rm) { Vmla(al, rd, rn, rm); }
10524 void Vmls(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10525 VIXL_ASSERT(rd.IsS() || rd.IsD());
10526 VIXL_ASSERT(rd.GetType() == rn.GetType());
10527 VIXL_ASSERT(rd.GetType() == rm.GetType());
10528 if (rd.IsS()) {
10529 Vmls(cond, F32, rd.S(), rn.S(), rm.S());
10530 } else {
10531 Vmls(cond, F64, rd.D(), rn.D(), rm.D());
10532 }
10533 }
10534 void Vmls(VRegister rd, VRegister rn, VRegister rm) { Vmls(al, rd, rn, rm); }
10535 void Vmov(Condition cond, VRegister rd, VRegister rm) {
10536 VIXL_ASSERT(rd.IsS() || rd.IsD());
10537 VIXL_ASSERT(rd.GetType() == rm.GetType());
10538 if (rd.IsS()) {
10539 Vmov(cond, F32, rd.S(), rm.S());
10540 } else {
10541 Vmov(cond, F64, rd.D(), rm.D());
10542 }
10543 }
10544 void Vmov(VRegister rd, VRegister rm) { Vmov(al, rd, rm); }
10545 void Vmul(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10546 VIXL_ASSERT(rd.IsS() || rd.IsD());
10547 VIXL_ASSERT(rd.GetType() == rn.GetType());
10548 VIXL_ASSERT(rd.GetType() == rm.GetType());
10549 if (rd.IsS()) {
10550 Vmul(cond, F32, rd.S(), rn.S(), rm.S());
10551 } else {
10552 Vmul(cond, F64, rd.D(), rn.D(), rm.D());
10553 }
10554 }
10555 void Vmul(VRegister rd, VRegister rn, VRegister rm) { Vmul(al, rd, rn, rm); }
10556 void Vneg(Condition cond, VRegister rd, VRegister rm) {
10557 VIXL_ASSERT(rd.IsS() || rd.IsD());
10558 VIXL_ASSERT(rd.GetType() == rm.GetType());
10559 if (rd.IsS()) {
10560 Vneg(cond, F32, rd.S(), rm.S());
10561 } else {
10562 Vneg(cond, F64, rd.D(), rm.D());
10563 }
10564 }
10565 void Vneg(VRegister rd, VRegister rm) { Vneg(al, rd, rm); }
10566 void Vnmla(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10567 VIXL_ASSERT(rd.IsS() || rd.IsD());
10568 VIXL_ASSERT(rd.GetType() == rn.GetType());
10569 VIXL_ASSERT(rd.GetType() == rm.GetType());
10570 if (rd.IsS()) {
10571 Vnmla(cond, F32, rd.S(), rn.S(), rm.S());
10572 } else {
10573 Vnmla(cond, F64, rd.D(), rn.D(), rm.D());
10574 }
10575 }
10576 void Vnmla(VRegister rd, VRegister rn, VRegister rm) {
10577 Vnmla(al, rd, rn, rm);
10578 }
10579 void Vnmls(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10580 VIXL_ASSERT(rd.IsS() || rd.IsD());
10581 VIXL_ASSERT(rd.GetType() == rn.GetType());
10582 VIXL_ASSERT(rd.GetType() == rm.GetType());
10583 if (rd.IsS()) {
10584 Vnmls(cond, F32, rd.S(), rn.S(), rm.S());
10585 } else {
10586 Vnmls(cond, F64, rd.D(), rn.D(), rm.D());
10587 }
10588 }
10589 void Vnmls(VRegister rd, VRegister rn, VRegister rm) {
10590 Vnmls(al, rd, rn, rm);
10591 }
10592 void Vnmul(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10593 VIXL_ASSERT(rd.IsS() || rd.IsD());
10594 VIXL_ASSERT(rd.GetType() == rn.GetType());
10595 VIXL_ASSERT(rd.GetType() == rm.GetType());
10596 if (rd.IsS()) {
10597 Vnmul(cond, F32, rd.S(), rn.S(), rm.S());
10598 } else {
10599 Vnmul(cond, F64, rd.D(), rn.D(), rm.D());
10600 }
10601 }
10602 void Vnmul(VRegister rd, VRegister rn, VRegister rm) {
10603 Vnmul(al, rd, rn, rm);
10604 }
10605 void Vseleq(VRegister rd, VRegister rn, VRegister rm) {
10606 VIXL_ASSERT(rd.IsS() || rd.IsD());
10607 VIXL_ASSERT(rd.GetType() == rn.GetType());
10608 VIXL_ASSERT(rd.GetType() == rm.GetType());
10609 if (rd.IsS()) {
10610 Vseleq(F32, rd.S(), rn.S(), rm.S());
10611 } else {
10612 Vseleq(F64, rd.D(), rn.D(), rm.D());
10613 }
10614 }
10615 void Vselge(VRegister rd, VRegister rn, VRegister rm) {
10616 VIXL_ASSERT(rd.IsS() || rd.IsD());
10617 VIXL_ASSERT(rd.GetType() == rn.GetType());
10618 VIXL_ASSERT(rd.GetType() == rm.GetType());
10619 if (rd.IsS()) {
10620 Vselge(F32, rd.S(), rn.S(), rm.S());
10621 } else {
10622 Vselge(F64, rd.D(), rn.D(), rm.D());
10623 }
10624 }
10625 void Vselgt(VRegister rd, VRegister rn, VRegister rm) {
10626 VIXL_ASSERT(rd.IsS() || rd.IsD());
10627 VIXL_ASSERT(rd.GetType() == rn.GetType());
10628 VIXL_ASSERT(rd.GetType() == rm.GetType());
10629 if (rd.IsS()) {
10630 Vselgt(F32, rd.S(), rn.S(), rm.S());
10631 } else {
10632 Vselgt(F64, rd.D(), rn.D(), rm.D());
10633 }
10634 }
10635 void Vselvs(VRegister rd, VRegister rn, VRegister rm) {
10636 VIXL_ASSERT(rd.IsS() || rd.IsD());
10637 VIXL_ASSERT(rd.GetType() == rn.GetType());
10638 VIXL_ASSERT(rd.GetType() == rm.GetType());
10639 if (rd.IsS()) {
10640 Vselvs(F32, rd.S(), rn.S(), rm.S());
10641 } else {
10642 Vselvs(F64, rd.D(), rn.D(), rm.D());
10643 }
10644 }
10645 void Vsqrt(Condition cond, VRegister rd, VRegister rm) {
10646 VIXL_ASSERT(rd.IsS() || rd.IsD());
10647 VIXL_ASSERT(rd.GetType() == rm.GetType());
10648 if (rd.IsS()) {
10649 Vsqrt(cond, F32, rd.S(), rm.S());
10650 } else {
10651 Vsqrt(cond, F64, rd.D(), rm.D());
10652 }
10653 }
10654 void Vsqrt(VRegister rd, VRegister rm) { Vsqrt(al, rd, rm); }
10655 void Vsub(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10656 VIXL_ASSERT(rd.IsS() || rd.IsD());
10657 VIXL_ASSERT(rd.GetType() == rn.GetType());
10658 VIXL_ASSERT(rd.GetType() == rm.GetType());
10659 if (rd.IsS()) {
10660 Vsub(cond, F32, rd.S(), rn.S(), rm.S());
10661 } else {
10662 Vsub(cond, F64, rd.D(), rn.D(), rm.D());
10663 }
10664 }
10665 void Vsub(VRegister rd, VRegister rn, VRegister rm) { Vsub(al, rd, rn, rm); }
Alexandre Ramesd3832962016-07-04 15:03:43 +010010666 // End of generated code.
10667 private:
10668 RegisterList available_;
10669 VRegisterList available_vfp_;
10670 MacroAssemblerContext context_;
10671 Label::Offset checkpoint_;
10672 LiteralPoolManager literal_pool_manager_;
10673 VeneerPoolManager veneer_pool_manager_;
Pierre Langlois1e85b7f2016-08-05 14:20:36 +010010674 bool generate_simulator_code_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010010675 bool allow_macro_instructions_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010010676};
10677
10678// This scope is used to ensure that the specified size of instructions will be
10679// emitted contiguously. The assert policy kExtactSize should only be used
10680// when you use directly the assembler as it's difficult to know exactly how
10681// many instructions will be emitted by the macro-assembler. Using the assembler
10682// means that you directly use the assembler instructions (in lower case) from a
10683// MacroAssembler object.
10684class CodeBufferCheckScope {
10685 public:
10686 // Tell whether or not the scope should assert the amount of code emitted
10687 // within the scope is consistent with the requested amount.
10688 enum AssertPolicy {
10689 kNoAssert, // No assert required.
10690 kExactSize, // The code emitted must be exactly size bytes.
10691 kMaximumSize // The code emitted must be at most size bytes.
10692 };
10693
10694 CodeBufferCheckScope(MacroAssembler* masm,
10695 uint32_t size,
10696 AssertPolicy assert_policy = kMaximumSize)
10697 : masm_(masm) {
10698 masm->EnsureEmitFor(size);
10699#ifdef VIXL_DEBUG
10700 initial_cursor_offset_ = masm->GetCursorOffset();
10701 size_ = size;
10702 assert_policy_ = assert_policy;
10703#else
10704 USE(assert_policy);
10705#endif
10706 }
10707
10708 ~CodeBufferCheckScope() {
10709#ifdef VIXL_DEBUG
10710 switch (assert_policy_) {
10711 case kNoAssert:
10712 break;
10713 case kExactSize:
10714 VIXL_ASSERT(masm_->GetCursorOffset() - initial_cursor_offset_ == size_);
10715 break;
10716 case kMaximumSize:
10717 VIXL_ASSERT(masm_->GetCursorOffset() - initial_cursor_offset_ <= size_);
10718 break;
10719 default:
10720 VIXL_UNREACHABLE();
10721 }
10722#endif
10723 }
10724
10725 protected:
10726 MacroAssembler* masm_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010010727 uint32_t initial_cursor_offset_;
10728 uint32_t size_;
10729 AssertPolicy assert_policy_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010010730};
10731
10732// Use this scope when you need a one-to-one mapping between methods and
10733// instructions. This scope prevents the MacroAssembler functions from being
10734// called and the literal pools and veneers from being emitted (they can only be
10735// emitted when you create the scope). It also asserts the size of the emitted
10736// instructions is the specified size (or not greater than the specified size).
10737// This scope must be used when you want to directly use the assembler. It will
10738// ensure that the buffer is big enough and that you don't break the pool and
10739// veneer mechanisms.
10740class AssemblerAccurateScope : public CodeBufferCheckScope {
10741 public:
10742 AssemblerAccurateScope(MacroAssembler* masm,
10743 uint32_t size,
10744 AssertPolicy policy = kExactSize)
10745 : CodeBufferCheckScope(masm, size, policy) {
10746 VIXL_ASSERT(policy != kNoAssert);
10747#ifdef VIXL_DEBUG
10748 old_allow_macro_instructions_ = masm->AllowMacroInstructions();
Vincent Belliard8885c172016-08-24 11:33:19 -070010749 old_allow_assembler_ = masm->AllowAssembler();
Alexandre Ramesd3832962016-07-04 15:03:43 +010010750 masm->SetAllowMacroInstructions(false);
Vincent Belliard8885c172016-08-24 11:33:19 -070010751 masm->SetAllowAssembler(true);
Alexandre Ramesfd098172016-08-09 10:29:53 +010010752#else
10753 USE(old_allow_macro_instructions_);
Vincent Belliard8885c172016-08-24 11:33:19 -070010754 USE(old_allow_assembler_);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010755#endif
10756 }
10757
10758 ~AssemblerAccurateScope() {
10759#ifdef VIXL_DEBUG
10760 masm_->SetAllowMacroInstructions(old_allow_macro_instructions_);
Vincent Belliard8885c172016-08-24 11:33:19 -070010761 masm_->SetAllowAssembler(old_allow_assembler_);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010762#endif
10763 }
10764
10765 private:
Alexandre Ramesd3832962016-07-04 15:03:43 +010010766 bool old_allow_macro_instructions_;
Vincent Belliard8885c172016-08-24 11:33:19 -070010767 bool old_allow_assembler_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010010768};
10769
10770// This scope utility allows scratch registers to be managed safely. The
10771// MacroAssembler's GetScratchRegisterList() is used as a pool of scratch
10772// registers. These registers can be allocated on demand, and will be returned
10773// at the end of the scope.
10774//
10775// When the scope ends, the MacroAssembler's lists will be restored to their
10776// original state, even if the lists were modified by some other means.
10777class UseScratchRegisterScope {
10778 public:
10779 // This constructor implicitly calls the `Open` function to initialise the
10780 // scope, so it is ready to use immediately after it has been constructed.
10781 explicit UseScratchRegisterScope(MacroAssembler* masm)
10782 : available_(NULL),
10783 available_vfp_(NULL),
10784 old_available_(0),
10785 old_available_vfp_(0) {
10786 Open(masm);
10787 }
10788 // This constructor allows deferred and optional initialisation of the scope.
10789 // The user is required to explicitly call the `Open` function before using
10790 // the scope.
10791 UseScratchRegisterScope()
10792 : available_(NULL),
10793 available_vfp_(NULL),
10794 old_available_(0),
10795 old_available_vfp_(0) {}
10796
10797 // This function performs the actual initialisation work.
10798 void Open(MacroAssembler* masm);
10799
10800 // The destructor always implicitly calls the `Close` function.
10801 ~UseScratchRegisterScope() { Close(); }
10802
10803 // This function performs the cleaning-up work. It must succeed even if the
10804 // scope has not been opened. It is safe to call multiple times.
10805 void Close();
10806
10807 bool IsAvailable(const Register& reg) const;
10808 bool IsAvailable(const VRegister& reg) const;
10809
10810 // Take a register from the temp list. It will be returned automatically when
10811 // the scope ends.
10812 Register Acquire();
10813 VRegister AcquireV(unsigned size_in_bits);
10814 QRegister AcquireQ();
10815 DRegister AcquireD();
10816 SRegister AcquireS();
10817
10818 // Explicitly release an acquired (or excluded) register, putting it back in
10819 // the temp list.
10820 void Release(const Register& reg);
10821 void Release(const VRegister& reg);
10822
10823 // Make the specified registers available as scratch registers for the
10824 // duration of this scope.
10825 void Include(const RegisterList& list);
10826 void Include(const Register& reg1,
10827 const Register& reg2 = NoReg,
10828 const Register& reg3 = NoReg,
10829 const Register& reg4 = NoReg) {
10830 Include(RegisterList(reg1, reg2, reg3, reg4));
10831 }
10832 void Include(const VRegisterList& list);
10833 void Include(const VRegister& reg1,
10834 const VRegister& reg2 = NoVReg,
10835 const VRegister& reg3 = NoVReg,
10836 const VRegister& reg4 = NoVReg) {
10837 Include(VRegisterList(reg1, reg2, reg3, reg4));
10838 }
10839
10840 // Make sure that the specified registers are not available in this scope.
10841 // This can be used to prevent helper functions from using sensitive
10842 // registers, for example.
10843 void Exclude(const RegisterList& list);
10844 void Exclude(const Register& reg1,
10845 const Register& reg2 = NoReg,
10846 const Register& reg3 = NoReg,
10847 const Register& reg4 = NoReg) {
10848 Exclude(RegisterList(reg1, reg2, reg3, reg4));
10849 }
10850 void Exclude(const VRegisterList& list);
10851 void Exclude(const VRegister& reg1,
10852 const VRegister& reg2 = NoVReg,
10853 const VRegister& reg3 = NoVReg,
10854 const VRegister& reg4 = NoVReg) {
10855 Exclude(VRegisterList(reg1, reg2, reg3, reg4));
10856 }
10857
10858 // Prevent any scratch registers from being used in this scope.
10859 void ExcludeAll();
10860
10861 private:
10862 // Available scratch registers.
10863 RegisterList* available_; // kRRegister
10864 VRegisterList* available_vfp_; // kVRegister
10865
10866 // The state of the available lists at the start of this scope.
10867 uint32_t old_available_; // kRRegister
10868 uint64_t old_available_vfp_; // kVRegister
10869
10870 VIXL_DEBUG_NO_RETURN UseScratchRegisterScope(const UseScratchRegisterScope&) {
10871 VIXL_UNREACHABLE();
10872 }
10873 VIXL_DEBUG_NO_RETURN void operator=(const UseScratchRegisterScope&) {
10874 VIXL_UNREACHABLE();
10875 }
10876};
10877
10878class JumpTableBase {
10879 protected:
10880 JumpTableBase(int len, int offset_size)
10881 : table_location_(Label::kMaxOffset),
10882 branch_location_(Label::kMaxOffset),
10883 length_(len),
10884 offset_shift_(WhichPowerOf2(offset_size)),
10885 presence_(length_) {
10886 VIXL_ASSERT((length_ >= 0) && (offset_size <= 4));
10887 }
10888 virtual ~JumpTableBase() {}
10889
10890 public:
10891 int GetTableSizeInBytes() const { return length_ * (1 << offset_shift_); }
10892 int GetOffsetShift() const { return offset_shift_; }
10893 int GetLength() const { return length_; }
10894 Label* GetDefaultLabel() { return &default_; }
10895 Label* GetEndLabel() { return &end_; }
10896 void SetBranchLocation(uint32_t branch_location) {
10897 branch_location_ = branch_location;
10898 }
10899 uint32_t GetBranchLocation() const { return branch_location_; }
10900 void BindTable(uint32_t location) { table_location_ = location; }
10901 virtual void Link(MacroAssembler* masm,
10902 int case_index,
10903 uint32_t location) = 0;
10904
10905 uint32_t GetLocationForCase(int i) {
10906 VIXL_ASSERT((i >= 0) && (i < length_));
10907 return table_location_ + (i * (1 << offset_shift_));
10908 }
10909 void SetPresenceBitForCase(int i) {
10910 VIXL_ASSERT((i >= 0) && (i < length_));
10911 presence_.Set(i);
10912 }
10913
10914 void Finalize(MacroAssembler* masm) {
10915 if (!default_.IsBound()) {
10916 masm->Bind(&default_);
10917 }
10918 masm->Bind(&end_);
10919
10920 presence_.ForEachBitNotSet(LinkIt(this, masm, default_.GetLocation()));
10921 }
10922
10923 private:
10924 uint32_t table_location_;
10925 uint32_t branch_location_;
10926 const int length_;
10927 const int offset_shift_;
10928 BitField presence_;
10929 Label default_;
10930 Label end_;
10931 struct LinkIt {
10932 JumpTableBase* table_;
10933 MacroAssembler* const masm_;
10934 const uint32_t location_;
10935 LinkIt(JumpTableBase* table, MacroAssembler* const masm, uint32_t location)
10936 : table_(table), masm_(masm), location_(location) {}
10937 bool execute(int id) const {
10938 VIXL_ASSERT(id < table_->GetLength());
10939 table_->Link(masm_, static_cast<int>(id), location_);
10940 return true;
10941 }
10942 };
10943};
10944
10945// JumpTable<T>(len): Helper to describe a jump table
10946// len here describes the number of possible case. Values in [0, n[ can have a
10947// jump offset. Any other value will assert.
10948template <typename T>
10949class JumpTable : public JumpTableBase {
10950 protected:
10951 explicit JumpTable(int length) : JumpTableBase(length, sizeof(T)) {}
10952
10953 public:
Pierre Langlois3fac43c2016-10-31 13:38:47 +000010954 virtual void Link(MacroAssembler* masm,
10955 int case_index,
10956 uint32_t location) VIXL_OVERRIDE {
Alexandre Ramesd3832962016-07-04 15:03:43 +010010957 uint32_t position_in_table = GetLocationForCase(case_index);
10958 uint32_t from = GetBranchLocation();
10959 int offset = location - from;
Alexandre Rames919e3fe2016-10-14 09:07:54 +010010960 T* case_offset = masm->GetBuffer()->GetOffsetAddress<T*>(position_in_table);
Jacob Bramley10dae1a2016-07-27 09:45:13 +010010961 if (masm->IsUsingT32()) {
Alexandre Ramesd3832962016-07-04 15:03:43 +010010962 *case_offset = offset >> 1;
10963 } else {
10964 *case_offset = offset >> 2;
10965 }
10966 }
10967};
10968
10969class JumpTable8bitOffset : public JumpTable<uint8_t> {
10970 public:
10971 explicit JumpTable8bitOffset(int length) : JumpTable<uint8_t>(length) {}
10972};
10973
10974class JumpTable16bitOffset : public JumpTable<uint16_t> {
10975 public:
10976 explicit JumpTable16bitOffset(int length) : JumpTable<uint16_t>(length) {}
10977};
10978
10979class JumpTable32bitOffset : public JumpTable<uint32_t> {
10980 public:
10981 explicit JumpTable32bitOffset(int length) : JumpTable<uint32_t>(length) {}
10982};
10983
10984} // namespace aarch32
10985} // namespace vixl
10986
10987#endif // VIXL_AARCH32_MACRO_ASSEMBLER_AARCH32_H_