blob: d0ff52b3ecb23ac4e9437a813f43e977597e3f2e [file] [log] [blame]
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001// Copyright 2017, VIXL authors
Alexandre Ramesd3832962016-07-04 15:03:43 +01002// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are met:
6//
7// * Redistributions of source code must retain the above copyright notice,
8// this list of conditions and the following disclaimer.
9// * Redistributions in binary form must reproduce the above copyright
10// notice, this list of conditions and the following disclaimer in the
11// documentation and/or other materials provided with the distribution.
12// * Neither the name of ARM Limited nor the names of its contributors may
13// be used to endorse or promote products derived from this software
14// without specific prior written permission.
15//
16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND
17// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26// POSSIBILITY OF SUCH DAMAGE.
27
28#ifndef VIXL_AARCH32_MACRO_ASSEMBLER_AARCH32_H_
29#define VIXL_AARCH32_MACRO_ASSEMBLER_AARCH32_H_
30
Alexandre Rames8d191ab2016-11-29 11:23:27 +000031#include "code-generation-scopes-vixl.h"
32#include "macro-assembler-interface.h"
Georgia Kouveli8b57c862017-03-02 15:18:58 +000033#include "pool-manager-impl.h"
Pierre Langlois1bce0072017-06-06 17:58:58 +010034#include "pool-manager.h"
Alexandre Ramesd3832962016-07-04 15:03:43 +010035#include "utils-vixl.h"
Alexandre Rames8d191ab2016-11-29 11:23:27 +000036
Alexandre Ramesd3832962016-07-04 15:03:43 +010037#include "aarch32/assembler-aarch32.h"
Pierre Langlois1bce0072017-06-06 17:58:58 +010038#include "aarch32/instructions-aarch32.h"
Pierre Langlois989663e2016-11-24 13:11:08 +000039#include "aarch32/operands-aarch32.h"
Alexandre Ramesd3832962016-07-04 15:03:43 +010040
41namespace vixl {
Georgia Kouveli8b57c862017-03-02 15:18:58 +000042
Alexandre Ramesd3832962016-07-04 15:03:43 +010043namespace aarch32 {
44
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000045class UseScratchRegisterScope;
Alexandre Ramesd3832962016-07-04 15:03:43 +010046
Vincent Belliard934696d2016-08-18 11:03:56 -070047enum FlagsUpdate { LeaveFlags = 0, SetFlags = 1, DontCare = 2 };
48
Georgia Kouveli8b57c862017-03-02 15:18:58 +000049// We use a subclass to access the protected `ExactAssemblyScope` constructor
50// giving us control over the pools, and make the constructor private to limit
51// usage to code paths emitting pools.
52class ExactAssemblyScopeWithoutPoolsCheck : public ExactAssemblyScope {
Alexandre Ramesd3832962016-07-04 15:03:43 +010053 private:
Georgia Kouveli8b57c862017-03-02 15:18:58 +000054 ExactAssemblyScopeWithoutPoolsCheck(MacroAssembler* masm,
55 size_t size,
56 SizePolicy size_policy = kExactSize);
Alexandre Ramesd3832962016-07-04 15:03:43 +010057
Georgia Kouveli8b57c862017-03-02 15:18:58 +000058 friend class MacroAssembler;
59 friend class Label;
Alexandre Ramesd3832962016-07-04 15:03:43 +010060};
Alexandre Ramesd3832962016-07-04 15:03:43 +010061// Macro assembler for aarch32 instruction set.
Alexandre Rames8d191ab2016-11-29 11:23:27 +000062class MacroAssembler : public Assembler, public MacroAssemblerInterface {
Alexandre Ramesd3832962016-07-04 15:03:43 +010063 public:
Pierre Langlois8571b892017-01-09 10:47:44 +000064 enum FinalizeOption {
65 kFallThrough, // There may be more code to execute after calling Finalize.
66 kUnreachable // Anything generated after calling Finalize is unreachable.
67 };
Alexandre Ramesd3832962016-07-04 15:03:43 +010068
Pierre Langlois4c5d65b2016-12-06 11:56:28 +000069 virtual internal::AssemblerBase* AsAssemblerBase() VIXL_OVERRIDE {
70 return this;
71 }
Vincent Belliard8885c172016-08-24 11:33:19 -070072
Pierre Langloisfb37b5d2017-01-18 17:19:45 +000073 virtual bool ArePoolsBlocked() const VIXL_OVERRIDE {
Georgia Kouveli8b57c862017-03-02 15:18:58 +000074 return pool_manager_.IsBlocked();
Alexandre Rames8d191ab2016-11-29 11:23:27 +000075 }
Alexandre Rames8d191ab2016-11-29 11:23:27 +000076
Georgia Kouveli8b57c862017-03-02 15:18:58 +000077 virtual void EmitPoolHeader() VIXL_OVERRIDE {
78 // Check that we have the correct alignment.
79 if (IsUsingT32()) {
80 VIXL_ASSERT(GetBuffer()->Is16bitAligned());
81 } else {
82 VIXL_ASSERT(GetBuffer()->Is32bitAligned());
83 }
84 VIXL_ASSERT(pool_end_ == NULL);
85 pool_end_ = new Label();
86 ExactAssemblyScopeWithoutPoolsCheck guard(this,
87 kMaxInstructionSizeInBytes,
88 ExactAssemblyScope::kMaximumSize);
89 b(pool_end_);
90 }
91 virtual void EmitPoolFooter() VIXL_OVERRIDE {
92 // Align buffer to 4 bytes.
93 GetBuffer()->Align();
94 if (pool_end_ != NULL) {
95 Bind(pool_end_);
96 delete pool_end_;
97 pool_end_ = NULL;
98 }
99 }
100 virtual void EmitPaddingBytes(int n) VIXL_OVERRIDE {
101 GetBuffer()->EmitZeroedBytes(n);
102 }
103 virtual void EmitNopBytes(int n) VIXL_OVERRIDE {
104 int nops = 0;
105 int nop_size = IsUsingT32() ? k16BitT32InstructionSizeInBytes
106 : kA32InstructionSizeInBytes;
107 VIXL_ASSERT(n % nop_size == 0);
108 nops = n / nop_size;
109 ExactAssemblyScopeWithoutPoolsCheck guard(this,
110 n,
111 ExactAssemblyScope::kExactSize);
112 for (int i = 0; i < nops; ++i) {
113 nop();
114 }
115 }
116
Georgia Kouveli1cb71442017-01-30 13:35:28 +0000117
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000118 private:
119 class MacroEmissionCheckScope : public EmissionCheckScope {
Vincent Belliard8885c172016-08-24 11:33:19 -0700120 public:
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000121 explicit MacroEmissionCheckScope(MacroAssemblerInterface* masm,
122 PoolPolicy pool_policy = kBlockPools)
123 : EmissionCheckScope(masm,
124 kTypicalMacroInstructionMaxSize,
125 kMaximumSize,
126 pool_policy) {}
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000127
128 private:
129 static const size_t kTypicalMacroInstructionMaxSize =
130 8 * kMaxInstructionSizeInBytes;
Vincent Belliard8885c172016-08-24 11:33:19 -0700131 };
132
Alexandre Ramesd3832962016-07-04 15:03:43 +0100133 class MacroAssemblerContext {
134 public:
135 MacroAssemblerContext() : count_(0) {}
136 ~MacroAssemblerContext() {}
137 unsigned GetRecursiveCount() const { return count_; }
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000138 void Up(const char* loc) {
139 location_stack_[count_] = loc;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100140 count_++;
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000141 if (count_ >= kMaxRecursion) {
142 printf(
143 "Recursion limit reached; unable to resolve macro assembler "
144 "call.\n");
145 printf("Macro assembler context stack:\n");
146 for (unsigned i = 0; i < kMaxRecursion; i++) {
147 printf("%10s %s\n", (i == 0) ? "oldest -> " : "", location_stack_[i]);
148 }
149 VIXL_ABORT();
150 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100151 }
152 void Down() {
153 VIXL_ASSERT((count_ > 0) && (count_ < kMaxRecursion));
154 count_--;
155 }
156
157 private:
158 unsigned count_;
Georgia Kouveli4f002a82016-12-14 16:13:54 +0000159 static const uint32_t kMaxRecursion = 6;
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000160 const char* location_stack_[kMaxRecursion];
Alexandre Ramesd3832962016-07-04 15:03:43 +0100161 };
162
Vincent Belliard76887c12016-11-10 12:54:09 -0800163 // This scope is used at each Delegate entry to avoid infinite recursion of
164 // Delegate calls. The limit is defined by
165 // MacroAssemblerContext::kMaxRecursion.
Alexandre Ramesd3832962016-07-04 15:03:43 +0100166 class ContextScope {
167 public:
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000168 explicit ContextScope(MacroAssembler* const masm, const char* loc)
169 : masm_(masm) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100170 VIXL_ASSERT(masm_->AllowMacroInstructions());
Martyn Capewell21d8d8d2016-11-14 11:32:40 +0000171 masm_->GetContext()->Up(loc);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100172 }
173 ~ContextScope() { masm_->GetContext()->Down(); }
174
175 private:
176 MacroAssembler* const masm_;
177 };
178
179 MacroAssemblerContext* GetContext() { return &context_; }
180
181 class ITScope {
182 public:
Georgia Kouvelia6090f82017-02-01 16:03:44 +0000183 ITScope(MacroAssembler* masm,
184 Condition* cond,
185 const MacroEmissionCheckScope& scope,
186 bool can_use_it = false)
Alexandre Ramesd3832962016-07-04 15:03:43 +0100187 : masm_(masm), cond_(*cond), can_use_it_(can_use_it) {
Georgia Kouvelia6090f82017-02-01 16:03:44 +0000188 // The 'scope' argument is used to remind us to only use this scope inside
189 // a MacroEmissionCheckScope. This way, we do not need to check whether
190 // we need to emit the pools or grow the code buffer when emitting the
191 // IT or B instructions.
192 USE(scope);
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100193 if (!cond_.Is(al) && masm->IsUsingT32()) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100194 if (can_use_it_) {
195 // IT is not deprecated (that implies a 16 bit T32 instruction).
196 // We generate an IT instruction and a conditional instruction.
197 masm->it(cond_);
198 } else {
199 // The usage of IT is deprecated for the instruction.
200 // We generate a conditional branch and an unconditional instruction.
Alexandre Ramesd3832962016-07-04 15:03:43 +0100201 // Generate the branch.
202 masm_->b(cond_.Negate(), Narrow, &label_);
203 // Tell the macro-assembler to generate unconditional instructions.
204 *cond = al;
205 }
206 }
207#ifdef VIXL_DEBUG
208 initial_cursor_offset_ = masm->GetCursorOffset();
Alexandre Ramesfd098172016-08-09 10:29:53 +0100209#else
210 USE(initial_cursor_offset_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100211#endif
212 }
213 ~ITScope() {
Jacob Bramley356323a2016-11-25 11:28:13 +0000214 if (label_.IsReferenced()) {
215 // We only use the label for conditional T32 instructions for which we
216 // cannot use IT.
217 VIXL_ASSERT(!cond_.Is(al));
218 VIXL_ASSERT(masm_->IsUsingT32());
219 VIXL_ASSERT(!can_use_it_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100220 VIXL_ASSERT(masm_->GetCursorOffset() - initial_cursor_offset_ <=
221 kMaxT32MacroInstructionSizeInBytes);
Vincent Belliarde42218c2016-10-19 13:24:28 -0700222 masm_->BindHelper(&label_);
Jacob Bramley356323a2016-11-25 11:28:13 +0000223 } else if (masm_->IsUsingT32() && !cond_.Is(al)) {
224 // If we've generated a conditional T32 instruction but haven't used the
225 // label, we must have used IT. Check that we did not generate a
226 // deprecated sequence.
227 VIXL_ASSERT(can_use_it_);
228 VIXL_ASSERT(masm_->GetCursorOffset() - initial_cursor_offset_ <=
229 k16BitT32InstructionSizeInBytes);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100230 }
231 }
232
233 private:
234 MacroAssembler* masm_;
235 Condition cond_;
236 Label label_;
237 bool can_use_it_;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100238 uint32_t initial_cursor_offset_;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100239 };
240
Alexandre Ramesd3832962016-07-04 15:03:43 +0100241 protected:
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000242 virtual void BlockPools() VIXL_OVERRIDE { pool_manager_.Block(); }
Pierre Langloisf4ba40f2017-01-19 16:06:26 +0000243 virtual void ReleasePools() VIXL_OVERRIDE {
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000244 pool_manager_.Release(GetCursorOffset());
Pierre Langloisf4ba40f2017-01-19 16:06:26 +0000245 }
Georgia Kouvelia6090f82017-02-01 16:03:44 +0000246 virtual void EnsureEmitPoolsFor(size_t size) VIXL_OVERRIDE;
Pierre Langloisf4ba40f2017-01-19 16:06:26 +0000247
248 // Tell whether any of the macro instruction can be used. When false the
249 // MacroAssembler will assert if a method which can emit a variable number
250 // of instructions is called.
251 virtual void SetAllowMacroInstructions(bool value) VIXL_OVERRIDE {
252 allow_macro_instructions_ = value;
253 }
254
Alexandre Ramesd3832962016-07-04 15:03:43 +0100255 void HandleOutOfBoundsImmediate(Condition cond, Register tmp, uint32_t imm);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100256
257 public:
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000258 // TODO: If we change the MacroAssembler to disallow setting a different ISA,
259 // we can change the alignment of the pool in the pool manager constructor to
260 // be 2 bytes for T32.
Rodolph Perfetta9a9331f2016-12-09 22:05:48 +0000261 explicit MacroAssembler(InstructionSet isa = kDefaultISA)
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100262 : Assembler(isa),
Alexandre Ramesd3832962016-07-04 15:03:43 +0100263 available_(r12),
Jacob Bramleye8ce9f02016-12-14 16:03:31 +0000264 current_scratch_scope_(NULL),
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000265 pool_manager_(4 /*header_size*/,
266 4 /*alignment*/,
267 4 /*buffer_alignment*/),
268 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE),
269 pool_end_(NULL) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100270#ifdef VIXL_DEBUG
271 SetAllowMacroInstructions(true);
Alexandre Ramesfd098172016-08-09 10:29:53 +0100272#else
Alexandre Ramesfd098172016-08-09 10:29:53 +0100273 USE(allow_macro_instructions_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100274#endif
Alexandre Ramesd3832962016-07-04 15:03:43 +0100275 }
Rodolph Perfetta9a9331f2016-12-09 22:05:48 +0000276 explicit MacroAssembler(size_t size, InstructionSet isa = kDefaultISA)
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100277 : Assembler(size, isa),
278 available_(r12),
Jacob Bramleye8ce9f02016-12-14 16:03:31 +0000279 current_scratch_scope_(NULL),
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000280 pool_manager_(4 /*header_size*/,
281 4 /*alignment*/,
282 4 /*buffer_alignment*/),
283 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE),
284 pool_end_(NULL) {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100285#ifdef VIXL_DEBUG
286 SetAllowMacroInstructions(true);
287#endif
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100288 }
Rodolph Perfetta9a9331f2016-12-09 22:05:48 +0000289 MacroAssembler(byte* buffer, size_t size, InstructionSet isa = kDefaultISA)
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100290 : Assembler(buffer, size, isa),
Alexandre Ramesd3832962016-07-04 15:03:43 +0100291 available_(r12),
Jacob Bramleye8ce9f02016-12-14 16:03:31 +0000292 current_scratch_scope_(NULL),
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000293 pool_manager_(4 /*header_size*/,
294 4 /*alignment*/,
295 4 /*buffer_alignment*/),
296 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE),
297 pool_end_(NULL) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100298#ifdef VIXL_DEBUG
299 SetAllowMacroInstructions(true);
300#endif
Alexandre Ramesd3832962016-07-04 15:03:43 +0100301 }
302
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100303 bool GenerateSimulatorCode() const { return generate_simulator_code_; }
304
Pierre Langlois4c5d65b2016-12-06 11:56:28 +0000305 virtual bool AllowMacroInstructions() const VIXL_OVERRIDE {
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000306 return allow_macro_instructions_;
307 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100308
Pierre Langlois8571b892017-01-09 10:47:44 +0000309 void FinalizeCode(FinalizeOption option = kUnreachable) {
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000310 EmitLiteralPool(option == kUnreachable
311 ? PoolManager<int32_t>::kNoBranchRequired
312 : PoolManager<int32_t>::kBranchRequired);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100313 Assembler::FinalizeCode();
314 }
315
316 RegisterList* GetScratchRegisterList() { return &available_; }
317 VRegisterList* GetScratchVRegisterList() { return &available_vfp_; }
318
Jacob Bramleye8ce9f02016-12-14 16:03:31 +0000319 // Get or set the current (most-deeply-nested) UseScratchRegisterScope.
320 void SetCurrentScratchRegisterScope(UseScratchRegisterScope* scope) {
321 current_scratch_scope_ = scope;
322 }
323 UseScratchRegisterScope* GetCurrentScratchRegisterScope() {
324 return current_scratch_scope_;
325 }
326
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000327 // Given an address calculation (Register + immediate), generate code to
328 // partially compute the address. The returned MemOperand will perform any
329 // remaining computation in a subsequent load or store instruction.
330 //
Jacob Bramley9c112d82016-12-08 14:38:44 +0000331 // The offset provided should be the offset that would be used in a load or
332 // store instruction (if it had sufficient range). This only matters where
333 // base.Is(pc), since load and store instructions align the pc before
334 // dereferencing it.
335 //
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000336 // TODO: Improve the handling of negative offsets. They are not implemented
337 // precisely for now because they only have a marginal benefit for the
338 // existing uses (in delegates).
339 MemOperand MemOperandComputationHelper(Condition cond,
340 Register scratch,
341 Register base,
342 uint32_t offset,
343 uint32_t extra_offset_mask = 0);
344
345 MemOperand MemOperandComputationHelper(Register scratch,
346 Register base,
347 uint32_t offset,
348 uint32_t extra_offset_mask = 0) {
349 return MemOperandComputationHelper(al,
350 scratch,
351 base,
352 offset,
353 extra_offset_mask);
354 }
355 MemOperand MemOperandComputationHelper(Condition cond,
356 Register scratch,
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100357 Location* location,
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000358 uint32_t extra_offset_mask = 0) {
359 // Check for buffer space _before_ calculating the offset, in case we
360 // generate a pool that affects the offset calculation.
Jacob Bramley89d2f772016-12-08 17:04:16 +0000361 CodeBufferCheckScope scope(this, 4 * kMaxInstructionSizeInBytes);
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000362 Label::Offset offset =
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100363 location->GetLocation() -
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000364 AlignDown(GetCursorOffset() + GetArchitectureStatePCOffset(), 4);
365 return MemOperandComputationHelper(cond,
366 scratch,
367 pc,
368 offset,
369 extra_offset_mask);
370 }
371 MemOperand MemOperandComputationHelper(Register scratch,
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100372 Location* location,
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000373 uint32_t extra_offset_mask = 0) {
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100374 return MemOperandComputationHelper(al,
375 scratch,
376 location,
377 extra_offset_mask);
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000378 }
379
380 // Determine the appropriate mask to pass into MemOperandComputationHelper.
381 uint32_t GetOffsetMask(InstructionType type, AddrMode addrmode);
382
Alexandre Ramesd3832962016-07-04 15:03:43 +0100383 // State and type helpers.
384 bool IsModifiedImmediate(uint32_t imm) {
Vincent Belliard5ddbc802016-12-16 07:57:11 -0800385 return IsUsingT32() ? ImmediateT32::IsImmediateT32(imm)
386 : ImmediateA32::IsImmediateA32(imm);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100387 }
388
389 void Bind(Label* label) {
390 VIXL_ASSERT(allow_macro_instructions_);
Vincent Belliarde42218c2016-10-19 13:24:28 -0700391 BindHelper(label);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100392 }
393
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000394 virtual void BindHelper(Label* label) VIXL_OVERRIDE {
395 // Assert that we have the correct buffer alignment.
396 if (IsUsingT32()) {
397 VIXL_ASSERT(GetBuffer()->Is16bitAligned());
398 } else {
399 VIXL_ASSERT(GetBuffer()->Is32bitAligned());
400 }
401 // If we need to add padding, check if we have to emit the pool.
402 const int32_t pc = GetCursorOffset();
403 if (label->Needs16BitPadding(pc)) {
404 const int kPaddingBytes = 2;
405 if (pool_manager_.MustEmit(pc, kPaddingBytes)) {
406 int32_t new_pc = pool_manager_.Emit(this, pc, kPaddingBytes);
407 USE(new_pc);
408 VIXL_ASSERT(new_pc == GetCursorOffset());
409 }
410 }
411 pool_manager_.Bind(this, label, GetCursorOffset());
412 }
413
414 void RegisterLiteralReference(RawLiteral* literal) {
415 if (literal->IsManuallyPlaced()) return;
416 RegisterForwardReference(literal);
417 }
418
419 void RegisterForwardReference(Location* location) {
420 if (location->IsBound()) return;
421 VIXL_ASSERT(location->HasForwardReferences());
422 const Location::ForwardRef& reference = location->GetLastForwardReference();
423 pool_manager_.AddObjectReference(&reference, location);
424 }
425
426 void CheckEmitPoolForInstruction(const ReferenceInfo* info,
427 Location* location,
428 Condition* cond = NULL) {
429 int size = info->size;
430 int32_t pc = GetCursorOffset();
431 // If we need to emit a branch over the instruction, take this into account.
432 if ((cond != NULL) && NeedBranch(cond)) {
433 size += kBranchSize;
434 pc += kBranchSize;
435 }
436 int32_t from = pc;
437 from += IsUsingT32() ? kT32PcDelta : kA32PcDelta;
438 if (info->pc_needs_aligning) from = AlignDown(from, 4);
439 int32_t min = from + info->min_offset;
440 int32_t max = from + info->max_offset;
441 ForwardReference<int32_t> temp_ref(pc,
442 info->size,
443 min,
444 max,
445 info->alignment);
446 if (pool_manager_.MustEmit(GetCursorOffset(), size, &temp_ref, location)) {
447 int32_t new_pc = pool_manager_.Emit(this,
448 GetCursorOffset(),
449 info->size,
450 &temp_ref,
451 location);
452 USE(new_pc);
453 VIXL_ASSERT(new_pc == GetCursorOffset());
454 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100455 }
456
457 void Place(RawLiteral* literal) {
458 VIXL_ASSERT(allow_macro_instructions_);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700459 VIXL_ASSERT(literal->IsManuallyPlaced());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000460 // Check if we need to emit the pools. Take the alignment of the literal
461 // into account, as well as potential 16-bit padding needed to reach the
462 // minimum accessible location.
463 int alignment = literal->GetMaxAlignment();
464 int32_t pc = GetCursorOffset();
465 int total_size = AlignUp(pc, alignment) - pc + literal->GetSize();
466 if (literal->Needs16BitPadding(pc)) total_size += 2;
467 if (pool_manager_.MustEmit(pc, total_size)) {
468 int32_t new_pc = pool_manager_.Emit(this, pc, total_size);
469 USE(new_pc);
470 VIXL_ASSERT(new_pc == GetCursorOffset());
471 }
472 pool_manager_.Bind(this, literal, GetCursorOffset());
473 literal->EmitPoolObject(this);
474 // Align the buffer, to be ready to generate instructions right after
475 // this.
Vincent Belliarde42218c2016-10-19 13:24:28 -0700476 GetBuffer()->Align();
Alexandre Ramesd3832962016-07-04 15:03:43 +0100477 }
478
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000479 void EmitLiteralPool(PoolManager<int32_t>::EmitOption option =
480 PoolManager<int32_t>::kBranchRequired) {
481 VIXL_ASSERT(!ArePoolsBlocked());
482 int32_t new_pc =
483 pool_manager_.Emit(this, GetCursorOffset(), 0, NULL, NULL, option);
484 VIXL_ASSERT(new_pc == GetCursorOffset());
485 USE(new_pc);
Vincent Belliarddcffac42016-10-19 11:31:20 -0700486 }
487
Alexandre Ramesd3832962016-07-04 15:03:43 +0100488 void EnsureEmitFor(uint32_t size) {
Georgia Kouvelia6090f82017-02-01 16:03:44 +0000489 EnsureEmitPoolsFor(size);
490 VIXL_ASSERT(GetBuffer()->HasSpaceFor(size) || GetBuffer()->IsManaged());
491 GetBuffer()->EnsureSpaceFor(size);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100492 }
493
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000494 bool AliasesAvailableScratchRegister(Register reg) {
495 return GetScratchRegisterList()->Includes(reg);
496 }
497
Vincent Belliardadbb4a72016-11-22 14:24:54 -0800498 bool AliasesAvailableScratchRegister(RegisterOrAPSR_nzcv reg) {
499 if (reg.IsAPSR_nzcv()) return false;
500 return GetScratchRegisterList()->Includes(reg.AsRegister());
501 }
502
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000503 bool AliasesAvailableScratchRegister(VRegister reg) {
504 return GetScratchVRegisterList()->IncludesAliasOf(reg);
505 }
506
507 bool AliasesAvailableScratchRegister(const Operand& operand) {
508 if (operand.IsImmediate()) return false;
509 return AliasesAvailableScratchRegister(operand.GetBaseRegister()) ||
510 (operand.IsRegisterShiftedRegister() &&
511 AliasesAvailableScratchRegister(operand.GetShiftRegister()));
512 }
513
514 bool AliasesAvailableScratchRegister(const NeonOperand& operand) {
515 if (operand.IsImmediate()) return false;
516 return AliasesAvailableScratchRegister(operand.GetRegister());
517 }
518
519 bool AliasesAvailableScratchRegister(SRegisterList list) {
520 for (int n = 0; n < list.GetLength(); n++) {
521 if (AliasesAvailableScratchRegister(list.GetSRegister(n))) return true;
522 }
523 return false;
524 }
525
526 bool AliasesAvailableScratchRegister(DRegisterList list) {
527 for (int n = 0; n < list.GetLength(); n++) {
528 if (AliasesAvailableScratchRegister(list.GetDRegister(n))) return true;
529 }
530 return false;
531 }
532
533 bool AliasesAvailableScratchRegister(NeonRegisterList list) {
534 for (int n = 0; n < list.GetLength(); n++) {
535 if (AliasesAvailableScratchRegister(list.GetDRegister(n))) return true;
536 }
537 return false;
538 }
539
540 bool AliasesAvailableScratchRegister(RegisterList list) {
541 return GetScratchRegisterList()->Overlaps(list);
542 }
543
544 bool AliasesAvailableScratchRegister(const MemOperand& operand) {
545 return AliasesAvailableScratchRegister(operand.GetBaseRegister()) ||
546 (operand.IsShiftedRegister() &&
547 AliasesAvailableScratchRegister(operand.GetOffsetRegister()));
548 }
549
Pierre Langlois25e39872016-10-20 17:14:21 +0100550 // Adr with a literal already constructed. Add the literal to the pool if it
551 // is not already done.
552 void Adr(Condition cond, Register rd, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000553 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
554 VIXL_ASSERT(allow_macro_instructions_);
555 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000556 MacroEmissionCheckScope::PoolPolicy pool_policy =
557 MacroEmissionCheckScope::kBlockPools;
558 if (!literal->IsBound()) {
559 const ReferenceInfo* info;
560 bool can_encode = adr_info(cond, Best, rd, literal, &info);
561 VIXL_CHECK(can_encode);
562 CheckEmitPoolForInstruction(info, literal, &cond);
563 // We have already checked for pool emission.
564 pool_policy = MacroEmissionCheckScope::kIgnorePools;
565 }
566 MacroEmissionCheckScope guard(this, pool_policy);
567 ITScope it_scope(this, &cond, guard);
568 adr(cond, Best, rd, literal);
569 RegisterLiteralReference(literal);
Pierre Langlois25e39872016-10-20 17:14:21 +0100570 }
571 void Adr(Register rd, RawLiteral* literal) { Adr(al, rd, literal); }
572
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700573 // Loads with literals already constructed. Add the literal to the pool
574 // if it is not already done.
575 void Ldr(Condition cond, Register rt, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000576 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
577 VIXL_ASSERT(allow_macro_instructions_);
578 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000579 MacroEmissionCheckScope::PoolPolicy pool_policy =
580 MacroEmissionCheckScope::kBlockPools;
581 if (!literal->IsBound()) {
582 const ReferenceInfo* info;
583 bool can_encode = ldr_info(cond, Best, rt, literal, &info);
584 VIXL_CHECK(can_encode);
585 CheckEmitPoolForInstruction(info, literal, &cond);
586 // We have already checked for pool emission.
587 pool_policy = MacroEmissionCheckScope::kIgnorePools;
588 }
589 MacroEmissionCheckScope guard(this, pool_policy);
590 ITScope it_scope(this, &cond, guard);
591 ldr(cond, rt, literal);
592 RegisterLiteralReference(literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700593 }
594 void Ldr(Register rt, RawLiteral* literal) { Ldr(al, rt, literal); }
595
596 void Ldrb(Condition cond, Register rt, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000597 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
598 VIXL_ASSERT(allow_macro_instructions_);
599 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000600 MacroEmissionCheckScope::PoolPolicy pool_policy =
601 MacroEmissionCheckScope::kBlockPools;
602 if (!literal->IsBound()) {
603 const ReferenceInfo* info;
604 bool can_encode = ldrb_info(cond, rt, literal, &info);
605 VIXL_CHECK(can_encode);
606 CheckEmitPoolForInstruction(info, literal, &cond);
607 // We have already checked for pool emission.
608 pool_policy = MacroEmissionCheckScope::kIgnorePools;
609 }
610 MacroEmissionCheckScope guard(this, pool_policy);
611 ITScope it_scope(this, &cond, guard);
612 ldrb(cond, rt, literal);
613 RegisterLiteralReference(literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700614 }
615 void Ldrb(Register rt, RawLiteral* literal) { Ldrb(al, rt, literal); }
616
617 void Ldrd(Condition cond, Register rt, Register rt2, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000618 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
619 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
620 VIXL_ASSERT(allow_macro_instructions_);
621 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000622 MacroEmissionCheckScope::PoolPolicy pool_policy =
623 MacroEmissionCheckScope::kBlockPools;
624 if (!literal->IsBound()) {
625 const ReferenceInfo* info;
626 bool can_encode = ldrd_info(cond, rt, rt2, literal, &info);
627 VIXL_CHECK(can_encode);
628 CheckEmitPoolForInstruction(info, literal, &cond);
629 // We have already checked for pool emission.
630 pool_policy = MacroEmissionCheckScope::kIgnorePools;
631 }
632 MacroEmissionCheckScope guard(this, pool_policy);
633 ITScope it_scope(this, &cond, guard);
634 ldrd(cond, rt, rt2, literal);
635 RegisterLiteralReference(literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700636 }
637 void Ldrd(Register rt, Register rt2, RawLiteral* literal) {
638 Ldrd(al, rt, rt2, literal);
639 }
640
641 void Ldrh(Condition cond, Register rt, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000642 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
643 VIXL_ASSERT(allow_macro_instructions_);
644 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000645 MacroEmissionCheckScope::PoolPolicy pool_policy =
646 MacroEmissionCheckScope::kBlockPools;
647 if (!literal->IsBound()) {
648 const ReferenceInfo* info;
649 bool can_encode = ldrh_info(cond, rt, literal, &info);
650 VIXL_CHECK(can_encode);
651 CheckEmitPoolForInstruction(info, literal, &cond);
652 // We have already checked for pool emission.
653 pool_policy = MacroEmissionCheckScope::kIgnorePools;
654 }
655 MacroEmissionCheckScope guard(this, pool_policy);
656 ITScope it_scope(this, &cond, guard);
657 ldrh(cond, rt, literal);
658 RegisterLiteralReference(literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700659 }
660 void Ldrh(Register rt, RawLiteral* literal) { Ldrh(al, rt, literal); }
661
662 void Ldrsb(Condition cond, Register rt, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000663 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
664 VIXL_ASSERT(allow_macro_instructions_);
665 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000666 MacroEmissionCheckScope::PoolPolicy pool_policy =
667 MacroEmissionCheckScope::kBlockPools;
668 if (!literal->IsBound()) {
669 const ReferenceInfo* info;
670 bool can_encode = ldrsb_info(cond, rt, literal, &info);
671 VIXL_CHECK(can_encode);
672 CheckEmitPoolForInstruction(info, literal, &cond);
673 // We have already checked for pool emission.
674 pool_policy = MacroEmissionCheckScope::kIgnorePools;
675 }
676 MacroEmissionCheckScope guard(this, pool_policy);
677 ITScope it_scope(this, &cond, guard);
678 ldrsb(cond, rt, literal);
679 RegisterLiteralReference(literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700680 }
681 void Ldrsb(Register rt, RawLiteral* literal) { Ldrsb(al, rt, literal); }
682
683 void Ldrsh(Condition cond, Register rt, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000684 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
685 VIXL_ASSERT(allow_macro_instructions_);
686 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000687 MacroEmissionCheckScope::PoolPolicy pool_policy =
688 MacroEmissionCheckScope::kBlockPools;
689 if (!literal->IsBound()) {
690 const ReferenceInfo* info;
691 bool can_encode = ldrsh_info(cond, rt, literal, &info);
692 VIXL_CHECK(can_encode);
693 CheckEmitPoolForInstruction(info, literal, &cond);
694 // We have already checked for pool emission.
695 pool_policy = MacroEmissionCheckScope::kIgnorePools;
696 }
697 MacroEmissionCheckScope guard(this, pool_policy);
698 ITScope it_scope(this, &cond, guard);
699 ldrsh(cond, rt, literal);
700 RegisterLiteralReference(literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700701 }
702 void Ldrsh(Register rt, RawLiteral* literal) { Ldrsh(al, rt, literal); }
703
704 void Vldr(Condition cond, DataType dt, DRegister rd, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000705 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
706 VIXL_ASSERT(allow_macro_instructions_);
707 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000708 MacroEmissionCheckScope::PoolPolicy pool_policy =
709 MacroEmissionCheckScope::kBlockPools;
710 if (!literal->IsBound()) {
711 const ReferenceInfo* info;
712 bool can_encode = vldr_info(cond, dt, rd, literal, &info);
713 VIXL_CHECK(can_encode);
714 CheckEmitPoolForInstruction(info, literal, &cond);
715 // We have already checked for pool emission.
716 pool_policy = MacroEmissionCheckScope::kIgnorePools;
717 }
718 MacroEmissionCheckScope guard(this, pool_policy);
719 ITScope it_scope(this, &cond, guard);
720 vldr(cond, dt, rd, literal);
721 RegisterLiteralReference(literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700722 }
723 void Vldr(DataType dt, DRegister rd, RawLiteral* literal) {
724 Vldr(al, dt, rd, literal);
725 }
726 void Vldr(Condition cond, DRegister rd, RawLiteral* literal) {
727 Vldr(cond, Untyped64, rd, literal);
728 }
729 void Vldr(DRegister rd, RawLiteral* literal) {
730 Vldr(al, Untyped64, rd, literal);
731 }
732
733 void Vldr(Condition cond, DataType dt, SRegister rd, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000734 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
735 VIXL_ASSERT(allow_macro_instructions_);
736 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000737 MacroEmissionCheckScope::PoolPolicy pool_policy =
738 MacroEmissionCheckScope::kBlockPools;
739 if (!literal->IsBound()) {
740 const ReferenceInfo* info;
741 bool can_encode = vldr_info(cond, dt, rd, literal, &info);
742 VIXL_CHECK(can_encode);
743 CheckEmitPoolForInstruction(info, literal, &cond);
744 // We have already checked for pool emission.
745 pool_policy = MacroEmissionCheckScope::kIgnorePools;
746 }
747 MacroEmissionCheckScope guard(this, pool_policy);
748 ITScope it_scope(this, &cond, guard);
749 vldr(cond, dt, rd, literal);
750 RegisterLiteralReference(literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700751 }
752 void Vldr(DataType dt, SRegister rd, RawLiteral* literal) {
753 Vldr(al, dt, rd, literal);
754 }
755 void Vldr(Condition cond, SRegister rd, RawLiteral* literal) {
756 Vldr(cond, Untyped32, rd, literal);
757 }
758 void Vldr(SRegister rd, RawLiteral* literal) {
759 Vldr(al, Untyped32, rd, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100760 }
761
762 // Generic Ldr(register, data)
763 void Ldr(Condition cond, Register rt, uint32_t v) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000764 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
765 VIXL_ASSERT(allow_macro_instructions_);
766 VIXL_ASSERT(OutsideITBlock());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100767 RawLiteral* literal =
768 new Literal<uint32_t>(v, RawLiteral::kDeletedOnPlacementByPool);
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000769 Ldr(cond, rt, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100770 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100771 template <typename T>
772 void Ldr(Register rt, T v) {
773 Ldr(al, rt, v);
774 }
775
776 // Generic Ldrd(rt, rt2, data)
777 void Ldrd(Condition cond, Register rt, Register rt2, uint64_t v) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000778 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
779 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
780 VIXL_ASSERT(allow_macro_instructions_);
781 VIXL_ASSERT(OutsideITBlock());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100782 RawLiteral* literal =
783 new Literal<uint64_t>(v, RawLiteral::kDeletedOnPlacementByPool);
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000784 Ldrd(cond, rt, rt2, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100785 }
786 template <typename T>
787 void Ldrd(Register rt, Register rt2, T v) {
788 Ldrd(al, rt, rt2, v);
789 }
790
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700791 void Vldr(Condition cond, SRegister rd, float v) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000792 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
793 VIXL_ASSERT(allow_macro_instructions_);
794 VIXL_ASSERT(OutsideITBlock());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100795 RawLiteral* literal =
796 new Literal<float>(v, RawLiteral::kDeletedOnPlacementByPool);
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000797 Vldr(cond, rd, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100798 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700799 void Vldr(SRegister rd, float v) { Vldr(al, rd, v); }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100800
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700801 void Vldr(Condition cond, DRegister rd, double v) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000802 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
803 VIXL_ASSERT(allow_macro_instructions_);
804 VIXL_ASSERT(OutsideITBlock());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100805 RawLiteral* literal =
806 new Literal<double>(v, RawLiteral::kDeletedOnPlacementByPool);
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000807 Vldr(cond, rd, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100808 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700809 void Vldr(DRegister rd, double v) { Vldr(al, rd, v); }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100810
811 void Vmov(Condition cond, DRegister rt, double v) { Vmov(cond, F64, rt, v); }
812 void Vmov(DRegister rt, double v) { Vmov(al, F64, rt, v); }
813 void Vmov(Condition cond, SRegister rt, float v) { Vmov(cond, F32, rt, v); }
814 void Vmov(SRegister rt, float v) { Vmov(al, F32, rt, v); }
815
Alexandre Ramesad91cee2016-07-26 09:31:34 +0100816 // Claim memory on the stack.
817 // Note that the Claim, Drop, and Peek helpers below ensure that offsets used
818 // are multiples of 32 bits to help maintain 32-bit SP alignment.
819 // We could `Align{Up,Down}(size, 4)`, but that's potentially problematic:
Alexandre Ramesd3832962016-07-04 15:03:43 +0100820 // Claim(3)
821 // Claim(1)
822 // Drop(4)
823 // would seem correct, when in fact:
824 // Claim(3) -> sp = sp - 4
Alexandre Ramesad91cee2016-07-26 09:31:34 +0100825 // Claim(1) -> sp = sp - 4
Alexandre Ramesd3832962016-07-04 15:03:43 +0100826 // Drop(4) -> sp = sp + 4
827 //
828 void Claim(int32_t size) {
829 if (size == 0) return;
830 // The stack must be kept 32bit aligned.
831 VIXL_ASSERT((size > 0) && ((size % 4) == 0));
832 Sub(sp, sp, size);
833 }
834 // Release memory on the stack
835 void Drop(int32_t size) {
836 if (size == 0) return;
837 // The stack must be kept 32bit aligned.
838 VIXL_ASSERT((size > 0) && ((size % 4) == 0));
839 Add(sp, sp, size);
840 }
841 void Peek(Register dst, int32_t offset) {
842 VIXL_ASSERT((offset >= 0) && ((offset % 4) == 0));
843 Ldr(dst, MemOperand(sp, offset));
844 }
845 void Poke(Register src, int32_t offset) {
846 VIXL_ASSERT((offset >= 0) && ((offset % 4) == 0));
847 Str(src, MemOperand(sp, offset));
848 }
849 void Printf(const char* format,
850 CPURegister reg1 = NoReg,
851 CPURegister reg2 = NoReg,
852 CPURegister reg3 = NoReg,
853 CPURegister reg4 = NoReg);
854 // Functions used by Printf for generation.
855 void PushRegister(CPURegister reg);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100856 void PreparePrintfArgument(CPURegister reg,
857 int* core_count,
858 int* vfp_count,
859 uint32_t* printf_type);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100860 // Handlers for cases not handled by the assembler.
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800861 // ADD, MOVT, MOVW, SUB, SXTB16, TEQ, UXTB16
Alexandre Ramesd3832962016-07-04 15:03:43 +0100862 virtual void Delegate(InstructionType type,
863 InstructionCondROp instruction,
864 Condition cond,
865 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000866 const Operand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800867 // CMN, CMP, MOV, MOVS, MVN, MVNS, SXTB, SXTH, TST, UXTB, UXTH
Alexandre Ramesd3832962016-07-04 15:03:43 +0100868 virtual void Delegate(InstructionType type,
869 InstructionCondSizeROp instruction,
870 Condition cond,
871 EncodingSize size,
872 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000873 const Operand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800874 // ADDW, ORN, ORNS, PKHBT, PKHTB, RSC, RSCS, SUBW, SXTAB, SXTAB16, SXTAH,
875 // UXTAB, UXTAB16, UXTAH
Alexandre Ramesd3832962016-07-04 15:03:43 +0100876 virtual void Delegate(InstructionType type,
877 InstructionCondRROp instruction,
878 Condition cond,
879 Register rd,
880 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000881 const Operand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800882 // ADC, ADCS, ADD, ADDS, AND, ANDS, ASR, ASRS, BIC, BICS, EOR, EORS, LSL,
883 // LSLS, LSR, LSRS, ORR, ORRS, ROR, RORS, RSB, RSBS, SBC, SBCS, SUB, SUBS
Alexandre Ramesd3832962016-07-04 15:03:43 +0100884 virtual void Delegate(InstructionType type,
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000885 InstructionCondSizeRL instruction,
886 Condition cond,
887 EncodingSize size,
888 Register rd,
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100889 Location* location) VIXL_OVERRIDE;
Vincent Belliard80b4a1f2016-12-14 08:16:21 -0800890 bool GenerateSplitInstruction(InstructionCondSizeRROp instruction,
891 Condition cond,
892 Register rd,
893 Register rn,
894 uint32_t imm,
895 uint32_t mask);
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000896 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100897 InstructionCondSizeRROp instruction,
898 Condition cond,
899 EncodingSize size,
900 Register rd,
901 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000902 const Operand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800903 // CBNZ, CBZ
Alexandre Ramesd3832962016-07-04 15:03:43 +0100904 virtual void Delegate(InstructionType type,
905 InstructionRL instruction,
906 Register rn,
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100907 Location* location) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800908 // VMOV
Alexandre Ramesd3832962016-07-04 15:03:43 +0100909 virtual void Delegate(InstructionType type,
910 InstructionCondDtSSop instruction,
911 Condition cond,
912 DataType dt,
913 SRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000914 const SOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800915 // VMOV, VMVN
Alexandre Ramesd3832962016-07-04 15:03:43 +0100916 virtual void Delegate(InstructionType type,
917 InstructionCondDtDDop instruction,
918 Condition cond,
919 DataType dt,
920 DRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000921 const DOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800922 // VMOV, VMVN
Alexandre Ramesd3832962016-07-04 15:03:43 +0100923 virtual void Delegate(InstructionType type,
924 InstructionCondDtQQop instruction,
925 Condition cond,
926 DataType dt,
927 QRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000928 const QOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800929 // LDR, LDRB, LDRH, LDRSB, LDRSH, STR, STRB, STRH
Alexandre Ramesd3832962016-07-04 15:03:43 +0100930 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100931 InstructionCondSizeRMop instruction,
932 Condition cond,
933 EncodingSize size,
934 Register rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000935 const MemOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800936 // LDAEXD, LDRD, LDREXD, STLEX, STLEXB, STLEXH, STRD, STREX, STREXB, STREXH
Alexandre Ramesd3832962016-07-04 15:03:43 +0100937 virtual void Delegate(InstructionType type,
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000938 InstructionCondRL instruction,
939 Condition cond,
940 Register rt,
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100941 Location* location) VIXL_OVERRIDE;
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000942 virtual void Delegate(InstructionType type,
943 InstructionCondRRL instruction,
944 Condition cond,
945 Register rt,
946 Register rt2,
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100947 Location* location) VIXL_OVERRIDE;
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000948 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100949 InstructionCondRRMop instruction,
950 Condition cond,
951 Register rt,
952 Register rt2,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000953 const MemOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800954 // VLDR, VSTR
Alexandre Ramesd3832962016-07-04 15:03:43 +0100955 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100956 InstructionCondDtSMop instruction,
957 Condition cond,
958 DataType dt,
959 SRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000960 const MemOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800961 // VLDR, VSTR
Alexandre Ramesd3832962016-07-04 15:03:43 +0100962 virtual void Delegate(InstructionType type,
963 InstructionCondDtDMop instruction,
964 Condition cond,
965 DataType dt,
966 DRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000967 const MemOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800968 // MSR
Alexandre Ramesd3832962016-07-04 15:03:43 +0100969 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100970 InstructionCondMsrOp instruction,
971 Condition cond,
972 MaskedSpecialRegister spec_reg,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000973 const Operand& operand) VIXL_OVERRIDE;
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000974 virtual void Delegate(InstructionType type,
975 InstructionCondDtDL instruction,
976 Condition cond,
977 DataType dt,
978 DRegister rd,
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100979 Location* location) VIXL_OVERRIDE;
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000980 virtual void Delegate(InstructionType type,
981 InstructionCondDtSL instruction,
982 Condition cond,
983 DataType dt,
984 SRegister rd,
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100985 Location* location) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100986
987 // Start of generated code.
988
989 void Adc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000990 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
991 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
992 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +0100993 VIXL_ASSERT(allow_macro_instructions_);
994 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000995 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100996 bool can_use_it =
997 // ADC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
998 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) &&
999 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001000 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001001 adc(cond, rd, rn, operand);
1002 }
1003 void Adc(Register rd, Register rn, const Operand& operand) {
1004 Adc(al, rd, rn, operand);
1005 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001006 void Adc(FlagsUpdate flags,
1007 Condition cond,
1008 Register rd,
1009 Register rn,
1010 const Operand& operand) {
1011 switch (flags) {
1012 case LeaveFlags:
1013 Adc(cond, rd, rn, operand);
1014 break;
1015 case SetFlags:
1016 Adcs(cond, rd, rn, operand);
1017 break;
1018 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001019 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1020 rn.Is(rd) && operand.IsPlainRegister() &&
1021 operand.GetBaseRegister().IsLow();
1022 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001023 Adcs(cond, rd, rn, operand);
1024 } else {
1025 Adc(cond, rd, rn, operand);
1026 }
1027 break;
1028 }
1029 }
1030 void Adc(FlagsUpdate flags,
1031 Register rd,
1032 Register rn,
1033 const Operand& operand) {
1034 Adc(flags, al, rd, rn, operand);
1035 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001036
1037 void Adcs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001038 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1039 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1040 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001041 VIXL_ASSERT(allow_macro_instructions_);
1042 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001043 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001044 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001045 adcs(cond, rd, rn, operand);
1046 }
1047 void Adcs(Register rd, Register rn, const Operand& operand) {
1048 Adcs(al, rd, rn, operand);
1049 }
1050
1051 void Add(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001052 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1053 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1054 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001055 VIXL_ASSERT(allow_macro_instructions_);
1056 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001057 MacroEmissionCheckScope guard(this);
Alexandre Rames628c5262016-09-21 11:52:30 +01001058 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
1059 uint32_t immediate = operand.GetImmediate();
1060 if (immediate == 0) {
1061 return;
1062 }
1063 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001064 bool can_use_it =
1065 // ADD<c>{<q>} <Rd>, <Rn>, #<imm3> ; T1
1066 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() &&
1067 rd.IsLow()) ||
1068 // ADD<c>{<q>} {<Rdn>,} <Rdn>, #<imm8> ; T2
1069 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
1070 rd.IsLow() && rn.Is(rd)) ||
1071 // ADD{<c>}{<q>} <Rd>, SP, #<imm8> ; T1
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001072 (operand.IsImmediate() && (operand.GetImmediate() <= 1020) &&
Alexandre Ramesd3832962016-07-04 15:03:43 +01001073 ((operand.GetImmediate() & 0x3) == 0) && rd.IsLow() && rn.IsSP()) ||
1074 // ADD<c>{<q>} <Rd>, <Rn>, <Rm>
1075 (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
1076 operand.GetBaseRegister().IsLow()) ||
1077 // ADD<c>{<q>} <Rdn>, <Rm> ; T2
1078 (operand.IsPlainRegister() && !rd.IsPC() && rn.Is(rd) &&
1079 !operand.GetBaseRegister().IsSP() &&
1080 !operand.GetBaseRegister().IsPC()) ||
1081 // ADD{<c>}{<q>} {<Rdm>,} SP, <Rdm> ; T1
1082 (operand.IsPlainRegister() && !rd.IsPC() && rn.IsSP() &&
1083 operand.GetBaseRegister().Is(rd));
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001084 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001085 add(cond, rd, rn, operand);
1086 }
1087 void Add(Register rd, Register rn, const Operand& operand) {
1088 Add(al, rd, rn, operand);
1089 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001090 void Add(FlagsUpdate flags,
1091 Condition cond,
1092 Register rd,
1093 Register rn,
1094 const Operand& operand) {
1095 switch (flags) {
1096 case LeaveFlags:
1097 Add(cond, rd, rn, operand);
1098 break;
1099 case SetFlags:
1100 Adds(cond, rd, rn, operand);
1101 break;
1102 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001103 bool setflags_is_smaller =
Vincent Belliard934696d2016-08-18 11:03:56 -07001104 IsUsingT32() && cond.Is(al) &&
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001105 ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
Georgia Kouveli1091d742016-12-16 16:30:39 +00001106 !rd.Is(rn) && operand.GetBaseRegister().IsLow()) ||
Vincent Belliard934696d2016-08-18 11:03:56 -07001107 (operand.IsImmediate() &&
1108 ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) ||
1109 (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256)))));
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001110 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001111 Adds(cond, rd, rn, operand);
1112 } else {
Georgia Kouvelidd8e4912016-12-12 16:42:30 +00001113 bool changed_op_is_smaller =
1114 operand.IsImmediate() && (operand.GetSignedImmediate() < 0) &&
1115 ((rd.IsLow() && rn.IsLow() &&
1116 (operand.GetSignedImmediate() >= -7)) ||
1117 (rd.IsLow() && rn.Is(rd) &&
1118 (operand.GetSignedImmediate() >= -255)));
1119 if (changed_op_is_smaller) {
1120 Subs(cond, rd, rn, -operand.GetSignedImmediate());
1121 } else {
1122 Add(cond, rd, rn, operand);
1123 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001124 }
1125 break;
1126 }
1127 }
1128 void Add(FlagsUpdate flags,
1129 Register rd,
1130 Register rn,
1131 const Operand& operand) {
1132 Add(flags, al, rd, rn, operand);
1133 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001134
1135 void Adds(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001136 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1137 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1138 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001139 VIXL_ASSERT(allow_macro_instructions_);
1140 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001141 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001142 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001143 adds(cond, rd, rn, operand);
1144 }
1145 void Adds(Register rd, Register rn, const Operand& operand) {
1146 Adds(al, rd, rn, operand);
1147 }
1148
Alexandre Ramesd3832962016-07-04 15:03:43 +01001149 void And(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001150 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1151 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1152 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001153 VIXL_ASSERT(allow_macro_instructions_);
1154 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001155 MacroEmissionCheckScope guard(this);
Vincent Belliarda576eb92016-12-13 14:38:55 -08001156 if (rd.Is(rn) && operand.IsPlainRegister() &&
1157 rd.Is(operand.GetBaseRegister())) {
1158 return;
1159 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001160 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001161 uint32_t immediate = operand.GetImmediate();
1162 if (immediate == 0) {
1163 mov(rd, 0);
1164 return;
1165 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001166 if ((immediate == 0xffffffff) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001167 return;
1168 }
1169 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001170 bool can_use_it =
1171 // AND<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1172 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1173 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001174 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001175 and_(cond, rd, rn, operand);
1176 }
1177 void And(Register rd, Register rn, const Operand& operand) {
1178 And(al, rd, rn, operand);
1179 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001180 void And(FlagsUpdate flags,
1181 Condition cond,
1182 Register rd,
1183 Register rn,
1184 const Operand& operand) {
1185 switch (flags) {
1186 case LeaveFlags:
1187 And(cond, rd, rn, operand);
1188 break;
1189 case SetFlags:
1190 Ands(cond, rd, rn, operand);
1191 break;
1192 case DontCare:
Vincent Belliarda576eb92016-12-13 14:38:55 -08001193 if (operand.IsPlainRegister() && rd.Is(rn) &&
1194 rd.Is(operand.GetBaseRegister())) {
1195 return;
1196 }
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001197 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1198 rn.Is(rd) && operand.IsPlainRegister() &&
1199 operand.GetBaseRegister().IsLow();
1200 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001201 Ands(cond, rd, rn, operand);
1202 } else {
1203 And(cond, rd, rn, operand);
1204 }
1205 break;
1206 }
1207 }
1208 void And(FlagsUpdate flags,
1209 Register rd,
1210 Register rn,
1211 const Operand& operand) {
1212 And(flags, al, rd, rn, operand);
1213 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001214
1215 void Ands(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001216 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1217 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1218 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001219 VIXL_ASSERT(allow_macro_instructions_);
1220 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001221 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001222 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001223 ands(cond, rd, rn, operand);
1224 }
1225 void Ands(Register rd, Register rn, const Operand& operand) {
1226 Ands(al, rd, rn, operand);
1227 }
1228
1229 void Asr(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001230 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1231 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
1232 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001233 VIXL_ASSERT(allow_macro_instructions_);
1234 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001235 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001236 bool can_use_it =
1237 // ASR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
1238 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
1239 (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) ||
1240 // ASR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
1241 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
1242 operand.GetBaseRegister().IsLow());
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001243 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001244 asr(cond, rd, rm, operand);
1245 }
1246 void Asr(Register rd, Register rm, const Operand& operand) {
1247 Asr(al, rd, rm, operand);
1248 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001249 void Asr(FlagsUpdate flags,
1250 Condition cond,
1251 Register rd,
1252 Register rm,
1253 const Operand& operand) {
1254 switch (flags) {
1255 case LeaveFlags:
1256 Asr(cond, rd, rm, operand);
1257 break;
1258 case SetFlags:
1259 Asrs(cond, rd, rm, operand);
1260 break;
1261 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001262 bool setflags_is_smaller =
1263 IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() &&
1264 ((operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
1265 (operand.GetImmediate() <= 32)) ||
1266 (operand.IsPlainRegister() && rd.Is(rm)));
1267 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001268 Asrs(cond, rd, rm, operand);
1269 } else {
1270 Asr(cond, rd, rm, operand);
1271 }
1272 break;
1273 }
1274 }
1275 void Asr(FlagsUpdate flags,
1276 Register rd,
1277 Register rm,
1278 const Operand& operand) {
1279 Asr(flags, al, rd, rm, operand);
1280 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001281
1282 void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001283 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1284 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
1285 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001286 VIXL_ASSERT(allow_macro_instructions_);
1287 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001288 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001289 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001290 asrs(cond, rd, rm, operand);
1291 }
1292 void Asrs(Register rd, Register rm, const Operand& operand) {
1293 Asrs(al, rd, rm, operand);
1294 }
1295
Vincent Belliard4a30c5d2016-12-08 09:23:42 -08001296 void B(Condition cond, Label* label, BranchHint hint = kBranchWithoutHint) {
Alexandre Ramesd3832962016-07-04 15:03:43 +01001297 VIXL_ASSERT(allow_macro_instructions_);
1298 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001299 EncodingSize size = Best;
1300 MacroEmissionCheckScope::PoolPolicy pool_policy =
1301 MacroEmissionCheckScope::kBlockPools;
1302 if (!label->IsBound()) {
1303 if (hint == kNear) size = Narrow;
1304 const ReferenceInfo* info;
1305 bool can_encode = b_info(cond, size, label, &info);
1306 VIXL_CHECK(can_encode);
1307 CheckEmitPoolForInstruction(info, label, &cond);
1308 // We have already checked for pool emission.
1309 pool_policy = MacroEmissionCheckScope::kIgnorePools;
Vincent Belliard4a30c5d2016-12-08 09:23:42 -08001310 }
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001311 MacroEmissionCheckScope guard(this, pool_policy);
1312 b(cond, size, label);
1313 RegisterForwardReference(label);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001314 }
Vincent Belliard4a30c5d2016-12-08 09:23:42 -08001315 void B(Label* label, BranchHint hint = kBranchWithoutHint) {
1316 B(al, label, hint);
1317 }
1318 void BPreferNear(Condition cond, Label* label) { B(cond, label, kNear); }
1319 void BPreferNear(Label* label) { B(al, label, kNear); }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001320
Vincent Belliard609821f2017-02-08 14:17:25 -08001321 void Bfc(Condition cond, Register rd, uint32_t lsb, uint32_t width) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001322 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001323 VIXL_ASSERT(allow_macro_instructions_);
1324 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001325 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001326 ITScope it_scope(this, &cond, guard);
Vincent Belliard609821f2017-02-08 14:17:25 -08001327 bfc(cond, rd, lsb, width);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001328 }
Vincent Belliard609821f2017-02-08 14:17:25 -08001329 void Bfc(Register rd, uint32_t lsb, uint32_t width) {
1330 Bfc(al, rd, lsb, width);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001331 }
1332
Vincent Belliard609821f2017-02-08 14:17:25 -08001333 void Bfi(
1334 Condition cond, Register rd, Register rn, uint32_t lsb, uint32_t width) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001335 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1336 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001337 VIXL_ASSERT(allow_macro_instructions_);
1338 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001339 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001340 ITScope it_scope(this, &cond, guard);
Vincent Belliard609821f2017-02-08 14:17:25 -08001341 bfi(cond, rd, rn, lsb, width);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001342 }
Vincent Belliard609821f2017-02-08 14:17:25 -08001343 void Bfi(Register rd, Register rn, uint32_t lsb, uint32_t width) {
1344 Bfi(al, rd, rn, lsb, width);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001345 }
1346
1347 void Bic(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001348 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1349 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1350 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001351 VIXL_ASSERT(allow_macro_instructions_);
1352 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001353 MacroEmissionCheckScope guard(this);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001354 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001355 uint32_t immediate = operand.GetImmediate();
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001356 if ((immediate == 0) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001357 return;
1358 }
1359 if (immediate == 0xffffffff) {
1360 mov(rd, 0);
1361 return;
1362 }
1363 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001364 bool can_use_it =
1365 // BIC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1366 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1367 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001368 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001369 bic(cond, rd, rn, operand);
1370 }
1371 void Bic(Register rd, Register rn, const Operand& operand) {
1372 Bic(al, rd, rn, operand);
1373 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001374 void Bic(FlagsUpdate flags,
1375 Condition cond,
1376 Register rd,
1377 Register rn,
1378 const Operand& operand) {
1379 switch (flags) {
1380 case LeaveFlags:
1381 Bic(cond, rd, rn, operand);
1382 break;
1383 case SetFlags:
1384 Bics(cond, rd, rn, operand);
1385 break;
1386 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001387 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1388 rn.Is(rd) && operand.IsPlainRegister() &&
1389 operand.GetBaseRegister().IsLow();
1390 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001391 Bics(cond, rd, rn, operand);
1392 } else {
1393 Bic(cond, rd, rn, operand);
1394 }
1395 break;
1396 }
1397 }
1398 void Bic(FlagsUpdate flags,
1399 Register rd,
1400 Register rn,
1401 const Operand& operand) {
1402 Bic(flags, al, rd, rn, operand);
1403 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001404
1405 void Bics(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001406 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1407 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1408 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001409 VIXL_ASSERT(allow_macro_instructions_);
1410 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001411 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001412 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001413 bics(cond, rd, rn, operand);
1414 }
1415 void Bics(Register rd, Register rn, const Operand& operand) {
1416 Bics(al, rd, rn, operand);
1417 }
1418
1419 void Bkpt(Condition cond, uint32_t imm) {
1420 VIXL_ASSERT(allow_macro_instructions_);
1421 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001422 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001423 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001424 bkpt(cond, imm);
1425 }
1426 void Bkpt(uint32_t imm) { Bkpt(al, imm); }
1427
1428 void Bl(Condition cond, Label* label) {
1429 VIXL_ASSERT(allow_macro_instructions_);
1430 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001431 MacroEmissionCheckScope::PoolPolicy pool_policy =
1432 MacroEmissionCheckScope::kBlockPools;
1433 if (!label->IsBound()) {
1434 const ReferenceInfo* info;
1435 bool can_encode = bl_info(cond, label, &info);
1436 VIXL_CHECK(can_encode);
1437 CheckEmitPoolForInstruction(info, label, &cond);
1438 // We have already checked for pool emission.
1439 pool_policy = MacroEmissionCheckScope::kIgnorePools;
1440 }
1441 MacroEmissionCheckScope guard(this, pool_policy);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001442 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001443 bl(cond, label);
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001444 RegisterForwardReference(label);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001445 }
1446 void Bl(Label* label) { Bl(al, label); }
1447
1448 void Blx(Condition cond, Label* label) {
1449 VIXL_ASSERT(allow_macro_instructions_);
1450 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001451 MacroEmissionCheckScope::PoolPolicy pool_policy =
1452 MacroEmissionCheckScope::kBlockPools;
1453 if (!label->IsBound()) {
1454 const ReferenceInfo* info;
1455 bool can_encode = blx_info(cond, label, &info);
1456 VIXL_CHECK(can_encode);
1457 CheckEmitPoolForInstruction(info, label, &cond);
1458 // We have already checked for pool emission.
1459 pool_policy = MacroEmissionCheckScope::kIgnorePools;
1460 }
1461 MacroEmissionCheckScope guard(this, pool_policy);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001462 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001463 blx(cond, label);
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001464 RegisterForwardReference(label);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001465 }
1466 void Blx(Label* label) { Blx(al, label); }
1467
1468 void Blx(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001469 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001470 VIXL_ASSERT(allow_macro_instructions_);
1471 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001472 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001473 bool can_use_it =
1474 // BLX{<c>}{<q>} <Rm> ; T1
1475 !rm.IsPC();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001476 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001477 blx(cond, rm);
1478 }
1479 void Blx(Register rm) { Blx(al, rm); }
1480
1481 void Bx(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001482 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001483 VIXL_ASSERT(allow_macro_instructions_);
1484 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001485 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001486 bool can_use_it =
1487 // BX{<c>}{<q>} <Rm> ; T1
1488 !rm.IsPC();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001489 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001490 bx(cond, rm);
1491 }
1492 void Bx(Register rm) { Bx(al, rm); }
1493
1494 void Bxj(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001495 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001496 VIXL_ASSERT(allow_macro_instructions_);
1497 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001498 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001499 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001500 bxj(cond, rm);
1501 }
1502 void Bxj(Register rm) { Bxj(al, rm); }
1503
1504 void Cbnz(Register rn, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001505 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001506 VIXL_ASSERT(allow_macro_instructions_);
1507 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001508 MacroEmissionCheckScope::PoolPolicy pool_policy =
1509 MacroEmissionCheckScope::kBlockPools;
1510 if (!label->IsBound()) {
1511 const ReferenceInfo* info;
1512 bool can_encode = cbnz_info(rn, label, &info);
1513 VIXL_CHECK(can_encode);
1514 CheckEmitPoolForInstruction(info, label);
1515 // We have already checked for pool emission.
1516 pool_policy = MacroEmissionCheckScope::kIgnorePools;
1517 }
1518 MacroEmissionCheckScope guard(this, pool_policy);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001519 cbnz(rn, label);
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001520 RegisterForwardReference(label);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001521 }
1522
1523 void Cbz(Register rn, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001524 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001525 VIXL_ASSERT(allow_macro_instructions_);
1526 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001527 MacroEmissionCheckScope::PoolPolicy pool_policy =
1528 MacroEmissionCheckScope::kBlockPools;
1529 if (!label->IsBound()) {
1530 const ReferenceInfo* info;
1531 bool can_encode = cbz_info(rn, label, &info);
1532 VIXL_CHECK(can_encode);
1533 CheckEmitPoolForInstruction(info, label);
1534 // We have already checked for pool emission.
1535 pool_policy = MacroEmissionCheckScope::kIgnorePools;
1536 }
1537 MacroEmissionCheckScope guard(this, pool_policy);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001538 cbz(rn, label);
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001539 RegisterForwardReference(label);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001540 }
1541
1542 void Clrex(Condition cond) {
1543 VIXL_ASSERT(allow_macro_instructions_);
1544 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001545 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001546 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001547 clrex(cond);
1548 }
1549 void Clrex() { Clrex(al); }
1550
1551 void Clz(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001552 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1553 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001554 VIXL_ASSERT(allow_macro_instructions_);
1555 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001556 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001557 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001558 clz(cond, rd, rm);
1559 }
1560 void Clz(Register rd, Register rm) { Clz(al, rd, rm); }
1561
1562 void Cmn(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1564 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001565 VIXL_ASSERT(allow_macro_instructions_);
1566 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001567 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001568 bool can_use_it =
1569 // CMN{<c>}{<q>} <Rn>, <Rm> ; T1
1570 operand.IsPlainRegister() && rn.IsLow() &&
1571 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001572 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001573 cmn(cond, rn, operand);
1574 }
1575 void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); }
1576
1577 void Cmp(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001578 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1579 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001580 VIXL_ASSERT(allow_macro_instructions_);
1581 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001582 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001583 bool can_use_it =
1584 // CMP{<c>}{<q>} <Rn>, #<imm8> ; T1
1585 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
1586 rn.IsLow()) ||
1587 // CMP{<c>}{<q>} <Rn>, <Rm> ; T1 T2
1588 (operand.IsPlainRegister() && !rn.IsPC() &&
1589 !operand.GetBaseRegister().IsPC());
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001590 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001591 cmp(cond, rn, operand);
1592 }
1593 void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); }
1594
1595 void Crc32b(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001596 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1597 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1598 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001599 VIXL_ASSERT(allow_macro_instructions_);
1600 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001601 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001602 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001603 crc32b(cond, rd, rn, rm);
1604 }
1605 void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); }
1606
1607 void Crc32cb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001608 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1609 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1610 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001611 VIXL_ASSERT(allow_macro_instructions_);
1612 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001613 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001614 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001615 crc32cb(cond, rd, rn, rm);
1616 }
1617 void Crc32cb(Register rd, Register rn, Register rm) {
1618 Crc32cb(al, rd, rn, rm);
1619 }
1620
1621 void Crc32ch(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001622 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1623 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1624 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001625 VIXL_ASSERT(allow_macro_instructions_);
1626 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001627 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001628 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001629 crc32ch(cond, rd, rn, rm);
1630 }
1631 void Crc32ch(Register rd, Register rn, Register rm) {
1632 Crc32ch(al, rd, rn, rm);
1633 }
1634
1635 void Crc32cw(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001636 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1637 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1638 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001639 VIXL_ASSERT(allow_macro_instructions_);
1640 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001641 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001642 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001643 crc32cw(cond, rd, rn, rm);
1644 }
1645 void Crc32cw(Register rd, Register rn, Register rm) {
1646 Crc32cw(al, rd, rn, rm);
1647 }
1648
1649 void Crc32h(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001650 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1651 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1652 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001653 VIXL_ASSERT(allow_macro_instructions_);
1654 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001655 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001656 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001657 crc32h(cond, rd, rn, rm);
1658 }
1659 void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); }
1660
1661 void Crc32w(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001662 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1663 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1664 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001665 VIXL_ASSERT(allow_macro_instructions_);
1666 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001667 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001668 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001669 crc32w(cond, rd, rn, rm);
1670 }
1671 void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); }
1672
1673 void Dmb(Condition cond, MemoryBarrier option) {
1674 VIXL_ASSERT(allow_macro_instructions_);
1675 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001676 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001677 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001678 dmb(cond, option);
1679 }
1680 void Dmb(MemoryBarrier option) { Dmb(al, option); }
1681
1682 void Dsb(Condition cond, MemoryBarrier option) {
1683 VIXL_ASSERT(allow_macro_instructions_);
1684 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001685 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001686 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001687 dsb(cond, option);
1688 }
1689 void Dsb(MemoryBarrier option) { Dsb(al, option); }
1690
1691 void Eor(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1693 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1694 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001695 VIXL_ASSERT(allow_macro_instructions_);
1696 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001697 MacroEmissionCheckScope guard(this);
Alexandre Rames628c5262016-09-21 11:52:30 +01001698 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
1699 uint32_t immediate = operand.GetImmediate();
1700 if (immediate == 0) {
1701 return;
1702 }
1703 if (immediate == 0xffffffff) {
1704 mvn(rd, rn);
1705 return;
1706 }
1707 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001708 bool can_use_it =
1709 // EOR<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1710 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1711 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001712 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001713 eor(cond, rd, rn, operand);
1714 }
1715 void Eor(Register rd, Register rn, const Operand& operand) {
1716 Eor(al, rd, rn, operand);
1717 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001718 void Eor(FlagsUpdate flags,
1719 Condition cond,
1720 Register rd,
1721 Register rn,
1722 const Operand& operand) {
1723 switch (flags) {
1724 case LeaveFlags:
1725 Eor(cond, rd, rn, operand);
1726 break;
1727 case SetFlags:
1728 Eors(cond, rd, rn, operand);
1729 break;
1730 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001731 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1732 rn.Is(rd) && operand.IsPlainRegister() &&
1733 operand.GetBaseRegister().IsLow();
1734 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001735 Eors(cond, rd, rn, operand);
1736 } else {
1737 Eor(cond, rd, rn, operand);
1738 }
1739 break;
1740 }
1741 }
1742 void Eor(FlagsUpdate flags,
1743 Register rd,
1744 Register rn,
1745 const Operand& operand) {
1746 Eor(flags, al, rd, rn, operand);
1747 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001748
1749 void Eors(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001750 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1751 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1752 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001753 VIXL_ASSERT(allow_macro_instructions_);
1754 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001755 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001756 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001757 eors(cond, rd, rn, operand);
1758 }
1759 void Eors(Register rd, Register rn, const Operand& operand) {
1760 Eors(al, rd, rn, operand);
1761 }
1762
1763 void Fldmdbx(Condition cond,
1764 Register rn,
1765 WriteBack write_back,
1766 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001767 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1768 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001769 VIXL_ASSERT(allow_macro_instructions_);
1770 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001771 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001772 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001773 fldmdbx(cond, rn, write_back, dreglist);
1774 }
1775 void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) {
1776 Fldmdbx(al, rn, write_back, dreglist);
1777 }
1778
1779 void Fldmiax(Condition cond,
1780 Register rn,
1781 WriteBack write_back,
1782 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001783 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1784 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001785 VIXL_ASSERT(allow_macro_instructions_);
1786 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001787 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001788 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001789 fldmiax(cond, rn, write_back, dreglist);
1790 }
1791 void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) {
1792 Fldmiax(al, rn, write_back, dreglist);
1793 }
1794
1795 void Fstmdbx(Condition cond,
1796 Register rn,
1797 WriteBack write_back,
1798 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001799 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1800 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001801 VIXL_ASSERT(allow_macro_instructions_);
1802 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001803 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001804 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001805 fstmdbx(cond, rn, write_back, dreglist);
1806 }
1807 void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) {
1808 Fstmdbx(al, rn, write_back, dreglist);
1809 }
1810
1811 void Fstmiax(Condition cond,
1812 Register rn,
1813 WriteBack write_back,
1814 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001815 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1816 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001817 VIXL_ASSERT(allow_macro_instructions_);
1818 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001819 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001820 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001821 fstmiax(cond, rn, write_back, dreglist);
1822 }
1823 void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) {
1824 Fstmiax(al, rn, write_back, dreglist);
1825 }
1826
1827 void Hlt(Condition cond, uint32_t imm) {
1828 VIXL_ASSERT(allow_macro_instructions_);
1829 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001830 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001831 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001832 hlt(cond, imm);
1833 }
1834 void Hlt(uint32_t imm) { Hlt(al, imm); }
1835
1836 void Hvc(Condition cond, uint32_t imm) {
1837 VIXL_ASSERT(allow_macro_instructions_);
1838 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001839 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001840 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001841 hvc(cond, imm);
1842 }
1843 void Hvc(uint32_t imm) { Hvc(al, imm); }
1844
1845 void Isb(Condition cond, MemoryBarrier option) {
1846 VIXL_ASSERT(allow_macro_instructions_);
1847 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001848 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001849 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001850 isb(cond, option);
1851 }
1852 void Isb(MemoryBarrier option) { Isb(al, option); }
1853
Alexandre Ramesd3832962016-07-04 15:03:43 +01001854 void Lda(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001855 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1856 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001857 VIXL_ASSERT(allow_macro_instructions_);
1858 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001859 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001860 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001861 lda(cond, rt, operand);
1862 }
1863 void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); }
1864
1865 void Ldab(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001866 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1867 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001868 VIXL_ASSERT(allow_macro_instructions_);
1869 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001870 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001871 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001872 ldab(cond, rt, operand);
1873 }
1874 void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); }
1875
1876 void Ldaex(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001877 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1878 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001879 VIXL_ASSERT(allow_macro_instructions_);
1880 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001881 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001882 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001883 ldaex(cond, rt, operand);
1884 }
1885 void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); }
1886
1887 void Ldaexb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001888 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1889 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001890 VIXL_ASSERT(allow_macro_instructions_);
1891 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001892 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001893 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001894 ldaexb(cond, rt, operand);
1895 }
1896 void Ldaexb(Register rt, const MemOperand& operand) {
1897 Ldaexb(al, rt, operand);
1898 }
1899
1900 void Ldaexd(Condition cond,
1901 Register rt,
1902 Register rt2,
1903 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001904 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1905 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
1906 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001907 VIXL_ASSERT(allow_macro_instructions_);
1908 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001909 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001910 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001911 ldaexd(cond, rt, rt2, operand);
1912 }
1913 void Ldaexd(Register rt, Register rt2, const MemOperand& operand) {
1914 Ldaexd(al, rt, rt2, operand);
1915 }
1916
1917 void Ldaexh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001918 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1919 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001920 VIXL_ASSERT(allow_macro_instructions_);
1921 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001922 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001923 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001924 ldaexh(cond, rt, operand);
1925 }
1926 void Ldaexh(Register rt, const MemOperand& operand) {
1927 Ldaexh(al, rt, operand);
1928 }
1929
1930 void Ldah(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001931 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1932 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001933 VIXL_ASSERT(allow_macro_instructions_);
1934 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001935 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001936 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001937 ldah(cond, rt, operand);
1938 }
1939 void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); }
1940
1941 void Ldm(Condition cond,
1942 Register rn,
1943 WriteBack write_back,
1944 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001945 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1946 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001947 VIXL_ASSERT(allow_macro_instructions_);
1948 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001949 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001950 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001951 ldm(cond, rn, write_back, registers);
1952 }
1953 void Ldm(Register rn, WriteBack write_back, RegisterList registers) {
1954 Ldm(al, rn, write_back, registers);
1955 }
1956
1957 void Ldmda(Condition cond,
1958 Register rn,
1959 WriteBack write_back,
1960 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001961 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1962 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001963 VIXL_ASSERT(allow_macro_instructions_);
1964 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001965 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001966 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001967 ldmda(cond, rn, write_back, registers);
1968 }
1969 void Ldmda(Register rn, WriteBack write_back, RegisterList registers) {
1970 Ldmda(al, rn, write_back, registers);
1971 }
1972
1973 void Ldmdb(Condition cond,
1974 Register rn,
1975 WriteBack write_back,
1976 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001977 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1978 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001979 VIXL_ASSERT(allow_macro_instructions_);
1980 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001981 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001982 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001983 ldmdb(cond, rn, write_back, registers);
1984 }
1985 void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) {
1986 Ldmdb(al, rn, write_back, registers);
1987 }
1988
1989 void Ldmea(Condition cond,
1990 Register rn,
1991 WriteBack write_back,
1992 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001993 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1994 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001995 VIXL_ASSERT(allow_macro_instructions_);
1996 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001997 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001998 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001999 ldmea(cond, rn, write_back, registers);
2000 }
2001 void Ldmea(Register rn, WriteBack write_back, RegisterList registers) {
2002 Ldmea(al, rn, write_back, registers);
2003 }
2004
2005 void Ldmed(Condition cond,
2006 Register rn,
2007 WriteBack write_back,
2008 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002009 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2010 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002011 VIXL_ASSERT(allow_macro_instructions_);
2012 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002013 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002014 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002015 ldmed(cond, rn, write_back, registers);
2016 }
2017 void Ldmed(Register rn, WriteBack write_back, RegisterList registers) {
2018 Ldmed(al, rn, write_back, registers);
2019 }
2020
2021 void Ldmfa(Condition cond,
2022 Register rn,
2023 WriteBack write_back,
2024 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002025 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2026 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002027 VIXL_ASSERT(allow_macro_instructions_);
2028 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002029 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002030 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002031 ldmfa(cond, rn, write_back, registers);
2032 }
2033 void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) {
2034 Ldmfa(al, rn, write_back, registers);
2035 }
2036
2037 void Ldmfd(Condition cond,
2038 Register rn,
2039 WriteBack write_back,
2040 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002041 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2042 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002043 VIXL_ASSERT(allow_macro_instructions_);
2044 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002045 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002046 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002047 ldmfd(cond, rn, write_back, registers);
2048 }
2049 void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) {
2050 Ldmfd(al, rn, write_back, registers);
2051 }
2052
2053 void Ldmib(Condition cond,
2054 Register rn,
2055 WriteBack write_back,
2056 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002057 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2058 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002059 VIXL_ASSERT(allow_macro_instructions_);
2060 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002061 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002062 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002063 ldmib(cond, rn, write_back, registers);
2064 }
2065 void Ldmib(Register rn, WriteBack write_back, RegisterList registers) {
2066 Ldmib(al, rn, write_back, registers);
2067 }
2068
2069 void Ldr(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002070 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2071 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002072 VIXL_ASSERT(allow_macro_instructions_);
2073 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002074 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002075 bool can_use_it =
2076 // LDR{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
2077 (operand.IsImmediate() && rt.IsLow() &&
2078 operand.GetBaseRegister().IsLow() &&
2079 operand.IsOffsetImmediateWithinRange(0, 124, 4) &&
2080 (operand.GetAddrMode() == Offset)) ||
2081 // LDR{<c>}{<q>} <Rt>, [SP{, #{+}<imm>}] ; T2
2082 (operand.IsImmediate() && rt.IsLow() &&
2083 operand.GetBaseRegister().IsSP() &&
2084 operand.IsOffsetImmediateWithinRange(0, 1020, 4) &&
2085 (operand.GetAddrMode() == Offset)) ||
2086 // LDR{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2087 (operand.IsPlainRegister() && rt.IsLow() &&
2088 operand.GetBaseRegister().IsLow() &&
2089 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2090 (operand.GetAddrMode() == Offset));
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002091 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002092 ldr(cond, rt, operand);
2093 }
2094 void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); }
2095
Alexandre Ramesd3832962016-07-04 15:03:43 +01002096
2097 void Ldrb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002098 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2099 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002100 VIXL_ASSERT(allow_macro_instructions_);
2101 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002102 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002103 bool can_use_it =
2104 // LDRB{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
2105 (operand.IsImmediate() && rt.IsLow() &&
2106 operand.GetBaseRegister().IsLow() &&
2107 operand.IsOffsetImmediateWithinRange(0, 31) &&
2108 (operand.GetAddrMode() == Offset)) ||
2109 // LDRB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2110 (operand.IsPlainRegister() && rt.IsLow() &&
2111 operand.GetBaseRegister().IsLow() &&
2112 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2113 (operand.GetAddrMode() == Offset));
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002114 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002115 ldrb(cond, rt, operand);
2116 }
2117 void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); }
2118
Alexandre Ramesd3832962016-07-04 15:03:43 +01002119
2120 void Ldrd(Condition cond,
2121 Register rt,
2122 Register rt2,
2123 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002124 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2125 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
2126 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002127 VIXL_ASSERT(allow_macro_instructions_);
2128 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002129 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002130 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002131 ldrd(cond, rt, rt2, operand);
2132 }
2133 void Ldrd(Register rt, Register rt2, const MemOperand& operand) {
2134 Ldrd(al, rt, rt2, operand);
2135 }
2136
Alexandre Ramesd3832962016-07-04 15:03:43 +01002137
2138 void Ldrex(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002139 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2140 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002141 VIXL_ASSERT(allow_macro_instructions_);
2142 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002143 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002144 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002145 ldrex(cond, rt, operand);
2146 }
2147 void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); }
2148
2149 void Ldrexb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002150 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2151 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002152 VIXL_ASSERT(allow_macro_instructions_);
2153 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002154 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002155 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002156 ldrexb(cond, rt, operand);
2157 }
2158 void Ldrexb(Register rt, const MemOperand& operand) {
2159 Ldrexb(al, rt, operand);
2160 }
2161
2162 void Ldrexd(Condition cond,
2163 Register rt,
2164 Register rt2,
2165 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002166 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2167 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
2168 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002169 VIXL_ASSERT(allow_macro_instructions_);
2170 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002171 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002172 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002173 ldrexd(cond, rt, rt2, operand);
2174 }
2175 void Ldrexd(Register rt, Register rt2, const MemOperand& operand) {
2176 Ldrexd(al, rt, rt2, operand);
2177 }
2178
2179 void Ldrexh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002180 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2181 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002182 VIXL_ASSERT(allow_macro_instructions_);
2183 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002184 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002185 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002186 ldrexh(cond, rt, operand);
2187 }
2188 void Ldrexh(Register rt, const MemOperand& operand) {
2189 Ldrexh(al, rt, operand);
2190 }
2191
2192 void Ldrh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002193 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2194 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002195 VIXL_ASSERT(allow_macro_instructions_);
2196 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002197 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002198 bool can_use_it =
2199 // LDRH{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
2200 (operand.IsImmediate() && rt.IsLow() &&
2201 operand.GetBaseRegister().IsLow() &&
2202 operand.IsOffsetImmediateWithinRange(0, 62, 2) &&
2203 (operand.GetAddrMode() == Offset)) ||
2204 // LDRH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2205 (operand.IsPlainRegister() && rt.IsLow() &&
2206 operand.GetBaseRegister().IsLow() &&
2207 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2208 (operand.GetAddrMode() == Offset));
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002209 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002210 ldrh(cond, rt, operand);
2211 }
2212 void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); }
2213
Alexandre Ramesd3832962016-07-04 15:03:43 +01002214
2215 void Ldrsb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002216 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2217 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002218 VIXL_ASSERT(allow_macro_instructions_);
2219 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002220 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002221 bool can_use_it =
2222 // LDRSB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2223 operand.IsPlainRegister() && rt.IsLow() &&
2224 operand.GetBaseRegister().IsLow() &&
2225 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2226 (operand.GetAddrMode() == Offset);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002227 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002228 ldrsb(cond, rt, operand);
2229 }
2230 void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); }
2231
Alexandre Ramesd3832962016-07-04 15:03:43 +01002232
2233 void Ldrsh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002234 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2235 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002236 VIXL_ASSERT(allow_macro_instructions_);
2237 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002238 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002239 bool can_use_it =
2240 // LDRSH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2241 operand.IsPlainRegister() && rt.IsLow() &&
2242 operand.GetBaseRegister().IsLow() &&
2243 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2244 (operand.GetAddrMode() == Offset);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002245 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002246 ldrsh(cond, rt, operand);
2247 }
2248 void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); }
2249
Alexandre Ramesd3832962016-07-04 15:03:43 +01002250
2251 void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002252 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2253 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2254 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002255 VIXL_ASSERT(allow_macro_instructions_);
2256 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002257 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002258 bool can_use_it =
2259 // LSL<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
2260 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2261 (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) ||
2262 // LSL<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
2263 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
2264 operand.GetBaseRegister().IsLow());
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002265 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002266 lsl(cond, rd, rm, operand);
2267 }
2268 void Lsl(Register rd, Register rm, const Operand& operand) {
2269 Lsl(al, rd, rm, operand);
2270 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002271 void Lsl(FlagsUpdate flags,
2272 Condition cond,
2273 Register rd,
2274 Register rm,
2275 const Operand& operand) {
2276 switch (flags) {
2277 case LeaveFlags:
2278 Lsl(cond, rd, rm, operand);
2279 break;
2280 case SetFlags:
2281 Lsls(cond, rd, rm, operand);
2282 break;
2283 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002284 bool setflags_is_smaller =
2285 IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() &&
2286 ((operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2287 (operand.GetImmediate() < 32)) ||
2288 (operand.IsPlainRegister() && rd.Is(rm)));
2289 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002290 Lsls(cond, rd, rm, operand);
2291 } else {
2292 Lsl(cond, rd, rm, operand);
2293 }
2294 break;
2295 }
2296 }
2297 void Lsl(FlagsUpdate flags,
2298 Register rd,
2299 Register rm,
2300 const Operand& operand) {
2301 Lsl(flags, al, rd, rm, operand);
2302 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002303
2304 void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002305 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2306 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2307 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002308 VIXL_ASSERT(allow_macro_instructions_);
2309 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002310 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002311 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002312 lsls(cond, rd, rm, operand);
2313 }
2314 void Lsls(Register rd, Register rm, const Operand& operand) {
2315 Lsls(al, rd, rm, operand);
2316 }
2317
2318 void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002319 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2320 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2321 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002322 VIXL_ASSERT(allow_macro_instructions_);
2323 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002324 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002325 bool can_use_it =
2326 // LSR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
2327 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2328 (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) ||
2329 // LSR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
2330 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
2331 operand.GetBaseRegister().IsLow());
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002332 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002333 lsr(cond, rd, rm, operand);
2334 }
2335 void Lsr(Register rd, Register rm, const Operand& operand) {
2336 Lsr(al, rd, rm, operand);
2337 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002338 void Lsr(FlagsUpdate flags,
2339 Condition cond,
2340 Register rd,
2341 Register rm,
2342 const Operand& operand) {
2343 switch (flags) {
2344 case LeaveFlags:
2345 Lsr(cond, rd, rm, operand);
2346 break;
2347 case SetFlags:
2348 Lsrs(cond, rd, rm, operand);
2349 break;
2350 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002351 bool setflags_is_smaller =
2352 IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() &&
2353 ((operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2354 (operand.GetImmediate() <= 32)) ||
2355 (operand.IsPlainRegister() && rd.Is(rm)));
2356 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002357 Lsrs(cond, rd, rm, operand);
2358 } else {
2359 Lsr(cond, rd, rm, operand);
2360 }
2361 break;
2362 }
2363 }
2364 void Lsr(FlagsUpdate flags,
2365 Register rd,
2366 Register rm,
2367 const Operand& operand) {
2368 Lsr(flags, al, rd, rm, operand);
2369 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002370
2371 void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002372 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2373 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2374 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002375 VIXL_ASSERT(allow_macro_instructions_);
2376 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002377 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002378 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002379 lsrs(cond, rd, rm, operand);
2380 }
2381 void Lsrs(Register rd, Register rm, const Operand& operand) {
2382 Lsrs(al, rd, rm, operand);
2383 }
2384
2385 void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002386 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2387 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2388 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2389 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002390 VIXL_ASSERT(allow_macro_instructions_);
2391 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002392 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002393 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002394 mla(cond, rd, rn, rm, ra);
2395 }
2396 void Mla(Register rd, Register rn, Register rm, Register ra) {
2397 Mla(al, rd, rn, rm, ra);
2398 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002399 void Mla(FlagsUpdate flags,
2400 Condition cond,
2401 Register rd,
2402 Register rn,
2403 Register rm,
2404 Register ra) {
2405 switch (flags) {
2406 case LeaveFlags:
2407 Mla(cond, rd, rn, rm, ra);
2408 break;
2409 case SetFlags:
2410 Mlas(cond, rd, rn, rm, ra);
2411 break;
2412 case DontCare:
2413 Mla(cond, rd, rn, rm, ra);
2414 break;
2415 }
2416 }
2417 void Mla(
2418 FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) {
2419 Mla(flags, al, rd, rn, rm, ra);
2420 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002421
2422 void Mlas(
2423 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002424 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2425 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2426 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2427 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002428 VIXL_ASSERT(allow_macro_instructions_);
2429 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002430 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002431 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002432 mlas(cond, rd, rn, rm, ra);
2433 }
2434 void Mlas(Register rd, Register rn, Register rm, Register ra) {
2435 Mlas(al, rd, rn, rm, ra);
2436 }
2437
2438 void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002439 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2440 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2441 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2442 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002443 VIXL_ASSERT(allow_macro_instructions_);
2444 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002445 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002446 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002447 mls(cond, rd, rn, rm, ra);
2448 }
2449 void Mls(Register rd, Register rn, Register rm, Register ra) {
2450 Mls(al, rd, rn, rm, ra);
2451 }
2452
2453 void Mov(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002454 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2455 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002456 VIXL_ASSERT(allow_macro_instructions_);
2457 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002458 MacroEmissionCheckScope guard(this);
Vincent Belliarda576eb92016-12-13 14:38:55 -08002459 if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) {
2460 return;
2461 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002462 bool can_use_it =
2463 // MOV<c>{<q>} <Rd>, #<imm8> ; T1
2464 (operand.IsImmediate() && rd.IsLow() &&
2465 (operand.GetImmediate() <= 255)) ||
2466 // MOV{<c>}{<q>} <Rd>, <Rm> ; T1
2467 (operand.IsPlainRegister() && !rd.IsPC() &&
2468 !operand.GetBaseRegister().IsPC()) ||
2469 // MOV<c>{<q>} <Rd>, <Rm> {, <shift> #<amount>} ; T2
2470 (operand.IsImmediateShiftedRegister() && rd.IsLow() &&
2471 operand.GetBaseRegister().IsLow() &&
2472 (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) ||
2473 operand.GetShift().Is(ASR))) ||
2474 // MOV<c>{<q>} <Rdm>, <Rdm>, LSL <Rs> ; T1
2475 // MOV<c>{<q>} <Rdm>, <Rdm>, LSR <Rs> ; T1
2476 // MOV<c>{<q>} <Rdm>, <Rdm>, ASR <Rs> ; T1
2477 // MOV<c>{<q>} <Rdm>, <Rdm>, ROR <Rs> ; T1
2478 (operand.IsRegisterShiftedRegister() &&
2479 rd.Is(operand.GetBaseRegister()) && rd.IsLow() &&
2480 (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) ||
2481 operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) &&
2482 operand.GetShiftRegister().IsLow());
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002483 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002484 mov(cond, rd, operand);
2485 }
2486 void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002487 void Mov(FlagsUpdate flags,
2488 Condition cond,
2489 Register rd,
2490 const Operand& operand) {
2491 switch (flags) {
2492 case LeaveFlags:
2493 Mov(cond, rd, operand);
2494 break;
2495 case SetFlags:
2496 Movs(cond, rd, operand);
2497 break;
2498 case DontCare:
Vincent Belliarda576eb92016-12-13 14:38:55 -08002499 if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) {
2500 return;
2501 }
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002502 bool setflags_is_smaller =
Vincent Belliard934696d2016-08-18 11:03:56 -07002503 IsUsingT32() && cond.Is(al) &&
2504 ((operand.IsImmediateShiftedRegister() && rd.IsLow() &&
2505 operand.GetBaseRegister().IsLow() &&
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002506 (operand.GetShiftAmount() >= 1) &&
2507 (((operand.GetShiftAmount() <= 32) &&
2508 ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) ||
2509 ((operand.GetShiftAmount() < 32) &&
2510 operand.GetShift().IsLSL()))) ||
Vincent Belliard934696d2016-08-18 11:03:56 -07002511 (operand.IsRegisterShiftedRegister() && rd.IsLow() &&
2512 operand.GetBaseRegister().Is(rd) &&
2513 operand.GetShiftRegister().IsLow() &&
2514 (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() ||
2515 operand.GetShift().IsASR() || operand.GetShift().IsROR())) ||
2516 (operand.IsImmediate() && rd.IsLow() &&
2517 (operand.GetImmediate() < 256)));
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002518 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002519 Movs(cond, rd, operand);
2520 } else {
2521 Mov(cond, rd, operand);
2522 }
2523 break;
2524 }
2525 }
2526 void Mov(FlagsUpdate flags, Register rd, const Operand& operand) {
2527 Mov(flags, al, rd, operand);
2528 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002529
2530 void Movs(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002531 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2532 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002533 VIXL_ASSERT(allow_macro_instructions_);
2534 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002535 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002536 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002537 movs(cond, rd, operand);
2538 }
2539 void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); }
2540
2541 void Movt(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002542 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2543 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002544 VIXL_ASSERT(allow_macro_instructions_);
2545 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002546 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002547 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002548 movt(cond, rd, operand);
2549 }
2550 void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); }
2551
Alexandre Ramesd3832962016-07-04 15:03:43 +01002552 void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002553 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002554 VIXL_ASSERT(allow_macro_instructions_);
2555 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002556 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002557 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002558 mrs(cond, rd, spec_reg);
2559 }
2560 void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); }
2561
2562 void Msr(Condition cond,
2563 MaskedSpecialRegister spec_reg,
2564 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002565 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002566 VIXL_ASSERT(allow_macro_instructions_);
2567 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002568 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002569 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002570 msr(cond, spec_reg, operand);
2571 }
2572 void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) {
2573 Msr(al, spec_reg, operand);
2574 }
2575
2576 void Mul(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002577 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2578 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2579 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002580 VIXL_ASSERT(allow_macro_instructions_);
2581 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002582 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002583 bool can_use_it =
2584 // MUL<c>{<q>} <Rdm>, <Rn>{, <Rdm>} ; T1
2585 rd.Is(rm) && rn.IsLow() && rm.IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002586 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002587 mul(cond, rd, rn, rm);
2588 }
2589 void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002590 void Mul(FlagsUpdate flags,
2591 Condition cond,
2592 Register rd,
2593 Register rn,
2594 Register rm) {
2595 switch (flags) {
2596 case LeaveFlags:
2597 Mul(cond, rd, rn, rm);
2598 break;
2599 case SetFlags:
2600 Muls(cond, rd, rn, rm);
2601 break;
2602 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002603 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2604 rn.IsLow() && rm.Is(rd);
2605 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002606 Muls(cond, rd, rn, rm);
2607 } else {
2608 Mul(cond, rd, rn, rm);
2609 }
2610 break;
2611 }
2612 }
2613 void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) {
2614 Mul(flags, al, rd, rn, rm);
2615 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002616
2617 void Muls(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002618 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2619 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2620 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002621 VIXL_ASSERT(allow_macro_instructions_);
2622 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002623 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002624 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002625 muls(cond, rd, rn, rm);
2626 }
2627 void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); }
2628
2629 void Mvn(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002630 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2631 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002632 VIXL_ASSERT(allow_macro_instructions_);
2633 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002634 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002635 bool can_use_it =
2636 // MVN<c>{<q>} <Rd>, <Rm> ; T1
2637 operand.IsPlainRegister() && rd.IsLow() &&
2638 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002639 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002640 mvn(cond, rd, operand);
2641 }
2642 void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002643 void Mvn(FlagsUpdate flags,
2644 Condition cond,
2645 Register rd,
2646 const Operand& operand) {
2647 switch (flags) {
2648 case LeaveFlags:
2649 Mvn(cond, rd, operand);
2650 break;
2651 case SetFlags:
2652 Mvns(cond, rd, operand);
2653 break;
2654 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002655 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2656 operand.IsPlainRegister() &&
2657 operand.GetBaseRegister().IsLow();
2658 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002659 Mvns(cond, rd, operand);
2660 } else {
2661 Mvn(cond, rd, operand);
2662 }
2663 break;
2664 }
2665 }
2666 void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) {
2667 Mvn(flags, al, rd, operand);
2668 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002669
2670 void Mvns(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002671 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2672 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002673 VIXL_ASSERT(allow_macro_instructions_);
2674 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002675 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002676 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002677 mvns(cond, rd, operand);
2678 }
2679 void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); }
2680
2681 void Nop(Condition cond) {
2682 VIXL_ASSERT(allow_macro_instructions_);
2683 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002684 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002685 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002686 nop(cond);
2687 }
2688 void Nop() { Nop(al); }
2689
2690 void Orn(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002691 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2693 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002694 VIXL_ASSERT(allow_macro_instructions_);
2695 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002696 MacroEmissionCheckScope guard(this);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002697 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002698 uint32_t immediate = operand.GetImmediate();
2699 if (immediate == 0) {
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002700 mvn(rd, 0);
Alexandre Rames628c5262016-09-21 11:52:30 +01002701 return;
2702 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002703 if ((immediate == 0xffffffff) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002704 return;
2705 }
2706 }
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002707 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002708 orn(cond, rd, rn, operand);
2709 }
2710 void Orn(Register rd, Register rn, const Operand& operand) {
2711 Orn(al, rd, rn, operand);
2712 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002713 void Orn(FlagsUpdate flags,
2714 Condition cond,
2715 Register rd,
2716 Register rn,
2717 const Operand& operand) {
2718 switch (flags) {
2719 case LeaveFlags:
2720 Orn(cond, rd, rn, operand);
2721 break;
2722 case SetFlags:
2723 Orns(cond, rd, rn, operand);
2724 break;
2725 case DontCare:
2726 Orn(cond, rd, rn, operand);
2727 break;
2728 }
2729 }
2730 void Orn(FlagsUpdate flags,
2731 Register rd,
2732 Register rn,
2733 const Operand& operand) {
2734 Orn(flags, al, rd, rn, operand);
2735 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002736
2737 void Orns(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002738 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2739 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2740 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002741 VIXL_ASSERT(allow_macro_instructions_);
2742 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002743 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002744 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002745 orns(cond, rd, rn, operand);
2746 }
2747 void Orns(Register rd, Register rn, const Operand& operand) {
2748 Orns(al, rd, rn, operand);
2749 }
2750
2751 void Orr(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002752 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2753 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2754 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002755 VIXL_ASSERT(allow_macro_instructions_);
2756 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002757 MacroEmissionCheckScope guard(this);
Vincent Belliarda576eb92016-12-13 14:38:55 -08002758 if (rd.Is(rn) && operand.IsPlainRegister() &&
2759 rd.Is(operand.GetBaseRegister())) {
2760 return;
2761 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002762 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002763 uint32_t immediate = operand.GetImmediate();
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002764 if ((immediate == 0) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002765 return;
2766 }
2767 if (immediate == 0xffffffff) {
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002768 mvn(rd, 0);
Alexandre Rames628c5262016-09-21 11:52:30 +01002769 return;
2770 }
2771 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002772 bool can_use_it =
2773 // ORR<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
2774 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
2775 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002776 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002777 orr(cond, rd, rn, operand);
2778 }
2779 void Orr(Register rd, Register rn, const Operand& operand) {
2780 Orr(al, rd, rn, operand);
2781 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002782 void Orr(FlagsUpdate flags,
2783 Condition cond,
2784 Register rd,
2785 Register rn,
2786 const Operand& operand) {
2787 switch (flags) {
2788 case LeaveFlags:
2789 Orr(cond, rd, rn, operand);
2790 break;
2791 case SetFlags:
2792 Orrs(cond, rd, rn, operand);
2793 break;
2794 case DontCare:
Vincent Belliarda576eb92016-12-13 14:38:55 -08002795 if (operand.IsPlainRegister() && rd.Is(rn) &&
2796 rd.Is(operand.GetBaseRegister())) {
2797 return;
2798 }
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002799 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2800 rn.Is(rd) && operand.IsPlainRegister() &&
2801 operand.GetBaseRegister().IsLow();
2802 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002803 Orrs(cond, rd, rn, operand);
2804 } else {
2805 Orr(cond, rd, rn, operand);
2806 }
2807 break;
2808 }
2809 }
2810 void Orr(FlagsUpdate flags,
2811 Register rd,
2812 Register rn,
2813 const Operand& operand) {
2814 Orr(flags, al, rd, rn, operand);
2815 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002816
2817 void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002818 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2819 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2820 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002821 VIXL_ASSERT(allow_macro_instructions_);
2822 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002823 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002824 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002825 orrs(cond, rd, rn, operand);
2826 }
2827 void Orrs(Register rd, Register rn, const Operand& operand) {
2828 Orrs(al, rd, rn, operand);
2829 }
2830
2831 void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002832 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2833 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2834 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002835 VIXL_ASSERT(allow_macro_instructions_);
2836 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002837 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002838 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002839 pkhbt(cond, rd, rn, operand);
2840 }
2841 void Pkhbt(Register rd, Register rn, const Operand& operand) {
2842 Pkhbt(al, rd, rn, operand);
2843 }
2844
2845 void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002846 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2847 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2848 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002849 VIXL_ASSERT(allow_macro_instructions_);
2850 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002851 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002852 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002853 pkhtb(cond, rd, rn, operand);
2854 }
2855 void Pkhtb(Register rd, Register rn, const Operand& operand) {
2856 Pkhtb(al, rd, rn, operand);
2857 }
2858
Alexandre Ramesd3832962016-07-04 15:03:43 +01002859
2860 void Pld(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002861 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002862 VIXL_ASSERT(allow_macro_instructions_);
2863 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002864 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002865 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002866 pld(cond, operand);
2867 }
2868 void Pld(const MemOperand& operand) { Pld(al, operand); }
2869
2870 void Pldw(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002871 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002872 VIXL_ASSERT(allow_macro_instructions_);
2873 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002874 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002875 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002876 pldw(cond, operand);
2877 }
2878 void Pldw(const MemOperand& operand) { Pldw(al, operand); }
2879
2880 void Pli(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002881 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002882 VIXL_ASSERT(allow_macro_instructions_);
2883 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002884 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002885 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002886 pli(cond, operand);
2887 }
2888 void Pli(const MemOperand& operand) { Pli(al, operand); }
2889
Alexandre Ramesd3832962016-07-04 15:03:43 +01002890
2891 void Pop(Condition cond, RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002892 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002893 VIXL_ASSERT(allow_macro_instructions_);
2894 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002895 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002896 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002897 pop(cond, registers);
2898 }
2899 void Pop(RegisterList registers) { Pop(al, registers); }
2900
2901 void Pop(Condition cond, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002902 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002903 VIXL_ASSERT(allow_macro_instructions_);
2904 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002905 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002906 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002907 pop(cond, rt);
2908 }
2909 void Pop(Register rt) { Pop(al, rt); }
2910
2911 void Push(Condition cond, RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002912 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002913 VIXL_ASSERT(allow_macro_instructions_);
2914 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002915 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002916 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002917 push(cond, registers);
2918 }
2919 void Push(RegisterList registers) { Push(al, registers); }
2920
2921 void Push(Condition cond, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002922 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002923 VIXL_ASSERT(allow_macro_instructions_);
2924 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002925 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002926 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002927 push(cond, rt);
2928 }
2929 void Push(Register rt) { Push(al, rt); }
2930
2931 void Qadd(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002932 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2933 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2934 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002935 VIXL_ASSERT(allow_macro_instructions_);
2936 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002937 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002938 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002939 qadd(cond, rd, rm, rn);
2940 }
2941 void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); }
2942
2943 void Qadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2945 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2946 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002947 VIXL_ASSERT(allow_macro_instructions_);
2948 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002949 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002950 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002951 qadd16(cond, rd, rn, rm);
2952 }
2953 void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); }
2954
2955 void Qadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002956 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2957 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2958 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002959 VIXL_ASSERT(allow_macro_instructions_);
2960 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002961 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002962 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002963 qadd8(cond, rd, rn, rm);
2964 }
2965 void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); }
2966
2967 void Qasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002968 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2969 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2970 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002971 VIXL_ASSERT(allow_macro_instructions_);
2972 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002973 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002974 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002975 qasx(cond, rd, rn, rm);
2976 }
2977 void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); }
2978
2979 void Qdadd(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002980 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2981 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2982 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002983 VIXL_ASSERT(allow_macro_instructions_);
2984 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002985 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002986 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002987 qdadd(cond, rd, rm, rn);
2988 }
2989 void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); }
2990
2991 void Qdsub(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002992 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2993 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2994 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002995 VIXL_ASSERT(allow_macro_instructions_);
2996 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002997 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002998 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002999 qdsub(cond, rd, rm, rn);
3000 }
3001 void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); }
3002
3003 void Qsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003004 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3005 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3006 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003007 VIXL_ASSERT(allow_macro_instructions_);
3008 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003009 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003010 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003011 qsax(cond, rd, rn, rm);
3012 }
3013 void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); }
3014
3015 void Qsub(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003016 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3017 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3018 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003019 VIXL_ASSERT(allow_macro_instructions_);
3020 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003021 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003022 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003023 qsub(cond, rd, rm, rn);
3024 }
3025 void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); }
3026
3027 void Qsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003028 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3029 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3030 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003031 VIXL_ASSERT(allow_macro_instructions_);
3032 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003033 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003034 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003035 qsub16(cond, rd, rn, rm);
3036 }
3037 void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); }
3038
3039 void Qsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003040 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3041 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3042 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003043 VIXL_ASSERT(allow_macro_instructions_);
3044 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003045 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003046 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003047 qsub8(cond, rd, rn, rm);
3048 }
3049 void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); }
3050
3051 void Rbit(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003052 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3053 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003054 VIXL_ASSERT(allow_macro_instructions_);
3055 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003056 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003057 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003058 rbit(cond, rd, rm);
3059 }
3060 void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); }
3061
3062 void Rev(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003063 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3064 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003065 VIXL_ASSERT(allow_macro_instructions_);
3066 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003067 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003068 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003069 rev(cond, rd, rm);
3070 }
3071 void Rev(Register rd, Register rm) { Rev(al, rd, rm); }
3072
3073 void Rev16(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003074 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3075 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003076 VIXL_ASSERT(allow_macro_instructions_);
3077 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003078 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003079 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003080 rev16(cond, rd, rm);
3081 }
3082 void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); }
3083
3084 void Revsh(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003085 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3086 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003087 VIXL_ASSERT(allow_macro_instructions_);
3088 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003089 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003090 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003091 revsh(cond, rd, rm);
3092 }
3093 void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); }
3094
3095 void Ror(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003096 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3097 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3098 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003099 VIXL_ASSERT(allow_macro_instructions_);
3100 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003101 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003102 bool can_use_it =
Alexandre Ramesd3832962016-07-04 15:03:43 +01003103 // ROR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
Georgia Kouvelie7a16902016-11-23 16:13:22 +00003104 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
3105 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003106 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003107 ror(cond, rd, rm, operand);
3108 }
3109 void Ror(Register rd, Register rm, const Operand& operand) {
3110 Ror(al, rd, rm, operand);
3111 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003112 void Ror(FlagsUpdate flags,
3113 Condition cond,
3114 Register rd,
3115 Register rm,
3116 const Operand& operand) {
3117 switch (flags) {
3118 case LeaveFlags:
3119 Ror(cond, rd, rm, operand);
3120 break;
3121 case SetFlags:
3122 Rors(cond, rd, rm, operand);
3123 break;
3124 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00003125 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
3126 rm.IsLow() && operand.IsPlainRegister() &&
3127 rd.Is(rm);
3128 if (setflags_is_smaller) {
3129 Rors(cond, rd, rm, operand);
3130 } else {
3131 Ror(cond, rd, rm, operand);
3132 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003133 break;
3134 }
3135 }
3136 void Ror(FlagsUpdate flags,
3137 Register rd,
3138 Register rm,
3139 const Operand& operand) {
3140 Ror(flags, al, rd, rm, operand);
3141 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003142
3143 void Rors(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003144 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3145 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3146 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003147 VIXL_ASSERT(allow_macro_instructions_);
3148 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003149 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003150 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003151 rors(cond, rd, rm, operand);
3152 }
3153 void Rors(Register rd, Register rm, const Operand& operand) {
3154 Rors(al, rd, rm, operand);
3155 }
3156
3157 void Rrx(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003158 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3159 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003160 VIXL_ASSERT(allow_macro_instructions_);
3161 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003162 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003163 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003164 rrx(cond, rd, rm);
3165 }
3166 void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); }
Vincent Belliard934696d2016-08-18 11:03:56 -07003167 void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) {
3168 switch (flags) {
3169 case LeaveFlags:
3170 Rrx(cond, rd, rm);
3171 break;
3172 case SetFlags:
3173 Rrxs(cond, rd, rm);
3174 break;
3175 case DontCare:
3176 Rrx(cond, rd, rm);
3177 break;
3178 }
3179 }
3180 void Rrx(FlagsUpdate flags, Register rd, Register rm) {
3181 Rrx(flags, al, rd, rm);
3182 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003183
3184 void Rrxs(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003185 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3186 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003187 VIXL_ASSERT(allow_macro_instructions_);
3188 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003189 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003190 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003191 rrxs(cond, rd, rm);
3192 }
3193 void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); }
3194
3195 void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003196 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3197 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3198 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003199 VIXL_ASSERT(allow_macro_instructions_);
3200 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003201 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003202 bool can_use_it =
3203 // RSB<c>{<q>} {<Rd>, }<Rn>, #0 ; T1
3204 operand.IsImmediate() && rd.IsLow() && rn.IsLow() &&
3205 (operand.GetImmediate() == 0);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003206 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003207 rsb(cond, rd, rn, operand);
3208 }
3209 void Rsb(Register rd, Register rn, const Operand& operand) {
3210 Rsb(al, rd, rn, operand);
3211 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003212 void Rsb(FlagsUpdate flags,
3213 Condition cond,
3214 Register rd,
3215 Register rn,
3216 const Operand& operand) {
3217 switch (flags) {
3218 case LeaveFlags:
3219 Rsb(cond, rd, rn, operand);
3220 break;
3221 case SetFlags:
3222 Rsbs(cond, rd, rn, operand);
3223 break;
3224 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00003225 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
3226 rn.IsLow() && operand.IsImmediate() &&
3227 (operand.GetImmediate() == 0);
3228 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07003229 Rsbs(cond, rd, rn, operand);
3230 } else {
3231 Rsb(cond, rd, rn, operand);
3232 }
3233 break;
3234 }
3235 }
3236 void Rsb(FlagsUpdate flags,
3237 Register rd,
3238 Register rn,
3239 const Operand& operand) {
3240 Rsb(flags, al, rd, rn, operand);
3241 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003242
3243 void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003244 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3245 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3246 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003247 VIXL_ASSERT(allow_macro_instructions_);
3248 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003249 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003250 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003251 rsbs(cond, rd, rn, operand);
3252 }
3253 void Rsbs(Register rd, Register rn, const Operand& operand) {
3254 Rsbs(al, rd, rn, operand);
3255 }
3256
3257 void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003258 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3259 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3260 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003261 VIXL_ASSERT(allow_macro_instructions_);
3262 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003263 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003264 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003265 rsc(cond, rd, rn, operand);
3266 }
3267 void Rsc(Register rd, Register rn, const Operand& operand) {
3268 Rsc(al, rd, rn, operand);
3269 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003270 void Rsc(FlagsUpdate flags,
3271 Condition cond,
3272 Register rd,
3273 Register rn,
3274 const Operand& operand) {
3275 switch (flags) {
3276 case LeaveFlags:
3277 Rsc(cond, rd, rn, operand);
3278 break;
3279 case SetFlags:
3280 Rscs(cond, rd, rn, operand);
3281 break;
3282 case DontCare:
3283 Rsc(cond, rd, rn, operand);
3284 break;
3285 }
3286 }
3287 void Rsc(FlagsUpdate flags,
3288 Register rd,
3289 Register rn,
3290 const Operand& operand) {
3291 Rsc(flags, al, rd, rn, operand);
3292 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003293
3294 void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003295 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3296 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3297 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003298 VIXL_ASSERT(allow_macro_instructions_);
3299 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003300 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003301 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003302 rscs(cond, rd, rn, operand);
3303 }
3304 void Rscs(Register rd, Register rn, const Operand& operand) {
3305 Rscs(al, rd, rn, operand);
3306 }
3307
3308 void Sadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003309 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3310 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3311 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003312 VIXL_ASSERT(allow_macro_instructions_);
3313 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003314 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003315 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003316 sadd16(cond, rd, rn, rm);
3317 }
3318 void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); }
3319
3320 void Sadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003321 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3322 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3323 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003324 VIXL_ASSERT(allow_macro_instructions_);
3325 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003326 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003327 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003328 sadd8(cond, rd, rn, rm);
3329 }
3330 void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); }
3331
3332 void Sasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003333 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3334 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3335 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003336 VIXL_ASSERT(allow_macro_instructions_);
3337 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003338 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003339 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003340 sasx(cond, rd, rn, rm);
3341 }
3342 void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); }
3343
3344 void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003345 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3346 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3347 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003348 VIXL_ASSERT(allow_macro_instructions_);
3349 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003350 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003351 bool can_use_it =
3352 // SBC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
3353 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) &&
3354 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003355 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003356 sbc(cond, rd, rn, operand);
3357 }
3358 void Sbc(Register rd, Register rn, const Operand& operand) {
3359 Sbc(al, rd, rn, operand);
3360 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003361 void Sbc(FlagsUpdate flags,
3362 Condition cond,
3363 Register rd,
3364 Register rn,
3365 const Operand& operand) {
3366 switch (flags) {
3367 case LeaveFlags:
3368 Sbc(cond, rd, rn, operand);
3369 break;
3370 case SetFlags:
3371 Sbcs(cond, rd, rn, operand);
3372 break;
3373 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00003374 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
3375 rn.Is(rd) && operand.IsPlainRegister() &&
3376 operand.GetBaseRegister().IsLow();
3377 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07003378 Sbcs(cond, rd, rn, operand);
3379 } else {
3380 Sbc(cond, rd, rn, operand);
3381 }
3382 break;
3383 }
3384 }
3385 void Sbc(FlagsUpdate flags,
3386 Register rd,
3387 Register rn,
3388 const Operand& operand) {
3389 Sbc(flags, al, rd, rn, operand);
3390 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003391
3392 void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003393 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3394 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3395 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003396 VIXL_ASSERT(allow_macro_instructions_);
3397 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003398 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003399 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003400 sbcs(cond, rd, rn, operand);
3401 }
3402 void Sbcs(Register rd, Register rn, const Operand& operand) {
3403 Sbcs(al, rd, rn, operand);
3404 }
3405
Vincent Belliard609821f2017-02-08 14:17:25 -08003406 void Sbfx(
3407 Condition cond, Register rd, Register rn, uint32_t lsb, uint32_t width) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003408 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3409 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003410 VIXL_ASSERT(allow_macro_instructions_);
3411 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003412 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003413 ITScope it_scope(this, &cond, guard);
Vincent Belliard609821f2017-02-08 14:17:25 -08003414 sbfx(cond, rd, rn, lsb, width);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003415 }
Vincent Belliard609821f2017-02-08 14:17:25 -08003416 void Sbfx(Register rd, Register rn, uint32_t lsb, uint32_t width) {
3417 Sbfx(al, rd, rn, lsb, width);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003418 }
3419
3420 void Sdiv(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003421 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3422 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3423 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003424 VIXL_ASSERT(allow_macro_instructions_);
3425 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003426 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003427 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003428 sdiv(cond, rd, rn, rm);
3429 }
3430 void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); }
3431
3432 void Sel(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003433 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3434 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3435 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003436 VIXL_ASSERT(allow_macro_instructions_);
3437 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003438 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003439 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003440 sel(cond, rd, rn, rm);
3441 }
3442 void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); }
3443
3444 void Shadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003445 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3446 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3447 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003448 VIXL_ASSERT(allow_macro_instructions_);
3449 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003450 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003451 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003452 shadd16(cond, rd, rn, rm);
3453 }
3454 void Shadd16(Register rd, Register rn, Register rm) {
3455 Shadd16(al, rd, rn, rm);
3456 }
3457
3458 void Shadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003459 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3460 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3461 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003462 VIXL_ASSERT(allow_macro_instructions_);
3463 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003464 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003465 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003466 shadd8(cond, rd, rn, rm);
3467 }
3468 void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); }
3469
3470 void Shasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003471 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3472 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3473 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003474 VIXL_ASSERT(allow_macro_instructions_);
3475 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003476 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003477 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003478 shasx(cond, rd, rn, rm);
3479 }
3480 void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); }
3481
3482 void Shsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003483 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3485 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003486 VIXL_ASSERT(allow_macro_instructions_);
3487 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003488 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003489 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003490 shsax(cond, rd, rn, rm);
3491 }
3492 void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); }
3493
3494 void Shsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003495 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3496 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3497 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003498 VIXL_ASSERT(allow_macro_instructions_);
3499 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003500 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003501 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003502 shsub16(cond, rd, rn, rm);
3503 }
3504 void Shsub16(Register rd, Register rn, Register rm) {
3505 Shsub16(al, rd, rn, rm);
3506 }
3507
3508 void Shsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003509 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3510 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3511 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003512 VIXL_ASSERT(allow_macro_instructions_);
3513 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003514 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003515 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003516 shsub8(cond, rd, rn, rm);
3517 }
3518 void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); }
3519
3520 void Smlabb(
3521 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003522 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3523 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3524 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3525 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003526 VIXL_ASSERT(allow_macro_instructions_);
3527 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003528 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003529 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003530 smlabb(cond, rd, rn, rm, ra);
3531 }
3532 void Smlabb(Register rd, Register rn, Register rm, Register ra) {
3533 Smlabb(al, rd, rn, rm, ra);
3534 }
3535
3536 void Smlabt(
3537 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003538 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3539 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3540 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3541 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003542 VIXL_ASSERT(allow_macro_instructions_);
3543 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003544 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003545 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003546 smlabt(cond, rd, rn, rm, ra);
3547 }
3548 void Smlabt(Register rd, Register rn, Register rm, Register ra) {
3549 Smlabt(al, rd, rn, rm, ra);
3550 }
3551
3552 void Smlad(
3553 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003554 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3555 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3556 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3557 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003558 VIXL_ASSERT(allow_macro_instructions_);
3559 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003560 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003561 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003562 smlad(cond, rd, rn, rm, ra);
3563 }
3564 void Smlad(Register rd, Register rn, Register rm, Register ra) {
3565 Smlad(al, rd, rn, rm, ra);
3566 }
3567
3568 void Smladx(
3569 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003570 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3571 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3572 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3573 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003574 VIXL_ASSERT(allow_macro_instructions_);
3575 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003576 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003577 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003578 smladx(cond, rd, rn, rm, ra);
3579 }
3580 void Smladx(Register rd, Register rn, Register rm, Register ra) {
3581 Smladx(al, rd, rn, rm, ra);
3582 }
3583
3584 void Smlal(
3585 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003586 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3587 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3588 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3589 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003590 VIXL_ASSERT(allow_macro_instructions_);
3591 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003592 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003593 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003594 smlal(cond, rdlo, rdhi, rn, rm);
3595 }
3596 void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) {
3597 Smlal(al, rdlo, rdhi, rn, rm);
3598 }
3599
3600 void Smlalbb(
3601 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003602 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3603 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3604 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3605 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003606 VIXL_ASSERT(allow_macro_instructions_);
3607 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003608 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003609 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003610 smlalbb(cond, rdlo, rdhi, rn, rm);
3611 }
3612 void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) {
3613 Smlalbb(al, rdlo, rdhi, rn, rm);
3614 }
3615
3616 void Smlalbt(
3617 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003618 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3619 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3620 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3621 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003622 VIXL_ASSERT(allow_macro_instructions_);
3623 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003624 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003625 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003626 smlalbt(cond, rdlo, rdhi, rn, rm);
3627 }
3628 void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) {
3629 Smlalbt(al, rdlo, rdhi, rn, rm);
3630 }
3631
3632 void Smlald(
3633 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003634 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3635 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3636 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3637 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003638 VIXL_ASSERT(allow_macro_instructions_);
3639 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003640 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003641 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003642 smlald(cond, rdlo, rdhi, rn, rm);
3643 }
3644 void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) {
3645 Smlald(al, rdlo, rdhi, rn, rm);
3646 }
3647
3648 void Smlaldx(
3649 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003650 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3651 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3652 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3653 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003654 VIXL_ASSERT(allow_macro_instructions_);
3655 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003656 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003657 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003658 smlaldx(cond, rdlo, rdhi, rn, rm);
3659 }
3660 void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) {
3661 Smlaldx(al, rdlo, rdhi, rn, rm);
3662 }
3663
3664 void Smlals(
3665 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003666 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3667 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3668 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3669 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003670 VIXL_ASSERT(allow_macro_instructions_);
3671 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003672 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003673 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003674 smlals(cond, rdlo, rdhi, rn, rm);
3675 }
3676 void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) {
3677 Smlals(al, rdlo, rdhi, rn, rm);
3678 }
3679
3680 void Smlaltb(
3681 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003682 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3683 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3684 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3685 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003686 VIXL_ASSERT(allow_macro_instructions_);
3687 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003688 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003689 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003690 smlaltb(cond, rdlo, rdhi, rn, rm);
3691 }
3692 void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) {
3693 Smlaltb(al, rdlo, rdhi, rn, rm);
3694 }
3695
3696 void Smlaltt(
3697 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003698 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3699 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3700 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3701 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003702 VIXL_ASSERT(allow_macro_instructions_);
3703 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003704 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003705 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003706 smlaltt(cond, rdlo, rdhi, rn, rm);
3707 }
3708 void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) {
3709 Smlaltt(al, rdlo, rdhi, rn, rm);
3710 }
3711
3712 void Smlatb(
3713 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003714 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3715 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3716 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3717 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003718 VIXL_ASSERT(allow_macro_instructions_);
3719 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003720 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003721 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003722 smlatb(cond, rd, rn, rm, ra);
3723 }
3724 void Smlatb(Register rd, Register rn, Register rm, Register ra) {
3725 Smlatb(al, rd, rn, rm, ra);
3726 }
3727
3728 void Smlatt(
3729 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003730 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3731 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3732 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3733 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003734 VIXL_ASSERT(allow_macro_instructions_);
3735 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003736 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003737 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003738 smlatt(cond, rd, rn, rm, ra);
3739 }
3740 void Smlatt(Register rd, Register rn, Register rm, Register ra) {
3741 Smlatt(al, rd, rn, rm, ra);
3742 }
3743
3744 void Smlawb(
3745 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003746 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3747 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3748 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3749 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003750 VIXL_ASSERT(allow_macro_instructions_);
3751 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003752 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003753 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003754 smlawb(cond, rd, rn, rm, ra);
3755 }
3756 void Smlawb(Register rd, Register rn, Register rm, Register ra) {
3757 Smlawb(al, rd, rn, rm, ra);
3758 }
3759
3760 void Smlawt(
3761 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003762 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3763 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3764 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3765 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003766 VIXL_ASSERT(allow_macro_instructions_);
3767 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003768 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003769 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003770 smlawt(cond, rd, rn, rm, ra);
3771 }
3772 void Smlawt(Register rd, Register rn, Register rm, Register ra) {
3773 Smlawt(al, rd, rn, rm, ra);
3774 }
3775
3776 void Smlsd(
3777 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003778 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3779 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3780 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3781 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003782 VIXL_ASSERT(allow_macro_instructions_);
3783 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003784 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003785 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003786 smlsd(cond, rd, rn, rm, ra);
3787 }
3788 void Smlsd(Register rd, Register rn, Register rm, Register ra) {
3789 Smlsd(al, rd, rn, rm, ra);
3790 }
3791
3792 void Smlsdx(
3793 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003794 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3795 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3796 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3797 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003798 VIXL_ASSERT(allow_macro_instructions_);
3799 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003800 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003801 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003802 smlsdx(cond, rd, rn, rm, ra);
3803 }
3804 void Smlsdx(Register rd, Register rn, Register rm, Register ra) {
3805 Smlsdx(al, rd, rn, rm, ra);
3806 }
3807
3808 void Smlsld(
3809 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003810 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3811 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3812 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3813 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003814 VIXL_ASSERT(allow_macro_instructions_);
3815 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003816 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003817 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003818 smlsld(cond, rdlo, rdhi, rn, rm);
3819 }
3820 void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) {
3821 Smlsld(al, rdlo, rdhi, rn, rm);
3822 }
3823
3824 void Smlsldx(
3825 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003826 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3827 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3828 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3829 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003830 VIXL_ASSERT(allow_macro_instructions_);
3831 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003832 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003833 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003834 smlsldx(cond, rdlo, rdhi, rn, rm);
3835 }
3836 void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) {
3837 Smlsldx(al, rdlo, rdhi, rn, rm);
3838 }
3839
3840 void Smmla(
3841 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003842 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3843 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3844 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3845 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003846 VIXL_ASSERT(allow_macro_instructions_);
3847 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003848 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003849 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003850 smmla(cond, rd, rn, rm, ra);
3851 }
3852 void Smmla(Register rd, Register rn, Register rm, Register ra) {
3853 Smmla(al, rd, rn, rm, ra);
3854 }
3855
3856 void Smmlar(
3857 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003858 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3859 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3860 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3861 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003862 VIXL_ASSERT(allow_macro_instructions_);
3863 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003864 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003865 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003866 smmlar(cond, rd, rn, rm, ra);
3867 }
3868 void Smmlar(Register rd, Register rn, Register rm, Register ra) {
3869 Smmlar(al, rd, rn, rm, ra);
3870 }
3871
3872 void Smmls(
3873 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003874 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3875 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3876 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3877 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003878 VIXL_ASSERT(allow_macro_instructions_);
3879 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003880 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003881 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003882 smmls(cond, rd, rn, rm, ra);
3883 }
3884 void Smmls(Register rd, Register rn, Register rm, Register ra) {
3885 Smmls(al, rd, rn, rm, ra);
3886 }
3887
3888 void Smmlsr(
3889 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003890 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3891 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3892 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3893 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003894 VIXL_ASSERT(allow_macro_instructions_);
3895 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003896 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003897 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003898 smmlsr(cond, rd, rn, rm, ra);
3899 }
3900 void Smmlsr(Register rd, Register rn, Register rm, Register ra) {
3901 Smmlsr(al, rd, rn, rm, ra);
3902 }
3903
3904 void Smmul(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003905 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3906 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3907 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003908 VIXL_ASSERT(allow_macro_instructions_);
3909 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003910 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003911 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003912 smmul(cond, rd, rn, rm);
3913 }
3914 void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); }
3915
3916 void Smmulr(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003917 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3918 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3919 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003920 VIXL_ASSERT(allow_macro_instructions_);
3921 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003922 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003923 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003924 smmulr(cond, rd, rn, rm);
3925 }
3926 void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); }
3927
3928 void Smuad(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003929 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3930 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3931 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003932 VIXL_ASSERT(allow_macro_instructions_);
3933 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003934 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003935 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003936 smuad(cond, rd, rn, rm);
3937 }
3938 void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); }
3939
3940 void Smuadx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003941 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3942 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3943 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003944 VIXL_ASSERT(allow_macro_instructions_);
3945 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003946 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003947 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003948 smuadx(cond, rd, rn, rm);
3949 }
3950 void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); }
3951
3952 void Smulbb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003953 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3954 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3955 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003956 VIXL_ASSERT(allow_macro_instructions_);
3957 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003958 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003959 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003960 smulbb(cond, rd, rn, rm);
3961 }
3962 void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); }
3963
3964 void Smulbt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003965 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3966 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3967 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003968 VIXL_ASSERT(allow_macro_instructions_);
3969 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003970 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003971 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003972 smulbt(cond, rd, rn, rm);
3973 }
3974 void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); }
3975
3976 void Smull(
3977 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003978 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3979 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3980 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3981 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003982 VIXL_ASSERT(allow_macro_instructions_);
3983 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003984 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003985 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003986 smull(cond, rdlo, rdhi, rn, rm);
3987 }
3988 void Smull(Register rdlo, Register rdhi, Register rn, Register rm) {
3989 Smull(al, rdlo, rdhi, rn, rm);
3990 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003991 void Smull(FlagsUpdate flags,
3992 Condition cond,
3993 Register rdlo,
3994 Register rdhi,
3995 Register rn,
3996 Register rm) {
3997 switch (flags) {
3998 case LeaveFlags:
3999 Smull(cond, rdlo, rdhi, rn, rm);
4000 break;
4001 case SetFlags:
4002 Smulls(cond, rdlo, rdhi, rn, rm);
4003 break;
4004 case DontCare:
4005 Smull(cond, rdlo, rdhi, rn, rm);
4006 break;
4007 }
4008 }
4009 void Smull(FlagsUpdate flags,
4010 Register rdlo,
4011 Register rdhi,
4012 Register rn,
4013 Register rm) {
4014 Smull(flags, al, rdlo, rdhi, rn, rm);
4015 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004016
4017 void Smulls(
4018 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004019 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4020 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4021 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4022 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004023 VIXL_ASSERT(allow_macro_instructions_);
4024 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004025 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004026 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004027 smulls(cond, rdlo, rdhi, rn, rm);
4028 }
4029 void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) {
4030 Smulls(al, rdlo, rdhi, rn, rm);
4031 }
4032
4033 void Smultb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004034 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4035 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4036 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004037 VIXL_ASSERT(allow_macro_instructions_);
4038 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004039 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004040 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004041 smultb(cond, rd, rn, rm);
4042 }
4043 void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); }
4044
4045 void Smultt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004046 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4047 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4048 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004049 VIXL_ASSERT(allow_macro_instructions_);
4050 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004051 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004052 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004053 smultt(cond, rd, rn, rm);
4054 }
4055 void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); }
4056
4057 void Smulwb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004058 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4059 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4060 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004061 VIXL_ASSERT(allow_macro_instructions_);
4062 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004063 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004064 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004065 smulwb(cond, rd, rn, rm);
4066 }
4067 void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); }
4068
4069 void Smulwt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004070 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4071 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4072 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004073 VIXL_ASSERT(allow_macro_instructions_);
4074 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004075 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004076 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004077 smulwt(cond, rd, rn, rm);
4078 }
4079 void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); }
4080
4081 void Smusd(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004082 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4083 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4084 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004085 VIXL_ASSERT(allow_macro_instructions_);
4086 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004087 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004088 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004089 smusd(cond, rd, rn, rm);
4090 }
4091 void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); }
4092
4093 void Smusdx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004094 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4095 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4096 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004097 VIXL_ASSERT(allow_macro_instructions_);
4098 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004099 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004100 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004101 smusdx(cond, rd, rn, rm);
4102 }
4103 void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); }
4104
4105 void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004106 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4107 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004108 VIXL_ASSERT(allow_macro_instructions_);
4109 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004110 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004111 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004112 ssat(cond, rd, imm, operand);
4113 }
4114 void Ssat(Register rd, uint32_t imm, const Operand& operand) {
4115 Ssat(al, rd, imm, operand);
4116 }
4117
4118 void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004119 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4120 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004121 VIXL_ASSERT(allow_macro_instructions_);
4122 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004123 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004124 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004125 ssat16(cond, rd, imm, rn);
4126 }
4127 void Ssat16(Register rd, uint32_t imm, Register rn) {
4128 Ssat16(al, rd, imm, rn);
4129 }
4130
4131 void Ssax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004132 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4133 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4134 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004135 VIXL_ASSERT(allow_macro_instructions_);
4136 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004137 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004138 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004139 ssax(cond, rd, rn, rm);
4140 }
4141 void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); }
4142
4143 void Ssub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004144 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4145 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4146 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004147 VIXL_ASSERT(allow_macro_instructions_);
4148 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004149 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004150 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004151 ssub16(cond, rd, rn, rm);
4152 }
4153 void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); }
4154
4155 void Ssub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004156 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4157 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4158 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004159 VIXL_ASSERT(allow_macro_instructions_);
4160 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004161 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004162 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004163 ssub8(cond, rd, rn, rm);
4164 }
4165 void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); }
4166
4167 void Stl(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004168 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4169 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004170 VIXL_ASSERT(allow_macro_instructions_);
4171 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004172 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004173 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004174 stl(cond, rt, operand);
4175 }
4176 void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); }
4177
4178 void Stlb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004179 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4180 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004181 VIXL_ASSERT(allow_macro_instructions_);
4182 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004183 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004184 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004185 stlb(cond, rt, operand);
4186 }
4187 void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); }
4188
4189 void Stlex(Condition cond,
4190 Register rd,
4191 Register rt,
4192 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004193 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4194 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4195 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004196 VIXL_ASSERT(allow_macro_instructions_);
4197 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004198 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004199 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004200 stlex(cond, rd, rt, operand);
4201 }
4202 void Stlex(Register rd, Register rt, const MemOperand& operand) {
4203 Stlex(al, rd, rt, operand);
4204 }
4205
4206 void Stlexb(Condition cond,
4207 Register rd,
4208 Register rt,
4209 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004210 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4211 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4212 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004213 VIXL_ASSERT(allow_macro_instructions_);
4214 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004215 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004216 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004217 stlexb(cond, rd, rt, operand);
4218 }
4219 void Stlexb(Register rd, Register rt, const MemOperand& operand) {
4220 Stlexb(al, rd, rt, operand);
4221 }
4222
4223 void Stlexd(Condition cond,
4224 Register rd,
4225 Register rt,
4226 Register rt2,
4227 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004228 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4229 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4230 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4231 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004232 VIXL_ASSERT(allow_macro_instructions_);
4233 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004234 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004235 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004236 stlexd(cond, rd, rt, rt2, operand);
4237 }
4238 void Stlexd(Register rd,
4239 Register rt,
4240 Register rt2,
4241 const MemOperand& operand) {
4242 Stlexd(al, rd, rt, rt2, operand);
4243 }
4244
4245 void Stlexh(Condition cond,
4246 Register rd,
4247 Register rt,
4248 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004249 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4250 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4251 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004252 VIXL_ASSERT(allow_macro_instructions_);
4253 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004254 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004255 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004256 stlexh(cond, rd, rt, operand);
4257 }
4258 void Stlexh(Register rd, Register rt, const MemOperand& operand) {
4259 Stlexh(al, rd, rt, operand);
4260 }
4261
4262 void Stlh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004263 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4264 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004265 VIXL_ASSERT(allow_macro_instructions_);
4266 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004267 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004268 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004269 stlh(cond, rt, operand);
4270 }
4271 void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); }
4272
4273 void Stm(Condition cond,
4274 Register rn,
4275 WriteBack write_back,
4276 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004277 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4278 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004279 VIXL_ASSERT(allow_macro_instructions_);
4280 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004281 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004282 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004283 stm(cond, rn, write_back, registers);
4284 }
4285 void Stm(Register rn, WriteBack write_back, RegisterList registers) {
4286 Stm(al, rn, write_back, registers);
4287 }
4288
4289 void Stmda(Condition cond,
4290 Register rn,
4291 WriteBack write_back,
4292 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004293 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4294 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004295 VIXL_ASSERT(allow_macro_instructions_);
4296 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004297 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004298 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004299 stmda(cond, rn, write_back, registers);
4300 }
4301 void Stmda(Register rn, WriteBack write_back, RegisterList registers) {
4302 Stmda(al, rn, write_back, registers);
4303 }
4304
4305 void Stmdb(Condition cond,
4306 Register rn,
4307 WriteBack write_back,
4308 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004309 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4310 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004311 VIXL_ASSERT(allow_macro_instructions_);
4312 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004313 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004314 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004315 stmdb(cond, rn, write_back, registers);
4316 }
4317 void Stmdb(Register rn, WriteBack write_back, RegisterList registers) {
4318 Stmdb(al, rn, write_back, registers);
4319 }
4320
4321 void Stmea(Condition cond,
4322 Register rn,
4323 WriteBack write_back,
4324 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004325 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4326 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004327 VIXL_ASSERT(allow_macro_instructions_);
4328 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004329 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004330 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004331 stmea(cond, rn, write_back, registers);
4332 }
4333 void Stmea(Register rn, WriteBack write_back, RegisterList registers) {
4334 Stmea(al, rn, write_back, registers);
4335 }
4336
4337 void Stmed(Condition cond,
4338 Register rn,
4339 WriteBack write_back,
4340 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004341 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4342 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004343 VIXL_ASSERT(allow_macro_instructions_);
4344 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004345 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004346 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004347 stmed(cond, rn, write_back, registers);
4348 }
4349 void Stmed(Register rn, WriteBack write_back, RegisterList registers) {
4350 Stmed(al, rn, write_back, registers);
4351 }
4352
4353 void Stmfa(Condition cond,
4354 Register rn,
4355 WriteBack write_back,
4356 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004357 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4358 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004359 VIXL_ASSERT(allow_macro_instructions_);
4360 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004361 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004362 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004363 stmfa(cond, rn, write_back, registers);
4364 }
4365 void Stmfa(Register rn, WriteBack write_back, RegisterList registers) {
4366 Stmfa(al, rn, write_back, registers);
4367 }
4368
4369 void Stmfd(Condition cond,
4370 Register rn,
4371 WriteBack write_back,
4372 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004373 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4374 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004375 VIXL_ASSERT(allow_macro_instructions_);
4376 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004377 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004378 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004379 stmfd(cond, rn, write_back, registers);
4380 }
4381 void Stmfd(Register rn, WriteBack write_back, RegisterList registers) {
4382 Stmfd(al, rn, write_back, registers);
4383 }
4384
4385 void Stmib(Condition cond,
4386 Register rn,
4387 WriteBack write_back,
4388 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004389 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4390 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004391 VIXL_ASSERT(allow_macro_instructions_);
4392 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004393 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004394 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004395 stmib(cond, rn, write_back, registers);
4396 }
4397 void Stmib(Register rn, WriteBack write_back, RegisterList registers) {
4398 Stmib(al, rn, write_back, registers);
4399 }
4400
4401 void Str(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004402 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4403 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004404 VIXL_ASSERT(allow_macro_instructions_);
4405 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004406 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004407 bool can_use_it =
4408 // STR{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4409 (operand.IsImmediate() && rt.IsLow() &&
4410 operand.GetBaseRegister().IsLow() &&
4411 operand.IsOffsetImmediateWithinRange(0, 124, 4) &&
4412 (operand.GetAddrMode() == Offset)) ||
4413 // STR{<c>}{<q>} <Rt>, [SP{, #{+}<imm>}] ; T2
4414 (operand.IsImmediate() && rt.IsLow() &&
4415 operand.GetBaseRegister().IsSP() &&
4416 operand.IsOffsetImmediateWithinRange(0, 1020, 4) &&
4417 (operand.GetAddrMode() == Offset)) ||
4418 // STR{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4419 (operand.IsPlainRegister() && rt.IsLow() &&
4420 operand.GetBaseRegister().IsLow() &&
4421 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4422 (operand.GetAddrMode() == Offset));
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004423 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004424 str(cond, rt, operand);
4425 }
4426 void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); }
4427
4428 void Strb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004429 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4430 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004431 VIXL_ASSERT(allow_macro_instructions_);
4432 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004433 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004434 bool can_use_it =
4435 // STRB{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4436 (operand.IsImmediate() && rt.IsLow() &&
4437 operand.GetBaseRegister().IsLow() &&
4438 operand.IsOffsetImmediateWithinRange(0, 31) &&
4439 (operand.GetAddrMode() == Offset)) ||
4440 // STRB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4441 (operand.IsPlainRegister() && rt.IsLow() &&
4442 operand.GetBaseRegister().IsLow() &&
4443 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4444 (operand.GetAddrMode() == Offset));
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004445 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004446 strb(cond, rt, operand);
4447 }
4448 void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); }
4449
4450 void Strd(Condition cond,
4451 Register rt,
4452 Register rt2,
4453 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004454 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4455 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4456 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004457 VIXL_ASSERT(allow_macro_instructions_);
4458 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004459 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004460 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004461 strd(cond, rt, rt2, operand);
4462 }
4463 void Strd(Register rt, Register rt2, const MemOperand& operand) {
4464 Strd(al, rt, rt2, operand);
4465 }
4466
4467 void Strex(Condition cond,
4468 Register rd,
4469 Register rt,
4470 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004471 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4472 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4473 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004474 VIXL_ASSERT(allow_macro_instructions_);
4475 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004476 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004477 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004478 strex(cond, rd, rt, operand);
4479 }
4480 void Strex(Register rd, Register rt, const MemOperand& operand) {
4481 Strex(al, rd, rt, operand);
4482 }
4483
4484 void Strexb(Condition cond,
4485 Register rd,
4486 Register rt,
4487 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004488 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4489 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4490 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004491 VIXL_ASSERT(allow_macro_instructions_);
4492 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004493 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004494 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004495 strexb(cond, rd, rt, operand);
4496 }
4497 void Strexb(Register rd, Register rt, const MemOperand& operand) {
4498 Strexb(al, rd, rt, operand);
4499 }
4500
4501 void Strexd(Condition cond,
4502 Register rd,
4503 Register rt,
4504 Register rt2,
4505 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004506 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4507 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4508 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4509 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004510 VIXL_ASSERT(allow_macro_instructions_);
4511 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004512 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004513 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004514 strexd(cond, rd, rt, rt2, operand);
4515 }
4516 void Strexd(Register rd,
4517 Register rt,
4518 Register rt2,
4519 const MemOperand& operand) {
4520 Strexd(al, rd, rt, rt2, operand);
4521 }
4522
4523 void Strexh(Condition cond,
4524 Register rd,
4525 Register rt,
4526 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004527 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4528 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4529 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004530 VIXL_ASSERT(allow_macro_instructions_);
4531 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004532 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004533 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004534 strexh(cond, rd, rt, operand);
4535 }
4536 void Strexh(Register rd, Register rt, const MemOperand& operand) {
4537 Strexh(al, rd, rt, operand);
4538 }
4539
4540 void Strh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004541 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4542 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004543 VIXL_ASSERT(allow_macro_instructions_);
4544 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004545 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004546 bool can_use_it =
4547 // STRH{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4548 (operand.IsImmediate() && rt.IsLow() &&
4549 operand.GetBaseRegister().IsLow() &&
4550 operand.IsOffsetImmediateWithinRange(0, 62, 2) &&
4551 (operand.GetAddrMode() == Offset)) ||
4552 // STRH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4553 (operand.IsPlainRegister() && rt.IsLow() &&
4554 operand.GetBaseRegister().IsLow() &&
4555 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4556 (operand.GetAddrMode() == Offset));
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004557 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004558 strh(cond, rt, operand);
4559 }
4560 void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); }
4561
4562 void Sub(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4564 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4565 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004566 VIXL_ASSERT(allow_macro_instructions_);
4567 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004568 MacroEmissionCheckScope guard(this);
Alexandre Rames628c5262016-09-21 11:52:30 +01004569 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
4570 uint32_t immediate = operand.GetImmediate();
4571 if (immediate == 0) {
4572 return;
4573 }
4574 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004575 bool can_use_it =
4576 // SUB<c>{<q>} <Rd>, <Rn>, #<imm3> ; T1
4577 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() &&
4578 rd.IsLow()) ||
4579 // SUB<c>{<q>} {<Rdn>,} <Rdn>, #<imm8> ; T2
4580 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
4581 rd.IsLow() && rn.Is(rd)) ||
4582 // SUB<c>{<q>} <Rd>, <Rn>, <Rm>
4583 (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
4584 operand.GetBaseRegister().IsLow());
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004585 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004586 sub(cond, rd, rn, operand);
4587 }
4588 void Sub(Register rd, Register rn, const Operand& operand) {
4589 Sub(al, rd, rn, operand);
4590 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004591 void Sub(FlagsUpdate flags,
4592 Condition cond,
4593 Register rd,
4594 Register rn,
4595 const Operand& operand) {
4596 switch (flags) {
4597 case LeaveFlags:
4598 Sub(cond, rd, rn, operand);
4599 break;
4600 case SetFlags:
4601 Subs(cond, rd, rn, operand);
4602 break;
4603 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00004604 bool setflags_is_smaller =
Vincent Belliard934696d2016-08-18 11:03:56 -07004605 IsUsingT32() && cond.Is(al) &&
4606 ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
4607 operand.GetBaseRegister().IsLow()) ||
4608 (operand.IsImmediate() &&
4609 ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) ||
4610 (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256)))));
Georgia Kouveli4443cf92016-12-08 11:34:57 +00004611 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07004612 Subs(cond, rd, rn, operand);
4613 } else {
Georgia Kouvelidd8e4912016-12-12 16:42:30 +00004614 bool changed_op_is_smaller =
4615 operand.IsImmediate() && (operand.GetSignedImmediate() < 0) &&
4616 ((rd.IsLow() && rn.IsLow() &&
4617 (operand.GetSignedImmediate() >= -7)) ||
4618 (rd.IsLow() && rn.Is(rd) &&
4619 (operand.GetSignedImmediate() >= -255)));
4620 if (changed_op_is_smaller) {
4621 Adds(cond, rd, rn, -operand.GetSignedImmediate());
4622 } else {
4623 Sub(cond, rd, rn, operand);
4624 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004625 }
4626 break;
4627 }
4628 }
4629 void Sub(FlagsUpdate flags,
4630 Register rd,
4631 Register rn,
4632 const Operand& operand) {
4633 Sub(flags, al, rd, rn, operand);
4634 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004635
4636 void Subs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004637 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4638 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4639 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004640 VIXL_ASSERT(allow_macro_instructions_);
4641 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004642 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004643 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004644 subs(cond, rd, rn, operand);
4645 }
4646 void Subs(Register rd, Register rn, const Operand& operand) {
4647 Subs(al, rd, rn, operand);
4648 }
4649
Alexandre Ramesd3832962016-07-04 15:03:43 +01004650 void Svc(Condition cond, uint32_t imm) {
4651 VIXL_ASSERT(allow_macro_instructions_);
4652 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004653 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004654 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004655 svc(cond, imm);
4656 }
4657 void Svc(uint32_t imm) { Svc(al, imm); }
4658
4659 void Sxtab(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004660 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4661 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4662 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004663 VIXL_ASSERT(allow_macro_instructions_);
4664 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004665 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004666 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004667 sxtab(cond, rd, rn, operand);
4668 }
4669 void Sxtab(Register rd, Register rn, const Operand& operand) {
4670 Sxtab(al, rd, rn, operand);
4671 }
4672
4673 void Sxtab16(Condition cond,
4674 Register rd,
4675 Register rn,
4676 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004677 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4678 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4679 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004680 VIXL_ASSERT(allow_macro_instructions_);
4681 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004682 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004683 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004684 sxtab16(cond, rd, rn, operand);
4685 }
4686 void Sxtab16(Register rd, Register rn, const Operand& operand) {
4687 Sxtab16(al, rd, rn, operand);
4688 }
4689
4690 void Sxtah(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004691 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4693 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004694 VIXL_ASSERT(allow_macro_instructions_);
4695 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004696 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004697 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004698 sxtah(cond, rd, rn, operand);
4699 }
4700 void Sxtah(Register rd, Register rn, const Operand& operand) {
4701 Sxtah(al, rd, rn, operand);
4702 }
4703
4704 void Sxtb(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004705 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4706 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004707 VIXL_ASSERT(allow_macro_instructions_);
4708 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004709 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004710 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004711 sxtb(cond, rd, operand);
4712 }
4713 void Sxtb(Register rd, const Operand& operand) { Sxtb(al, rd, operand); }
4714
4715 void Sxtb16(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004716 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4717 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004718 VIXL_ASSERT(allow_macro_instructions_);
4719 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004720 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004721 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004722 sxtb16(cond, rd, operand);
4723 }
4724 void Sxtb16(Register rd, const Operand& operand) { Sxtb16(al, rd, operand); }
4725
4726 void Sxth(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004727 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4728 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004729 VIXL_ASSERT(allow_macro_instructions_);
4730 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004731 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004732 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004733 sxth(cond, rd, operand);
4734 }
4735 void Sxth(Register rd, const Operand& operand) { Sxth(al, rd, operand); }
4736
Alexandre Ramesd3832962016-07-04 15:03:43 +01004737 void Teq(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004738 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4739 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004740 VIXL_ASSERT(allow_macro_instructions_);
4741 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004742 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004743 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004744 teq(cond, rn, operand);
4745 }
4746 void Teq(Register rn, const Operand& operand) { Teq(al, rn, operand); }
4747
4748 void Tst(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004749 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4750 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004751 VIXL_ASSERT(allow_macro_instructions_);
4752 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004753 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004754 bool can_use_it =
4755 // TST{<c>}{<q>} <Rn>, <Rm> ; T1
4756 operand.IsPlainRegister() && rn.IsLow() &&
4757 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004758 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004759 tst(cond, rn, operand);
4760 }
4761 void Tst(Register rn, const Operand& operand) { Tst(al, rn, operand); }
4762
4763 void Uadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004764 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4765 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4766 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004767 VIXL_ASSERT(allow_macro_instructions_);
4768 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004769 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004770 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004771 uadd16(cond, rd, rn, rm);
4772 }
4773 void Uadd16(Register rd, Register rn, Register rm) { Uadd16(al, rd, rn, rm); }
4774
4775 void Uadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004776 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4777 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4778 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004779 VIXL_ASSERT(allow_macro_instructions_);
4780 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004781 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004782 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004783 uadd8(cond, rd, rn, rm);
4784 }
4785 void Uadd8(Register rd, Register rn, Register rm) { Uadd8(al, rd, rn, rm); }
4786
4787 void Uasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004788 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4789 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4790 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004791 VIXL_ASSERT(allow_macro_instructions_);
4792 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004793 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004794 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004795 uasx(cond, rd, rn, rm);
4796 }
4797 void Uasx(Register rd, Register rn, Register rm) { Uasx(al, rd, rn, rm); }
4798
Vincent Belliard609821f2017-02-08 14:17:25 -08004799 void Ubfx(
4800 Condition cond, Register rd, Register rn, uint32_t lsb, uint32_t width) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004801 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4802 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004803 VIXL_ASSERT(allow_macro_instructions_);
4804 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004805 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004806 ITScope it_scope(this, &cond, guard);
Vincent Belliard609821f2017-02-08 14:17:25 -08004807 ubfx(cond, rd, rn, lsb, width);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004808 }
Vincent Belliard609821f2017-02-08 14:17:25 -08004809 void Ubfx(Register rd, Register rn, uint32_t lsb, uint32_t width) {
4810 Ubfx(al, rd, rn, lsb, width);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004811 }
4812
4813 void Udf(Condition cond, uint32_t imm) {
4814 VIXL_ASSERT(allow_macro_instructions_);
4815 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004816 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004817 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004818 udf(cond, imm);
4819 }
4820 void Udf(uint32_t imm) { Udf(al, imm); }
4821
4822 void Udiv(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004823 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
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());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004828 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004829 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004830 udiv(cond, rd, rn, rm);
4831 }
4832 void Udiv(Register rd, Register rn, Register rm) { Udiv(al, rd, rn, rm); }
4833
4834 void Uhadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004835 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4836 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4837 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004838 VIXL_ASSERT(allow_macro_instructions_);
4839 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004840 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004841 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004842 uhadd16(cond, rd, rn, rm);
4843 }
4844 void Uhadd16(Register rd, Register rn, Register rm) {
4845 Uhadd16(al, rd, rn, rm);
4846 }
4847
4848 void Uhadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004849 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4850 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4851 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004852 VIXL_ASSERT(allow_macro_instructions_);
4853 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004854 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004855 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004856 uhadd8(cond, rd, rn, rm);
4857 }
4858 void Uhadd8(Register rd, Register rn, Register rm) { Uhadd8(al, rd, rn, rm); }
4859
4860 void Uhasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004861 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4862 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4863 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004864 VIXL_ASSERT(allow_macro_instructions_);
4865 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004866 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004867 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004868 uhasx(cond, rd, rn, rm);
4869 }
4870 void Uhasx(Register rd, Register rn, Register rm) { Uhasx(al, rd, rn, rm); }
4871
4872 void Uhsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004873 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4874 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4875 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004876 VIXL_ASSERT(allow_macro_instructions_);
4877 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004878 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004879 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004880 uhsax(cond, rd, rn, rm);
4881 }
4882 void Uhsax(Register rd, Register rn, Register rm) { Uhsax(al, rd, rn, rm); }
4883
4884 void Uhsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004885 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4886 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4887 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004888 VIXL_ASSERT(allow_macro_instructions_);
4889 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004890 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004891 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004892 uhsub16(cond, rd, rn, rm);
4893 }
4894 void Uhsub16(Register rd, Register rn, Register rm) {
4895 Uhsub16(al, rd, rn, rm);
4896 }
4897
4898 void Uhsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004899 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4900 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4901 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004902 VIXL_ASSERT(allow_macro_instructions_);
4903 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004904 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004905 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004906 uhsub8(cond, rd, rn, rm);
4907 }
4908 void Uhsub8(Register rd, Register rn, Register rm) { Uhsub8(al, rd, rn, rm); }
4909
4910 void Umaal(
4911 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004912 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4913 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4914 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4915 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004916 VIXL_ASSERT(allow_macro_instructions_);
4917 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004918 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004919 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004920 umaal(cond, rdlo, rdhi, rn, rm);
4921 }
4922 void Umaal(Register rdlo, Register rdhi, Register rn, Register rm) {
4923 Umaal(al, rdlo, rdhi, rn, rm);
4924 }
4925
4926 void Umlal(
4927 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004928 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4929 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4930 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4931 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004932 VIXL_ASSERT(allow_macro_instructions_);
4933 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004934 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004935 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004936 umlal(cond, rdlo, rdhi, rn, rm);
4937 }
4938 void Umlal(Register rdlo, Register rdhi, Register rn, Register rm) {
4939 Umlal(al, rdlo, rdhi, rn, rm);
4940 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004941 void Umlal(FlagsUpdate flags,
4942 Condition cond,
4943 Register rdlo,
4944 Register rdhi,
4945 Register rn,
4946 Register rm) {
4947 switch (flags) {
4948 case LeaveFlags:
4949 Umlal(cond, rdlo, rdhi, rn, rm);
4950 break;
4951 case SetFlags:
4952 Umlals(cond, rdlo, rdhi, rn, rm);
4953 break;
4954 case DontCare:
4955 Umlal(cond, rdlo, rdhi, rn, rm);
4956 break;
4957 }
4958 }
4959 void Umlal(FlagsUpdate flags,
4960 Register rdlo,
4961 Register rdhi,
4962 Register rn,
4963 Register rm) {
4964 Umlal(flags, al, rdlo, rdhi, rn, rm);
4965 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004966
4967 void Umlals(
4968 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004969 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4970 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4971 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4972 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004973 VIXL_ASSERT(allow_macro_instructions_);
4974 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004975 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004976 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004977 umlals(cond, rdlo, rdhi, rn, rm);
4978 }
4979 void Umlals(Register rdlo, Register rdhi, Register rn, Register rm) {
4980 Umlals(al, rdlo, rdhi, rn, rm);
4981 }
4982
4983 void Umull(
4984 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004985 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4986 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4987 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4988 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004989 VIXL_ASSERT(allow_macro_instructions_);
4990 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004991 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004992 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004993 umull(cond, rdlo, rdhi, rn, rm);
4994 }
4995 void Umull(Register rdlo, Register rdhi, Register rn, Register rm) {
4996 Umull(al, rdlo, rdhi, rn, rm);
4997 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004998 void Umull(FlagsUpdate flags,
4999 Condition cond,
5000 Register rdlo,
5001 Register rdhi,
5002 Register rn,
5003 Register rm) {
5004 switch (flags) {
5005 case LeaveFlags:
5006 Umull(cond, rdlo, rdhi, rn, rm);
5007 break;
5008 case SetFlags:
5009 Umulls(cond, rdlo, rdhi, rn, rm);
5010 break;
5011 case DontCare:
5012 Umull(cond, rdlo, rdhi, rn, rm);
5013 break;
5014 }
5015 }
5016 void Umull(FlagsUpdate flags,
5017 Register rdlo,
5018 Register rdhi,
5019 Register rn,
5020 Register rm) {
5021 Umull(flags, al, rdlo, rdhi, rn, rm);
5022 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01005023
5024 void Umulls(
5025 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005026 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
5027 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
5028 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5029 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005030 VIXL_ASSERT(allow_macro_instructions_);
5031 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005032 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005033 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005034 umulls(cond, rdlo, rdhi, rn, rm);
5035 }
5036 void Umulls(Register rdlo, Register rdhi, Register rn, Register rm) {
5037 Umulls(al, rdlo, rdhi, rn, rm);
5038 }
5039
5040 void Uqadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005041 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5042 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5043 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005044 VIXL_ASSERT(allow_macro_instructions_);
5045 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005046 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005047 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005048 uqadd16(cond, rd, rn, rm);
5049 }
5050 void Uqadd16(Register rd, Register rn, Register rm) {
5051 Uqadd16(al, rd, rn, rm);
5052 }
5053
5054 void Uqadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005055 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5056 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5057 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005058 VIXL_ASSERT(allow_macro_instructions_);
5059 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005060 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005061 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005062 uqadd8(cond, rd, rn, rm);
5063 }
5064 void Uqadd8(Register rd, Register rn, Register rm) { Uqadd8(al, rd, rn, rm); }
5065
5066 void Uqasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005067 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5068 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5069 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005070 VIXL_ASSERT(allow_macro_instructions_);
5071 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005072 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005073 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005074 uqasx(cond, rd, rn, rm);
5075 }
5076 void Uqasx(Register rd, Register rn, Register rm) { Uqasx(al, rd, rn, rm); }
5077
5078 void Uqsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005079 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5080 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5081 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005082 VIXL_ASSERT(allow_macro_instructions_);
5083 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005084 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005085 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005086 uqsax(cond, rd, rn, rm);
5087 }
5088 void Uqsax(Register rd, Register rn, Register rm) { Uqsax(al, rd, rn, rm); }
5089
5090 void Uqsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005091 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5092 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5093 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005094 VIXL_ASSERT(allow_macro_instructions_);
5095 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005096 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005097 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005098 uqsub16(cond, rd, rn, rm);
5099 }
5100 void Uqsub16(Register rd, Register rn, Register rm) {
5101 Uqsub16(al, rd, rn, rm);
5102 }
5103
5104 void Uqsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005105 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5106 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5107 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005108 VIXL_ASSERT(allow_macro_instructions_);
5109 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005110 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005111 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005112 uqsub8(cond, rd, rn, rm);
5113 }
5114 void Uqsub8(Register rd, Register rn, Register rm) { Uqsub8(al, rd, rn, rm); }
5115
5116 void Usad8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005117 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5118 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5119 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005120 VIXL_ASSERT(allow_macro_instructions_);
5121 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005122 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005123 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005124 usad8(cond, rd, rn, rm);
5125 }
5126 void Usad8(Register rd, Register rn, Register rm) { Usad8(al, rd, rn, rm); }
5127
5128 void Usada8(
5129 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005130 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5131 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5132 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5133 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005134 VIXL_ASSERT(allow_macro_instructions_);
5135 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005136 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005137 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005138 usada8(cond, rd, rn, rm, ra);
5139 }
5140 void Usada8(Register rd, Register rn, Register rm, Register ra) {
5141 Usada8(al, rd, rn, rm, ra);
5142 }
5143
5144 void Usat(Condition cond, Register rd, uint32_t imm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005145 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5146 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005147 VIXL_ASSERT(allow_macro_instructions_);
5148 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005149 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005150 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005151 usat(cond, rd, imm, operand);
5152 }
5153 void Usat(Register rd, uint32_t imm, const Operand& operand) {
5154 Usat(al, rd, imm, operand);
5155 }
5156
5157 void Usat16(Condition cond, Register rd, uint32_t imm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005158 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5159 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005160 VIXL_ASSERT(allow_macro_instructions_);
5161 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005162 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005163 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005164 usat16(cond, rd, imm, rn);
5165 }
5166 void Usat16(Register rd, uint32_t imm, Register rn) {
5167 Usat16(al, rd, imm, rn);
5168 }
5169
5170 void Usax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005171 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5172 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5173 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005174 VIXL_ASSERT(allow_macro_instructions_);
5175 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005176 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005177 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005178 usax(cond, rd, rn, rm);
5179 }
5180 void Usax(Register rd, Register rn, Register rm) { Usax(al, rd, rn, rm); }
5181
5182 void Usub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005183 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5184 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5185 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005186 VIXL_ASSERT(allow_macro_instructions_);
5187 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005188 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005189 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005190 usub16(cond, rd, rn, rm);
5191 }
5192 void Usub16(Register rd, Register rn, Register rm) { Usub16(al, rd, rn, rm); }
5193
5194 void Usub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005195 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5196 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5197 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005198 VIXL_ASSERT(allow_macro_instructions_);
5199 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005200 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005201 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005202 usub8(cond, rd, rn, rm);
5203 }
5204 void Usub8(Register rd, Register rn, Register rm) { Usub8(al, rd, rn, rm); }
5205
5206 void Uxtab(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005207 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5208 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5209 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005210 VIXL_ASSERT(allow_macro_instructions_);
5211 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005212 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005213 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005214 uxtab(cond, rd, rn, operand);
5215 }
5216 void Uxtab(Register rd, Register rn, const Operand& operand) {
5217 Uxtab(al, rd, rn, operand);
5218 }
5219
5220 void Uxtab16(Condition cond,
5221 Register rd,
5222 Register rn,
5223 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005224 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5225 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5226 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005227 VIXL_ASSERT(allow_macro_instructions_);
5228 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005229 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005230 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005231 uxtab16(cond, rd, rn, operand);
5232 }
5233 void Uxtab16(Register rd, Register rn, const Operand& operand) {
5234 Uxtab16(al, rd, rn, operand);
5235 }
5236
5237 void Uxtah(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005238 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5239 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5240 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005241 VIXL_ASSERT(allow_macro_instructions_);
5242 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005243 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005244 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005245 uxtah(cond, rd, rn, operand);
5246 }
5247 void Uxtah(Register rd, Register rn, const Operand& operand) {
5248 Uxtah(al, rd, rn, operand);
5249 }
5250
5251 void Uxtb(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005252 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5253 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005254 VIXL_ASSERT(allow_macro_instructions_);
5255 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005256 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005257 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005258 uxtb(cond, rd, operand);
5259 }
5260 void Uxtb(Register rd, const Operand& operand) { Uxtb(al, rd, operand); }
5261
5262 void Uxtb16(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005263 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5264 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005265 VIXL_ASSERT(allow_macro_instructions_);
5266 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005267 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005268 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005269 uxtb16(cond, rd, operand);
5270 }
5271 void Uxtb16(Register rd, const Operand& operand) { Uxtb16(al, rd, operand); }
5272
5273 void Uxth(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005274 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5275 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005276 VIXL_ASSERT(allow_macro_instructions_);
5277 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005278 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005279 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005280 uxth(cond, rd, operand);
5281 }
5282 void Uxth(Register rd, const Operand& operand) { Uxth(al, rd, operand); }
5283
5284 void Vaba(
5285 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005286 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5287 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5288 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005289 VIXL_ASSERT(allow_macro_instructions_);
5290 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005291 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005292 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005293 vaba(cond, dt, rd, rn, rm);
5294 }
5295 void Vaba(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5296 Vaba(al, dt, rd, rn, rm);
5297 }
5298
5299 void Vaba(
5300 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005301 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5302 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5303 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005304 VIXL_ASSERT(allow_macro_instructions_);
5305 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005306 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005307 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005308 vaba(cond, dt, rd, rn, rm);
5309 }
5310 void Vaba(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5311 Vaba(al, dt, rd, rn, rm);
5312 }
5313
5314 void Vabal(
5315 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005316 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5317 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5318 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005319 VIXL_ASSERT(allow_macro_instructions_);
5320 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005321 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005322 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005323 vabal(cond, dt, rd, rn, rm);
5324 }
5325 void Vabal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5326 Vabal(al, dt, rd, rn, rm);
5327 }
5328
5329 void Vabd(
5330 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005331 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5332 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5333 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005334 VIXL_ASSERT(allow_macro_instructions_);
5335 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005336 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005337 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005338 vabd(cond, dt, rd, rn, rm);
5339 }
5340 void Vabd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5341 Vabd(al, dt, rd, rn, rm);
5342 }
5343
5344 void Vabd(
5345 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005346 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5347 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5348 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005349 VIXL_ASSERT(allow_macro_instructions_);
5350 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005351 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005352 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005353 vabd(cond, dt, rd, rn, rm);
5354 }
5355 void Vabd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5356 Vabd(al, dt, rd, rn, rm);
5357 }
5358
5359 void Vabdl(
5360 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005361 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5362 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5363 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005364 VIXL_ASSERT(allow_macro_instructions_);
5365 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005366 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005367 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005368 vabdl(cond, dt, rd, rn, rm);
5369 }
5370 void Vabdl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5371 Vabdl(al, dt, rd, rn, rm);
5372 }
5373
5374 void Vabs(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005375 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5376 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005377 VIXL_ASSERT(allow_macro_instructions_);
5378 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005379 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005380 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005381 vabs(cond, dt, rd, rm);
5382 }
5383 void Vabs(DataType dt, DRegister rd, DRegister rm) { Vabs(al, dt, rd, rm); }
5384
5385 void Vabs(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005386 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5387 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005388 VIXL_ASSERT(allow_macro_instructions_);
5389 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005390 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005391 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005392 vabs(cond, dt, rd, rm);
5393 }
5394 void Vabs(DataType dt, QRegister rd, QRegister rm) { Vabs(al, dt, rd, rm); }
5395
5396 void Vabs(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005397 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5398 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005399 VIXL_ASSERT(allow_macro_instructions_);
5400 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005401 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005402 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005403 vabs(cond, dt, rd, rm);
5404 }
5405 void Vabs(DataType dt, SRegister rd, SRegister rm) { Vabs(al, dt, rd, rm); }
5406
5407 void Vacge(
5408 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005409 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5410 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5411 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005412 VIXL_ASSERT(allow_macro_instructions_);
5413 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005414 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005415 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005416 vacge(cond, dt, rd, rn, rm);
5417 }
5418 void Vacge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5419 Vacge(al, dt, rd, rn, rm);
5420 }
5421
5422 void Vacge(
5423 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005424 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5425 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5426 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005427 VIXL_ASSERT(allow_macro_instructions_);
5428 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005429 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005430 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005431 vacge(cond, dt, rd, rn, rm);
5432 }
5433 void Vacge(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5434 Vacge(al, dt, rd, rn, rm);
5435 }
5436
5437 void Vacgt(
5438 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005439 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5440 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5441 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005442 VIXL_ASSERT(allow_macro_instructions_);
5443 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005444 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005445 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005446 vacgt(cond, dt, rd, rn, rm);
5447 }
5448 void Vacgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5449 Vacgt(al, dt, rd, rn, rm);
5450 }
5451
5452 void Vacgt(
5453 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005454 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5455 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5456 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005457 VIXL_ASSERT(allow_macro_instructions_);
5458 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005459 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005460 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005461 vacgt(cond, dt, rd, rn, rm);
5462 }
5463 void Vacgt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5464 Vacgt(al, dt, rd, rn, rm);
5465 }
5466
5467 void Vacle(
5468 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005469 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5470 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5471 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005472 VIXL_ASSERT(allow_macro_instructions_);
5473 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005474 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005475 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005476 vacle(cond, dt, rd, rn, rm);
5477 }
5478 void Vacle(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5479 Vacle(al, dt, rd, rn, rm);
5480 }
5481
5482 void Vacle(
5483 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5485 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5486 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005487 VIXL_ASSERT(allow_macro_instructions_);
5488 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005489 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005490 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005491 vacle(cond, dt, rd, rn, rm);
5492 }
5493 void Vacle(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5494 Vacle(al, dt, rd, rn, rm);
5495 }
5496
5497 void Vaclt(
5498 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005499 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5500 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5501 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005502 VIXL_ASSERT(allow_macro_instructions_);
5503 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005504 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005505 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005506 vaclt(cond, dt, rd, rn, rm);
5507 }
5508 void Vaclt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5509 Vaclt(al, dt, rd, rn, rm);
5510 }
5511
5512 void Vaclt(
5513 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005514 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5515 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5516 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005517 VIXL_ASSERT(allow_macro_instructions_);
5518 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005519 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005520 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005521 vaclt(cond, dt, rd, rn, rm);
5522 }
5523 void Vaclt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5524 Vaclt(al, dt, rd, rn, rm);
5525 }
5526
5527 void Vadd(
5528 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005529 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5530 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5531 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005532 VIXL_ASSERT(allow_macro_instructions_);
5533 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005534 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005535 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005536 vadd(cond, dt, rd, rn, rm);
5537 }
5538 void Vadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5539 Vadd(al, dt, rd, rn, rm);
5540 }
5541
5542 void Vadd(
5543 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005544 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5545 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5546 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005547 VIXL_ASSERT(allow_macro_instructions_);
5548 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005549 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005550 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005551 vadd(cond, dt, rd, rn, rm);
5552 }
5553 void Vadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5554 Vadd(al, dt, rd, rn, rm);
5555 }
5556
5557 void Vadd(
5558 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005559 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5560 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5561 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005562 VIXL_ASSERT(allow_macro_instructions_);
5563 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005564 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005565 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005566 vadd(cond, dt, rd, rn, rm);
5567 }
5568 void Vadd(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
5569 Vadd(al, dt, rd, rn, rm);
5570 }
5571
5572 void Vaddhn(
5573 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005574 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5575 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5576 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005577 VIXL_ASSERT(allow_macro_instructions_);
5578 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005579 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005580 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005581 vaddhn(cond, dt, rd, rn, rm);
5582 }
5583 void Vaddhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
5584 Vaddhn(al, dt, rd, rn, rm);
5585 }
5586
5587 void Vaddl(
5588 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005589 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5590 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5591 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005592 VIXL_ASSERT(allow_macro_instructions_);
5593 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005594 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005595 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005596 vaddl(cond, dt, rd, rn, rm);
5597 }
5598 void Vaddl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5599 Vaddl(al, dt, rd, rn, rm);
5600 }
5601
5602 void Vaddw(
5603 Condition cond, DataType dt, QRegister rd, QRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005604 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5605 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5606 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005607 VIXL_ASSERT(allow_macro_instructions_);
5608 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005609 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005610 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005611 vaddw(cond, dt, rd, rn, rm);
5612 }
5613 void Vaddw(DataType dt, QRegister rd, QRegister rn, DRegister rm) {
5614 Vaddw(al, dt, rd, rn, rm);
5615 }
5616
5617 void Vand(Condition cond,
5618 DataType dt,
5619 DRegister rd,
5620 DRegister rn,
5621 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005622 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5623 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5624 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005625 VIXL_ASSERT(allow_macro_instructions_);
5626 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005627 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005628 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005629 vand(cond, dt, rd, rn, operand);
5630 }
5631 void Vand(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
5632 Vand(al, dt, rd, rn, operand);
5633 }
5634
5635 void Vand(Condition cond,
5636 DataType dt,
5637 QRegister rd,
5638 QRegister rn,
5639 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005640 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5641 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5642 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005643 VIXL_ASSERT(allow_macro_instructions_);
5644 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005645 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005646 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005647 vand(cond, dt, rd, rn, operand);
5648 }
5649 void Vand(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
5650 Vand(al, dt, rd, rn, operand);
5651 }
5652
5653 void Vbic(Condition cond,
5654 DataType dt,
5655 DRegister rd,
5656 DRegister rn,
5657 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005658 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5659 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5660 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005661 VIXL_ASSERT(allow_macro_instructions_);
5662 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005663 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005664 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005665 vbic(cond, dt, rd, rn, operand);
5666 }
5667 void Vbic(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
5668 Vbic(al, dt, rd, rn, operand);
5669 }
5670
5671 void Vbic(Condition cond,
5672 DataType dt,
5673 QRegister rd,
5674 QRegister rn,
5675 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005676 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5677 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5678 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005679 VIXL_ASSERT(allow_macro_instructions_);
5680 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005681 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005682 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005683 vbic(cond, dt, rd, rn, operand);
5684 }
5685 void Vbic(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
5686 Vbic(al, dt, rd, rn, operand);
5687 }
5688
5689 void Vbif(
5690 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005691 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5693 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005694 VIXL_ASSERT(allow_macro_instructions_);
5695 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005696 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005697 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005698 vbif(cond, dt, rd, rn, rm);
5699 }
5700 void Vbif(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5701 Vbif(al, dt, rd, rn, rm);
5702 }
5703 void Vbif(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5704 Vbif(cond, kDataTypeValueNone, rd, rn, rm);
5705 }
5706 void Vbif(DRegister rd, DRegister rn, DRegister rm) {
5707 Vbif(al, kDataTypeValueNone, rd, rn, rm);
5708 }
5709
5710 void Vbif(
5711 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005712 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5713 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5714 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005715 VIXL_ASSERT(allow_macro_instructions_);
5716 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005717 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005718 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005719 vbif(cond, dt, rd, rn, rm);
5720 }
5721 void Vbif(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5722 Vbif(al, dt, rd, rn, rm);
5723 }
5724 void Vbif(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5725 Vbif(cond, kDataTypeValueNone, rd, rn, rm);
5726 }
5727 void Vbif(QRegister rd, QRegister rn, QRegister rm) {
5728 Vbif(al, kDataTypeValueNone, rd, rn, rm);
5729 }
5730
5731 void Vbit(
5732 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005733 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5734 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5735 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005736 VIXL_ASSERT(allow_macro_instructions_);
5737 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005738 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005739 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005740 vbit(cond, dt, rd, rn, rm);
5741 }
5742 void Vbit(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5743 Vbit(al, dt, rd, rn, rm);
5744 }
5745 void Vbit(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5746 Vbit(cond, kDataTypeValueNone, rd, rn, rm);
5747 }
5748 void Vbit(DRegister rd, DRegister rn, DRegister rm) {
5749 Vbit(al, kDataTypeValueNone, rd, rn, rm);
5750 }
5751
5752 void Vbit(
5753 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005754 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5755 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5756 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005757 VIXL_ASSERT(allow_macro_instructions_);
5758 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005759 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005760 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005761 vbit(cond, dt, rd, rn, rm);
5762 }
5763 void Vbit(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5764 Vbit(al, dt, rd, rn, rm);
5765 }
5766 void Vbit(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5767 Vbit(cond, kDataTypeValueNone, rd, rn, rm);
5768 }
5769 void Vbit(QRegister rd, QRegister rn, QRegister rm) {
5770 Vbit(al, kDataTypeValueNone, rd, rn, rm);
5771 }
5772
5773 void Vbsl(
5774 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005775 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5776 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5777 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005778 VIXL_ASSERT(allow_macro_instructions_);
5779 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005780 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005781 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005782 vbsl(cond, dt, rd, rn, rm);
5783 }
5784 void Vbsl(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5785 Vbsl(al, dt, rd, rn, rm);
5786 }
5787 void Vbsl(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5788 Vbsl(cond, kDataTypeValueNone, rd, rn, rm);
5789 }
5790 void Vbsl(DRegister rd, DRegister rn, DRegister rm) {
5791 Vbsl(al, kDataTypeValueNone, rd, rn, rm);
5792 }
5793
5794 void Vbsl(
5795 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005796 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5797 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5798 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005799 VIXL_ASSERT(allow_macro_instructions_);
5800 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005801 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005802 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005803 vbsl(cond, dt, rd, rn, rm);
5804 }
5805 void Vbsl(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5806 Vbsl(al, dt, rd, rn, rm);
5807 }
5808 void Vbsl(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5809 Vbsl(cond, kDataTypeValueNone, rd, rn, rm);
5810 }
5811 void Vbsl(QRegister rd, QRegister rn, QRegister rm) {
5812 Vbsl(al, kDataTypeValueNone, rd, rn, rm);
5813 }
5814
5815 void Vceq(Condition cond,
5816 DataType dt,
5817 DRegister rd,
5818 DRegister rm,
5819 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005820 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5821 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5822 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005823 VIXL_ASSERT(allow_macro_instructions_);
5824 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005825 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005826 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005827 vceq(cond, dt, rd, rm, operand);
5828 }
5829 void Vceq(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5830 Vceq(al, dt, rd, rm, operand);
5831 }
5832
5833 void Vceq(Condition cond,
5834 DataType dt,
5835 QRegister rd,
5836 QRegister rm,
5837 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005838 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5839 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5840 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005841 VIXL_ASSERT(allow_macro_instructions_);
5842 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005843 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005844 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005845 vceq(cond, dt, rd, rm, operand);
5846 }
5847 void Vceq(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5848 Vceq(al, dt, rd, rm, operand);
5849 }
5850
5851 void Vceq(
5852 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister 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());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005858 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005859 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005860 vceq(cond, dt, rd, rn, rm);
5861 }
5862 void Vceq(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5863 Vceq(al, dt, rd, rn, rm);
5864 }
5865
5866 void Vceq(
5867 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005868 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5869 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5870 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005871 VIXL_ASSERT(allow_macro_instructions_);
5872 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005873 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005874 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005875 vceq(cond, dt, rd, rn, rm);
5876 }
5877 void Vceq(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5878 Vceq(al, dt, rd, rn, rm);
5879 }
5880
5881 void Vcge(Condition cond,
5882 DataType dt,
5883 DRegister rd,
5884 DRegister rm,
5885 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005886 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5887 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5888 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005889 VIXL_ASSERT(allow_macro_instructions_);
5890 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005891 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005892 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005893 vcge(cond, dt, rd, rm, operand);
5894 }
5895 void Vcge(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5896 Vcge(al, dt, rd, rm, operand);
5897 }
5898
5899 void Vcge(Condition cond,
5900 DataType dt,
5901 QRegister rd,
5902 QRegister rm,
5903 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005904 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5905 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5906 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005907 VIXL_ASSERT(allow_macro_instructions_);
5908 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005909 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005910 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005911 vcge(cond, dt, rd, rm, operand);
5912 }
5913 void Vcge(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5914 Vcge(al, dt, rd, rm, operand);
5915 }
5916
5917 void Vcge(
5918 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister 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());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005924 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005925 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005926 vcge(cond, dt, rd, rn, rm);
5927 }
5928 void Vcge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5929 Vcge(al, dt, rd, rn, rm);
5930 }
5931
5932 void Vcge(
5933 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005934 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5935 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5936 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005937 VIXL_ASSERT(allow_macro_instructions_);
5938 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005939 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005940 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005941 vcge(cond, dt, rd, rn, rm);
5942 }
5943 void Vcge(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5944 Vcge(al, dt, rd, rn, rm);
5945 }
5946
5947 void Vcgt(Condition cond,
5948 DataType dt,
5949 DRegister rd,
5950 DRegister rm,
5951 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005952 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5953 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5954 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005955 VIXL_ASSERT(allow_macro_instructions_);
5956 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005957 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005958 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005959 vcgt(cond, dt, rd, rm, operand);
5960 }
5961 void Vcgt(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
5962 Vcgt(al, dt, rd, rm, operand);
5963 }
5964
5965 void Vcgt(Condition cond,
5966 DataType dt,
5967 QRegister rd,
5968 QRegister rm,
5969 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005970 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5971 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5972 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005973 VIXL_ASSERT(allow_macro_instructions_);
5974 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005975 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005976 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005977 vcgt(cond, dt, rd, rm, operand);
5978 }
5979 void Vcgt(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5980 Vcgt(al, dt, rd, rm, operand);
5981 }
5982
5983 void Vcgt(
5984 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005985 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5986 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5987 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005988 VIXL_ASSERT(allow_macro_instructions_);
5989 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005990 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005991 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005992 vcgt(cond, dt, rd, rn, rm);
5993 }
5994 void Vcgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5995 Vcgt(al, dt, rd, rn, rm);
5996 }
5997
5998 void Vcgt(
5999 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006000 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6001 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6002 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006003 VIXL_ASSERT(allow_macro_instructions_);
6004 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006005 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006006 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006007 vcgt(cond, dt, rd, rn, rm);
6008 }
6009 void Vcgt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6010 Vcgt(al, dt, rd, rn, rm);
6011 }
6012
6013 void Vcle(Condition cond,
6014 DataType dt,
6015 DRegister rd,
6016 DRegister rm,
6017 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006018 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6019 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6020 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006021 VIXL_ASSERT(allow_macro_instructions_);
6022 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006023 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006024 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006025 vcle(cond, dt, rd, rm, operand);
6026 }
6027 void Vcle(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
6028 Vcle(al, dt, rd, rm, operand);
6029 }
6030
6031 void Vcle(Condition cond,
6032 DataType dt,
6033 QRegister rd,
6034 QRegister rm,
6035 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006036 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6037 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6038 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006039 VIXL_ASSERT(allow_macro_instructions_);
6040 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006041 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006042 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006043 vcle(cond, dt, rd, rm, operand);
6044 }
6045 void Vcle(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
6046 Vcle(al, dt, rd, rm, operand);
6047 }
6048
6049 void Vcle(
6050 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006051 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6052 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6053 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006054 VIXL_ASSERT(allow_macro_instructions_);
6055 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006056 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006057 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006058 vcle(cond, dt, rd, rn, rm);
6059 }
6060 void Vcle(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6061 Vcle(al, dt, rd, rn, rm);
6062 }
6063
6064 void Vcle(
6065 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006066 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6067 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6068 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006069 VIXL_ASSERT(allow_macro_instructions_);
6070 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006071 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006072 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006073 vcle(cond, dt, rd, rn, rm);
6074 }
6075 void Vcle(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6076 Vcle(al, dt, rd, rn, rm);
6077 }
6078
6079 void Vcls(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006080 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6081 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006082 VIXL_ASSERT(allow_macro_instructions_);
6083 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006084 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006085 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006086 vcls(cond, dt, rd, rm);
6087 }
6088 void Vcls(DataType dt, DRegister rd, DRegister rm) { Vcls(al, dt, rd, rm); }
6089
6090 void Vcls(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006091 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6092 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006093 VIXL_ASSERT(allow_macro_instructions_);
6094 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006095 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006096 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006097 vcls(cond, dt, rd, rm);
6098 }
6099 void Vcls(DataType dt, QRegister rd, QRegister rm) { Vcls(al, dt, rd, rm); }
6100
6101 void Vclt(Condition cond,
6102 DataType dt,
6103 DRegister rd,
6104 DRegister rm,
6105 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006106 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6107 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6108 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006109 VIXL_ASSERT(allow_macro_instructions_);
6110 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006111 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006112 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006113 vclt(cond, dt, rd, rm, operand);
6114 }
6115 void Vclt(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
6116 Vclt(al, dt, rd, rm, operand);
6117 }
6118
6119 void Vclt(Condition cond,
6120 DataType dt,
6121 QRegister rd,
6122 QRegister rm,
6123 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006124 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6125 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6126 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006127 VIXL_ASSERT(allow_macro_instructions_);
6128 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006129 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006130 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006131 vclt(cond, dt, rd, rm, operand);
6132 }
6133 void Vclt(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
6134 Vclt(al, dt, rd, rm, operand);
6135 }
6136
6137 void Vclt(
6138 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006139 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6140 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6141 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006142 VIXL_ASSERT(allow_macro_instructions_);
6143 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006144 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006145 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006146 vclt(cond, dt, rd, rn, rm);
6147 }
6148 void Vclt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6149 Vclt(al, dt, rd, rn, rm);
6150 }
6151
6152 void Vclt(
6153 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006154 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6155 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6156 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006157 VIXL_ASSERT(allow_macro_instructions_);
6158 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006159 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006160 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006161 vclt(cond, dt, rd, rn, rm);
6162 }
6163 void Vclt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6164 Vclt(al, dt, rd, rn, rm);
6165 }
6166
6167 void Vclz(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006168 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6169 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006170 VIXL_ASSERT(allow_macro_instructions_);
6171 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006172 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006173 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006174 vclz(cond, dt, rd, rm);
6175 }
6176 void Vclz(DataType dt, DRegister rd, DRegister rm) { Vclz(al, dt, rd, rm); }
6177
6178 void Vclz(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006179 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6180 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006181 VIXL_ASSERT(allow_macro_instructions_);
6182 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006183 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006184 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006185 vclz(cond, dt, rd, rm);
6186 }
6187 void Vclz(DataType dt, QRegister rd, QRegister rm) { Vclz(al, dt, rd, rm); }
6188
Vincent Belliard07f9e742017-04-21 13:10:07 -07006189 void Vcmp(Condition cond,
6190 DataType dt,
6191 SRegister rd,
6192 const SOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006193 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Vincent Belliard07f9e742017-04-21 13:10:07 -07006194 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006195 VIXL_ASSERT(allow_macro_instructions_);
6196 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006197 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006198 ITScope it_scope(this, &cond, guard);
Vincent Belliard07f9e742017-04-21 13:10:07 -07006199 vcmp(cond, dt, rd, operand);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006200 }
Vincent Belliard07f9e742017-04-21 13:10:07 -07006201 void Vcmp(DataType dt, SRegister rd, const SOperand& operand) {
6202 Vcmp(al, dt, rd, operand);
6203 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01006204
Vincent Belliard07f9e742017-04-21 13:10:07 -07006205 void Vcmp(Condition cond,
6206 DataType dt,
6207 DRegister rd,
6208 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006209 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Vincent Belliard07f9e742017-04-21 13:10:07 -07006210 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006211 VIXL_ASSERT(allow_macro_instructions_);
6212 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006213 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006214 ITScope it_scope(this, &cond, guard);
Vincent Belliard07f9e742017-04-21 13:10:07 -07006215 vcmp(cond, dt, rd, operand);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006216 }
Vincent Belliard07f9e742017-04-21 13:10:07 -07006217 void Vcmp(DataType dt, DRegister rd, const DOperand& operand) {
6218 Vcmp(al, dt, rd, operand);
6219 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01006220
Vincent Belliard07f9e742017-04-21 13:10:07 -07006221 void Vcmpe(Condition cond,
6222 DataType dt,
6223 SRegister rd,
6224 const SOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006225 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Vincent Belliard07f9e742017-04-21 13:10:07 -07006226 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006227 VIXL_ASSERT(allow_macro_instructions_);
6228 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006229 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006230 ITScope it_scope(this, &cond, guard);
Vincent Belliard07f9e742017-04-21 13:10:07 -07006231 vcmpe(cond, dt, rd, operand);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006232 }
Vincent Belliard07f9e742017-04-21 13:10:07 -07006233 void Vcmpe(DataType dt, SRegister rd, const SOperand& operand) {
6234 Vcmpe(al, dt, rd, operand);
6235 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01006236
Vincent Belliard07f9e742017-04-21 13:10:07 -07006237 void Vcmpe(Condition cond,
6238 DataType dt,
6239 DRegister rd,
6240 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006241 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Vincent Belliard07f9e742017-04-21 13:10:07 -07006242 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006243 VIXL_ASSERT(allow_macro_instructions_);
6244 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006245 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006246 ITScope it_scope(this, &cond, guard);
Vincent Belliard07f9e742017-04-21 13:10:07 -07006247 vcmpe(cond, dt, rd, operand);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006248 }
Vincent Belliard07f9e742017-04-21 13:10:07 -07006249 void Vcmpe(DataType dt, DRegister rd, const DOperand& operand) {
6250 Vcmpe(al, dt, rd, operand);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006251 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01006252
6253 void Vcnt(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006254 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6255 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006256 VIXL_ASSERT(allow_macro_instructions_);
6257 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006258 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006259 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006260 vcnt(cond, dt, rd, rm);
6261 }
6262 void Vcnt(DataType dt, DRegister rd, DRegister rm) { Vcnt(al, dt, rd, rm); }
6263
6264 void Vcnt(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006265 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6266 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006267 VIXL_ASSERT(allow_macro_instructions_);
6268 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006269 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006270 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006271 vcnt(cond, dt, rd, rm);
6272 }
6273 void Vcnt(DataType dt, QRegister rd, QRegister rm) { Vcnt(al, dt, rd, rm); }
6274
6275 void Vcvt(
6276 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister 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());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006281 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006282 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006283 vcvt(cond, dt1, dt2, rd, rm);
6284 }
6285 void Vcvt(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6286 Vcvt(al, dt1, dt2, rd, rm);
6287 }
6288
6289 void Vcvt(
6290 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister 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());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006295 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006296 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006297 vcvt(cond, dt1, dt2, rd, rm);
6298 }
6299 void Vcvt(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6300 Vcvt(al, dt1, dt2, rd, rm);
6301 }
6302
6303 void Vcvt(Condition cond,
6304 DataType dt1,
6305 DataType dt2,
6306 DRegister rd,
6307 DRegister rm,
6308 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006309 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6310 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006311 VIXL_ASSERT(allow_macro_instructions_);
6312 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006313 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006314 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006315 vcvt(cond, dt1, dt2, rd, rm, fbits);
6316 }
6317 void Vcvt(
6318 DataType dt1, DataType dt2, DRegister rd, DRegister rm, int32_t fbits) {
6319 Vcvt(al, dt1, dt2, rd, rm, fbits);
6320 }
6321
6322 void Vcvt(Condition cond,
6323 DataType dt1,
6324 DataType dt2,
6325 QRegister rd,
6326 QRegister rm,
6327 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006328 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6329 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006330 VIXL_ASSERT(allow_macro_instructions_);
6331 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006332 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006333 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006334 vcvt(cond, dt1, dt2, rd, rm, fbits);
6335 }
6336 void Vcvt(
6337 DataType dt1, DataType dt2, QRegister rd, QRegister rm, int32_t fbits) {
6338 Vcvt(al, dt1, dt2, rd, rm, fbits);
6339 }
6340
6341 void Vcvt(Condition cond,
6342 DataType dt1,
6343 DataType dt2,
6344 SRegister rd,
6345 SRegister rm,
6346 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006347 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6348 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006349 VIXL_ASSERT(allow_macro_instructions_);
6350 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006351 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006352 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006353 vcvt(cond, dt1, dt2, rd, rm, fbits);
6354 }
6355 void Vcvt(
6356 DataType dt1, DataType dt2, SRegister rd, SRegister rm, int32_t fbits) {
6357 Vcvt(al, dt1, dt2, rd, rm, fbits);
6358 }
6359
6360 void Vcvt(
6361 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006362 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6363 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006364 VIXL_ASSERT(allow_macro_instructions_);
6365 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006366 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006367 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006368 vcvt(cond, dt1, dt2, rd, rm);
6369 }
6370 void Vcvt(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
6371 Vcvt(al, dt1, dt2, rd, rm);
6372 }
6373
6374 void Vcvt(
6375 Condition cond, DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006376 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6377 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006378 VIXL_ASSERT(allow_macro_instructions_);
6379 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006380 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006381 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006382 vcvt(cond, dt1, dt2, rd, rm);
6383 }
6384 void Vcvt(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
6385 Vcvt(al, dt1, dt2, rd, rm);
6386 }
6387
6388 void Vcvt(
6389 Condition cond, DataType dt1, DataType dt2, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006390 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6391 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006392 VIXL_ASSERT(allow_macro_instructions_);
6393 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006394 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006395 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006396 vcvt(cond, dt1, dt2, rd, rm);
6397 }
6398 void Vcvt(DataType dt1, DataType dt2, DRegister rd, QRegister rm) {
6399 Vcvt(al, dt1, dt2, rd, rm);
6400 }
6401
6402 void Vcvt(
6403 Condition cond, DataType dt1, DataType dt2, QRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006404 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6405 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006406 VIXL_ASSERT(allow_macro_instructions_);
6407 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006408 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006409 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006410 vcvt(cond, dt1, dt2, rd, rm);
6411 }
6412 void Vcvt(DataType dt1, DataType dt2, QRegister rd, DRegister rm) {
6413 Vcvt(al, dt1, dt2, rd, rm);
6414 }
6415
6416 void Vcvt(
6417 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister 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());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006422 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006423 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006424 vcvt(cond, dt1, dt2, rd, rm);
6425 }
6426 void Vcvt(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6427 Vcvt(al, dt1, dt2, rd, rm);
6428 }
6429
6430 void Vcvta(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006431 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6432 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006433 VIXL_ASSERT(allow_macro_instructions_);
6434 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006435 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006436 vcvta(dt1, dt2, rd, rm);
6437 }
6438
6439 void Vcvta(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006440 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6441 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006442 VIXL_ASSERT(allow_macro_instructions_);
6443 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006444 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006445 vcvta(dt1, dt2, rd, rm);
6446 }
6447
6448 void Vcvta(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006449 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6450 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006451 VIXL_ASSERT(allow_macro_instructions_);
6452 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006453 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006454 vcvta(dt1, dt2, rd, rm);
6455 }
6456
6457 void Vcvta(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006458 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6459 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006460 VIXL_ASSERT(allow_macro_instructions_);
6461 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006462 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006463 vcvta(dt1, dt2, rd, rm);
6464 }
6465
6466 void Vcvtb(
6467 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006468 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6469 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006470 VIXL_ASSERT(allow_macro_instructions_);
6471 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006472 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006473 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006474 vcvtb(cond, dt1, dt2, rd, rm);
6475 }
6476 void Vcvtb(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6477 Vcvtb(al, dt1, dt2, rd, rm);
6478 }
6479
6480 void Vcvtb(
6481 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006482 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6483 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006484 VIXL_ASSERT(allow_macro_instructions_);
6485 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006486 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006487 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006488 vcvtb(cond, dt1, dt2, rd, rm);
6489 }
6490 void Vcvtb(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6491 Vcvtb(al, dt1, dt2, rd, rm);
6492 }
6493
6494 void Vcvtb(
6495 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006496 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6497 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006498 VIXL_ASSERT(allow_macro_instructions_);
6499 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006500 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006501 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006502 vcvtb(cond, dt1, dt2, rd, rm);
6503 }
6504 void Vcvtb(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6505 Vcvtb(al, dt1, dt2, rd, rm);
6506 }
6507
6508 void Vcvtm(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006509 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6510 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006511 VIXL_ASSERT(allow_macro_instructions_);
6512 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006513 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006514 vcvtm(dt1, dt2, rd, rm);
6515 }
6516
6517 void Vcvtm(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006518 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6519 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006520 VIXL_ASSERT(allow_macro_instructions_);
6521 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006522 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006523 vcvtm(dt1, dt2, rd, rm);
6524 }
6525
6526 void Vcvtm(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006527 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6528 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006529 VIXL_ASSERT(allow_macro_instructions_);
6530 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006531 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006532 vcvtm(dt1, dt2, rd, rm);
6533 }
6534
6535 void Vcvtm(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006536 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6537 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006538 VIXL_ASSERT(allow_macro_instructions_);
6539 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006540 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006541 vcvtm(dt1, dt2, rd, rm);
6542 }
6543
6544 void Vcvtn(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006545 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6546 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006547 VIXL_ASSERT(allow_macro_instructions_);
6548 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006549 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006550 vcvtn(dt1, dt2, rd, rm);
6551 }
6552
6553 void Vcvtn(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006554 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6555 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006556 VIXL_ASSERT(allow_macro_instructions_);
6557 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006558 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006559 vcvtn(dt1, dt2, rd, rm);
6560 }
6561
6562 void Vcvtn(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6564 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006565 VIXL_ASSERT(allow_macro_instructions_);
6566 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006567 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006568 vcvtn(dt1, dt2, rd, rm);
6569 }
6570
6571 void Vcvtn(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006572 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6573 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006574 VIXL_ASSERT(allow_macro_instructions_);
6575 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006576 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006577 vcvtn(dt1, dt2, rd, rm);
6578 }
6579
6580 void Vcvtp(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006581 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6582 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006583 VIXL_ASSERT(allow_macro_instructions_);
6584 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006585 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006586 vcvtp(dt1, dt2, rd, rm);
6587 }
6588
6589 void Vcvtp(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006590 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6591 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006592 VIXL_ASSERT(allow_macro_instructions_);
6593 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006594 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006595 vcvtp(dt1, dt2, rd, rm);
6596 }
6597
6598 void Vcvtp(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006599 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6600 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006601 VIXL_ASSERT(allow_macro_instructions_);
6602 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006603 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006604 vcvtp(dt1, dt2, rd, rm);
6605 }
6606
6607 void Vcvtp(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006608 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6609 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006610 VIXL_ASSERT(allow_macro_instructions_);
6611 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006612 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006613 vcvtp(dt1, dt2, rd, rm);
6614 }
6615
6616 void Vcvtr(
6617 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006618 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6619 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006620 VIXL_ASSERT(allow_macro_instructions_);
6621 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006622 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006623 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006624 vcvtr(cond, dt1, dt2, rd, rm);
6625 }
6626 void Vcvtr(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6627 Vcvtr(al, dt1, dt2, rd, rm);
6628 }
6629
6630 void Vcvtr(
6631 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006632 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6633 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006634 VIXL_ASSERT(allow_macro_instructions_);
6635 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006636 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006637 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006638 vcvtr(cond, dt1, dt2, rd, rm);
6639 }
6640 void Vcvtr(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6641 Vcvtr(al, dt1, dt2, rd, rm);
6642 }
6643
6644 void Vcvtt(
6645 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006646 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6647 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006648 VIXL_ASSERT(allow_macro_instructions_);
6649 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006650 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006651 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006652 vcvtt(cond, dt1, dt2, rd, rm);
6653 }
6654 void Vcvtt(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6655 Vcvtt(al, dt1, dt2, rd, rm);
6656 }
6657
6658 void Vcvtt(
6659 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006660 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6661 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006662 VIXL_ASSERT(allow_macro_instructions_);
6663 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006664 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006665 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006666 vcvtt(cond, dt1, dt2, rd, rm);
6667 }
6668 void Vcvtt(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6669 Vcvtt(al, dt1, dt2, rd, rm);
6670 }
6671
6672 void Vcvtt(
6673 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006674 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6675 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006676 VIXL_ASSERT(allow_macro_instructions_);
6677 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006678 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006679 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006680 vcvtt(cond, dt1, dt2, rd, rm);
6681 }
6682 void Vcvtt(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6683 Vcvtt(al, dt1, dt2, rd, rm);
6684 }
6685
6686 void Vdiv(
6687 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006688 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6689 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6690 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006691 VIXL_ASSERT(allow_macro_instructions_);
6692 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006693 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006694 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006695 vdiv(cond, dt, rd, rn, rm);
6696 }
6697 void Vdiv(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6698 Vdiv(al, dt, rd, rn, rm);
6699 }
6700
6701 void Vdiv(
6702 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006703 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6704 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6705 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006706 VIXL_ASSERT(allow_macro_instructions_);
6707 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006708 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006709 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006710 vdiv(cond, dt, rd, rn, rm);
6711 }
6712 void Vdiv(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6713 Vdiv(al, dt, rd, rn, rm);
6714 }
6715
6716 void Vdup(Condition cond, DataType dt, QRegister rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006717 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6718 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006719 VIXL_ASSERT(allow_macro_instructions_);
6720 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006721 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006722 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006723 vdup(cond, dt, rd, rt);
6724 }
6725 void Vdup(DataType dt, QRegister rd, Register rt) { Vdup(al, dt, rd, rt); }
6726
6727 void Vdup(Condition cond, DataType dt, DRegister rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006728 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6729 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006730 VIXL_ASSERT(allow_macro_instructions_);
6731 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006732 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006733 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006734 vdup(cond, dt, rd, rt);
6735 }
6736 void Vdup(DataType dt, DRegister rd, Register rt) { Vdup(al, dt, rd, rt); }
6737
6738 void Vdup(Condition cond, DataType dt, DRegister rd, DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006739 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6740 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006741 VIXL_ASSERT(allow_macro_instructions_);
6742 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006743 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006744 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006745 vdup(cond, dt, rd, rm);
6746 }
6747 void Vdup(DataType dt, DRegister rd, DRegisterLane rm) {
6748 Vdup(al, dt, rd, rm);
6749 }
6750
6751 void Vdup(Condition cond, DataType dt, QRegister rd, DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006752 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6753 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006754 VIXL_ASSERT(allow_macro_instructions_);
6755 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006756 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006757 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006758 vdup(cond, dt, rd, rm);
6759 }
6760 void Vdup(DataType dt, QRegister rd, DRegisterLane rm) {
6761 Vdup(al, dt, rd, rm);
6762 }
6763
6764 void Veor(
6765 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006766 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6767 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6768 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006769 VIXL_ASSERT(allow_macro_instructions_);
6770 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006771 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006772 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006773 veor(cond, dt, rd, rn, rm);
6774 }
6775 void Veor(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6776 Veor(al, dt, rd, rn, rm);
6777 }
6778 void Veor(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
6779 Veor(cond, kDataTypeValueNone, rd, rn, rm);
6780 }
6781 void Veor(DRegister rd, DRegister rn, DRegister rm) {
6782 Veor(al, kDataTypeValueNone, rd, rn, rm);
6783 }
6784
6785 void Veor(
6786 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006787 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6788 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6789 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006790 VIXL_ASSERT(allow_macro_instructions_);
6791 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006792 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006793 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006794 veor(cond, dt, rd, rn, rm);
6795 }
6796 void Veor(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6797 Veor(al, dt, rd, rn, rm);
6798 }
6799 void Veor(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
6800 Veor(cond, kDataTypeValueNone, rd, rn, rm);
6801 }
6802 void Veor(QRegister rd, QRegister rn, QRegister rm) {
6803 Veor(al, kDataTypeValueNone, rd, rn, rm);
6804 }
6805
6806 void Vext(Condition cond,
6807 DataType dt,
6808 DRegister rd,
6809 DRegister rn,
6810 DRegister rm,
6811 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006812 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6813 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6814 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6815 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006816 VIXL_ASSERT(allow_macro_instructions_);
6817 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006818 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006819 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006820 vext(cond, dt, rd, rn, rm, operand);
6821 }
6822 void Vext(DataType dt,
6823 DRegister rd,
6824 DRegister rn,
6825 DRegister rm,
6826 const DOperand& operand) {
6827 Vext(al, dt, rd, rn, rm, operand);
6828 }
6829
6830 void Vext(Condition cond,
6831 DataType dt,
6832 QRegister rd,
6833 QRegister rn,
6834 QRegister rm,
6835 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006836 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6837 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6838 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6839 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006840 VIXL_ASSERT(allow_macro_instructions_);
6841 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006842 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006843 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006844 vext(cond, dt, rd, rn, rm, operand);
6845 }
6846 void Vext(DataType dt,
6847 QRegister rd,
6848 QRegister rn,
6849 QRegister rm,
6850 const QOperand& operand) {
6851 Vext(al, dt, rd, rn, rm, operand);
6852 }
6853
6854 void Vfma(
6855 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006856 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6857 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6858 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006859 VIXL_ASSERT(allow_macro_instructions_);
6860 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006861 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006862 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006863 vfma(cond, dt, rd, rn, rm);
6864 }
6865 void Vfma(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6866 Vfma(al, dt, rd, rn, rm);
6867 }
6868
6869 void Vfma(
6870 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006871 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6872 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6873 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006874 VIXL_ASSERT(allow_macro_instructions_);
6875 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006876 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006877 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006878 vfma(cond, dt, rd, rn, rm);
6879 }
6880 void Vfma(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6881 Vfma(al, dt, rd, rn, rm);
6882 }
6883
6884 void Vfma(
6885 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006886 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6887 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6888 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006889 VIXL_ASSERT(allow_macro_instructions_);
6890 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006891 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006892 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006893 vfma(cond, dt, rd, rn, rm);
6894 }
6895 void Vfma(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6896 Vfma(al, dt, rd, rn, rm);
6897 }
6898
6899 void Vfms(
6900 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006901 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6902 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6903 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006904 VIXL_ASSERT(allow_macro_instructions_);
6905 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006906 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006907 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006908 vfms(cond, dt, rd, rn, rm);
6909 }
6910 void Vfms(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6911 Vfms(al, dt, rd, rn, rm);
6912 }
6913
6914 void Vfms(
6915 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006916 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6917 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6918 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006919 VIXL_ASSERT(allow_macro_instructions_);
6920 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006921 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006922 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006923 vfms(cond, dt, rd, rn, rm);
6924 }
6925 void Vfms(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6926 Vfms(al, dt, rd, rn, rm);
6927 }
6928
6929 void Vfms(
6930 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006931 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6932 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6933 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006934 VIXL_ASSERT(allow_macro_instructions_);
6935 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006936 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006937 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006938 vfms(cond, dt, rd, rn, rm);
6939 }
6940 void Vfms(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6941 Vfms(al, dt, rd, rn, rm);
6942 }
6943
6944 void Vfnma(
6945 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006946 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6947 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6948 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006949 VIXL_ASSERT(allow_macro_instructions_);
6950 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006951 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006952 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006953 vfnma(cond, dt, rd, rn, rm);
6954 }
6955 void Vfnma(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6956 Vfnma(al, dt, rd, rn, rm);
6957 }
6958
6959 void Vfnma(
6960 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006961 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6962 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6963 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006964 VIXL_ASSERT(allow_macro_instructions_);
6965 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006966 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006967 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006968 vfnma(cond, dt, rd, rn, rm);
6969 }
6970 void Vfnma(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6971 Vfnma(al, dt, rd, rn, rm);
6972 }
6973
6974 void Vfnms(
6975 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006976 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6977 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6978 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006979 VIXL_ASSERT(allow_macro_instructions_);
6980 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006981 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006982 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006983 vfnms(cond, dt, rd, rn, rm);
6984 }
6985 void Vfnms(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6986 Vfnms(al, dt, rd, rn, rm);
6987 }
6988
6989 void Vfnms(
6990 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006991 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6992 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6993 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006994 VIXL_ASSERT(allow_macro_instructions_);
6995 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006996 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006997 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006998 vfnms(cond, dt, rd, rn, rm);
6999 }
7000 void Vfnms(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7001 Vfnms(al, dt, rd, rn, rm);
7002 }
7003
7004 void Vhadd(
7005 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007006 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7007 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7008 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007009 VIXL_ASSERT(allow_macro_instructions_);
7010 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007011 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007012 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007013 vhadd(cond, dt, rd, rn, rm);
7014 }
7015 void Vhadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7016 Vhadd(al, dt, rd, rn, rm);
7017 }
7018
7019 void Vhadd(
7020 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007021 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7022 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7023 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007024 VIXL_ASSERT(allow_macro_instructions_);
7025 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007026 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007027 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007028 vhadd(cond, dt, rd, rn, rm);
7029 }
7030 void Vhadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7031 Vhadd(al, dt, rd, rn, rm);
7032 }
7033
7034 void Vhsub(
7035 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007036 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7037 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7038 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007039 VIXL_ASSERT(allow_macro_instructions_);
7040 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007041 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007042 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007043 vhsub(cond, dt, rd, rn, rm);
7044 }
7045 void Vhsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7046 Vhsub(al, dt, rd, rn, rm);
7047 }
7048
7049 void Vhsub(
7050 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007051 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7052 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7053 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007054 VIXL_ASSERT(allow_macro_instructions_);
7055 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007056 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007057 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007058 vhsub(cond, dt, rd, rn, rm);
7059 }
7060 void Vhsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7061 Vhsub(al, dt, rd, rn, rm);
7062 }
7063
7064 void Vld1(Condition cond,
7065 DataType dt,
7066 const NeonRegisterList& nreglist,
7067 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007068 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7069 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007070 VIXL_ASSERT(allow_macro_instructions_);
7071 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007072 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007073 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007074 vld1(cond, dt, nreglist, operand);
7075 }
7076 void Vld1(DataType dt,
7077 const NeonRegisterList& nreglist,
7078 const AlignedMemOperand& operand) {
7079 Vld1(al, dt, nreglist, operand);
7080 }
7081
7082 void Vld2(Condition cond,
7083 DataType dt,
7084 const NeonRegisterList& nreglist,
7085 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007086 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7087 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007088 VIXL_ASSERT(allow_macro_instructions_);
7089 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007090 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007091 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007092 vld2(cond, dt, nreglist, operand);
7093 }
7094 void Vld2(DataType dt,
7095 const NeonRegisterList& nreglist,
7096 const AlignedMemOperand& operand) {
7097 Vld2(al, dt, nreglist, operand);
7098 }
7099
7100 void Vld3(Condition cond,
7101 DataType dt,
7102 const NeonRegisterList& nreglist,
7103 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007104 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7105 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007106 VIXL_ASSERT(allow_macro_instructions_);
7107 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007108 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007109 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007110 vld3(cond, dt, nreglist, operand);
7111 }
7112 void Vld3(DataType dt,
7113 const NeonRegisterList& nreglist,
7114 const AlignedMemOperand& operand) {
7115 Vld3(al, dt, nreglist, operand);
7116 }
7117
7118 void Vld3(Condition cond,
7119 DataType dt,
7120 const NeonRegisterList& nreglist,
7121 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007122 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7123 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007124 VIXL_ASSERT(allow_macro_instructions_);
7125 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007126 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007127 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007128 vld3(cond, dt, nreglist, operand);
7129 }
7130 void Vld3(DataType dt,
7131 const NeonRegisterList& nreglist,
7132 const MemOperand& operand) {
7133 Vld3(al, dt, nreglist, operand);
7134 }
7135
7136 void Vld4(Condition cond,
7137 DataType dt,
7138 const NeonRegisterList& nreglist,
7139 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007140 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7141 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007142 VIXL_ASSERT(allow_macro_instructions_);
7143 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007144 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007145 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007146 vld4(cond, dt, nreglist, operand);
7147 }
7148 void Vld4(DataType dt,
7149 const NeonRegisterList& nreglist,
7150 const AlignedMemOperand& operand) {
7151 Vld4(al, dt, nreglist, operand);
7152 }
7153
7154 void Vldm(Condition cond,
7155 DataType dt,
7156 Register rn,
7157 WriteBack write_back,
7158 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007159 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7160 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007161 VIXL_ASSERT(allow_macro_instructions_);
7162 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007163 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007164 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007165 vldm(cond, dt, rn, write_back, dreglist);
7166 }
7167 void Vldm(DataType dt,
7168 Register rn,
7169 WriteBack write_back,
7170 DRegisterList dreglist) {
7171 Vldm(al, dt, rn, write_back, dreglist);
7172 }
7173 void Vldm(Condition cond,
7174 Register rn,
7175 WriteBack write_back,
7176 DRegisterList dreglist) {
7177 Vldm(cond, kDataTypeValueNone, rn, write_back, dreglist);
7178 }
7179 void Vldm(Register rn, WriteBack write_back, DRegisterList dreglist) {
7180 Vldm(al, kDataTypeValueNone, rn, write_back, dreglist);
7181 }
7182
7183 void Vldm(Condition cond,
7184 DataType dt,
7185 Register rn,
7186 WriteBack write_back,
7187 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007188 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7189 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007190 VIXL_ASSERT(allow_macro_instructions_);
7191 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007192 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007193 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007194 vldm(cond, dt, rn, write_back, sreglist);
7195 }
7196 void Vldm(DataType dt,
7197 Register rn,
7198 WriteBack write_back,
7199 SRegisterList sreglist) {
7200 Vldm(al, dt, rn, write_back, sreglist);
7201 }
7202 void Vldm(Condition cond,
7203 Register rn,
7204 WriteBack write_back,
7205 SRegisterList sreglist) {
7206 Vldm(cond, kDataTypeValueNone, rn, write_back, sreglist);
7207 }
7208 void Vldm(Register rn, WriteBack write_back, SRegisterList sreglist) {
7209 Vldm(al, kDataTypeValueNone, rn, write_back, sreglist);
7210 }
7211
7212 void Vldmdb(Condition cond,
7213 DataType dt,
7214 Register rn,
7215 WriteBack write_back,
7216 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007217 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7218 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007219 VIXL_ASSERT(allow_macro_instructions_);
7220 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007221 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007222 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007223 vldmdb(cond, dt, rn, write_back, dreglist);
7224 }
7225 void Vldmdb(DataType dt,
7226 Register rn,
7227 WriteBack write_back,
7228 DRegisterList dreglist) {
7229 Vldmdb(al, dt, rn, write_back, dreglist);
7230 }
7231 void Vldmdb(Condition cond,
7232 Register rn,
7233 WriteBack write_back,
7234 DRegisterList dreglist) {
7235 Vldmdb(cond, kDataTypeValueNone, rn, write_back, dreglist);
7236 }
7237 void Vldmdb(Register rn, WriteBack write_back, DRegisterList dreglist) {
7238 Vldmdb(al, kDataTypeValueNone, rn, write_back, dreglist);
7239 }
7240
7241 void Vldmdb(Condition cond,
7242 DataType dt,
7243 Register rn,
7244 WriteBack write_back,
7245 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007246 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7247 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007248 VIXL_ASSERT(allow_macro_instructions_);
7249 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007250 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007251 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007252 vldmdb(cond, dt, rn, write_back, sreglist);
7253 }
7254 void Vldmdb(DataType dt,
7255 Register rn,
7256 WriteBack write_back,
7257 SRegisterList sreglist) {
7258 Vldmdb(al, dt, rn, write_back, sreglist);
7259 }
7260 void Vldmdb(Condition cond,
7261 Register rn,
7262 WriteBack write_back,
7263 SRegisterList sreglist) {
7264 Vldmdb(cond, kDataTypeValueNone, rn, write_back, sreglist);
7265 }
7266 void Vldmdb(Register rn, WriteBack write_back, SRegisterList sreglist) {
7267 Vldmdb(al, kDataTypeValueNone, rn, write_back, sreglist);
7268 }
7269
7270 void Vldmia(Condition cond,
7271 DataType dt,
7272 Register rn,
7273 WriteBack write_back,
7274 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007275 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7276 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007277 VIXL_ASSERT(allow_macro_instructions_);
7278 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007279 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007280 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007281 vldmia(cond, dt, rn, write_back, dreglist);
7282 }
7283 void Vldmia(DataType dt,
7284 Register rn,
7285 WriteBack write_back,
7286 DRegisterList dreglist) {
7287 Vldmia(al, dt, rn, write_back, dreglist);
7288 }
7289 void Vldmia(Condition cond,
7290 Register rn,
7291 WriteBack write_back,
7292 DRegisterList dreglist) {
7293 Vldmia(cond, kDataTypeValueNone, rn, write_back, dreglist);
7294 }
7295 void Vldmia(Register rn, WriteBack write_back, DRegisterList dreglist) {
7296 Vldmia(al, kDataTypeValueNone, rn, write_back, dreglist);
7297 }
7298
7299 void Vldmia(Condition cond,
7300 DataType dt,
7301 Register rn,
7302 WriteBack write_back,
7303 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007304 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7305 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007306 VIXL_ASSERT(allow_macro_instructions_);
7307 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007308 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007309 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007310 vldmia(cond, dt, rn, write_back, sreglist);
7311 }
7312 void Vldmia(DataType dt,
7313 Register rn,
7314 WriteBack write_back,
7315 SRegisterList sreglist) {
7316 Vldmia(al, dt, rn, write_back, sreglist);
7317 }
7318 void Vldmia(Condition cond,
7319 Register rn,
7320 WriteBack write_back,
7321 SRegisterList sreglist) {
7322 Vldmia(cond, kDataTypeValueNone, rn, write_back, sreglist);
7323 }
7324 void Vldmia(Register rn, WriteBack write_back, SRegisterList sreglist) {
7325 Vldmia(al, kDataTypeValueNone, rn, write_back, sreglist);
7326 }
7327
Alexandre Ramesd3832962016-07-04 15:03:43 +01007328
7329 void Vldr(Condition cond,
7330 DataType dt,
7331 DRegister rd,
7332 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007333 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7334 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007335 VIXL_ASSERT(allow_macro_instructions_);
7336 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007337 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007338 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007339 vldr(cond, dt, rd, operand);
7340 }
7341 void Vldr(DataType dt, DRegister rd, const MemOperand& operand) {
7342 Vldr(al, dt, rd, operand);
7343 }
7344 void Vldr(Condition cond, DRegister rd, const MemOperand& operand) {
7345 Vldr(cond, Untyped64, rd, operand);
7346 }
7347 void Vldr(DRegister rd, const MemOperand& operand) {
7348 Vldr(al, Untyped64, rd, operand);
7349 }
7350
Alexandre Ramesd3832962016-07-04 15:03:43 +01007351
7352 void Vldr(Condition cond,
7353 DataType dt,
7354 SRegister rd,
7355 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007356 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7357 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007358 VIXL_ASSERT(allow_macro_instructions_);
7359 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007360 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007361 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007362 vldr(cond, dt, rd, operand);
7363 }
7364 void Vldr(DataType dt, SRegister rd, const MemOperand& operand) {
7365 Vldr(al, dt, rd, operand);
7366 }
7367 void Vldr(Condition cond, SRegister rd, const MemOperand& operand) {
7368 Vldr(cond, Untyped32, rd, operand);
7369 }
7370 void Vldr(SRegister rd, const MemOperand& operand) {
7371 Vldr(al, Untyped32, rd, operand);
7372 }
7373
7374 void Vmax(
7375 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007376 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7377 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7378 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007379 VIXL_ASSERT(allow_macro_instructions_);
7380 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007381 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007382 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007383 vmax(cond, dt, rd, rn, rm);
7384 }
7385 void Vmax(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7386 Vmax(al, dt, rd, rn, rm);
7387 }
7388
7389 void Vmax(
7390 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007391 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7392 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7393 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007394 VIXL_ASSERT(allow_macro_instructions_);
7395 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007396 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007397 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007398 vmax(cond, dt, rd, rn, rm);
7399 }
7400 void Vmax(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7401 Vmax(al, dt, rd, rn, rm);
7402 }
7403
7404 void Vmaxnm(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007405 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7406 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7407 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007408 VIXL_ASSERT(allow_macro_instructions_);
7409 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007410 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007411 vmaxnm(dt, rd, rn, rm);
7412 }
7413
7414 void Vmaxnm(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007415 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7416 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7417 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007418 VIXL_ASSERT(allow_macro_instructions_);
7419 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007420 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007421 vmaxnm(dt, rd, rn, rm);
7422 }
7423
7424 void Vmaxnm(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007425 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7426 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7427 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007428 VIXL_ASSERT(allow_macro_instructions_);
7429 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007430 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007431 vmaxnm(dt, rd, rn, rm);
7432 }
7433
7434 void Vmin(
7435 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007436 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7437 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7438 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007439 VIXL_ASSERT(allow_macro_instructions_);
7440 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007441 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007442 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007443 vmin(cond, dt, rd, rn, rm);
7444 }
7445 void Vmin(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7446 Vmin(al, dt, rd, rn, rm);
7447 }
7448
7449 void Vmin(
7450 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007451 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7452 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7453 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007454 VIXL_ASSERT(allow_macro_instructions_);
7455 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007456 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007457 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007458 vmin(cond, dt, rd, rn, rm);
7459 }
7460 void Vmin(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7461 Vmin(al, dt, rd, rn, rm);
7462 }
7463
7464 void Vminnm(DataType dt, DRegister rd, DRegister rn, DRegister 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());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007470 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007471 vminnm(dt, rd, rn, rm);
7472 }
7473
7474 void Vminnm(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007475 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7476 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7477 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007478 VIXL_ASSERT(allow_macro_instructions_);
7479 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007480 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007481 vminnm(dt, rd, rn, rm);
7482 }
7483
7484 void Vminnm(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007485 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7486 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7487 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007488 VIXL_ASSERT(allow_macro_instructions_);
7489 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007490 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007491 vminnm(dt, rd, rn, rm);
7492 }
7493
7494 void Vmla(Condition cond,
7495 DataType dt,
7496 DRegister rd,
7497 DRegister rn,
7498 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007499 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7500 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7501 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007502 VIXL_ASSERT(allow_macro_instructions_);
7503 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007504 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007505 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007506 vmla(cond, dt, rd, rn, rm);
7507 }
7508 void Vmla(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
7509 Vmla(al, dt, rd, rn, rm);
7510 }
7511
7512 void Vmla(Condition cond,
7513 DataType dt,
7514 QRegister rd,
7515 QRegister rn,
7516 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007517 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7518 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7519 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007520 VIXL_ASSERT(allow_macro_instructions_);
7521 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007522 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007523 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007524 vmla(cond, dt, rd, rn, rm);
7525 }
7526 void Vmla(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
7527 Vmla(al, dt, rd, rn, rm);
7528 }
7529
7530 void Vmla(
7531 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007532 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7533 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7534 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007535 VIXL_ASSERT(allow_macro_instructions_);
7536 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007537 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007538 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007539 vmla(cond, dt, rd, rn, rm);
7540 }
7541 void Vmla(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7542 Vmla(al, dt, rd, rn, rm);
7543 }
7544
7545 void Vmla(
7546 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007547 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7548 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7549 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007550 VIXL_ASSERT(allow_macro_instructions_);
7551 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007552 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007553 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007554 vmla(cond, dt, rd, rn, rm);
7555 }
7556 void Vmla(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7557 Vmla(al, dt, rd, rn, rm);
7558 }
7559
7560 void Vmla(
7561 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007562 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7564 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007565 VIXL_ASSERT(allow_macro_instructions_);
7566 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007567 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007568 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007569 vmla(cond, dt, rd, rn, rm);
7570 }
7571 void Vmla(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7572 Vmla(al, dt, rd, rn, rm);
7573 }
7574
7575 void Vmlal(Condition cond,
7576 DataType dt,
7577 QRegister rd,
7578 DRegister rn,
7579 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007580 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7581 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7582 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007583 VIXL_ASSERT(allow_macro_instructions_);
7584 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007585 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007586 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007587 vmlal(cond, dt, rd, rn, rm);
7588 }
7589 void Vmlal(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
7590 Vmlal(al, dt, rd, rn, rm);
7591 }
7592
7593 void Vmlal(
7594 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007595 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7596 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7597 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007598 VIXL_ASSERT(allow_macro_instructions_);
7599 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007600 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007601 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007602 vmlal(cond, dt, rd, rn, rm);
7603 }
7604 void Vmlal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7605 Vmlal(al, dt, rd, rn, rm);
7606 }
7607
7608 void Vmls(Condition cond,
7609 DataType dt,
7610 DRegister rd,
7611 DRegister rn,
7612 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007613 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7614 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7615 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007616 VIXL_ASSERT(allow_macro_instructions_);
7617 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007618 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007619 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007620 vmls(cond, dt, rd, rn, rm);
7621 }
7622 void Vmls(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
7623 Vmls(al, dt, rd, rn, rm);
7624 }
7625
7626 void Vmls(Condition cond,
7627 DataType dt,
7628 QRegister rd,
7629 QRegister rn,
7630 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007631 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7632 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7633 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007634 VIXL_ASSERT(allow_macro_instructions_);
7635 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007636 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007637 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007638 vmls(cond, dt, rd, rn, rm);
7639 }
7640 void Vmls(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
7641 Vmls(al, dt, rd, rn, rm);
7642 }
7643
7644 void Vmls(
7645 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007646 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7647 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7648 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007649 VIXL_ASSERT(allow_macro_instructions_);
7650 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007651 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007652 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007653 vmls(cond, dt, rd, rn, rm);
7654 }
7655 void Vmls(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7656 Vmls(al, dt, rd, rn, rm);
7657 }
7658
7659 void Vmls(
7660 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007661 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7662 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7663 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007664 VIXL_ASSERT(allow_macro_instructions_);
7665 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007666 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007667 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007668 vmls(cond, dt, rd, rn, rm);
7669 }
7670 void Vmls(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7671 Vmls(al, dt, rd, rn, rm);
7672 }
7673
7674 void Vmls(
7675 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007676 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7677 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7678 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007679 VIXL_ASSERT(allow_macro_instructions_);
7680 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007681 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007682 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007683 vmls(cond, dt, rd, rn, rm);
7684 }
7685 void Vmls(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7686 Vmls(al, dt, rd, rn, rm);
7687 }
7688
7689 void Vmlsl(Condition cond,
7690 DataType dt,
7691 QRegister rd,
7692 DRegister rn,
7693 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007694 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7696 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007697 VIXL_ASSERT(allow_macro_instructions_);
7698 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007699 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007700 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007701 vmlsl(cond, dt, rd, rn, rm);
7702 }
7703 void Vmlsl(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
7704 Vmlsl(al, dt, rd, rn, rm);
7705 }
7706
7707 void Vmlsl(
7708 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007709 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7710 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7711 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007712 VIXL_ASSERT(allow_macro_instructions_);
7713 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007714 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007715 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007716 vmlsl(cond, dt, rd, rn, rm);
7717 }
7718 void Vmlsl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7719 Vmlsl(al, dt, rd, rn, rm);
7720 }
7721
7722 void Vmov(Condition cond, Register rt, SRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007723 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7724 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007725 VIXL_ASSERT(allow_macro_instructions_);
7726 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007727 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007728 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007729 vmov(cond, rt, rn);
7730 }
7731 void Vmov(Register rt, SRegister rn) { Vmov(al, rt, rn); }
7732
7733 void Vmov(Condition cond, SRegister rn, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007734 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7735 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007736 VIXL_ASSERT(allow_macro_instructions_);
7737 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007738 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007739 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007740 vmov(cond, rn, rt);
7741 }
7742 void Vmov(SRegister rn, Register rt) { Vmov(al, rn, rt); }
7743
7744 void Vmov(Condition cond, Register rt, Register rt2, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007745 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7746 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
7747 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007748 VIXL_ASSERT(allow_macro_instructions_);
7749 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007750 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007751 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007752 vmov(cond, rt, rt2, rm);
7753 }
7754 void Vmov(Register rt, Register rt2, DRegister rm) { Vmov(al, rt, rt2, rm); }
7755
7756 void Vmov(Condition cond, DRegister rm, Register rt, Register rt2) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007757 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7758 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7759 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007760 VIXL_ASSERT(allow_macro_instructions_);
7761 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007762 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007763 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007764 vmov(cond, rm, rt, rt2);
7765 }
7766 void Vmov(DRegister rm, Register rt, Register rt2) { Vmov(al, rm, rt, rt2); }
7767
7768 void Vmov(
7769 Condition cond, Register rt, Register rt2, SRegister rm, SRegister rm1) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007770 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7771 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
7772 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7773 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm1));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007774 VIXL_ASSERT(allow_macro_instructions_);
7775 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007776 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007777 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007778 vmov(cond, rt, rt2, rm, rm1);
7779 }
7780 void Vmov(Register rt, Register rt2, SRegister rm, SRegister rm1) {
7781 Vmov(al, rt, rt2, rm, rm1);
7782 }
7783
7784 void Vmov(
7785 Condition cond, SRegister rm, SRegister rm1, Register rt, Register rt2) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007786 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7787 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm1));
7788 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7789 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007790 VIXL_ASSERT(allow_macro_instructions_);
7791 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007792 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007793 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007794 vmov(cond, rm, rm1, rt, rt2);
7795 }
7796 void Vmov(SRegister rm, SRegister rm1, Register rt, Register rt2) {
7797 Vmov(al, rm, rm1, rt, rt2);
7798 }
7799
7800 void Vmov(Condition cond, DataType dt, DRegisterLane rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007801 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7802 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007803 VIXL_ASSERT(allow_macro_instructions_);
7804 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007805 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007806 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007807 vmov(cond, dt, rd, rt);
7808 }
7809 void Vmov(DataType dt, DRegisterLane rd, Register rt) {
7810 Vmov(al, dt, rd, rt);
7811 }
7812 void Vmov(Condition cond, DRegisterLane rd, Register rt) {
7813 Vmov(cond, kDataTypeValueNone, rd, rt);
7814 }
7815 void Vmov(DRegisterLane rd, Register rt) {
7816 Vmov(al, kDataTypeValueNone, rd, rt);
7817 }
7818
7819 void Vmov(Condition cond,
7820 DataType dt,
7821 DRegister rd,
7822 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007823 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7824 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007825 VIXL_ASSERT(allow_macro_instructions_);
7826 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007827 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007828 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007829 vmov(cond, dt, rd, operand);
7830 }
7831 void Vmov(DataType dt, DRegister rd, const DOperand& operand) {
7832 Vmov(al, dt, rd, operand);
7833 }
7834
7835 void Vmov(Condition cond,
7836 DataType dt,
7837 QRegister rd,
7838 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007839 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7840 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007841 VIXL_ASSERT(allow_macro_instructions_);
7842 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007843 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007844 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007845 vmov(cond, dt, rd, operand);
7846 }
7847 void Vmov(DataType dt, QRegister rd, const QOperand& operand) {
7848 Vmov(al, dt, rd, operand);
7849 }
7850
7851 void Vmov(Condition cond,
7852 DataType dt,
7853 SRegister rd,
7854 const SOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007855 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7856 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007857 VIXL_ASSERT(allow_macro_instructions_);
7858 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007859 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007860 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007861 vmov(cond, dt, rd, operand);
7862 }
7863 void Vmov(DataType dt, SRegister rd, const SOperand& operand) {
7864 Vmov(al, dt, rd, operand);
7865 }
7866
7867 void Vmov(Condition cond, DataType dt, Register rt, DRegisterLane rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007868 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7869 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007870 VIXL_ASSERT(allow_macro_instructions_);
7871 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007872 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007873 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007874 vmov(cond, dt, rt, rn);
7875 }
7876 void Vmov(DataType dt, Register rt, DRegisterLane rn) {
7877 Vmov(al, dt, rt, rn);
7878 }
7879 void Vmov(Condition cond, Register rt, DRegisterLane rn) {
7880 Vmov(cond, kDataTypeValueNone, rt, rn);
7881 }
7882 void Vmov(Register rt, DRegisterLane rn) {
7883 Vmov(al, kDataTypeValueNone, rt, rn);
7884 }
7885
7886 void Vmovl(Condition cond, DataType dt, QRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007887 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7888 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007889 VIXL_ASSERT(allow_macro_instructions_);
7890 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007891 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007892 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007893 vmovl(cond, dt, rd, rm);
7894 }
7895 void Vmovl(DataType dt, QRegister rd, DRegister rm) { Vmovl(al, dt, rd, rm); }
7896
7897 void Vmovn(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007898 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7899 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007900 VIXL_ASSERT(allow_macro_instructions_);
7901 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007902 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007903 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007904 vmovn(cond, dt, rd, rm);
7905 }
7906 void Vmovn(DataType dt, DRegister rd, QRegister rm) { Vmovn(al, dt, rd, rm); }
7907
7908 void Vmrs(Condition cond,
7909 RegisterOrAPSR_nzcv rt,
7910 SpecialFPRegister spec_reg) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007911 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007912 VIXL_ASSERT(allow_macro_instructions_);
7913 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007914 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007915 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007916 vmrs(cond, rt, spec_reg);
7917 }
7918 void Vmrs(RegisterOrAPSR_nzcv rt, SpecialFPRegister spec_reg) {
7919 Vmrs(al, rt, spec_reg);
7920 }
7921
7922 void Vmsr(Condition cond, SpecialFPRegister spec_reg, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007923 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007924 VIXL_ASSERT(allow_macro_instructions_);
7925 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007926 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007927 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007928 vmsr(cond, spec_reg, rt);
7929 }
7930 void Vmsr(SpecialFPRegister spec_reg, Register rt) { Vmsr(al, spec_reg, rt); }
7931
7932 void Vmul(Condition cond,
7933 DataType dt,
7934 DRegister rd,
7935 DRegister rn,
7936 DRegister dm,
7937 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007938 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7939 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7940 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007941 VIXL_ASSERT(allow_macro_instructions_);
7942 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007943 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007944 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007945 vmul(cond, dt, rd, rn, dm, index);
7946 }
7947 void Vmul(
7948 DataType dt, DRegister rd, DRegister rn, DRegister dm, unsigned index) {
7949 Vmul(al, dt, rd, rn, dm, index);
7950 }
7951
7952 void Vmul(Condition cond,
7953 DataType dt,
7954 QRegister rd,
7955 QRegister rn,
7956 DRegister dm,
7957 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007958 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7959 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7960 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007961 VIXL_ASSERT(allow_macro_instructions_);
7962 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007963 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007964 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007965 vmul(cond, dt, rd, rn, dm, index);
7966 }
7967 void Vmul(
7968 DataType dt, QRegister rd, QRegister rn, DRegister dm, unsigned index) {
7969 Vmul(al, dt, rd, rn, dm, index);
7970 }
7971
7972 void Vmul(
7973 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007974 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7975 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7976 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007977 VIXL_ASSERT(allow_macro_instructions_);
7978 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007979 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007980 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007981 vmul(cond, dt, rd, rn, rm);
7982 }
7983 void Vmul(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7984 Vmul(al, dt, rd, rn, rm);
7985 }
7986
7987 void Vmul(
7988 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007989 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7990 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7991 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007992 VIXL_ASSERT(allow_macro_instructions_);
7993 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007994 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007995 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007996 vmul(cond, dt, rd, rn, rm);
7997 }
7998 void Vmul(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7999 Vmul(al, dt, rd, rn, rm);
8000 }
8001
8002 void Vmul(
8003 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008004 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8005 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8006 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008007 VIXL_ASSERT(allow_macro_instructions_);
8008 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008009 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008010 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008011 vmul(cond, dt, rd, rn, rm);
8012 }
8013 void Vmul(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8014 Vmul(al, dt, rd, rn, rm);
8015 }
8016
8017 void Vmull(Condition cond,
8018 DataType dt,
8019 QRegister rd,
8020 DRegister rn,
8021 DRegister dm,
8022 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008023 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8024 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8025 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008026 VIXL_ASSERT(allow_macro_instructions_);
8027 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008028 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008029 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008030 vmull(cond, dt, rd, rn, dm, index);
8031 }
8032 void Vmull(
8033 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
8034 Vmull(al, dt, rd, rn, dm, index);
8035 }
8036
8037 void Vmull(
8038 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008039 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8040 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8041 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008042 VIXL_ASSERT(allow_macro_instructions_);
8043 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008044 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008045 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008046 vmull(cond, dt, rd, rn, rm);
8047 }
8048 void Vmull(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8049 Vmull(al, dt, rd, rn, rm);
8050 }
8051
8052 void Vmvn(Condition cond,
8053 DataType dt,
8054 DRegister rd,
8055 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008056 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8057 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008058 VIXL_ASSERT(allow_macro_instructions_);
8059 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008060 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008061 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008062 vmvn(cond, dt, rd, operand);
8063 }
8064 void Vmvn(DataType dt, DRegister rd, const DOperand& operand) {
8065 Vmvn(al, dt, rd, operand);
8066 }
8067
8068 void Vmvn(Condition cond,
8069 DataType dt,
8070 QRegister rd,
8071 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008072 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8073 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008074 VIXL_ASSERT(allow_macro_instructions_);
8075 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008076 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008077 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008078 vmvn(cond, dt, rd, operand);
8079 }
8080 void Vmvn(DataType dt, QRegister rd, const QOperand& operand) {
8081 Vmvn(al, dt, rd, operand);
8082 }
8083
8084 void Vneg(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008085 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8086 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008087 VIXL_ASSERT(allow_macro_instructions_);
8088 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008089 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008090 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008091 vneg(cond, dt, rd, rm);
8092 }
8093 void Vneg(DataType dt, DRegister rd, DRegister rm) { Vneg(al, dt, rd, rm); }
8094
8095 void Vneg(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008096 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8097 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008098 VIXL_ASSERT(allow_macro_instructions_);
8099 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008100 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008101 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008102 vneg(cond, dt, rd, rm);
8103 }
8104 void Vneg(DataType dt, QRegister rd, QRegister rm) { Vneg(al, dt, rd, rm); }
8105
8106 void Vneg(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008107 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8108 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008109 VIXL_ASSERT(allow_macro_instructions_);
8110 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008111 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008112 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008113 vneg(cond, dt, rd, rm);
8114 }
8115 void Vneg(DataType dt, SRegister rd, SRegister rm) { Vneg(al, dt, rd, rm); }
8116
8117 void Vnmla(
8118 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008119 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8120 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8121 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008122 VIXL_ASSERT(allow_macro_instructions_);
8123 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008124 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008125 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008126 vnmla(cond, dt, rd, rn, rm);
8127 }
8128 void Vnmla(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8129 Vnmla(al, dt, rd, rn, rm);
8130 }
8131
8132 void Vnmla(
8133 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008134 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8135 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8136 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008137 VIXL_ASSERT(allow_macro_instructions_);
8138 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008139 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008140 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008141 vnmla(cond, dt, rd, rn, rm);
8142 }
8143 void Vnmla(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8144 Vnmla(al, dt, rd, rn, rm);
8145 }
8146
8147 void Vnmls(
8148 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008149 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8150 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8151 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008152 VIXL_ASSERT(allow_macro_instructions_);
8153 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008154 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008155 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008156 vnmls(cond, dt, rd, rn, rm);
8157 }
8158 void Vnmls(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8159 Vnmls(al, dt, rd, rn, rm);
8160 }
8161
8162 void Vnmls(
8163 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008164 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8165 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8166 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008167 VIXL_ASSERT(allow_macro_instructions_);
8168 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008169 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008170 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008171 vnmls(cond, dt, rd, rn, rm);
8172 }
8173 void Vnmls(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8174 Vnmls(al, dt, rd, rn, rm);
8175 }
8176
8177 void Vnmul(
8178 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008179 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8180 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8181 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008182 VIXL_ASSERT(allow_macro_instructions_);
8183 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008184 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008185 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008186 vnmul(cond, dt, rd, rn, rm);
8187 }
8188 void Vnmul(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8189 Vnmul(al, dt, rd, rn, rm);
8190 }
8191
8192 void Vnmul(
8193 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008194 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8195 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8196 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008197 VIXL_ASSERT(allow_macro_instructions_);
8198 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008199 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008200 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008201 vnmul(cond, dt, rd, rn, rm);
8202 }
8203 void Vnmul(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8204 Vnmul(al, dt, rd, rn, rm);
8205 }
8206
8207 void Vorn(Condition cond,
8208 DataType dt,
8209 DRegister rd,
8210 DRegister rn,
8211 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008212 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8213 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8214 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008215 VIXL_ASSERT(allow_macro_instructions_);
8216 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008217 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008218 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008219 vorn(cond, dt, rd, rn, operand);
8220 }
8221 void Vorn(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
8222 Vorn(al, dt, rd, rn, operand);
8223 }
8224
8225 void Vorn(Condition cond,
8226 DataType dt,
8227 QRegister rd,
8228 QRegister rn,
8229 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008230 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8231 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8232 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008233 VIXL_ASSERT(allow_macro_instructions_);
8234 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008235 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008236 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008237 vorn(cond, dt, rd, rn, operand);
8238 }
8239 void Vorn(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
8240 Vorn(al, dt, rd, rn, operand);
8241 }
8242
8243 void Vorr(Condition cond,
8244 DataType dt,
8245 DRegister rd,
8246 DRegister rn,
8247 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008248 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8249 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8250 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008251 VIXL_ASSERT(allow_macro_instructions_);
8252 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008253 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008254 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008255 vorr(cond, dt, rd, rn, operand);
8256 }
8257 void Vorr(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
8258 Vorr(al, dt, rd, rn, operand);
8259 }
8260 void Vorr(Condition cond,
8261 DRegister rd,
8262 DRegister rn,
8263 const DOperand& operand) {
8264 Vorr(cond, kDataTypeValueNone, rd, rn, operand);
8265 }
8266 void Vorr(DRegister rd, DRegister rn, const DOperand& operand) {
8267 Vorr(al, kDataTypeValueNone, rd, rn, operand);
8268 }
8269
8270 void Vorr(Condition cond,
8271 DataType dt,
8272 QRegister rd,
8273 QRegister rn,
8274 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008275 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8276 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8277 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008278 VIXL_ASSERT(allow_macro_instructions_);
8279 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008280 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008281 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008282 vorr(cond, dt, rd, rn, operand);
8283 }
8284 void Vorr(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
8285 Vorr(al, dt, rd, rn, operand);
8286 }
8287 void Vorr(Condition cond,
8288 QRegister rd,
8289 QRegister rn,
8290 const QOperand& operand) {
8291 Vorr(cond, kDataTypeValueNone, rd, rn, operand);
8292 }
8293 void Vorr(QRegister rd, QRegister rn, const QOperand& operand) {
8294 Vorr(al, kDataTypeValueNone, rd, rn, operand);
8295 }
8296
8297 void Vpadal(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008298 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8299 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008300 VIXL_ASSERT(allow_macro_instructions_);
8301 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008302 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008303 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008304 vpadal(cond, dt, rd, rm);
8305 }
8306 void Vpadal(DataType dt, DRegister rd, DRegister rm) {
8307 Vpadal(al, dt, rd, rm);
8308 }
8309
8310 void Vpadal(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008311 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8312 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008313 VIXL_ASSERT(allow_macro_instructions_);
8314 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008315 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008316 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008317 vpadal(cond, dt, rd, rm);
8318 }
8319 void Vpadal(DataType dt, QRegister rd, QRegister rm) {
8320 Vpadal(al, dt, rd, rm);
8321 }
8322
8323 void Vpadd(
8324 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008325 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8326 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8327 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008328 VIXL_ASSERT(allow_macro_instructions_);
8329 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008330 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008331 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008332 vpadd(cond, dt, rd, rn, rm);
8333 }
8334 void Vpadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8335 Vpadd(al, dt, rd, rn, rm);
8336 }
8337
8338 void Vpaddl(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008339 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8340 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008341 VIXL_ASSERT(allow_macro_instructions_);
8342 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008343 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008344 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008345 vpaddl(cond, dt, rd, rm);
8346 }
8347 void Vpaddl(DataType dt, DRegister rd, DRegister rm) {
8348 Vpaddl(al, dt, rd, rm);
8349 }
8350
8351 void Vpaddl(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008352 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8353 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008354 VIXL_ASSERT(allow_macro_instructions_);
8355 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008356 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008357 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008358 vpaddl(cond, dt, rd, rm);
8359 }
8360 void Vpaddl(DataType dt, QRegister rd, QRegister rm) {
8361 Vpaddl(al, dt, rd, rm);
8362 }
8363
8364 void Vpmax(
8365 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008366 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8367 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8368 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008369 VIXL_ASSERT(allow_macro_instructions_);
8370 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008371 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008372 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008373 vpmax(cond, dt, rd, rn, rm);
8374 }
8375 void Vpmax(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8376 Vpmax(al, dt, rd, rn, rm);
8377 }
8378
8379 void Vpmin(
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());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008386 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008387 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008388 vpmin(cond, dt, rd, rn, rm);
8389 }
8390 void Vpmin(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8391 Vpmin(al, dt, rd, rn, rm);
8392 }
8393
8394 void Vpop(Condition cond, DataType dt, DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008395 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008396 VIXL_ASSERT(allow_macro_instructions_);
8397 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008398 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008399 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008400 vpop(cond, dt, dreglist);
8401 }
8402 void Vpop(DataType dt, DRegisterList dreglist) { Vpop(al, dt, dreglist); }
8403 void Vpop(Condition cond, DRegisterList dreglist) {
8404 Vpop(cond, kDataTypeValueNone, dreglist);
8405 }
8406 void Vpop(DRegisterList dreglist) { Vpop(al, kDataTypeValueNone, dreglist); }
8407
8408 void Vpop(Condition cond, DataType dt, SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008409 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008410 VIXL_ASSERT(allow_macro_instructions_);
8411 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008412 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008413 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008414 vpop(cond, dt, sreglist);
8415 }
8416 void Vpop(DataType dt, SRegisterList sreglist) { Vpop(al, dt, sreglist); }
8417 void Vpop(Condition cond, SRegisterList sreglist) {
8418 Vpop(cond, kDataTypeValueNone, sreglist);
8419 }
8420 void Vpop(SRegisterList sreglist) { Vpop(al, kDataTypeValueNone, sreglist); }
8421
8422 void Vpush(Condition cond, DataType dt, DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008423 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008424 VIXL_ASSERT(allow_macro_instructions_);
8425 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008426 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008427 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008428 vpush(cond, dt, dreglist);
8429 }
8430 void Vpush(DataType dt, DRegisterList dreglist) { Vpush(al, dt, dreglist); }
8431 void Vpush(Condition cond, DRegisterList dreglist) {
8432 Vpush(cond, kDataTypeValueNone, dreglist);
8433 }
8434 void Vpush(DRegisterList dreglist) {
8435 Vpush(al, kDataTypeValueNone, dreglist);
8436 }
8437
8438 void Vpush(Condition cond, DataType dt, SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008439 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008440 VIXL_ASSERT(allow_macro_instructions_);
8441 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008442 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008443 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008444 vpush(cond, dt, sreglist);
8445 }
8446 void Vpush(DataType dt, SRegisterList sreglist) { Vpush(al, dt, sreglist); }
8447 void Vpush(Condition cond, SRegisterList sreglist) {
8448 Vpush(cond, kDataTypeValueNone, sreglist);
8449 }
8450 void Vpush(SRegisterList sreglist) {
8451 Vpush(al, kDataTypeValueNone, sreglist);
8452 }
8453
8454 void Vqabs(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008455 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8456 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008457 VIXL_ASSERT(allow_macro_instructions_);
8458 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008459 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008460 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008461 vqabs(cond, dt, rd, rm);
8462 }
8463 void Vqabs(DataType dt, DRegister rd, DRegister rm) { Vqabs(al, dt, rd, rm); }
8464
8465 void Vqabs(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008466 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8467 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008468 VIXL_ASSERT(allow_macro_instructions_);
8469 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008470 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008471 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008472 vqabs(cond, dt, rd, rm);
8473 }
8474 void Vqabs(DataType dt, QRegister rd, QRegister rm) { Vqabs(al, dt, rd, rm); }
8475
8476 void Vqadd(
8477 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008478 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8479 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8480 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008481 VIXL_ASSERT(allow_macro_instructions_);
8482 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008483 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008484 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008485 vqadd(cond, dt, rd, rn, rm);
8486 }
8487 void Vqadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8488 Vqadd(al, dt, rd, rn, rm);
8489 }
8490
8491 void Vqadd(
8492 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008493 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8494 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8495 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008496 VIXL_ASSERT(allow_macro_instructions_);
8497 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008498 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008499 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008500 vqadd(cond, dt, rd, rn, rm);
8501 }
8502 void Vqadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8503 Vqadd(al, dt, rd, rn, rm);
8504 }
8505
8506 void Vqdmlal(
8507 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008508 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8509 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8510 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008511 VIXL_ASSERT(allow_macro_instructions_);
8512 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008513 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008514 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008515 vqdmlal(cond, dt, rd, rn, rm);
8516 }
8517 void Vqdmlal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8518 Vqdmlal(al, dt, rd, rn, rm);
8519 }
8520
8521 void Vqdmlal(Condition cond,
8522 DataType dt,
8523 QRegister rd,
8524 DRegister rn,
8525 DRegister dm,
8526 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008527 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8528 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8529 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008530 VIXL_ASSERT(allow_macro_instructions_);
8531 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008532 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008533 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008534 vqdmlal(cond, dt, rd, rn, dm, index);
8535 }
8536 void Vqdmlal(
8537 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
8538 Vqdmlal(al, dt, rd, rn, dm, index);
8539 }
8540
8541 void Vqdmlsl(
8542 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008543 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8544 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8545 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008546 VIXL_ASSERT(allow_macro_instructions_);
8547 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008548 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008549 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008550 vqdmlsl(cond, dt, rd, rn, rm);
8551 }
8552 void Vqdmlsl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8553 Vqdmlsl(al, dt, rd, rn, rm);
8554 }
8555
8556 void Vqdmlsl(Condition cond,
8557 DataType dt,
8558 QRegister rd,
8559 DRegister rn,
8560 DRegister dm,
8561 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008562 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8564 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008565 VIXL_ASSERT(allow_macro_instructions_);
8566 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008567 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008568 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008569 vqdmlsl(cond, dt, rd, rn, dm, index);
8570 }
8571 void Vqdmlsl(
8572 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
8573 Vqdmlsl(al, dt, rd, rn, dm, index);
8574 }
8575
8576 void Vqdmulh(
8577 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008578 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8579 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8580 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008581 VIXL_ASSERT(allow_macro_instructions_);
8582 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008583 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008584 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008585 vqdmulh(cond, dt, rd, rn, rm);
8586 }
8587 void Vqdmulh(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8588 Vqdmulh(al, dt, rd, rn, rm);
8589 }
8590
8591 void Vqdmulh(
8592 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008593 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8594 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8595 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008596 VIXL_ASSERT(allow_macro_instructions_);
8597 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008598 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008599 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008600 vqdmulh(cond, dt, rd, rn, rm);
8601 }
8602 void Vqdmulh(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8603 Vqdmulh(al, dt, rd, rn, rm);
8604 }
8605
8606 void Vqdmulh(Condition cond,
8607 DataType dt,
8608 DRegister rd,
8609 DRegister rn,
8610 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008611 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8612 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8613 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008614 VIXL_ASSERT(allow_macro_instructions_);
8615 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008616 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008617 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008618 vqdmulh(cond, dt, rd, rn, rm);
8619 }
8620 void Vqdmulh(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
8621 Vqdmulh(al, dt, rd, rn, rm);
8622 }
8623
8624 void Vqdmulh(Condition cond,
8625 DataType dt,
8626 QRegister rd,
8627 QRegister rn,
8628 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008629 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8630 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8631 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008632 VIXL_ASSERT(allow_macro_instructions_);
8633 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008634 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008635 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008636 vqdmulh(cond, dt, rd, rn, rm);
8637 }
8638 void Vqdmulh(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
8639 Vqdmulh(al, dt, rd, rn, rm);
8640 }
8641
8642 void Vqdmull(
8643 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008644 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8645 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8646 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008647 VIXL_ASSERT(allow_macro_instructions_);
8648 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008649 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008650 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008651 vqdmull(cond, dt, rd, rn, rm);
8652 }
8653 void Vqdmull(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8654 Vqdmull(al, dt, rd, rn, rm);
8655 }
8656
8657 void Vqdmull(Condition cond,
8658 DataType dt,
8659 QRegister rd,
8660 DRegister rn,
8661 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008662 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8663 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8664 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008665 VIXL_ASSERT(allow_macro_instructions_);
8666 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008667 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008668 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008669 vqdmull(cond, dt, rd, rn, rm);
8670 }
8671 void Vqdmull(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
8672 Vqdmull(al, dt, rd, rn, rm);
8673 }
8674
8675 void Vqmovn(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008676 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8677 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008678 VIXL_ASSERT(allow_macro_instructions_);
8679 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008680 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008681 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008682 vqmovn(cond, dt, rd, rm);
8683 }
8684 void Vqmovn(DataType dt, DRegister rd, QRegister rm) {
8685 Vqmovn(al, dt, rd, rm);
8686 }
8687
8688 void Vqmovun(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008689 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8690 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008691 VIXL_ASSERT(allow_macro_instructions_);
8692 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008693 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008694 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008695 vqmovun(cond, dt, rd, rm);
8696 }
8697 void Vqmovun(DataType dt, DRegister rd, QRegister rm) {
8698 Vqmovun(al, dt, rd, rm);
8699 }
8700
8701 void Vqneg(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008702 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8703 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008704 VIXL_ASSERT(allow_macro_instructions_);
8705 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008706 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008707 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008708 vqneg(cond, dt, rd, rm);
8709 }
8710 void Vqneg(DataType dt, DRegister rd, DRegister rm) { Vqneg(al, dt, rd, rm); }
8711
8712 void Vqneg(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008713 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8714 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008715 VIXL_ASSERT(allow_macro_instructions_);
8716 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008717 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008718 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008719 vqneg(cond, dt, rd, rm);
8720 }
8721 void Vqneg(DataType dt, QRegister rd, QRegister rm) { Vqneg(al, dt, rd, rm); }
8722
8723 void Vqrdmulh(
8724 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008725 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8726 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8727 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008728 VIXL_ASSERT(allow_macro_instructions_);
8729 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008730 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008731 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008732 vqrdmulh(cond, dt, rd, rn, rm);
8733 }
8734 void Vqrdmulh(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8735 Vqrdmulh(al, dt, rd, rn, rm);
8736 }
8737
8738 void Vqrdmulh(
8739 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008740 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8741 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8742 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008743 VIXL_ASSERT(allow_macro_instructions_);
8744 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008745 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008746 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008747 vqrdmulh(cond, dt, rd, rn, rm);
8748 }
8749 void Vqrdmulh(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8750 Vqrdmulh(al, dt, rd, rn, rm);
8751 }
8752
8753 void Vqrdmulh(Condition cond,
8754 DataType dt,
8755 DRegister rd,
8756 DRegister rn,
8757 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008758 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8759 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8760 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008761 VIXL_ASSERT(allow_macro_instructions_);
8762 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008763 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008764 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008765 vqrdmulh(cond, dt, rd, rn, rm);
8766 }
8767 void Vqrdmulh(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) {
8768 Vqrdmulh(al, dt, rd, rn, rm);
8769 }
8770
8771 void Vqrdmulh(Condition cond,
8772 DataType dt,
8773 QRegister rd,
8774 QRegister rn,
8775 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008776 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8777 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8778 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008779 VIXL_ASSERT(allow_macro_instructions_);
8780 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008781 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008782 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008783 vqrdmulh(cond, dt, rd, rn, rm);
8784 }
8785 void Vqrdmulh(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
8786 Vqrdmulh(al, dt, rd, rn, rm);
8787 }
8788
8789 void Vqrshl(
8790 Condition cond, DataType dt, DRegister rd, DRegister rm, DRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008791 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8792 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8793 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008794 VIXL_ASSERT(allow_macro_instructions_);
8795 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008796 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008797 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008798 vqrshl(cond, dt, rd, rm, rn);
8799 }
8800 void Vqrshl(DataType dt, DRegister rd, DRegister rm, DRegister rn) {
8801 Vqrshl(al, dt, rd, rm, rn);
8802 }
8803
8804 void Vqrshl(
8805 Condition cond, DataType dt, QRegister rd, QRegister rm, QRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008806 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8807 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8808 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008809 VIXL_ASSERT(allow_macro_instructions_);
8810 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008811 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008812 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008813 vqrshl(cond, dt, rd, rm, rn);
8814 }
8815 void Vqrshl(DataType dt, QRegister rd, QRegister rm, QRegister rn) {
8816 Vqrshl(al, dt, rd, rm, rn);
8817 }
8818
8819 void Vqrshrn(Condition cond,
8820 DataType dt,
8821 DRegister rd,
8822 QRegister rm,
8823 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008824 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8825 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8826 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008827 VIXL_ASSERT(allow_macro_instructions_);
8828 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008829 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008830 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008831 vqrshrn(cond, dt, rd, rm, operand);
8832 }
8833 void Vqrshrn(DataType dt,
8834 DRegister rd,
8835 QRegister rm,
8836 const QOperand& operand) {
8837 Vqrshrn(al, dt, rd, rm, operand);
8838 }
8839
8840 void Vqrshrun(Condition cond,
8841 DataType dt,
8842 DRegister rd,
8843 QRegister rm,
8844 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008845 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8846 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8847 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008848 VIXL_ASSERT(allow_macro_instructions_);
8849 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008850 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008851 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008852 vqrshrun(cond, dt, rd, rm, operand);
8853 }
8854 void Vqrshrun(DataType dt,
8855 DRegister rd,
8856 QRegister rm,
8857 const QOperand& operand) {
8858 Vqrshrun(al, dt, rd, rm, operand);
8859 }
8860
8861 void Vqshl(Condition cond,
8862 DataType dt,
8863 DRegister rd,
8864 DRegister rm,
8865 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008866 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8867 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8868 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008869 VIXL_ASSERT(allow_macro_instructions_);
8870 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008871 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008872 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008873 vqshl(cond, dt, rd, rm, operand);
8874 }
8875 void Vqshl(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
8876 Vqshl(al, dt, rd, rm, operand);
8877 }
8878
8879 void Vqshl(Condition cond,
8880 DataType dt,
8881 QRegister rd,
8882 QRegister rm,
8883 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008884 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8885 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8886 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008887 VIXL_ASSERT(allow_macro_instructions_);
8888 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008889 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008890 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008891 vqshl(cond, dt, rd, rm, operand);
8892 }
8893 void Vqshl(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
8894 Vqshl(al, dt, rd, rm, operand);
8895 }
8896
8897 void Vqshlu(Condition cond,
8898 DataType dt,
8899 DRegister rd,
8900 DRegister rm,
8901 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008902 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8903 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8904 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008905 VIXL_ASSERT(allow_macro_instructions_);
8906 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008907 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008908 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008909 vqshlu(cond, dt, rd, rm, operand);
8910 }
8911 void Vqshlu(DataType dt,
8912 DRegister rd,
8913 DRegister rm,
8914 const DOperand& operand) {
8915 Vqshlu(al, dt, rd, rm, operand);
8916 }
8917
8918 void Vqshlu(Condition cond,
8919 DataType dt,
8920 QRegister rd,
8921 QRegister rm,
8922 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008923 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8924 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8925 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008926 VIXL_ASSERT(allow_macro_instructions_);
8927 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008928 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008929 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008930 vqshlu(cond, dt, rd, rm, operand);
8931 }
8932 void Vqshlu(DataType dt,
8933 QRegister rd,
8934 QRegister rm,
8935 const QOperand& operand) {
8936 Vqshlu(al, dt, rd, rm, operand);
8937 }
8938
8939 void Vqshrn(Condition cond,
8940 DataType dt,
8941 DRegister rd,
8942 QRegister rm,
8943 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8945 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8946 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008947 VIXL_ASSERT(allow_macro_instructions_);
8948 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008949 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008950 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008951 vqshrn(cond, dt, rd, rm, operand);
8952 }
8953 void Vqshrn(DataType dt,
8954 DRegister rd,
8955 QRegister rm,
8956 const QOperand& operand) {
8957 Vqshrn(al, dt, rd, rm, operand);
8958 }
8959
8960 void Vqshrun(Condition cond,
8961 DataType dt,
8962 DRegister rd,
8963 QRegister rm,
8964 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008965 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8966 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8967 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008968 VIXL_ASSERT(allow_macro_instructions_);
8969 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008970 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008971 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008972 vqshrun(cond, dt, rd, rm, operand);
8973 }
8974 void Vqshrun(DataType dt,
8975 DRegister rd,
8976 QRegister rm,
8977 const QOperand& operand) {
8978 Vqshrun(al, dt, rd, rm, operand);
8979 }
8980
8981 void Vqsub(
8982 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008983 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8984 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8985 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008986 VIXL_ASSERT(allow_macro_instructions_);
8987 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008988 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008989 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008990 vqsub(cond, dt, rd, rn, rm);
8991 }
8992 void Vqsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8993 Vqsub(al, dt, rd, rn, rm);
8994 }
8995
8996 void Vqsub(
8997 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008998 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8999 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9000 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009001 VIXL_ASSERT(allow_macro_instructions_);
9002 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009003 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009004 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009005 vqsub(cond, dt, rd, rn, rm);
9006 }
9007 void Vqsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9008 Vqsub(al, dt, rd, rn, rm);
9009 }
9010
9011 void Vraddhn(
9012 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009013 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9014 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9015 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009016 VIXL_ASSERT(allow_macro_instructions_);
9017 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009018 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009019 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009020 vraddhn(cond, dt, rd, rn, rm);
9021 }
9022 void Vraddhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
9023 Vraddhn(al, dt, rd, rn, rm);
9024 }
9025
9026 void Vrecpe(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009027 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9028 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009029 VIXL_ASSERT(allow_macro_instructions_);
9030 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009031 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009032 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009033 vrecpe(cond, dt, rd, rm);
9034 }
9035 void Vrecpe(DataType dt, DRegister rd, DRegister rm) {
9036 Vrecpe(al, dt, rd, rm);
9037 }
9038
9039 void Vrecpe(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009040 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9041 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009042 VIXL_ASSERT(allow_macro_instructions_);
9043 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009044 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009045 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009046 vrecpe(cond, dt, rd, rm);
9047 }
9048 void Vrecpe(DataType dt, QRegister rd, QRegister rm) {
9049 Vrecpe(al, dt, rd, rm);
9050 }
9051
9052 void Vrecps(
9053 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009054 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9055 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9056 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009057 VIXL_ASSERT(allow_macro_instructions_);
9058 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009059 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009060 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009061 vrecps(cond, dt, rd, rn, rm);
9062 }
9063 void Vrecps(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9064 Vrecps(al, dt, rd, rn, rm);
9065 }
9066
9067 void Vrecps(
9068 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009069 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9070 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9071 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009072 VIXL_ASSERT(allow_macro_instructions_);
9073 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009074 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009075 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009076 vrecps(cond, dt, rd, rn, rm);
9077 }
9078 void Vrecps(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9079 Vrecps(al, dt, rd, rn, rm);
9080 }
9081
9082 void Vrev16(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009083 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9084 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009085 VIXL_ASSERT(allow_macro_instructions_);
9086 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009087 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009088 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009089 vrev16(cond, dt, rd, rm);
9090 }
9091 void Vrev16(DataType dt, DRegister rd, DRegister rm) {
9092 Vrev16(al, dt, rd, rm);
9093 }
9094
9095 void Vrev16(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009096 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9097 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009098 VIXL_ASSERT(allow_macro_instructions_);
9099 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009100 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009101 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009102 vrev16(cond, dt, rd, rm);
9103 }
9104 void Vrev16(DataType dt, QRegister rd, QRegister rm) {
9105 Vrev16(al, dt, rd, rm);
9106 }
9107
9108 void Vrev32(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009109 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9110 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009111 VIXL_ASSERT(allow_macro_instructions_);
9112 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009113 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009114 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009115 vrev32(cond, dt, rd, rm);
9116 }
9117 void Vrev32(DataType dt, DRegister rd, DRegister rm) {
9118 Vrev32(al, dt, rd, rm);
9119 }
9120
9121 void Vrev32(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009122 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9123 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009124 VIXL_ASSERT(allow_macro_instructions_);
9125 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009126 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009127 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009128 vrev32(cond, dt, rd, rm);
9129 }
9130 void Vrev32(DataType dt, QRegister rd, QRegister rm) {
9131 Vrev32(al, dt, rd, rm);
9132 }
9133
9134 void Vrev64(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009135 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9136 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009137 VIXL_ASSERT(allow_macro_instructions_);
9138 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009139 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009140 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009141 vrev64(cond, dt, rd, rm);
9142 }
9143 void Vrev64(DataType dt, DRegister rd, DRegister rm) {
9144 Vrev64(al, dt, rd, rm);
9145 }
9146
9147 void Vrev64(Condition cond, DataType dt, QRegister rd, QRegister 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());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009152 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009153 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009154 vrev64(cond, dt, rd, rm);
9155 }
9156 void Vrev64(DataType dt, QRegister rd, QRegister rm) {
9157 Vrev64(al, dt, rd, rm);
9158 }
9159
9160 void Vrhadd(
9161 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009162 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9163 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9164 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009165 VIXL_ASSERT(allow_macro_instructions_);
9166 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009167 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009168 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009169 vrhadd(cond, dt, rd, rn, rm);
9170 }
9171 void Vrhadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9172 Vrhadd(al, dt, rd, rn, rm);
9173 }
9174
9175 void Vrhadd(
9176 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009177 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9178 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9179 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009180 VIXL_ASSERT(allow_macro_instructions_);
9181 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009182 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009183 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009184 vrhadd(cond, dt, rd, rn, rm);
9185 }
9186 void Vrhadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9187 Vrhadd(al, dt, rd, rn, rm);
9188 }
9189
Vincent Belliard564c10c2018-02-06 08:21:16 -08009190 void Vrinta(DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009191 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9192 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009193 VIXL_ASSERT(allow_macro_instructions_);
9194 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009195 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009196 vrinta(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009197 }
9198
Vincent Belliard564c10c2018-02-06 08:21:16 -08009199 void Vrinta(DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009200 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9201 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009202 VIXL_ASSERT(allow_macro_instructions_);
9203 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009204 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009205 vrinta(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009206 }
9207
Vincent Belliard564c10c2018-02-06 08:21:16 -08009208 void Vrinta(DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009209 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9210 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009211 VIXL_ASSERT(allow_macro_instructions_);
9212 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009213 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009214 vrinta(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009215 }
9216
Vincent Belliard564c10c2018-02-06 08:21:16 -08009217 void Vrintm(DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009218 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9219 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009220 VIXL_ASSERT(allow_macro_instructions_);
9221 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009222 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009223 vrintm(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009224 }
9225
Vincent Belliard564c10c2018-02-06 08:21:16 -08009226 void Vrintm(DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009227 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9228 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009229 VIXL_ASSERT(allow_macro_instructions_);
9230 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009231 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009232 vrintm(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009233 }
9234
Vincent Belliard564c10c2018-02-06 08:21:16 -08009235 void Vrintm(DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009236 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9237 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009238 VIXL_ASSERT(allow_macro_instructions_);
9239 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009240 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009241 vrintm(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009242 }
9243
Vincent Belliard564c10c2018-02-06 08:21:16 -08009244 void Vrintn(DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009245 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9246 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009247 VIXL_ASSERT(allow_macro_instructions_);
9248 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009249 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009250 vrintn(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009251 }
9252
Vincent Belliard564c10c2018-02-06 08:21:16 -08009253 void Vrintn(DataType dt, QRegister rd, QRegister 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());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009258 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009259 vrintn(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009260 }
9261
Vincent Belliard564c10c2018-02-06 08:21:16 -08009262 void Vrintn(DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009263 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9264 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009265 VIXL_ASSERT(allow_macro_instructions_);
9266 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009267 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009268 vrintn(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009269 }
9270
Vincent Belliard564c10c2018-02-06 08:21:16 -08009271 void Vrintp(DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009272 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9273 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009274 VIXL_ASSERT(allow_macro_instructions_);
9275 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009276 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009277 vrintp(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009278 }
9279
Vincent Belliard564c10c2018-02-06 08:21:16 -08009280 void Vrintp(DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009281 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9282 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009283 VIXL_ASSERT(allow_macro_instructions_);
9284 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009285 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009286 vrintp(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009287 }
9288
Vincent Belliard564c10c2018-02-06 08:21:16 -08009289 void Vrintp(DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009290 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9291 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009292 VIXL_ASSERT(allow_macro_instructions_);
9293 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009294 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009295 vrintp(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009296 }
9297
Vincent Belliard564c10c2018-02-06 08:21:16 -08009298 void Vrintr(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009299 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9300 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009301 VIXL_ASSERT(allow_macro_instructions_);
9302 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009303 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009304 ITScope it_scope(this, &cond, guard);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009305 vrintr(cond, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009306 }
Vincent Belliard564c10c2018-02-06 08:21:16 -08009307 void Vrintr(DataType dt, SRegister rd, SRegister rm) {
9308 Vrintr(al, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009309 }
9310
Vincent Belliard564c10c2018-02-06 08:21:16 -08009311 void Vrintr(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009312 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9313 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009314 VIXL_ASSERT(allow_macro_instructions_);
9315 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009316 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009317 ITScope it_scope(this, &cond, guard);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009318 vrintr(cond, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009319 }
Vincent Belliard564c10c2018-02-06 08:21:16 -08009320 void Vrintr(DataType dt, DRegister rd, DRegister rm) {
9321 Vrintr(al, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009322 }
9323
Vincent Belliard564c10c2018-02-06 08:21:16 -08009324 void Vrintx(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009325 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9326 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009327 VIXL_ASSERT(allow_macro_instructions_);
9328 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009329 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009330 ITScope it_scope(this, &cond, guard);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009331 vrintx(cond, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009332 }
Vincent Belliard564c10c2018-02-06 08:21:16 -08009333 void Vrintx(DataType dt, DRegister rd, DRegister rm) {
9334 Vrintx(al, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009335 }
9336
Vincent Belliard564c10c2018-02-06 08:21:16 -08009337 void Vrintx(DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009338 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9339 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009340 VIXL_ASSERT(allow_macro_instructions_);
9341 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009342 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009343 vrintx(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009344 }
9345
Vincent Belliard564c10c2018-02-06 08:21:16 -08009346 void Vrintx(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009347 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9348 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009349 VIXL_ASSERT(allow_macro_instructions_);
9350 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009351 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009352 ITScope it_scope(this, &cond, guard);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009353 vrintx(cond, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009354 }
Vincent Belliard564c10c2018-02-06 08:21:16 -08009355 void Vrintx(DataType dt, SRegister rd, SRegister rm) {
9356 Vrintx(al, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009357 }
9358
Vincent Belliard564c10c2018-02-06 08:21:16 -08009359 void Vrintz(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009360 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9361 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009362 VIXL_ASSERT(allow_macro_instructions_);
9363 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009364 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009365 ITScope it_scope(this, &cond, guard);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009366 vrintz(cond, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009367 }
Vincent Belliard564c10c2018-02-06 08:21:16 -08009368 void Vrintz(DataType dt, DRegister rd, DRegister rm) {
9369 Vrintz(al, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009370 }
9371
Vincent Belliard564c10c2018-02-06 08:21:16 -08009372 void Vrintz(DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009373 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9374 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009375 VIXL_ASSERT(allow_macro_instructions_);
9376 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009377 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009378 vrintz(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009379 }
9380
Vincent Belliard564c10c2018-02-06 08:21:16 -08009381 void Vrintz(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009382 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9383 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009384 VIXL_ASSERT(allow_macro_instructions_);
9385 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009386 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009387 ITScope it_scope(this, &cond, guard);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009388 vrintz(cond, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009389 }
Vincent Belliard564c10c2018-02-06 08:21:16 -08009390 void Vrintz(DataType dt, SRegister rd, SRegister rm) {
9391 Vrintz(al, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009392 }
9393
9394 void Vrshl(
9395 Condition cond, DataType dt, DRegister rd, DRegister rm, DRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009396 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9397 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9398 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009399 VIXL_ASSERT(allow_macro_instructions_);
9400 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009401 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009402 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009403 vrshl(cond, dt, rd, rm, rn);
9404 }
9405 void Vrshl(DataType dt, DRegister rd, DRegister rm, DRegister rn) {
9406 Vrshl(al, dt, rd, rm, rn);
9407 }
9408
9409 void Vrshl(
9410 Condition cond, DataType dt, QRegister rd, QRegister rm, QRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009411 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9412 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9413 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009414 VIXL_ASSERT(allow_macro_instructions_);
9415 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009416 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009417 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009418 vrshl(cond, dt, rd, rm, rn);
9419 }
9420 void Vrshl(DataType dt, QRegister rd, QRegister rm, QRegister rn) {
9421 Vrshl(al, dt, rd, rm, rn);
9422 }
9423
9424 void Vrshr(Condition cond,
9425 DataType dt,
9426 DRegister rd,
9427 DRegister rm,
9428 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009429 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9430 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9431 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009432 VIXL_ASSERT(allow_macro_instructions_);
9433 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009434 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009435 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009436 vrshr(cond, dt, rd, rm, operand);
9437 }
9438 void Vrshr(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9439 Vrshr(al, dt, rd, rm, operand);
9440 }
9441
9442 void Vrshr(Condition cond,
9443 DataType dt,
9444 QRegister rd,
9445 QRegister rm,
9446 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009447 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9448 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9449 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009450 VIXL_ASSERT(allow_macro_instructions_);
9451 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009452 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009453 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009454 vrshr(cond, dt, rd, rm, operand);
9455 }
9456 void Vrshr(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9457 Vrshr(al, dt, rd, rm, operand);
9458 }
9459
9460 void Vrshrn(Condition cond,
9461 DataType dt,
9462 DRegister rd,
9463 QRegister rm,
9464 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009465 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9466 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9467 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009468 VIXL_ASSERT(allow_macro_instructions_);
9469 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009470 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009471 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009472 vrshrn(cond, dt, rd, rm, operand);
9473 }
9474 void Vrshrn(DataType dt,
9475 DRegister rd,
9476 QRegister rm,
9477 const QOperand& operand) {
9478 Vrshrn(al, dt, rd, rm, operand);
9479 }
9480
9481 void Vrsqrte(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009482 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9483 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009484 VIXL_ASSERT(allow_macro_instructions_);
9485 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009486 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009487 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009488 vrsqrte(cond, dt, rd, rm);
9489 }
9490 void Vrsqrte(DataType dt, DRegister rd, DRegister rm) {
9491 Vrsqrte(al, dt, rd, rm);
9492 }
9493
9494 void Vrsqrte(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009495 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9496 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009497 VIXL_ASSERT(allow_macro_instructions_);
9498 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009499 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009500 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009501 vrsqrte(cond, dt, rd, rm);
9502 }
9503 void Vrsqrte(DataType dt, QRegister rd, QRegister rm) {
9504 Vrsqrte(al, dt, rd, rm);
9505 }
9506
9507 void Vrsqrts(
9508 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009509 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9510 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9511 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009512 VIXL_ASSERT(allow_macro_instructions_);
9513 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009514 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009515 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009516 vrsqrts(cond, dt, rd, rn, rm);
9517 }
9518 void Vrsqrts(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9519 Vrsqrts(al, dt, rd, rn, rm);
9520 }
9521
9522 void Vrsqrts(
9523 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009524 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9525 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9526 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009527 VIXL_ASSERT(allow_macro_instructions_);
9528 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009529 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009530 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009531 vrsqrts(cond, dt, rd, rn, rm);
9532 }
9533 void Vrsqrts(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9534 Vrsqrts(al, dt, rd, rn, rm);
9535 }
9536
9537 void Vrsra(Condition cond,
9538 DataType dt,
9539 DRegister rd,
9540 DRegister rm,
9541 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009542 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9543 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9544 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009545 VIXL_ASSERT(allow_macro_instructions_);
9546 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009547 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009548 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009549 vrsra(cond, dt, rd, rm, operand);
9550 }
9551 void Vrsra(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9552 Vrsra(al, dt, rd, rm, operand);
9553 }
9554
9555 void Vrsra(Condition cond,
9556 DataType dt,
9557 QRegister rd,
9558 QRegister rm,
9559 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009560 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9561 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9562 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009563 VIXL_ASSERT(allow_macro_instructions_);
9564 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009565 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009566 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009567 vrsra(cond, dt, rd, rm, operand);
9568 }
9569 void Vrsra(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9570 Vrsra(al, dt, rd, rm, operand);
9571 }
9572
9573 void Vrsubhn(
9574 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009575 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9576 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9577 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009578 VIXL_ASSERT(allow_macro_instructions_);
9579 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009580 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009581 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009582 vrsubhn(cond, dt, rd, rn, rm);
9583 }
9584 void Vrsubhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
9585 Vrsubhn(al, dt, rd, rn, rm);
9586 }
9587
9588 void Vseleq(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009589 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9590 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9591 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009592 VIXL_ASSERT(allow_macro_instructions_);
9593 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009594 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009595 vseleq(dt, rd, rn, rm);
9596 }
9597
9598 void Vseleq(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009599 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9600 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9601 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009602 VIXL_ASSERT(allow_macro_instructions_);
9603 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009604 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009605 vseleq(dt, rd, rn, rm);
9606 }
9607
9608 void Vselge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009609 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9610 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9611 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009612 VIXL_ASSERT(allow_macro_instructions_);
9613 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009614 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009615 vselge(dt, rd, rn, rm);
9616 }
9617
9618 void Vselge(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009619 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9620 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9621 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009622 VIXL_ASSERT(allow_macro_instructions_);
9623 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009624 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009625 vselge(dt, rd, rn, rm);
9626 }
9627
9628 void Vselgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009629 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9630 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9631 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009632 VIXL_ASSERT(allow_macro_instructions_);
9633 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009634 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009635 vselgt(dt, rd, rn, rm);
9636 }
9637
9638 void Vselgt(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009639 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9640 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9641 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009642 VIXL_ASSERT(allow_macro_instructions_);
9643 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009644 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009645 vselgt(dt, rd, rn, rm);
9646 }
9647
9648 void Vselvs(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009649 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9650 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9651 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009652 VIXL_ASSERT(allow_macro_instructions_);
9653 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009654 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009655 vselvs(dt, rd, rn, rm);
9656 }
9657
9658 void Vselvs(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009659 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9660 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9661 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009662 VIXL_ASSERT(allow_macro_instructions_);
9663 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009664 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009665 vselvs(dt, rd, rn, rm);
9666 }
9667
9668 void Vshl(Condition cond,
9669 DataType dt,
9670 DRegister rd,
9671 DRegister rm,
9672 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009673 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9674 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9675 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009676 VIXL_ASSERT(allow_macro_instructions_);
9677 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009678 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009679 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009680 vshl(cond, dt, rd, rm, operand);
9681 }
9682 void Vshl(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9683 Vshl(al, dt, rd, rm, operand);
9684 }
9685
9686 void Vshl(Condition cond,
9687 DataType dt,
9688 QRegister rd,
9689 QRegister rm,
9690 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009691 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9693 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009694 VIXL_ASSERT(allow_macro_instructions_);
9695 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009696 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009697 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009698 vshl(cond, dt, rd, rm, operand);
9699 }
9700 void Vshl(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9701 Vshl(al, dt, rd, rm, operand);
9702 }
9703
9704 void Vshll(Condition cond,
9705 DataType dt,
9706 QRegister rd,
9707 DRegister rm,
9708 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009709 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9710 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9711 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009712 VIXL_ASSERT(allow_macro_instructions_);
9713 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009714 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009715 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009716 vshll(cond, dt, rd, rm, operand);
9717 }
9718 void Vshll(DataType dt, QRegister rd, DRegister rm, const DOperand& operand) {
9719 Vshll(al, dt, rd, rm, operand);
9720 }
9721
9722 void Vshr(Condition cond,
9723 DataType dt,
9724 DRegister rd,
9725 DRegister rm,
9726 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009727 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9728 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9729 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009730 VIXL_ASSERT(allow_macro_instructions_);
9731 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009732 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009733 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009734 vshr(cond, dt, rd, rm, operand);
9735 }
9736 void Vshr(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9737 Vshr(al, dt, rd, rm, operand);
9738 }
9739
9740 void Vshr(Condition cond,
9741 DataType dt,
9742 QRegister rd,
9743 QRegister rm,
9744 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009745 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9746 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9747 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009748 VIXL_ASSERT(allow_macro_instructions_);
9749 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009750 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009751 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009752 vshr(cond, dt, rd, rm, operand);
9753 }
9754 void Vshr(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9755 Vshr(al, dt, rd, rm, operand);
9756 }
9757
9758 void Vshrn(Condition cond,
9759 DataType dt,
9760 DRegister rd,
9761 QRegister rm,
9762 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009763 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9764 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9765 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009766 VIXL_ASSERT(allow_macro_instructions_);
9767 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009768 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009769 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009770 vshrn(cond, dt, rd, rm, operand);
9771 }
9772 void Vshrn(DataType dt, DRegister rd, QRegister rm, const QOperand& operand) {
9773 Vshrn(al, dt, rd, rm, operand);
9774 }
9775
9776 void Vsli(Condition cond,
9777 DataType dt,
9778 DRegister rd,
9779 DRegister rm,
9780 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009781 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9782 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9783 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009784 VIXL_ASSERT(allow_macro_instructions_);
9785 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009786 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009787 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009788 vsli(cond, dt, rd, rm, operand);
9789 }
9790 void Vsli(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9791 Vsli(al, dt, rd, rm, operand);
9792 }
9793
9794 void Vsli(Condition cond,
9795 DataType dt,
9796 QRegister rd,
9797 QRegister rm,
9798 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009799 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9800 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9801 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009802 VIXL_ASSERT(allow_macro_instructions_);
9803 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009804 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009805 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009806 vsli(cond, dt, rd, rm, operand);
9807 }
9808 void Vsli(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9809 Vsli(al, dt, rd, rm, operand);
9810 }
9811
9812 void Vsqrt(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009813 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9814 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009815 VIXL_ASSERT(allow_macro_instructions_);
9816 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009817 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009818 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009819 vsqrt(cond, dt, rd, rm);
9820 }
9821 void Vsqrt(DataType dt, SRegister rd, SRegister rm) { Vsqrt(al, dt, rd, rm); }
9822
9823 void Vsqrt(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009824 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9825 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009826 VIXL_ASSERT(allow_macro_instructions_);
9827 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009828 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009829 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009830 vsqrt(cond, dt, rd, rm);
9831 }
9832 void Vsqrt(DataType dt, DRegister rd, DRegister rm) { Vsqrt(al, dt, rd, rm); }
9833
9834 void Vsra(Condition cond,
9835 DataType dt,
9836 DRegister rd,
9837 DRegister rm,
9838 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009839 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9840 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9841 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009842 VIXL_ASSERT(allow_macro_instructions_);
9843 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009844 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009845 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009846 vsra(cond, dt, rd, rm, operand);
9847 }
9848 void Vsra(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9849 Vsra(al, dt, rd, rm, operand);
9850 }
9851
9852 void Vsra(Condition cond,
9853 DataType dt,
9854 QRegister rd,
9855 QRegister rm,
9856 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009857 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9858 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9859 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009860 VIXL_ASSERT(allow_macro_instructions_);
9861 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009862 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009863 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009864 vsra(cond, dt, rd, rm, operand);
9865 }
9866 void Vsra(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9867 Vsra(al, dt, rd, rm, operand);
9868 }
9869
9870 void Vsri(Condition cond,
9871 DataType dt,
9872 DRegister rd,
9873 DRegister rm,
9874 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009875 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9876 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9877 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009878 VIXL_ASSERT(allow_macro_instructions_);
9879 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009880 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009881 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009882 vsri(cond, dt, rd, rm, operand);
9883 }
9884 void Vsri(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) {
9885 Vsri(al, dt, rd, rm, operand);
9886 }
9887
9888 void Vsri(Condition cond,
9889 DataType dt,
9890 QRegister rd,
9891 QRegister rm,
9892 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009893 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9894 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9895 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009896 VIXL_ASSERT(allow_macro_instructions_);
9897 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009898 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009899 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009900 vsri(cond, dt, rd, rm, operand);
9901 }
9902 void Vsri(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9903 Vsri(al, dt, rd, rm, operand);
9904 }
9905
9906 void Vst1(Condition cond,
9907 DataType dt,
9908 const NeonRegisterList& nreglist,
9909 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009910 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9911 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009912 VIXL_ASSERT(allow_macro_instructions_);
9913 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009914 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009915 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009916 vst1(cond, dt, nreglist, operand);
9917 }
9918 void Vst1(DataType dt,
9919 const NeonRegisterList& nreglist,
9920 const AlignedMemOperand& operand) {
9921 Vst1(al, dt, nreglist, operand);
9922 }
9923
9924 void Vst2(Condition cond,
9925 DataType dt,
9926 const NeonRegisterList& nreglist,
9927 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009928 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9929 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009930 VIXL_ASSERT(allow_macro_instructions_);
9931 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009932 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009933 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009934 vst2(cond, dt, nreglist, operand);
9935 }
9936 void Vst2(DataType dt,
9937 const NeonRegisterList& nreglist,
9938 const AlignedMemOperand& operand) {
9939 Vst2(al, dt, nreglist, operand);
9940 }
9941
9942 void Vst3(Condition cond,
9943 DataType dt,
9944 const NeonRegisterList& nreglist,
9945 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009946 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9947 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009948 VIXL_ASSERT(allow_macro_instructions_);
9949 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009950 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009951 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009952 vst3(cond, dt, nreglist, operand);
9953 }
9954 void Vst3(DataType dt,
9955 const NeonRegisterList& nreglist,
9956 const AlignedMemOperand& operand) {
9957 Vst3(al, dt, nreglist, operand);
9958 }
9959
9960 void Vst3(Condition cond,
9961 DataType dt,
9962 const NeonRegisterList& nreglist,
9963 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009964 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9965 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009966 VIXL_ASSERT(allow_macro_instructions_);
9967 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009968 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009969 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009970 vst3(cond, dt, nreglist, operand);
9971 }
9972 void Vst3(DataType dt,
9973 const NeonRegisterList& nreglist,
9974 const MemOperand& operand) {
9975 Vst3(al, dt, nreglist, operand);
9976 }
9977
9978 void Vst4(Condition cond,
9979 DataType dt,
9980 const NeonRegisterList& nreglist,
9981 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009982 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
9983 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009984 VIXL_ASSERT(allow_macro_instructions_);
9985 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009986 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009987 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009988 vst4(cond, dt, nreglist, operand);
9989 }
9990 void Vst4(DataType dt,
9991 const NeonRegisterList& nreglist,
9992 const AlignedMemOperand& operand) {
9993 Vst4(al, dt, nreglist, operand);
9994 }
9995
9996 void Vstm(Condition cond,
9997 DataType dt,
9998 Register rn,
9999 WriteBack write_back,
10000 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010001 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10002 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010003 VIXL_ASSERT(allow_macro_instructions_);
10004 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010005 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010006 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010007 vstm(cond, dt, rn, write_back, dreglist);
10008 }
10009 void Vstm(DataType dt,
10010 Register rn,
10011 WriteBack write_back,
10012 DRegisterList dreglist) {
10013 Vstm(al, dt, rn, write_back, dreglist);
10014 }
10015 void Vstm(Condition cond,
10016 Register rn,
10017 WriteBack write_back,
10018 DRegisterList dreglist) {
10019 Vstm(cond, kDataTypeValueNone, rn, write_back, dreglist);
10020 }
10021 void Vstm(Register rn, WriteBack write_back, DRegisterList dreglist) {
10022 Vstm(al, kDataTypeValueNone, rn, write_back, dreglist);
10023 }
10024
10025 void Vstm(Condition cond,
10026 DataType dt,
10027 Register rn,
10028 WriteBack write_back,
10029 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010030 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10031 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010032 VIXL_ASSERT(allow_macro_instructions_);
10033 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010034 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010035 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010036 vstm(cond, dt, rn, write_back, sreglist);
10037 }
10038 void Vstm(DataType dt,
10039 Register rn,
10040 WriteBack write_back,
10041 SRegisterList sreglist) {
10042 Vstm(al, dt, rn, write_back, sreglist);
10043 }
10044 void Vstm(Condition cond,
10045 Register rn,
10046 WriteBack write_back,
10047 SRegisterList sreglist) {
10048 Vstm(cond, kDataTypeValueNone, rn, write_back, sreglist);
10049 }
10050 void Vstm(Register rn, WriteBack write_back, SRegisterList sreglist) {
10051 Vstm(al, kDataTypeValueNone, rn, write_back, sreglist);
10052 }
10053
10054 void Vstmdb(Condition cond,
10055 DataType dt,
10056 Register rn,
10057 WriteBack write_back,
10058 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010059 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10060 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010061 VIXL_ASSERT(allow_macro_instructions_);
10062 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010063 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010064 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010065 vstmdb(cond, dt, rn, write_back, dreglist);
10066 }
10067 void Vstmdb(DataType dt,
10068 Register rn,
10069 WriteBack write_back,
10070 DRegisterList dreglist) {
10071 Vstmdb(al, dt, rn, write_back, dreglist);
10072 }
10073 void Vstmdb(Condition cond,
10074 Register rn,
10075 WriteBack write_back,
10076 DRegisterList dreglist) {
10077 Vstmdb(cond, kDataTypeValueNone, rn, write_back, dreglist);
10078 }
10079 void Vstmdb(Register rn, WriteBack write_back, DRegisterList dreglist) {
10080 Vstmdb(al, kDataTypeValueNone, rn, write_back, dreglist);
10081 }
10082
10083 void Vstmdb(Condition cond,
10084 DataType dt,
10085 Register rn,
10086 WriteBack write_back,
10087 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010088 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10089 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010090 VIXL_ASSERT(allow_macro_instructions_);
10091 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010092 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010093 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010094 vstmdb(cond, dt, rn, write_back, sreglist);
10095 }
10096 void Vstmdb(DataType dt,
10097 Register rn,
10098 WriteBack write_back,
10099 SRegisterList sreglist) {
10100 Vstmdb(al, dt, rn, write_back, sreglist);
10101 }
10102 void Vstmdb(Condition cond,
10103 Register rn,
10104 WriteBack write_back,
10105 SRegisterList sreglist) {
10106 Vstmdb(cond, kDataTypeValueNone, rn, write_back, sreglist);
10107 }
10108 void Vstmdb(Register rn, WriteBack write_back, SRegisterList sreglist) {
10109 Vstmdb(al, kDataTypeValueNone, rn, write_back, sreglist);
10110 }
10111
10112 void Vstmia(Condition cond,
10113 DataType dt,
10114 Register rn,
10115 WriteBack write_back,
10116 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010117 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10118 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010119 VIXL_ASSERT(allow_macro_instructions_);
10120 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010121 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010122 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010123 vstmia(cond, dt, rn, write_back, dreglist);
10124 }
10125 void Vstmia(DataType dt,
10126 Register rn,
10127 WriteBack write_back,
10128 DRegisterList dreglist) {
10129 Vstmia(al, dt, rn, write_back, dreglist);
10130 }
10131 void Vstmia(Condition cond,
10132 Register rn,
10133 WriteBack write_back,
10134 DRegisterList dreglist) {
10135 Vstmia(cond, kDataTypeValueNone, rn, write_back, dreglist);
10136 }
10137 void Vstmia(Register rn, WriteBack write_back, DRegisterList dreglist) {
10138 Vstmia(al, kDataTypeValueNone, rn, write_back, dreglist);
10139 }
10140
10141 void Vstmia(Condition cond,
10142 DataType dt,
10143 Register rn,
10144 WriteBack write_back,
10145 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010146 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10147 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010148 VIXL_ASSERT(allow_macro_instructions_);
10149 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010150 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010151 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010152 vstmia(cond, dt, rn, write_back, sreglist);
10153 }
10154 void Vstmia(DataType dt,
10155 Register rn,
10156 WriteBack write_back,
10157 SRegisterList sreglist) {
10158 Vstmia(al, dt, rn, write_back, sreglist);
10159 }
10160 void Vstmia(Condition cond,
10161 Register rn,
10162 WriteBack write_back,
10163 SRegisterList sreglist) {
10164 Vstmia(cond, kDataTypeValueNone, rn, write_back, sreglist);
10165 }
10166 void Vstmia(Register rn, WriteBack write_back, SRegisterList sreglist) {
10167 Vstmia(al, kDataTypeValueNone, rn, write_back, sreglist);
10168 }
10169
10170 void Vstr(Condition cond,
10171 DataType dt,
10172 DRegister rd,
10173 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010174 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10175 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010176 VIXL_ASSERT(allow_macro_instructions_);
10177 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010178 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010179 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010180 vstr(cond, dt, rd, operand);
10181 }
10182 void Vstr(DataType dt, DRegister rd, const MemOperand& operand) {
10183 Vstr(al, dt, rd, operand);
10184 }
10185 void Vstr(Condition cond, DRegister rd, const MemOperand& operand) {
10186 Vstr(cond, Untyped64, rd, operand);
10187 }
10188 void Vstr(DRegister rd, const MemOperand& operand) {
10189 Vstr(al, Untyped64, rd, operand);
10190 }
10191
10192 void Vstr(Condition cond,
10193 DataType dt,
10194 SRegister rd,
10195 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010196 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10197 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010198 VIXL_ASSERT(allow_macro_instructions_);
10199 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010200 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010201 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010202 vstr(cond, dt, rd, operand);
10203 }
10204 void Vstr(DataType dt, SRegister rd, const MemOperand& operand) {
10205 Vstr(al, dt, rd, operand);
10206 }
10207 void Vstr(Condition cond, SRegister rd, const MemOperand& operand) {
10208 Vstr(cond, Untyped32, rd, operand);
10209 }
10210 void Vstr(SRegister rd, const MemOperand& operand) {
10211 Vstr(al, Untyped32, rd, operand);
10212 }
10213
10214 void Vsub(
10215 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010216 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10217 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10218 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010219 VIXL_ASSERT(allow_macro_instructions_);
10220 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010221 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010222 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010223 vsub(cond, dt, rd, rn, rm);
10224 }
10225 void Vsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
10226 Vsub(al, dt, rd, rn, rm);
10227 }
10228
10229 void Vsub(
10230 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010231 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10232 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10233 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010234 VIXL_ASSERT(allow_macro_instructions_);
10235 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010236 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010237 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010238 vsub(cond, dt, rd, rn, rm);
10239 }
10240 void Vsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
10241 Vsub(al, dt, rd, rn, rm);
10242 }
10243
10244 void Vsub(
10245 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010246 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10247 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10248 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010249 VIXL_ASSERT(allow_macro_instructions_);
10250 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010251 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010252 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010253 vsub(cond, dt, rd, rn, rm);
10254 }
10255 void Vsub(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
10256 Vsub(al, dt, rd, rn, rm);
10257 }
10258
10259 void Vsubhn(
10260 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010261 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10262 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10263 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010264 VIXL_ASSERT(allow_macro_instructions_);
10265 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010266 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010267 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010268 vsubhn(cond, dt, rd, rn, rm);
10269 }
10270 void Vsubhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
10271 Vsubhn(al, dt, rd, rn, rm);
10272 }
10273
10274 void Vsubl(
10275 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010276 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10277 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10278 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010279 VIXL_ASSERT(allow_macro_instructions_);
10280 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010281 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010282 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010283 vsubl(cond, dt, rd, rn, rm);
10284 }
10285 void Vsubl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
10286 Vsubl(al, dt, rd, rn, rm);
10287 }
10288
10289 void Vsubw(
10290 Condition cond, DataType dt, QRegister rd, QRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010291 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10292 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10293 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010294 VIXL_ASSERT(allow_macro_instructions_);
10295 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010296 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010297 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010298 vsubw(cond, dt, rd, rn, rm);
10299 }
10300 void Vsubw(DataType dt, QRegister rd, QRegister rn, DRegister rm) {
10301 Vsubw(al, dt, rd, rn, rm);
10302 }
10303
10304 void Vswp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010305 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10306 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010307 VIXL_ASSERT(allow_macro_instructions_);
10308 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010309 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010310 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010311 vswp(cond, dt, rd, rm);
10312 }
10313 void Vswp(DataType dt, DRegister rd, DRegister rm) { Vswp(al, dt, rd, rm); }
10314 void Vswp(Condition cond, DRegister rd, DRegister rm) {
10315 Vswp(cond, kDataTypeValueNone, rd, rm);
10316 }
10317 void Vswp(DRegister rd, DRegister rm) {
10318 Vswp(al, kDataTypeValueNone, rd, rm);
10319 }
10320
10321 void Vswp(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010322 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10323 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010324 VIXL_ASSERT(allow_macro_instructions_);
10325 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010326 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010327 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010328 vswp(cond, dt, rd, rm);
10329 }
10330 void Vswp(DataType dt, QRegister rd, QRegister rm) { Vswp(al, dt, rd, rm); }
10331 void Vswp(Condition cond, QRegister rd, QRegister rm) {
10332 Vswp(cond, kDataTypeValueNone, rd, rm);
10333 }
10334 void Vswp(QRegister rd, QRegister rm) {
10335 Vswp(al, kDataTypeValueNone, rd, rm);
10336 }
10337
10338 void Vtbl(Condition cond,
10339 DataType dt,
10340 DRegister rd,
10341 const NeonRegisterList& nreglist,
10342 DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010343 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10344 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10345 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010346 VIXL_ASSERT(allow_macro_instructions_);
10347 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010348 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010349 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010350 vtbl(cond, dt, rd, nreglist, rm);
10351 }
10352 void Vtbl(DataType dt,
10353 DRegister rd,
10354 const NeonRegisterList& nreglist,
10355 DRegister rm) {
10356 Vtbl(al, dt, rd, nreglist, rm);
10357 }
10358
10359 void Vtbx(Condition cond,
10360 DataType dt,
10361 DRegister rd,
10362 const NeonRegisterList& nreglist,
10363 DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010364 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10365 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10366 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010367 VIXL_ASSERT(allow_macro_instructions_);
10368 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010369 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010370 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010371 vtbx(cond, dt, rd, nreglist, rm);
10372 }
10373 void Vtbx(DataType dt,
10374 DRegister rd,
10375 const NeonRegisterList& nreglist,
10376 DRegister rm) {
10377 Vtbx(al, dt, rd, nreglist, rm);
10378 }
10379
10380 void Vtrn(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010381 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10382 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010383 VIXL_ASSERT(allow_macro_instructions_);
10384 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010385 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010386 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010387 vtrn(cond, dt, rd, rm);
10388 }
10389 void Vtrn(DataType dt, DRegister rd, DRegister rm) { Vtrn(al, dt, rd, rm); }
10390
10391 void Vtrn(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010392 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10393 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010394 VIXL_ASSERT(allow_macro_instructions_);
10395 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010396 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010397 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010398 vtrn(cond, dt, rd, rm);
10399 }
10400 void Vtrn(DataType dt, QRegister rd, QRegister rm) { Vtrn(al, dt, rd, rm); }
10401
10402 void Vtst(
10403 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010404 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10405 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10406 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010407 VIXL_ASSERT(allow_macro_instructions_);
10408 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010409 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010410 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010411 vtst(cond, dt, rd, rn, rm);
10412 }
10413 void Vtst(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
10414 Vtst(al, dt, rd, rn, rm);
10415 }
10416
10417 void Vtst(
10418 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010419 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10420 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10421 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010422 VIXL_ASSERT(allow_macro_instructions_);
10423 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010424 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010425 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010426 vtst(cond, dt, rd, rn, rm);
10427 }
10428 void Vtst(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
10429 Vtst(al, dt, rd, rn, rm);
10430 }
10431
10432 void Vuzp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010433 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10434 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010435 VIXL_ASSERT(allow_macro_instructions_);
10436 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010437 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010438 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010439 vuzp(cond, dt, rd, rm);
10440 }
10441 void Vuzp(DataType dt, DRegister rd, DRegister rm) { Vuzp(al, dt, rd, rm); }
10442
10443 void Vuzp(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010444 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10445 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010446 VIXL_ASSERT(allow_macro_instructions_);
10447 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010448 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010449 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010450 vuzp(cond, dt, rd, rm);
10451 }
10452 void Vuzp(DataType dt, QRegister rd, QRegister rm) { Vuzp(al, dt, rd, rm); }
10453
10454 void Vzip(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010455 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10456 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010457 VIXL_ASSERT(allow_macro_instructions_);
10458 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010459 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010460 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010461 vzip(cond, dt, rd, rm);
10462 }
10463 void Vzip(DataType dt, DRegister rd, DRegister rm) { Vzip(al, dt, rd, rm); }
10464
10465 void Vzip(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010466 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10467 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010468 VIXL_ASSERT(allow_macro_instructions_);
10469 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010470 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010471 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010472 vzip(cond, dt, rd, rm);
10473 }
10474 void Vzip(DataType dt, QRegister rd, QRegister rm) { Vzip(al, dt, rd, rm); }
10475
10476 void Yield(Condition cond) {
10477 VIXL_ASSERT(allow_macro_instructions_);
10478 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010479 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010480 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010481 yield(cond);
10482 }
10483 void Yield() { Yield(al); }
Vincent Belliardf6786182016-09-21 11:55:28 +010010484 void Vabs(Condition cond, VRegister rd, VRegister rm) {
10485 VIXL_ASSERT(rd.IsS() || rd.IsD());
10486 VIXL_ASSERT(rd.GetType() == rm.GetType());
10487 if (rd.IsS()) {
10488 Vabs(cond, F32, rd.S(), rm.S());
10489 } else {
10490 Vabs(cond, F64, rd.D(), rm.D());
10491 }
10492 }
10493 void Vabs(VRegister rd, VRegister rm) { Vabs(al, rd, rm); }
10494 void Vadd(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10495 VIXL_ASSERT(rd.IsS() || rd.IsD());
10496 VIXL_ASSERT(rd.GetType() == rn.GetType());
10497 VIXL_ASSERT(rd.GetType() == rm.GetType());
10498 if (rd.IsS()) {
10499 Vadd(cond, F32, rd.S(), rn.S(), rm.S());
10500 } else {
10501 Vadd(cond, F64, rd.D(), rn.D(), rm.D());
10502 }
10503 }
10504 void Vadd(VRegister rd, VRegister rn, VRegister rm) { Vadd(al, rd, rn, rm); }
10505 void Vcmp(Condition cond, VRegister rd, VRegister rm) {
10506 VIXL_ASSERT(rd.IsS() || rd.IsD());
10507 VIXL_ASSERT(rd.GetType() == rm.GetType());
10508 if (rd.IsS()) {
10509 Vcmp(cond, F32, rd.S(), rm.S());
10510 } else {
10511 Vcmp(cond, F64, rd.D(), rm.D());
10512 }
10513 }
10514 void Vcmp(VRegister rd, VRegister rm) { Vcmp(al, rd, rm); }
10515 void Vcmpe(Condition cond, VRegister rd, VRegister rm) {
10516 VIXL_ASSERT(rd.IsS() || rd.IsD());
10517 VIXL_ASSERT(rd.GetType() == rm.GetType());
10518 if (rd.IsS()) {
10519 Vcmpe(cond, F32, rd.S(), rm.S());
10520 } else {
10521 Vcmpe(cond, F64, rd.D(), rm.D());
10522 }
10523 }
10524 void Vcmpe(VRegister rd, VRegister rm) { Vcmpe(al, rd, rm); }
10525 void Vdiv(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10526 VIXL_ASSERT(rd.IsS() || rd.IsD());
10527 VIXL_ASSERT(rd.GetType() == rn.GetType());
10528 VIXL_ASSERT(rd.GetType() == rm.GetType());
10529 if (rd.IsS()) {
10530 Vdiv(cond, F32, rd.S(), rn.S(), rm.S());
10531 } else {
10532 Vdiv(cond, F64, rd.D(), rn.D(), rm.D());
10533 }
10534 }
10535 void Vdiv(VRegister rd, VRegister rn, VRegister rm) { Vdiv(al, rd, rn, rm); }
10536 void Vfma(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10537 VIXL_ASSERT(rd.IsS() || rd.IsD());
10538 VIXL_ASSERT(rd.GetType() == rn.GetType());
10539 VIXL_ASSERT(rd.GetType() == rm.GetType());
10540 if (rd.IsS()) {
10541 Vfma(cond, F32, rd.S(), rn.S(), rm.S());
10542 } else {
10543 Vfma(cond, F64, rd.D(), rn.D(), rm.D());
10544 }
10545 }
10546 void Vfma(VRegister rd, VRegister rn, VRegister rm) { Vfma(al, rd, rn, rm); }
10547 void Vfms(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10548 VIXL_ASSERT(rd.IsS() || rd.IsD());
10549 VIXL_ASSERT(rd.GetType() == rn.GetType());
10550 VIXL_ASSERT(rd.GetType() == rm.GetType());
10551 if (rd.IsS()) {
10552 Vfms(cond, F32, rd.S(), rn.S(), rm.S());
10553 } else {
10554 Vfms(cond, F64, rd.D(), rn.D(), rm.D());
10555 }
10556 }
10557 void Vfms(VRegister rd, VRegister rn, VRegister rm) { Vfms(al, rd, rn, rm); }
10558 void Vfnma(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10559 VIXL_ASSERT(rd.IsS() || rd.IsD());
10560 VIXL_ASSERT(rd.GetType() == rn.GetType());
10561 VIXL_ASSERT(rd.GetType() == rm.GetType());
10562 if (rd.IsS()) {
10563 Vfnma(cond, F32, rd.S(), rn.S(), rm.S());
10564 } else {
10565 Vfnma(cond, F64, rd.D(), rn.D(), rm.D());
10566 }
10567 }
10568 void Vfnma(VRegister rd, VRegister rn, VRegister rm) {
10569 Vfnma(al, rd, rn, rm);
10570 }
10571 void Vfnms(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10572 VIXL_ASSERT(rd.IsS() || rd.IsD());
10573 VIXL_ASSERT(rd.GetType() == rn.GetType());
10574 VIXL_ASSERT(rd.GetType() == rm.GetType());
10575 if (rd.IsS()) {
10576 Vfnms(cond, F32, rd.S(), rn.S(), rm.S());
10577 } else {
10578 Vfnms(cond, F64, rd.D(), rn.D(), rm.D());
10579 }
10580 }
10581 void Vfnms(VRegister rd, VRegister rn, VRegister rm) {
10582 Vfnms(al, rd, rn, rm);
10583 }
10584 void Vmaxnm(VRegister rd, VRegister rn, VRegister rm) {
10585 VIXL_ASSERT(rd.IsS() || rd.IsD());
10586 VIXL_ASSERT(rd.GetType() == rn.GetType());
10587 VIXL_ASSERT(rd.GetType() == rm.GetType());
10588 if (rd.IsS()) {
10589 Vmaxnm(F32, rd.S(), rn.S(), rm.S());
10590 } else {
10591 Vmaxnm(F64, rd.D(), rn.D(), rm.D());
10592 }
10593 }
10594 void Vminnm(VRegister rd, VRegister rn, VRegister rm) {
10595 VIXL_ASSERT(rd.IsS() || rd.IsD());
10596 VIXL_ASSERT(rd.GetType() == rn.GetType());
10597 VIXL_ASSERT(rd.GetType() == rm.GetType());
10598 if (rd.IsS()) {
10599 Vminnm(F32, rd.S(), rn.S(), rm.S());
10600 } else {
10601 Vminnm(F64, rd.D(), rn.D(), rm.D());
10602 }
10603 }
10604 void Vmla(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10605 VIXL_ASSERT(rd.IsS() || rd.IsD());
10606 VIXL_ASSERT(rd.GetType() == rn.GetType());
10607 VIXL_ASSERT(rd.GetType() == rm.GetType());
10608 if (rd.IsS()) {
10609 Vmla(cond, F32, rd.S(), rn.S(), rm.S());
10610 } else {
10611 Vmla(cond, F64, rd.D(), rn.D(), rm.D());
10612 }
10613 }
10614 void Vmla(VRegister rd, VRegister rn, VRegister rm) { Vmla(al, rd, rn, rm); }
10615 void Vmls(Condition cond, 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 Vmls(cond, F32, rd.S(), rn.S(), rm.S());
10621 } else {
10622 Vmls(cond, F64, rd.D(), rn.D(), rm.D());
10623 }
10624 }
10625 void Vmls(VRegister rd, VRegister rn, VRegister rm) { Vmls(al, rd, rn, rm); }
10626 void Vmov(Condition cond, VRegister rd, VRegister rm) {
10627 VIXL_ASSERT(rd.IsS() || rd.IsD());
10628 VIXL_ASSERT(rd.GetType() == rm.GetType());
10629 if (rd.IsS()) {
10630 Vmov(cond, F32, rd.S(), rm.S());
10631 } else {
10632 Vmov(cond, F64, rd.D(), rm.D());
10633 }
10634 }
10635 void Vmov(VRegister rd, VRegister rm) { Vmov(al, rd, rm); }
10636 void Vmul(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10637 VIXL_ASSERT(rd.IsS() || rd.IsD());
10638 VIXL_ASSERT(rd.GetType() == rn.GetType());
10639 VIXL_ASSERT(rd.GetType() == rm.GetType());
10640 if (rd.IsS()) {
10641 Vmul(cond, F32, rd.S(), rn.S(), rm.S());
10642 } else {
10643 Vmul(cond, F64, rd.D(), rn.D(), rm.D());
10644 }
10645 }
10646 void Vmul(VRegister rd, VRegister rn, VRegister rm) { Vmul(al, rd, rn, rm); }
10647 void Vneg(Condition cond, VRegister rd, VRegister rm) {
10648 VIXL_ASSERT(rd.IsS() || rd.IsD());
10649 VIXL_ASSERT(rd.GetType() == rm.GetType());
10650 if (rd.IsS()) {
10651 Vneg(cond, F32, rd.S(), rm.S());
10652 } else {
10653 Vneg(cond, F64, rd.D(), rm.D());
10654 }
10655 }
10656 void Vneg(VRegister rd, VRegister rm) { Vneg(al, rd, rm); }
10657 void Vnmla(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10658 VIXL_ASSERT(rd.IsS() || rd.IsD());
10659 VIXL_ASSERT(rd.GetType() == rn.GetType());
10660 VIXL_ASSERT(rd.GetType() == rm.GetType());
10661 if (rd.IsS()) {
10662 Vnmla(cond, F32, rd.S(), rn.S(), rm.S());
10663 } else {
10664 Vnmla(cond, F64, rd.D(), rn.D(), rm.D());
10665 }
10666 }
10667 void Vnmla(VRegister rd, VRegister rn, VRegister rm) {
10668 Vnmla(al, rd, rn, rm);
10669 }
10670 void Vnmls(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10671 VIXL_ASSERT(rd.IsS() || rd.IsD());
10672 VIXL_ASSERT(rd.GetType() == rn.GetType());
10673 VIXL_ASSERT(rd.GetType() == rm.GetType());
10674 if (rd.IsS()) {
10675 Vnmls(cond, F32, rd.S(), rn.S(), rm.S());
10676 } else {
10677 Vnmls(cond, F64, rd.D(), rn.D(), rm.D());
10678 }
10679 }
10680 void Vnmls(VRegister rd, VRegister rn, VRegister rm) {
10681 Vnmls(al, rd, rn, rm);
10682 }
10683 void Vnmul(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10684 VIXL_ASSERT(rd.IsS() || rd.IsD());
10685 VIXL_ASSERT(rd.GetType() == rn.GetType());
10686 VIXL_ASSERT(rd.GetType() == rm.GetType());
10687 if (rd.IsS()) {
10688 Vnmul(cond, F32, rd.S(), rn.S(), rm.S());
10689 } else {
10690 Vnmul(cond, F64, rd.D(), rn.D(), rm.D());
10691 }
10692 }
10693 void Vnmul(VRegister rd, VRegister rn, VRegister rm) {
10694 Vnmul(al, rd, rn, rm);
10695 }
Vincent Belliard564c10c2018-02-06 08:21:16 -080010696 void Vrinta(VRegister rd, VRegister rm) {
10697 VIXL_ASSERT(rd.IsS() || rd.IsD());
10698 VIXL_ASSERT(rd.GetType() == rm.GetType());
10699 if (rd.IsS()) {
10700 Vrinta(F32, rd.S(), rm.S());
10701 } else {
10702 Vrinta(F64, rd.D(), rm.D());
10703 }
10704 }
10705 void Vrintm(VRegister rd, VRegister rm) {
10706 VIXL_ASSERT(rd.IsS() || rd.IsD());
10707 VIXL_ASSERT(rd.GetType() == rm.GetType());
10708 if (rd.IsS()) {
10709 Vrintm(F32, rd.S(), rm.S());
10710 } else {
10711 Vrintm(F64, rd.D(), rm.D());
10712 }
10713 }
10714 void Vrintn(VRegister rd, VRegister rm) {
10715 VIXL_ASSERT(rd.IsS() || rd.IsD());
10716 VIXL_ASSERT(rd.GetType() == rm.GetType());
10717 if (rd.IsS()) {
10718 Vrintn(F32, rd.S(), rm.S());
10719 } else {
10720 Vrintn(F64, rd.D(), rm.D());
10721 }
10722 }
10723 void Vrintp(VRegister rd, VRegister rm) {
10724 VIXL_ASSERT(rd.IsS() || rd.IsD());
10725 VIXL_ASSERT(rd.GetType() == rm.GetType());
10726 if (rd.IsS()) {
10727 Vrintp(F32, rd.S(), rm.S());
10728 } else {
10729 Vrintp(F64, rd.D(), rm.D());
10730 }
10731 }
10732 void Vrintr(Condition cond, VRegister rd, VRegister rm) {
10733 VIXL_ASSERT(rd.IsS() || rd.IsD());
10734 VIXL_ASSERT(rd.GetType() == rm.GetType());
10735 if (rd.IsS()) {
10736 Vrintr(cond, F32, rd.S(), rm.S());
10737 } else {
10738 Vrintr(cond, F64, rd.D(), rm.D());
10739 }
10740 }
10741 void Vrintr(VRegister rd, VRegister rm) { Vrintr(al, rd, rm); }
10742 void Vrintx(Condition cond, VRegister rd, VRegister rm) {
10743 VIXL_ASSERT(rd.IsS() || rd.IsD());
10744 VIXL_ASSERT(rd.GetType() == rm.GetType());
10745 if (rd.IsS()) {
10746 Vrintx(cond, F32, rd.S(), rm.S());
10747 } else {
10748 Vrintx(cond, F64, rd.D(), rm.D());
10749 }
10750 }
10751 void Vrintx(VRegister rd, VRegister rm) { Vrintx(al, rd, rm); }
10752 void Vrintz(Condition cond, VRegister rd, VRegister rm) {
10753 VIXL_ASSERT(rd.IsS() || rd.IsD());
10754 VIXL_ASSERT(rd.GetType() == rm.GetType());
10755 if (rd.IsS()) {
10756 Vrintz(cond, F32, rd.S(), rm.S());
10757 } else {
10758 Vrintz(cond, F64, rd.D(), rm.D());
10759 }
10760 }
10761 void Vrintz(VRegister rd, VRegister rm) { Vrintz(al, rd, rm); }
Vincent Belliardf6786182016-09-21 11:55:28 +010010762 void Vseleq(VRegister rd, VRegister rn, VRegister rm) {
10763 VIXL_ASSERT(rd.IsS() || rd.IsD());
10764 VIXL_ASSERT(rd.GetType() == rn.GetType());
10765 VIXL_ASSERT(rd.GetType() == rm.GetType());
10766 if (rd.IsS()) {
10767 Vseleq(F32, rd.S(), rn.S(), rm.S());
10768 } else {
10769 Vseleq(F64, rd.D(), rn.D(), rm.D());
10770 }
10771 }
10772 void Vselge(VRegister rd, VRegister rn, VRegister rm) {
10773 VIXL_ASSERT(rd.IsS() || rd.IsD());
10774 VIXL_ASSERT(rd.GetType() == rn.GetType());
10775 VIXL_ASSERT(rd.GetType() == rm.GetType());
10776 if (rd.IsS()) {
10777 Vselge(F32, rd.S(), rn.S(), rm.S());
10778 } else {
10779 Vselge(F64, rd.D(), rn.D(), rm.D());
10780 }
10781 }
10782 void Vselgt(VRegister rd, VRegister rn, VRegister rm) {
10783 VIXL_ASSERT(rd.IsS() || rd.IsD());
10784 VIXL_ASSERT(rd.GetType() == rn.GetType());
10785 VIXL_ASSERT(rd.GetType() == rm.GetType());
10786 if (rd.IsS()) {
10787 Vselgt(F32, rd.S(), rn.S(), rm.S());
10788 } else {
10789 Vselgt(F64, rd.D(), rn.D(), rm.D());
10790 }
10791 }
10792 void Vselvs(VRegister rd, VRegister rn, VRegister rm) {
10793 VIXL_ASSERT(rd.IsS() || rd.IsD());
10794 VIXL_ASSERT(rd.GetType() == rn.GetType());
10795 VIXL_ASSERT(rd.GetType() == rm.GetType());
10796 if (rd.IsS()) {
10797 Vselvs(F32, rd.S(), rn.S(), rm.S());
10798 } else {
10799 Vselvs(F64, rd.D(), rn.D(), rm.D());
10800 }
10801 }
10802 void Vsqrt(Condition cond, VRegister rd, VRegister rm) {
10803 VIXL_ASSERT(rd.IsS() || rd.IsD());
10804 VIXL_ASSERT(rd.GetType() == rm.GetType());
10805 if (rd.IsS()) {
10806 Vsqrt(cond, F32, rd.S(), rm.S());
10807 } else {
10808 Vsqrt(cond, F64, rd.D(), rm.D());
10809 }
10810 }
10811 void Vsqrt(VRegister rd, VRegister rm) { Vsqrt(al, rd, rm); }
10812 void Vsub(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10813 VIXL_ASSERT(rd.IsS() || rd.IsD());
10814 VIXL_ASSERT(rd.GetType() == rn.GetType());
10815 VIXL_ASSERT(rd.GetType() == rm.GetType());
10816 if (rd.IsS()) {
10817 Vsub(cond, F32, rd.S(), rn.S(), rm.S());
10818 } else {
10819 Vsub(cond, F64, rd.D(), rn.D(), rm.D());
10820 }
10821 }
10822 void Vsub(VRegister rd, VRegister rn, VRegister rm) { Vsub(al, rd, rn, rm); }
Alexandre Ramesd3832962016-07-04 15:03:43 +010010823 // End of generated code.
Vincent Belliardd17e3482016-11-22 15:46:43 -080010824
Pierre Langlois0cc43be2016-12-22 15:17:50 +000010825 virtual bool AllowUnpredictable() VIXL_OVERRIDE {
10826 VIXL_ABORT_WITH_MSG("Unpredictable instruction.\n");
10827 return false;
10828 }
10829 virtual bool AllowStronglyDiscouraged() VIXL_OVERRIDE {
10830 VIXL_ABORT_WITH_MSG(
10831 "ARM strongly recommends to not use this instruction.\n");
10832 return false;
10833 }
Vincent Belliard564c10c2018-02-06 08:21:16 -080010834 // Old syntax of vrint instructions.
10835 VIXL_DEPRECATED(
10836 "void Vrinta(DataType dt, DRegister rd, DRegister rm)",
10837 void Vrinta(DataType dt1, DataType dt2, DRegister rd, DRegister rm)) {
10838 USE(dt2);
10839 VIXL_ASSERT(dt1.Is(dt2));
10840 return Vrinta(dt1, rd, rm);
10841 }
10842 VIXL_DEPRECATED(
10843 "void Vrinta(DataType dt, QRegister rd, QRegister rm)",
10844 void Vrinta(DataType dt1, DataType dt2, QRegister rd, QRegister rm)) {
10845 USE(dt2);
10846 VIXL_ASSERT(dt1.Is(dt2));
10847 return Vrinta(dt1, rd, rm);
10848 }
10849 VIXL_DEPRECATED(
10850 "void Vrinta(DataType dt, SRegister rd, SRegister rm)",
10851 void Vrinta(DataType dt1, DataType dt2, SRegister rd, SRegister rm)) {
10852 USE(dt2);
10853 VIXL_ASSERT(dt1.Is(dt2));
10854 return Vrinta(dt1, rd, rm);
10855 }
10856
10857 VIXL_DEPRECATED(
10858 "void Vrintm(DataType dt, DRegister rd, DRegister rm)",
10859 void Vrintm(DataType dt1, DataType dt2, DRegister rd, DRegister rm)) {
10860 USE(dt2);
10861 VIXL_ASSERT(dt1.Is(dt2));
10862 return Vrintm(dt1, rd, rm);
10863 }
10864 VIXL_DEPRECATED(
10865 "void Vrintm(DataType dt, QRegister rd, QRegister rm)",
10866 void Vrintm(DataType dt1, DataType dt2, QRegister rd, QRegister rm)) {
10867 USE(dt2);
10868 VIXL_ASSERT(dt1.Is(dt2));
10869 return Vrintm(dt1, rd, rm);
10870 }
10871 VIXL_DEPRECATED(
10872 "void Vrintm(DataType dt, SRegister rd, SRegister rm)",
10873 void Vrintm(DataType dt1, DataType dt2, SRegister rd, SRegister rm)) {
10874 USE(dt2);
10875 VIXL_ASSERT(dt1.Is(dt2));
10876 return Vrintm(dt1, rd, rm);
10877 }
10878
10879 VIXL_DEPRECATED(
10880 "void Vrintn(DataType dt, DRegister rd, DRegister rm)",
10881 void Vrintn(DataType dt1, DataType dt2, DRegister rd, DRegister rm)) {
10882 USE(dt2);
10883 VIXL_ASSERT(dt1.Is(dt2));
10884 return Vrintn(dt1, rd, rm);
10885 }
10886 VIXL_DEPRECATED(
10887 "void Vrintn(DataType dt, QRegister rd, QRegister rm)",
10888 void Vrintn(DataType dt1, DataType dt2, QRegister rd, QRegister rm)) {
10889 USE(dt2);
10890 VIXL_ASSERT(dt1.Is(dt2));
10891 return Vrintn(dt1, rd, rm);
10892 }
10893 VIXL_DEPRECATED(
10894 "void Vrintn(DataType dt, SRegister rd, SRegister rm)",
10895 void Vrintn(DataType dt1, DataType dt2, SRegister rd, SRegister rm)) {
10896 USE(dt2);
10897 VIXL_ASSERT(dt1.Is(dt2));
10898 return Vrintn(dt1, rd, rm);
10899 }
10900
10901 VIXL_DEPRECATED(
10902 "void Vrintp(DataType dt, DRegister rd, DRegister rm)",
10903 void Vrintp(DataType dt1, DataType dt2, DRegister rd, DRegister rm)) {
10904 USE(dt2);
10905 VIXL_ASSERT(dt1.Is(dt2));
10906 return Vrintp(dt1, rd, rm);
10907 }
10908 VIXL_DEPRECATED(
10909 "void Vrintp(DataType dt, QRegister rd, QRegister rm)",
10910 void Vrintp(DataType dt1, DataType dt2, QRegister rd, QRegister rm)) {
10911 USE(dt2);
10912 VIXL_ASSERT(dt1.Is(dt2));
10913 return Vrintp(dt1, rd, rm);
10914 }
10915 VIXL_DEPRECATED(
10916 "void Vrintp(DataType dt, SRegister rd, SRegister rm)",
10917 void Vrintp(DataType dt1, DataType dt2, SRegister rd, SRegister rm)) {
10918 USE(dt2);
10919 VIXL_ASSERT(dt1.Is(dt2));
10920 return Vrintp(dt1, rd, rm);
10921 }
10922
10923 VIXL_DEPRECATED(
10924 "void Vrintr(Condition cond, DataType dt, SRegister rd, SRegister rm)",
10925 void Vrintr(Condition cond,
10926 DataType dt1,
10927 DataType dt2,
10928 SRegister rd,
10929 SRegister rm)) {
10930 USE(dt2);
10931 VIXL_ASSERT(dt1.Is(dt2));
10932 return Vrintr(cond, dt1, rd, rm);
10933 }
10934 VIXL_DEPRECATED(
10935 "void Vrintr(DataType dt, SRegister rd, SRegister rm)",
10936 void Vrintr(DataType dt1, DataType dt2, SRegister rd, SRegister rm)) {
10937 USE(dt2);
10938 VIXL_ASSERT(dt1.Is(dt2));
10939 return Vrintr(dt1, rd, rm);
10940 }
10941
10942 VIXL_DEPRECATED(
10943 "void Vrintr(Condition cond, DataType dt, DRegister rd, DRegister rm)",
10944 void Vrintr(Condition cond,
10945 DataType dt1,
10946 DataType dt2,
10947 DRegister rd,
10948 DRegister rm)) {
10949 USE(dt2);
10950 VIXL_ASSERT(dt1.Is(dt2));
10951 return Vrintr(cond, dt1, rd, rm);
10952 }
10953 VIXL_DEPRECATED(
10954 "void Vrintr(DataType dt, DRegister rd, DRegister rm)",
10955 void Vrintr(DataType dt1, DataType dt2, DRegister rd, DRegister rm)) {
10956 USE(dt2);
10957 VIXL_ASSERT(dt1.Is(dt2));
10958 return Vrintr(dt1, rd, rm);
10959 }
10960
10961 VIXL_DEPRECATED(
10962 "void Vrintx(Condition cond, DataType dt, DRegister rd, DRegister rm)",
10963 void Vrintx(Condition cond,
10964 DataType dt1,
10965 DataType dt2,
10966 DRegister rd,
10967 DRegister rm)) {
10968 USE(dt2);
10969 VIXL_ASSERT(dt1.Is(dt2));
10970 return Vrintx(cond, dt1, rd, rm);
10971 }
10972 VIXL_DEPRECATED(
10973 "void Vrintx(DataType dt, DRegister rd, DRegister rm)",
10974 void Vrintx(DataType dt1, DataType dt2, DRegister rd, DRegister rm)) {
10975 USE(dt2);
10976 VIXL_ASSERT(dt1.Is(dt2));
10977 return Vrintx(dt1, rd, rm);
10978 }
10979
10980 VIXL_DEPRECATED(
10981 "void Vrintx(DataType dt, QRegister rd, QRegister rm)",
10982 void Vrintx(DataType dt1, DataType dt2, QRegister rd, QRegister rm)) {
10983 USE(dt2);
10984 VIXL_ASSERT(dt1.Is(dt2));
10985 return Vrintx(dt1, rd, rm);
10986 }
10987
10988 VIXL_DEPRECATED(
10989 "void Vrintx(Condition cond, DataType dt, SRegister rd, SRegister rm)",
10990 void Vrintx(Condition cond,
10991 DataType dt1,
10992 DataType dt2,
10993 SRegister rd,
10994 SRegister rm)) {
10995 USE(dt2);
10996 VIXL_ASSERT(dt1.Is(dt2));
10997 return Vrintx(cond, dt1, rd, rm);
10998 }
10999 VIXL_DEPRECATED(
11000 "void Vrintx(DataType dt, SRegister rd, SRegister rm)",
11001 void Vrintx(DataType dt1, DataType dt2, SRegister rd, SRegister rm)) {
11002 USE(dt2);
11003 VIXL_ASSERT(dt1.Is(dt2));
11004 return Vrintx(dt1, rd, rm);
11005 }
11006
11007 VIXL_DEPRECATED(
11008 "void Vrintz(Condition cond, DataType dt, DRegister rd, DRegister rm)",
11009 void Vrintz(Condition cond,
11010 DataType dt1,
11011 DataType dt2,
11012 DRegister rd,
11013 DRegister rm)) {
11014 USE(dt2);
11015 VIXL_ASSERT(dt1.Is(dt2));
11016 return Vrintz(cond, dt1, rd, rm);
11017 }
11018 VIXL_DEPRECATED(
11019 "void Vrintz(DataType dt, DRegister rd, DRegister rm)",
11020 void Vrintz(DataType dt1, DataType dt2, DRegister rd, DRegister rm)) {
11021 USE(dt2);
11022 VIXL_ASSERT(dt1.Is(dt2));
11023 return Vrintz(dt1, rd, rm);
11024 }
11025
11026 VIXL_DEPRECATED(
11027 "void Vrintz(DataType dt, QRegister rd, QRegister rm)",
11028 void Vrintz(DataType dt1, DataType dt2, QRegister rd, QRegister rm)) {
11029 USE(dt2);
11030 VIXL_ASSERT(dt1.Is(dt2));
11031 return Vrintz(dt1, rd, rm);
11032 }
11033
11034 VIXL_DEPRECATED(
11035 "void Vrintz(Condition cond, DataType dt, SRegister rd, SRegister rm)",
11036 void Vrintz(Condition cond,
11037 DataType dt1,
11038 DataType dt2,
11039 SRegister rd,
11040 SRegister rm)) {
11041 USE(dt2);
11042 VIXL_ASSERT(dt1.Is(dt2));
11043 return Vrintz(cond, dt1, rd, rm);
11044 }
11045 VIXL_DEPRECATED(
11046 "void Vrintz(DataType dt, SRegister rd, SRegister rm)",
11047 void Vrintz(DataType dt1, DataType dt2, SRegister rd, SRegister rm)) {
11048 USE(dt2);
11049 VIXL_ASSERT(dt1.Is(dt2));
11050 return Vrintz(dt1, rd, rm);
11051 }
Pierre Langlois0cc43be2016-12-22 15:17:50 +000011052
Alexandre Ramesd3832962016-07-04 15:03:43 +010011053 private:
Georgia Kouveli8b57c862017-03-02 15:18:58 +000011054 bool NeedBranch(Condition* cond) { return !cond->Is(al) && IsUsingT32(); }
11055 static const int kBranchSize = kMaxInstructionSizeInBytes;
11056
Alexandre Ramesd3832962016-07-04 15:03:43 +010011057 RegisterList available_;
11058 VRegisterList available_vfp_;
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000011059 UseScratchRegisterScope* current_scratch_scope_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010011060 MacroAssemblerContext context_;
Georgia Kouveli8b57c862017-03-02 15:18:58 +000011061 PoolManager<int32_t> pool_manager_;
Pierre Langlois1e85b7f2016-08-05 14:20:36 +010011062 bool generate_simulator_code_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010011063 bool allow_macro_instructions_;
Georgia Kouveli8b57c862017-03-02 15:18:58 +000011064 Label* pool_end_;
11065
11066 friend class TestMacroAssembler;
Alexandre Ramesd3832962016-07-04 15:03:43 +010011067};
11068
Alexandre Ramesd3832962016-07-04 15:03:43 +010011069// This scope utility allows scratch registers to be managed safely. The
11070// MacroAssembler's GetScratchRegisterList() is used as a pool of scratch
11071// registers. These registers can be allocated on demand, and will be returned
11072// at the end of the scope.
11073//
11074// When the scope ends, the MacroAssembler's lists will be restored to their
11075// original state, even if the lists were modified by some other means.
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000011076//
11077// Scopes must nest perfectly. That is, they must be destructed in reverse
11078// construction order. Otherwise, it is not clear how to handle cases where one
11079// scope acquires a register that was included in a now-closing scope. With
11080// perfect nesting, this cannot occur.
Alexandre Ramesd3832962016-07-04 15:03:43 +010011081class UseScratchRegisterScope {
11082 public:
11083 // This constructor implicitly calls the `Open` function to initialise the
11084 // scope, so it is ready to use immediately after it has been constructed.
11085 explicit UseScratchRegisterScope(MacroAssembler* masm)
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000011086 : masm_(NULL), parent_(NULL), old_available_(0), old_available_vfp_(0) {
Alexandre Ramesd3832962016-07-04 15:03:43 +010011087 Open(masm);
11088 }
11089 // This constructor allows deferred and optional initialisation of the scope.
11090 // The user is required to explicitly call the `Open` function before using
11091 // the scope.
11092 UseScratchRegisterScope()
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000011093 : masm_(NULL), parent_(NULL), old_available_(0), old_available_vfp_(0) {}
Alexandre Ramesd3832962016-07-04 15:03:43 +010011094
11095 // This function performs the actual initialisation work.
11096 void Open(MacroAssembler* masm);
11097
11098 // The destructor always implicitly calls the `Close` function.
11099 ~UseScratchRegisterScope() { Close(); }
11100
11101 // This function performs the cleaning-up work. It must succeed even if the
11102 // scope has not been opened. It is safe to call multiple times.
11103 void Close();
11104
11105 bool IsAvailable(const Register& reg) const;
11106 bool IsAvailable(const VRegister& reg) const;
11107
11108 // Take a register from the temp list. It will be returned automatically when
11109 // the scope ends.
11110 Register Acquire();
11111 VRegister AcquireV(unsigned size_in_bits);
11112 QRegister AcquireQ();
11113 DRegister AcquireD();
11114 SRegister AcquireS();
11115
11116 // Explicitly release an acquired (or excluded) register, putting it back in
11117 // the temp list.
11118 void Release(const Register& reg);
11119 void Release(const VRegister& reg);
11120
11121 // Make the specified registers available as scratch registers for the
11122 // duration of this scope.
11123 void Include(const RegisterList& list);
11124 void Include(const Register& reg1,
11125 const Register& reg2 = NoReg,
11126 const Register& reg3 = NoReg,
11127 const Register& reg4 = NoReg) {
11128 Include(RegisterList(reg1, reg2, reg3, reg4));
11129 }
11130 void Include(const VRegisterList& list);
11131 void Include(const VRegister& reg1,
11132 const VRegister& reg2 = NoVReg,
11133 const VRegister& reg3 = NoVReg,
11134 const VRegister& reg4 = NoVReg) {
11135 Include(VRegisterList(reg1, reg2, reg3, reg4));
11136 }
11137
11138 // Make sure that the specified registers are not available in this scope.
11139 // This can be used to prevent helper functions from using sensitive
11140 // registers, for example.
11141 void Exclude(const RegisterList& list);
11142 void Exclude(const Register& reg1,
11143 const Register& reg2 = NoReg,
11144 const Register& reg3 = NoReg,
11145 const Register& reg4 = NoReg) {
11146 Exclude(RegisterList(reg1, reg2, reg3, reg4));
11147 }
11148 void Exclude(const VRegisterList& list);
11149 void Exclude(const VRegister& reg1,
11150 const VRegister& reg2 = NoVReg,
11151 const VRegister& reg3 = NoVReg,
11152 const VRegister& reg4 = NoVReg) {
11153 Exclude(VRegisterList(reg1, reg2, reg3, reg4));
11154 }
11155
Jacob Bramley9ee25b52016-12-02 10:58:09 +000011156 // A convenience helper to exclude any registers used by the operand.
11157 void Exclude(const Operand& operand);
11158
Alexandre Ramesd3832962016-07-04 15:03:43 +010011159 // Prevent any scratch registers from being used in this scope.
11160 void ExcludeAll();
11161
11162 private:
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000011163 // The MacroAssembler maintains a list of available scratch registers, and
11164 // also keeps track of the most recently-opened scope so that on destruction
11165 // we can check that scopes do not outlive their parents.
11166 MacroAssembler* masm_;
11167 UseScratchRegisterScope* parent_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010011168
11169 // The state of the available lists at the start of this scope.
11170 uint32_t old_available_; // kRRegister
11171 uint64_t old_available_vfp_; // kVRegister
11172
Jacob Bramleycff5a2e2019-03-15 09:34:56 +000011173 VIXL_NO_RETURN_IN_DEBUG_MODE UseScratchRegisterScope(
11174 const UseScratchRegisterScope&) {
Alexandre Ramesd3832962016-07-04 15:03:43 +010011175 VIXL_UNREACHABLE();
11176 }
Jacob Bramleycff5a2e2019-03-15 09:34:56 +000011177 VIXL_NO_RETURN_IN_DEBUG_MODE void operator=(const UseScratchRegisterScope&) {
Alexandre Ramesd3832962016-07-04 15:03:43 +010011178 VIXL_UNREACHABLE();
11179 }
11180};
11181
Alexandre Ramesd3832962016-07-04 15:03:43 +010011182
11183} // namespace aarch32
11184} // namespace vixl
11185
11186#endif // VIXL_AARCH32_MACRO_ASSEMBLER_AARCH32_H_