blob: 59b25a5da8a295efa7e4a59028bd93eb1e52ff7c [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
Jacob Bramley2fe55ec2020-03-20 17:03:48 +0000271 SetAllowMacroInstructions( // NOLINT(clang-analyzer-optin.cplusplus.VirtualCall)
272 true);
Alexandre Ramesfd098172016-08-09 10:29:53 +0100273#else
Alexandre Ramesfd098172016-08-09 10:29:53 +0100274 USE(allow_macro_instructions_);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100275#endif
Alexandre Ramesd3832962016-07-04 15:03:43 +0100276 }
Rodolph Perfetta9a9331f2016-12-09 22:05:48 +0000277 explicit MacroAssembler(size_t size, InstructionSet isa = kDefaultISA)
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100278 : Assembler(size, isa),
279 available_(r12),
Jacob Bramleye8ce9f02016-12-14 16:03:31 +0000280 current_scratch_scope_(NULL),
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000281 pool_manager_(4 /*header_size*/,
282 4 /*alignment*/,
283 4 /*buffer_alignment*/),
284 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE),
285 pool_end_(NULL) {
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100286#ifdef VIXL_DEBUG
Jacob Bramley2fe55ec2020-03-20 17:03:48 +0000287 SetAllowMacroInstructions( // NOLINT(clang-analyzer-optin.cplusplus.VirtualCall)
288 true);
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100289#endif
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100290 }
Rodolph Perfetta9a9331f2016-12-09 22:05:48 +0000291 MacroAssembler(byte* buffer, size_t size, InstructionSet isa = kDefaultISA)
Jacob Bramley10dae1a2016-07-27 09:45:13 +0100292 : Assembler(buffer, size, isa),
Alexandre Ramesd3832962016-07-04 15:03:43 +0100293 available_(r12),
Jacob Bramleye8ce9f02016-12-14 16:03:31 +0000294 current_scratch_scope_(NULL),
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000295 pool_manager_(4 /*header_size*/,
296 4 /*alignment*/,
297 4 /*buffer_alignment*/),
298 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE),
299 pool_end_(NULL) {
Alexandre Ramesd3832962016-07-04 15:03:43 +0100300#ifdef VIXL_DEBUG
Jacob Bramley2fe55ec2020-03-20 17:03:48 +0000301 SetAllowMacroInstructions( // NOLINT(clang-analyzer-optin.cplusplus.VirtualCall)
302 true);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100303#endif
Alexandre Ramesd3832962016-07-04 15:03:43 +0100304 }
305
Pierre Langlois1e85b7f2016-08-05 14:20:36 +0100306 bool GenerateSimulatorCode() const { return generate_simulator_code_; }
307
Pierre Langlois4c5d65b2016-12-06 11:56:28 +0000308 virtual bool AllowMacroInstructions() const VIXL_OVERRIDE {
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000309 return allow_macro_instructions_;
310 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100311
Pierre Langlois8571b892017-01-09 10:47:44 +0000312 void FinalizeCode(FinalizeOption option = kUnreachable) {
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000313 EmitLiteralPool(option == kUnreachable
314 ? PoolManager<int32_t>::kNoBranchRequired
315 : PoolManager<int32_t>::kBranchRequired);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100316 Assembler::FinalizeCode();
317 }
318
319 RegisterList* GetScratchRegisterList() { return &available_; }
320 VRegisterList* GetScratchVRegisterList() { return &available_vfp_; }
321
Jacob Bramleye8ce9f02016-12-14 16:03:31 +0000322 // Get or set the current (most-deeply-nested) UseScratchRegisterScope.
323 void SetCurrentScratchRegisterScope(UseScratchRegisterScope* scope) {
324 current_scratch_scope_ = scope;
325 }
326 UseScratchRegisterScope* GetCurrentScratchRegisterScope() {
327 return current_scratch_scope_;
328 }
329
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000330 // Given an address calculation (Register + immediate), generate code to
331 // partially compute the address. The returned MemOperand will perform any
332 // remaining computation in a subsequent load or store instruction.
333 //
Jacob Bramley9c112d82016-12-08 14:38:44 +0000334 // The offset provided should be the offset that would be used in a load or
335 // store instruction (if it had sufficient range). This only matters where
336 // base.Is(pc), since load and store instructions align the pc before
337 // dereferencing it.
338 //
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000339 // TODO: Improve the handling of negative offsets. They are not implemented
340 // precisely for now because they only have a marginal benefit for the
341 // existing uses (in delegates).
342 MemOperand MemOperandComputationHelper(Condition cond,
343 Register scratch,
344 Register base,
345 uint32_t offset,
346 uint32_t extra_offset_mask = 0);
347
348 MemOperand MemOperandComputationHelper(Register scratch,
349 Register base,
350 uint32_t offset,
351 uint32_t extra_offset_mask = 0) {
352 return MemOperandComputationHelper(al,
353 scratch,
354 base,
355 offset,
356 extra_offset_mask);
357 }
358 MemOperand MemOperandComputationHelper(Condition cond,
359 Register scratch,
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100360 Location* location,
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000361 uint32_t extra_offset_mask = 0) {
362 // Check for buffer space _before_ calculating the offset, in case we
363 // generate a pool that affects the offset calculation.
Jacob Bramley89d2f772016-12-08 17:04:16 +0000364 CodeBufferCheckScope scope(this, 4 * kMaxInstructionSizeInBytes);
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000365 Label::Offset offset =
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100366 location->GetLocation() -
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000367 AlignDown(GetCursorOffset() + GetArchitectureStatePCOffset(), 4);
368 return MemOperandComputationHelper(cond,
369 scratch,
370 pc,
371 offset,
372 extra_offset_mask);
373 }
374 MemOperand MemOperandComputationHelper(Register scratch,
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100375 Location* location,
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000376 uint32_t extra_offset_mask = 0) {
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100377 return MemOperandComputationHelper(al,
378 scratch,
379 location,
380 extra_offset_mask);
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000381 }
382
383 // Determine the appropriate mask to pass into MemOperandComputationHelper.
384 uint32_t GetOffsetMask(InstructionType type, AddrMode addrmode);
385
Alexandre Ramesd3832962016-07-04 15:03:43 +0100386 // State and type helpers.
387 bool IsModifiedImmediate(uint32_t imm) {
Vincent Belliard5ddbc802016-12-16 07:57:11 -0800388 return IsUsingT32() ? ImmediateT32::IsImmediateT32(imm)
389 : ImmediateA32::IsImmediateA32(imm);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100390 }
391
392 void Bind(Label* label) {
393 VIXL_ASSERT(allow_macro_instructions_);
Vincent Belliarde42218c2016-10-19 13:24:28 -0700394 BindHelper(label);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100395 }
396
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000397 virtual void BindHelper(Label* label) VIXL_OVERRIDE {
398 // Assert that we have the correct buffer alignment.
399 if (IsUsingT32()) {
400 VIXL_ASSERT(GetBuffer()->Is16bitAligned());
401 } else {
402 VIXL_ASSERT(GetBuffer()->Is32bitAligned());
403 }
404 // If we need to add padding, check if we have to emit the pool.
405 const int32_t pc = GetCursorOffset();
406 if (label->Needs16BitPadding(pc)) {
407 const int kPaddingBytes = 2;
408 if (pool_manager_.MustEmit(pc, kPaddingBytes)) {
409 int32_t new_pc = pool_manager_.Emit(this, pc, kPaddingBytes);
410 USE(new_pc);
411 VIXL_ASSERT(new_pc == GetCursorOffset());
412 }
413 }
414 pool_manager_.Bind(this, label, GetCursorOffset());
415 }
416
417 void RegisterLiteralReference(RawLiteral* literal) {
418 if (literal->IsManuallyPlaced()) return;
419 RegisterForwardReference(literal);
420 }
421
422 void RegisterForwardReference(Location* location) {
423 if (location->IsBound()) return;
424 VIXL_ASSERT(location->HasForwardReferences());
425 const Location::ForwardRef& reference = location->GetLastForwardReference();
426 pool_manager_.AddObjectReference(&reference, location);
427 }
428
429 void CheckEmitPoolForInstruction(const ReferenceInfo* info,
430 Location* location,
431 Condition* cond = NULL) {
432 int size = info->size;
433 int32_t pc = GetCursorOffset();
434 // If we need to emit a branch over the instruction, take this into account.
435 if ((cond != NULL) && NeedBranch(cond)) {
436 size += kBranchSize;
437 pc += kBranchSize;
438 }
439 int32_t from = pc;
440 from += IsUsingT32() ? kT32PcDelta : kA32PcDelta;
441 if (info->pc_needs_aligning) from = AlignDown(from, 4);
442 int32_t min = from + info->min_offset;
443 int32_t max = from + info->max_offset;
444 ForwardReference<int32_t> temp_ref(pc,
445 info->size,
446 min,
447 max,
448 info->alignment);
449 if (pool_manager_.MustEmit(GetCursorOffset(), size, &temp_ref, location)) {
450 int32_t new_pc = pool_manager_.Emit(this,
451 GetCursorOffset(),
452 info->size,
453 &temp_ref,
454 location);
455 USE(new_pc);
456 VIXL_ASSERT(new_pc == GetCursorOffset());
457 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100458 }
459
460 void Place(RawLiteral* literal) {
461 VIXL_ASSERT(allow_macro_instructions_);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700462 VIXL_ASSERT(literal->IsManuallyPlaced());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000463 // Check if we need to emit the pools. Take the alignment of the literal
464 // into account, as well as potential 16-bit padding needed to reach the
465 // minimum accessible location.
466 int alignment = literal->GetMaxAlignment();
467 int32_t pc = GetCursorOffset();
468 int total_size = AlignUp(pc, alignment) - pc + literal->GetSize();
469 if (literal->Needs16BitPadding(pc)) total_size += 2;
470 if (pool_manager_.MustEmit(pc, total_size)) {
471 int32_t new_pc = pool_manager_.Emit(this, pc, total_size);
472 USE(new_pc);
473 VIXL_ASSERT(new_pc == GetCursorOffset());
474 }
475 pool_manager_.Bind(this, literal, GetCursorOffset());
476 literal->EmitPoolObject(this);
477 // Align the buffer, to be ready to generate instructions right after
478 // this.
Vincent Belliarde42218c2016-10-19 13:24:28 -0700479 GetBuffer()->Align();
Alexandre Ramesd3832962016-07-04 15:03:43 +0100480 }
481
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000482 void EmitLiteralPool(PoolManager<int32_t>::EmitOption option =
483 PoolManager<int32_t>::kBranchRequired) {
484 VIXL_ASSERT(!ArePoolsBlocked());
485 int32_t new_pc =
486 pool_manager_.Emit(this, GetCursorOffset(), 0, NULL, NULL, option);
487 VIXL_ASSERT(new_pc == GetCursorOffset());
488 USE(new_pc);
Vincent Belliarddcffac42016-10-19 11:31:20 -0700489 }
490
Alexandre Ramesd3832962016-07-04 15:03:43 +0100491 void EnsureEmitFor(uint32_t size) {
Georgia Kouvelia6090f82017-02-01 16:03:44 +0000492 EnsureEmitPoolsFor(size);
493 VIXL_ASSERT(GetBuffer()->HasSpaceFor(size) || GetBuffer()->IsManaged());
494 GetBuffer()->EnsureSpaceFor(size);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100495 }
496
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000497 bool AliasesAvailableScratchRegister(Register reg) {
498 return GetScratchRegisterList()->Includes(reg);
499 }
500
Vincent Belliardadbb4a72016-11-22 14:24:54 -0800501 bool AliasesAvailableScratchRegister(RegisterOrAPSR_nzcv reg) {
502 if (reg.IsAPSR_nzcv()) return false;
503 return GetScratchRegisterList()->Includes(reg.AsRegister());
504 }
505
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000506 bool AliasesAvailableScratchRegister(VRegister reg) {
507 return GetScratchVRegisterList()->IncludesAliasOf(reg);
508 }
509
510 bool AliasesAvailableScratchRegister(const Operand& operand) {
511 if (operand.IsImmediate()) return false;
512 return AliasesAvailableScratchRegister(operand.GetBaseRegister()) ||
513 (operand.IsRegisterShiftedRegister() &&
514 AliasesAvailableScratchRegister(operand.GetShiftRegister()));
515 }
516
517 bool AliasesAvailableScratchRegister(const NeonOperand& operand) {
518 if (operand.IsImmediate()) return false;
519 return AliasesAvailableScratchRegister(operand.GetRegister());
520 }
521
522 bool AliasesAvailableScratchRegister(SRegisterList list) {
523 for (int n = 0; n < list.GetLength(); n++) {
524 if (AliasesAvailableScratchRegister(list.GetSRegister(n))) return true;
525 }
526 return false;
527 }
528
529 bool AliasesAvailableScratchRegister(DRegisterList list) {
530 for (int n = 0; n < list.GetLength(); n++) {
531 if (AliasesAvailableScratchRegister(list.GetDRegister(n))) return true;
532 }
533 return false;
534 }
535
536 bool AliasesAvailableScratchRegister(NeonRegisterList list) {
537 for (int n = 0; n < list.GetLength(); n++) {
538 if (AliasesAvailableScratchRegister(list.GetDRegister(n))) return true;
539 }
540 return false;
541 }
542
543 bool AliasesAvailableScratchRegister(RegisterList list) {
544 return GetScratchRegisterList()->Overlaps(list);
545 }
546
547 bool AliasesAvailableScratchRegister(const MemOperand& operand) {
548 return AliasesAvailableScratchRegister(operand.GetBaseRegister()) ||
549 (operand.IsShiftedRegister() &&
550 AliasesAvailableScratchRegister(operand.GetOffsetRegister()));
551 }
552
Pierre Langlois25e39872016-10-20 17:14:21 +0100553 // Adr with a literal already constructed. Add the literal to the pool if it
554 // is not already done.
555 void Adr(Condition cond, Register rd, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000556 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
557 VIXL_ASSERT(allow_macro_instructions_);
558 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000559 MacroEmissionCheckScope::PoolPolicy pool_policy =
560 MacroEmissionCheckScope::kBlockPools;
561 if (!literal->IsBound()) {
562 const ReferenceInfo* info;
563 bool can_encode = adr_info(cond, Best, rd, literal, &info);
564 VIXL_CHECK(can_encode);
565 CheckEmitPoolForInstruction(info, literal, &cond);
566 // We have already checked for pool emission.
567 pool_policy = MacroEmissionCheckScope::kIgnorePools;
568 }
569 MacroEmissionCheckScope guard(this, pool_policy);
570 ITScope it_scope(this, &cond, guard);
571 adr(cond, Best, rd, literal);
572 RegisterLiteralReference(literal);
Pierre Langlois25e39872016-10-20 17:14:21 +0100573 }
574 void Adr(Register rd, RawLiteral* literal) { Adr(al, rd, literal); }
575
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700576 // Loads with literals already constructed. Add the literal to the pool
577 // if it is not already done.
578 void Ldr(Condition cond, Register rt, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000579 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
580 VIXL_ASSERT(allow_macro_instructions_);
581 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000582 MacroEmissionCheckScope::PoolPolicy pool_policy =
583 MacroEmissionCheckScope::kBlockPools;
584 if (!literal->IsBound()) {
585 const ReferenceInfo* info;
586 bool can_encode = ldr_info(cond, Best, rt, literal, &info);
587 VIXL_CHECK(can_encode);
588 CheckEmitPoolForInstruction(info, literal, &cond);
589 // We have already checked for pool emission.
590 pool_policy = MacroEmissionCheckScope::kIgnorePools;
591 }
592 MacroEmissionCheckScope guard(this, pool_policy);
593 ITScope it_scope(this, &cond, guard);
594 ldr(cond, rt, literal);
595 RegisterLiteralReference(literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700596 }
597 void Ldr(Register rt, RawLiteral* literal) { Ldr(al, rt, literal); }
598
599 void Ldrb(Condition cond, Register rt, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000600 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
601 VIXL_ASSERT(allow_macro_instructions_);
602 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000603 MacroEmissionCheckScope::PoolPolicy pool_policy =
604 MacroEmissionCheckScope::kBlockPools;
605 if (!literal->IsBound()) {
606 const ReferenceInfo* info;
607 bool can_encode = ldrb_info(cond, rt, literal, &info);
608 VIXL_CHECK(can_encode);
609 CheckEmitPoolForInstruction(info, literal, &cond);
610 // We have already checked for pool emission.
611 pool_policy = MacroEmissionCheckScope::kIgnorePools;
612 }
613 MacroEmissionCheckScope guard(this, pool_policy);
614 ITScope it_scope(this, &cond, guard);
615 ldrb(cond, rt, literal);
616 RegisterLiteralReference(literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700617 }
618 void Ldrb(Register rt, RawLiteral* literal) { Ldrb(al, rt, literal); }
619
620 void Ldrd(Condition cond, Register rt, Register rt2, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000621 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
622 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
623 VIXL_ASSERT(allow_macro_instructions_);
624 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000625 MacroEmissionCheckScope::PoolPolicy pool_policy =
626 MacroEmissionCheckScope::kBlockPools;
627 if (!literal->IsBound()) {
628 const ReferenceInfo* info;
629 bool can_encode = ldrd_info(cond, rt, rt2, literal, &info);
630 VIXL_CHECK(can_encode);
631 CheckEmitPoolForInstruction(info, literal, &cond);
632 // We have already checked for pool emission.
633 pool_policy = MacroEmissionCheckScope::kIgnorePools;
634 }
635 MacroEmissionCheckScope guard(this, pool_policy);
636 ITScope it_scope(this, &cond, guard);
637 ldrd(cond, rt, rt2, literal);
638 RegisterLiteralReference(literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700639 }
640 void Ldrd(Register rt, Register rt2, RawLiteral* literal) {
641 Ldrd(al, rt, rt2, literal);
642 }
643
644 void Ldrh(Condition cond, Register rt, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000645 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
646 VIXL_ASSERT(allow_macro_instructions_);
647 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000648 MacroEmissionCheckScope::PoolPolicy pool_policy =
649 MacroEmissionCheckScope::kBlockPools;
650 if (!literal->IsBound()) {
651 const ReferenceInfo* info;
652 bool can_encode = ldrh_info(cond, rt, literal, &info);
653 VIXL_CHECK(can_encode);
654 CheckEmitPoolForInstruction(info, literal, &cond);
655 // We have already checked for pool emission.
656 pool_policy = MacroEmissionCheckScope::kIgnorePools;
657 }
658 MacroEmissionCheckScope guard(this, pool_policy);
659 ITScope it_scope(this, &cond, guard);
660 ldrh(cond, rt, literal);
661 RegisterLiteralReference(literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700662 }
663 void Ldrh(Register rt, RawLiteral* literal) { Ldrh(al, rt, literal); }
664
665 void Ldrsb(Condition cond, Register rt, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000666 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
667 VIXL_ASSERT(allow_macro_instructions_);
668 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000669 MacroEmissionCheckScope::PoolPolicy pool_policy =
670 MacroEmissionCheckScope::kBlockPools;
671 if (!literal->IsBound()) {
672 const ReferenceInfo* info;
673 bool can_encode = ldrsb_info(cond, rt, literal, &info);
674 VIXL_CHECK(can_encode);
675 CheckEmitPoolForInstruction(info, literal, &cond);
676 // We have already checked for pool emission.
677 pool_policy = MacroEmissionCheckScope::kIgnorePools;
678 }
679 MacroEmissionCheckScope guard(this, pool_policy);
680 ITScope it_scope(this, &cond, guard);
681 ldrsb(cond, rt, literal);
682 RegisterLiteralReference(literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700683 }
684 void Ldrsb(Register rt, RawLiteral* literal) { Ldrsb(al, rt, literal); }
685
686 void Ldrsh(Condition cond, Register rt, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000687 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
688 VIXL_ASSERT(allow_macro_instructions_);
689 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000690 MacroEmissionCheckScope::PoolPolicy pool_policy =
691 MacroEmissionCheckScope::kBlockPools;
692 if (!literal->IsBound()) {
693 const ReferenceInfo* info;
694 bool can_encode = ldrsh_info(cond, rt, literal, &info);
695 VIXL_CHECK(can_encode);
696 CheckEmitPoolForInstruction(info, literal, &cond);
697 // We have already checked for pool emission.
698 pool_policy = MacroEmissionCheckScope::kIgnorePools;
699 }
700 MacroEmissionCheckScope guard(this, pool_policy);
701 ITScope it_scope(this, &cond, guard);
702 ldrsh(cond, rt, literal);
703 RegisterLiteralReference(literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700704 }
705 void Ldrsh(Register rt, RawLiteral* literal) { Ldrsh(al, rt, literal); }
706
707 void Vldr(Condition cond, DataType dt, DRegister rd, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000708 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
709 VIXL_ASSERT(allow_macro_instructions_);
710 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000711 MacroEmissionCheckScope::PoolPolicy pool_policy =
712 MacroEmissionCheckScope::kBlockPools;
713 if (!literal->IsBound()) {
714 const ReferenceInfo* info;
715 bool can_encode = vldr_info(cond, dt, rd, literal, &info);
716 VIXL_CHECK(can_encode);
717 CheckEmitPoolForInstruction(info, literal, &cond);
718 // We have already checked for pool emission.
719 pool_policy = MacroEmissionCheckScope::kIgnorePools;
720 }
721 MacroEmissionCheckScope guard(this, pool_policy);
722 ITScope it_scope(this, &cond, guard);
723 vldr(cond, dt, rd, literal);
724 RegisterLiteralReference(literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700725 }
726 void Vldr(DataType dt, DRegister rd, RawLiteral* literal) {
727 Vldr(al, dt, rd, literal);
728 }
729 void Vldr(Condition cond, DRegister rd, RawLiteral* literal) {
730 Vldr(cond, Untyped64, rd, literal);
731 }
732 void Vldr(DRegister rd, RawLiteral* literal) {
733 Vldr(al, Untyped64, rd, literal);
734 }
735
736 void Vldr(Condition cond, DataType dt, SRegister rd, RawLiteral* literal) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000737 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
738 VIXL_ASSERT(allow_macro_instructions_);
739 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000740 MacroEmissionCheckScope::PoolPolicy pool_policy =
741 MacroEmissionCheckScope::kBlockPools;
742 if (!literal->IsBound()) {
743 const ReferenceInfo* info;
744 bool can_encode = vldr_info(cond, dt, rd, literal, &info);
745 VIXL_CHECK(can_encode);
746 CheckEmitPoolForInstruction(info, literal, &cond);
747 // We have already checked for pool emission.
748 pool_policy = MacroEmissionCheckScope::kIgnorePools;
749 }
750 MacroEmissionCheckScope guard(this, pool_policy);
751 ITScope it_scope(this, &cond, guard);
752 vldr(cond, dt, rd, literal);
753 RegisterLiteralReference(literal);
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700754 }
755 void Vldr(DataType dt, SRegister rd, RawLiteral* literal) {
756 Vldr(al, dt, rd, literal);
757 }
758 void Vldr(Condition cond, SRegister rd, RawLiteral* literal) {
759 Vldr(cond, Untyped32, rd, literal);
760 }
761 void Vldr(SRegister rd, RawLiteral* literal) {
762 Vldr(al, Untyped32, rd, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100763 }
764
765 // Generic Ldr(register, data)
766 void Ldr(Condition cond, Register rt, uint32_t v) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000767 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
768 VIXL_ASSERT(allow_macro_instructions_);
769 VIXL_ASSERT(OutsideITBlock());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100770 RawLiteral* literal =
771 new Literal<uint32_t>(v, RawLiteral::kDeletedOnPlacementByPool);
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000772 Ldr(cond, rt, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100773 }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100774 template <typename T>
775 void Ldr(Register rt, T v) {
776 Ldr(al, rt, v);
777 }
778
779 // Generic Ldrd(rt, rt2, data)
780 void Ldrd(Condition cond, Register rt, Register rt2, uint64_t v) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000781 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
782 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
783 VIXL_ASSERT(allow_macro_instructions_);
784 VIXL_ASSERT(OutsideITBlock());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100785 RawLiteral* literal =
786 new Literal<uint64_t>(v, RawLiteral::kDeletedOnPlacementByPool);
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000787 Ldrd(cond, rt, rt2, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100788 }
789 template <typename T>
790 void Ldrd(Register rt, Register rt2, T v) {
791 Ldrd(al, rt, rt2, v);
792 }
793
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700794 void Vldr(Condition cond, SRegister rd, float v) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000795 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
796 VIXL_ASSERT(allow_macro_instructions_);
797 VIXL_ASSERT(OutsideITBlock());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100798 RawLiteral* literal =
799 new Literal<float>(v, RawLiteral::kDeletedOnPlacementByPool);
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000800 Vldr(cond, rd, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100801 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700802 void Vldr(SRegister rd, float v) { Vldr(al, rd, v); }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100803
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700804 void Vldr(Condition cond, DRegister rd, double v) {
Georgia Kouvelibe9c4d02016-12-15 13:41:51 +0000805 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
806 VIXL_ASSERT(allow_macro_instructions_);
807 VIXL_ASSERT(OutsideITBlock());
Alexandre Ramesd3832962016-07-04 15:03:43 +0100808 RawLiteral* literal =
809 new Literal<double>(v, RawLiteral::kDeletedOnPlacementByPool);
Georgia Kouveli8b57c862017-03-02 15:18:58 +0000810 Vldr(cond, rd, literal);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100811 }
Vincent Belliard51d1ccc2016-09-22 10:17:11 -0700812 void Vldr(DRegister rd, double v) { Vldr(al, rd, v); }
Alexandre Ramesd3832962016-07-04 15:03:43 +0100813
814 void Vmov(Condition cond, DRegister rt, double v) { Vmov(cond, F64, rt, v); }
815 void Vmov(DRegister rt, double v) { Vmov(al, F64, rt, v); }
816 void Vmov(Condition cond, SRegister rt, float v) { Vmov(cond, F32, rt, v); }
817 void Vmov(SRegister rt, float v) { Vmov(al, F32, rt, v); }
818
Alexandre Ramesad91cee2016-07-26 09:31:34 +0100819 // Claim memory on the stack.
820 // Note that the Claim, Drop, and Peek helpers below ensure that offsets used
821 // are multiples of 32 bits to help maintain 32-bit SP alignment.
822 // We could `Align{Up,Down}(size, 4)`, but that's potentially problematic:
Alexandre Ramesd3832962016-07-04 15:03:43 +0100823 // Claim(3)
824 // Claim(1)
825 // Drop(4)
826 // would seem correct, when in fact:
827 // Claim(3) -> sp = sp - 4
Alexandre Ramesad91cee2016-07-26 09:31:34 +0100828 // Claim(1) -> sp = sp - 4
Alexandre Ramesd3832962016-07-04 15:03:43 +0100829 // Drop(4) -> sp = sp + 4
830 //
831 void Claim(int32_t size) {
832 if (size == 0) return;
833 // The stack must be kept 32bit aligned.
834 VIXL_ASSERT((size > 0) && ((size % 4) == 0));
835 Sub(sp, sp, size);
836 }
837 // Release memory on the stack
838 void Drop(int32_t size) {
839 if (size == 0) return;
840 // The stack must be kept 32bit aligned.
841 VIXL_ASSERT((size > 0) && ((size % 4) == 0));
842 Add(sp, sp, size);
843 }
844 void Peek(Register dst, int32_t offset) {
845 VIXL_ASSERT((offset >= 0) && ((offset % 4) == 0));
846 Ldr(dst, MemOperand(sp, offset));
847 }
848 void Poke(Register src, int32_t offset) {
849 VIXL_ASSERT((offset >= 0) && ((offset % 4) == 0));
850 Str(src, MemOperand(sp, offset));
851 }
852 void Printf(const char* format,
853 CPURegister reg1 = NoReg,
854 CPURegister reg2 = NoReg,
855 CPURegister reg3 = NoReg,
856 CPURegister reg4 = NoReg);
857 // Functions used by Printf for generation.
858 void PushRegister(CPURegister reg);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100859 void PreparePrintfArgument(CPURegister reg,
860 int* core_count,
861 int* vfp_count,
862 uint32_t* printf_type);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100863 // Handlers for cases not handled by the assembler.
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800864 // ADD, MOVT, MOVW, SUB, SXTB16, TEQ, UXTB16
Alexandre Ramesd3832962016-07-04 15:03:43 +0100865 virtual void Delegate(InstructionType type,
866 InstructionCondROp instruction,
867 Condition cond,
868 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000869 const Operand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800870 // CMN, CMP, MOV, MOVS, MVN, MVNS, SXTB, SXTH, TST, UXTB, UXTH
Alexandre Ramesd3832962016-07-04 15:03:43 +0100871 virtual void Delegate(InstructionType type,
872 InstructionCondSizeROp instruction,
873 Condition cond,
874 EncodingSize size,
875 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000876 const Operand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800877 // ADDW, ORN, ORNS, PKHBT, PKHTB, RSC, RSCS, SUBW, SXTAB, SXTAB16, SXTAH,
878 // UXTAB, UXTAB16, UXTAH
Alexandre Ramesd3832962016-07-04 15:03:43 +0100879 virtual void Delegate(InstructionType type,
880 InstructionCondRROp instruction,
881 Condition cond,
882 Register rd,
883 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000884 const Operand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800885 // ADC, ADCS, ADD, ADDS, AND, ANDS, ASR, ASRS, BIC, BICS, EOR, EORS, LSL,
886 // LSLS, LSR, LSRS, ORR, ORRS, ROR, RORS, RSB, RSBS, SBC, SBCS, SUB, SUBS
Alexandre Ramesd3832962016-07-04 15:03:43 +0100887 virtual void Delegate(InstructionType type,
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000888 InstructionCondSizeRL instruction,
889 Condition cond,
890 EncodingSize size,
891 Register rd,
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100892 Location* location) VIXL_OVERRIDE;
Vincent Belliard80b4a1f2016-12-14 08:16:21 -0800893 bool GenerateSplitInstruction(InstructionCondSizeRROp instruction,
894 Condition cond,
895 Register rd,
896 Register rn,
897 uint32_t imm,
898 uint32_t mask);
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000899 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100900 InstructionCondSizeRROp instruction,
901 Condition cond,
902 EncodingSize size,
903 Register rd,
904 Register rn,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000905 const Operand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800906 // CBNZ, CBZ
Alexandre Ramesd3832962016-07-04 15:03:43 +0100907 virtual void Delegate(InstructionType type,
908 InstructionRL instruction,
909 Register rn,
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100910 Location* location) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800911 // VMOV
Alexandre Ramesd3832962016-07-04 15:03:43 +0100912 virtual void Delegate(InstructionType type,
913 InstructionCondDtSSop instruction,
914 Condition cond,
915 DataType dt,
916 SRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000917 const SOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800918 // VMOV, VMVN
Alexandre Ramesd3832962016-07-04 15:03:43 +0100919 virtual void Delegate(InstructionType type,
920 InstructionCondDtDDop instruction,
921 Condition cond,
922 DataType dt,
923 DRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000924 const DOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800925 // VMOV, VMVN
Alexandre Ramesd3832962016-07-04 15:03:43 +0100926 virtual void Delegate(InstructionType type,
927 InstructionCondDtQQop instruction,
928 Condition cond,
929 DataType dt,
930 QRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000931 const QOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800932 // LDR, LDRB, LDRH, LDRSB, LDRSH, STR, STRB, STRH
Alexandre Ramesd3832962016-07-04 15:03:43 +0100933 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100934 InstructionCondSizeRMop instruction,
935 Condition cond,
936 EncodingSize size,
937 Register rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000938 const MemOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800939 // LDAEXD, LDRD, LDREXD, STLEX, STLEXB, STLEXH, STRD, STREX, STREXB, STREXH
Alexandre Ramesd3832962016-07-04 15:03:43 +0100940 virtual void Delegate(InstructionType type,
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000941 InstructionCondRL instruction,
942 Condition cond,
943 Register rt,
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100944 Location* location) VIXL_OVERRIDE;
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000945 virtual void Delegate(InstructionType type,
946 InstructionCondRRL instruction,
947 Condition cond,
948 Register rt,
949 Register rt2,
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100950 Location* location) VIXL_OVERRIDE;
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000951 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100952 InstructionCondRRMop instruction,
953 Condition cond,
954 Register rt,
955 Register rt2,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000956 const MemOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800957 // VLDR, VSTR
Alexandre Ramesd3832962016-07-04 15:03:43 +0100958 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100959 InstructionCondDtSMop instruction,
960 Condition cond,
961 DataType dt,
962 SRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000963 const MemOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800964 // VLDR, VSTR
Alexandre Ramesd3832962016-07-04 15:03:43 +0100965 virtual void Delegate(InstructionType type,
966 InstructionCondDtDMop instruction,
967 Condition cond,
968 DataType dt,
969 DRegister rd,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000970 const MemOperand& operand) VIXL_OVERRIDE;
Vincent Belliard9ae5da22016-12-05 13:17:13 -0800971 // MSR
Alexandre Ramesd3832962016-07-04 15:03:43 +0100972 virtual void Delegate(InstructionType type,
Alexandre Ramesd3832962016-07-04 15:03:43 +0100973 InstructionCondMsrOp instruction,
974 Condition cond,
975 MaskedSpecialRegister spec_reg,
Pierre Langlois3fac43c2016-10-31 13:38:47 +0000976 const Operand& operand) VIXL_OVERRIDE;
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000977 virtual void Delegate(InstructionType type,
978 InstructionCondDtDL instruction,
979 Condition cond,
980 DataType dt,
981 DRegister rd,
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100982 Location* location) VIXL_OVERRIDE;
Jacob Bramleyf8c22842016-11-29 15:07:12 +0000983 virtual void Delegate(InstructionType type,
984 InstructionCondDtSL instruction,
985 Condition cond,
986 DataType dt,
987 SRegister rd,
Georgia Kouveli275c9d42017-05-12 18:07:45 +0100988 Location* location) VIXL_OVERRIDE;
Alexandre Ramesd3832962016-07-04 15:03:43 +0100989
990 // Start of generated code.
991
992 void Adc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +0000993 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
994 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
995 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +0100996 VIXL_ASSERT(allow_macro_instructions_);
997 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +0000998 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +0100999 bool can_use_it =
1000 // ADC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1001 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) &&
1002 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001003 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001004 adc(cond, rd, rn, operand);
1005 }
1006 void Adc(Register rd, Register rn, const Operand& operand) {
1007 Adc(al, rd, rn, operand);
1008 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001009 void Adc(FlagsUpdate flags,
1010 Condition cond,
1011 Register rd,
1012 Register rn,
1013 const Operand& operand) {
1014 switch (flags) {
1015 case LeaveFlags:
1016 Adc(cond, rd, rn, operand);
1017 break;
1018 case SetFlags:
1019 Adcs(cond, rd, rn, operand);
1020 break;
1021 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001022 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1023 rn.Is(rd) && operand.IsPlainRegister() &&
1024 operand.GetBaseRegister().IsLow();
1025 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001026 Adcs(cond, rd, rn, operand);
1027 } else {
1028 Adc(cond, rd, rn, operand);
1029 }
1030 break;
1031 }
1032 }
1033 void Adc(FlagsUpdate flags,
1034 Register rd,
1035 Register rn,
1036 const Operand& operand) {
1037 Adc(flags, al, rd, rn, operand);
1038 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001039
1040 void Adcs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001041 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1042 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1043 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001044 VIXL_ASSERT(allow_macro_instructions_);
1045 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001046 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001047 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001048 adcs(cond, rd, rn, operand);
1049 }
1050 void Adcs(Register rd, Register rn, const Operand& operand) {
1051 Adcs(al, rd, rn, operand);
1052 }
1053
1054 void Add(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001055 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1056 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1057 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001058 VIXL_ASSERT(allow_macro_instructions_);
1059 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001060 MacroEmissionCheckScope guard(this);
Alexandre Rames628c5262016-09-21 11:52:30 +01001061 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
1062 uint32_t immediate = operand.GetImmediate();
1063 if (immediate == 0) {
1064 return;
1065 }
1066 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001067 bool can_use_it =
1068 // ADD<c>{<q>} <Rd>, <Rn>, #<imm3> ; T1
1069 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() &&
1070 rd.IsLow()) ||
1071 // ADD<c>{<q>} {<Rdn>,} <Rdn>, #<imm8> ; T2
1072 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
1073 rd.IsLow() && rn.Is(rd)) ||
1074 // ADD{<c>}{<q>} <Rd>, SP, #<imm8> ; T1
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001075 (operand.IsImmediate() && (operand.GetImmediate() <= 1020) &&
Alexandre Ramesd3832962016-07-04 15:03:43 +01001076 ((operand.GetImmediate() & 0x3) == 0) && rd.IsLow() && rn.IsSP()) ||
1077 // ADD<c>{<q>} <Rd>, <Rn>, <Rm>
1078 (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
1079 operand.GetBaseRegister().IsLow()) ||
1080 // ADD<c>{<q>} <Rdn>, <Rm> ; T2
1081 (operand.IsPlainRegister() && !rd.IsPC() && rn.Is(rd) &&
1082 !operand.GetBaseRegister().IsSP() &&
1083 !operand.GetBaseRegister().IsPC()) ||
1084 // ADD{<c>}{<q>} {<Rdm>,} SP, <Rdm> ; T1
1085 (operand.IsPlainRegister() && !rd.IsPC() && rn.IsSP() &&
1086 operand.GetBaseRegister().Is(rd));
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001087 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001088 add(cond, rd, rn, operand);
1089 }
1090 void Add(Register rd, Register rn, const Operand& operand) {
1091 Add(al, rd, rn, operand);
1092 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001093 void Add(FlagsUpdate flags,
1094 Condition cond,
1095 Register rd,
1096 Register rn,
1097 const Operand& operand) {
1098 switch (flags) {
1099 case LeaveFlags:
1100 Add(cond, rd, rn, operand);
1101 break;
1102 case SetFlags:
1103 Adds(cond, rd, rn, operand);
1104 break;
1105 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001106 bool setflags_is_smaller =
Vincent Belliard934696d2016-08-18 11:03:56 -07001107 IsUsingT32() && cond.Is(al) &&
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001108 ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
Georgia Kouveli1091d742016-12-16 16:30:39 +00001109 !rd.Is(rn) && operand.GetBaseRegister().IsLow()) ||
Vincent Belliard934696d2016-08-18 11:03:56 -07001110 (operand.IsImmediate() &&
1111 ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) ||
1112 (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256)))));
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001113 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001114 Adds(cond, rd, rn, operand);
1115 } else {
Georgia Kouvelidd8e4912016-12-12 16:42:30 +00001116 bool changed_op_is_smaller =
1117 operand.IsImmediate() && (operand.GetSignedImmediate() < 0) &&
1118 ((rd.IsLow() && rn.IsLow() &&
1119 (operand.GetSignedImmediate() >= -7)) ||
1120 (rd.IsLow() && rn.Is(rd) &&
1121 (operand.GetSignedImmediate() >= -255)));
1122 if (changed_op_is_smaller) {
1123 Subs(cond, rd, rn, -operand.GetSignedImmediate());
1124 } else {
1125 Add(cond, rd, rn, operand);
1126 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001127 }
1128 break;
1129 }
1130 }
1131 void Add(FlagsUpdate flags,
1132 Register rd,
1133 Register rn,
1134 const Operand& operand) {
1135 Add(flags, al, rd, rn, operand);
1136 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001137
1138 void Adds(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001139 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1140 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1141 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001142 VIXL_ASSERT(allow_macro_instructions_);
1143 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001144 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001145 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001146 adds(cond, rd, rn, operand);
1147 }
1148 void Adds(Register rd, Register rn, const Operand& operand) {
1149 Adds(al, rd, rn, operand);
1150 }
1151
Alexandre Ramesd3832962016-07-04 15:03:43 +01001152 void And(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001153 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1154 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1155 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001156 VIXL_ASSERT(allow_macro_instructions_);
1157 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001158 MacroEmissionCheckScope guard(this);
Vincent Belliarda576eb92016-12-13 14:38:55 -08001159 if (rd.Is(rn) && operand.IsPlainRegister() &&
1160 rd.Is(operand.GetBaseRegister())) {
1161 return;
1162 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001163 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001164 uint32_t immediate = operand.GetImmediate();
1165 if (immediate == 0) {
1166 mov(rd, 0);
1167 return;
1168 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001169 if ((immediate == 0xffffffff) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001170 return;
1171 }
1172 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001173 bool can_use_it =
1174 // AND<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1175 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1176 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001177 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001178 and_(cond, rd, rn, operand);
1179 }
1180 void And(Register rd, Register rn, const Operand& operand) {
1181 And(al, rd, rn, operand);
1182 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001183 void And(FlagsUpdate flags,
1184 Condition cond,
1185 Register rd,
1186 Register rn,
1187 const Operand& operand) {
1188 switch (flags) {
1189 case LeaveFlags:
1190 And(cond, rd, rn, operand);
1191 break;
1192 case SetFlags:
1193 Ands(cond, rd, rn, operand);
1194 break;
1195 case DontCare:
Vincent Belliarda576eb92016-12-13 14:38:55 -08001196 if (operand.IsPlainRegister() && rd.Is(rn) &&
1197 rd.Is(operand.GetBaseRegister())) {
1198 return;
1199 }
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001200 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1201 rn.Is(rd) && operand.IsPlainRegister() &&
1202 operand.GetBaseRegister().IsLow();
1203 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001204 Ands(cond, rd, rn, operand);
1205 } else {
1206 And(cond, rd, rn, operand);
1207 }
1208 break;
1209 }
1210 }
1211 void And(FlagsUpdate flags,
1212 Register rd,
1213 Register rn,
1214 const Operand& operand) {
1215 And(flags, al, rd, rn, operand);
1216 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001217
1218 void Ands(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001219 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1220 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1221 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001222 VIXL_ASSERT(allow_macro_instructions_);
1223 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001224 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001225 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001226 ands(cond, rd, rn, operand);
1227 }
1228 void Ands(Register rd, Register rn, const Operand& operand) {
1229 Ands(al, rd, rn, operand);
1230 }
1231
1232 void Asr(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001233 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1234 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
1235 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001236 VIXL_ASSERT(allow_macro_instructions_);
1237 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001238 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001239 bool can_use_it =
1240 // ASR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
1241 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
1242 (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) ||
1243 // ASR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
1244 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
1245 operand.GetBaseRegister().IsLow());
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001246 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001247 asr(cond, rd, rm, operand);
1248 }
1249 void Asr(Register rd, Register rm, const Operand& operand) {
1250 Asr(al, rd, rm, operand);
1251 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001252 void Asr(FlagsUpdate flags,
1253 Condition cond,
1254 Register rd,
1255 Register rm,
1256 const Operand& operand) {
1257 switch (flags) {
1258 case LeaveFlags:
1259 Asr(cond, rd, rm, operand);
1260 break;
1261 case SetFlags:
1262 Asrs(cond, rd, rm, operand);
1263 break;
1264 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001265 bool setflags_is_smaller =
1266 IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() &&
1267 ((operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
1268 (operand.GetImmediate() <= 32)) ||
1269 (operand.IsPlainRegister() && rd.Is(rm)));
1270 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001271 Asrs(cond, rd, rm, operand);
1272 } else {
1273 Asr(cond, rd, rm, operand);
1274 }
1275 break;
1276 }
1277 }
1278 void Asr(FlagsUpdate flags,
1279 Register rd,
1280 Register rm,
1281 const Operand& operand) {
1282 Asr(flags, al, rd, rm, operand);
1283 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001284
1285 void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001286 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1287 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
1288 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001289 VIXL_ASSERT(allow_macro_instructions_);
1290 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001291 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001292 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001293 asrs(cond, rd, rm, operand);
1294 }
1295 void Asrs(Register rd, Register rm, const Operand& operand) {
1296 Asrs(al, rd, rm, operand);
1297 }
1298
Vincent Belliard4a30c5d2016-12-08 09:23:42 -08001299 void B(Condition cond, Label* label, BranchHint hint = kBranchWithoutHint) {
Alexandre Ramesd3832962016-07-04 15:03:43 +01001300 VIXL_ASSERT(allow_macro_instructions_);
1301 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001302 EncodingSize size = Best;
1303 MacroEmissionCheckScope::PoolPolicy pool_policy =
1304 MacroEmissionCheckScope::kBlockPools;
1305 if (!label->IsBound()) {
1306 if (hint == kNear) size = Narrow;
1307 const ReferenceInfo* info;
1308 bool can_encode = b_info(cond, size, label, &info);
1309 VIXL_CHECK(can_encode);
1310 CheckEmitPoolForInstruction(info, label, &cond);
1311 // We have already checked for pool emission.
1312 pool_policy = MacroEmissionCheckScope::kIgnorePools;
Vincent Belliard4a30c5d2016-12-08 09:23:42 -08001313 }
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001314 MacroEmissionCheckScope guard(this, pool_policy);
1315 b(cond, size, label);
1316 RegisterForwardReference(label);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001317 }
Vincent Belliard4a30c5d2016-12-08 09:23:42 -08001318 void B(Label* label, BranchHint hint = kBranchWithoutHint) {
1319 B(al, label, hint);
1320 }
1321 void BPreferNear(Condition cond, Label* label) { B(cond, label, kNear); }
1322 void BPreferNear(Label* label) { B(al, label, kNear); }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001323
Vincent Belliard609821f2017-02-08 14:17:25 -08001324 void Bfc(Condition cond, Register rd, uint32_t lsb, uint32_t width) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001325 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001326 VIXL_ASSERT(allow_macro_instructions_);
1327 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001328 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001329 ITScope it_scope(this, &cond, guard);
Vincent Belliard609821f2017-02-08 14:17:25 -08001330 bfc(cond, rd, lsb, width);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001331 }
Vincent Belliard609821f2017-02-08 14:17:25 -08001332 void Bfc(Register rd, uint32_t lsb, uint32_t width) {
1333 Bfc(al, rd, lsb, width);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001334 }
1335
Vincent Belliard609821f2017-02-08 14:17:25 -08001336 void Bfi(
1337 Condition cond, Register rd, Register rn, uint32_t lsb, uint32_t width) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001338 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1339 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001340 VIXL_ASSERT(allow_macro_instructions_);
1341 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001342 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001343 ITScope it_scope(this, &cond, guard);
Vincent Belliard609821f2017-02-08 14:17:25 -08001344 bfi(cond, rd, rn, lsb, width);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001345 }
Vincent Belliard609821f2017-02-08 14:17:25 -08001346 void Bfi(Register rd, Register rn, uint32_t lsb, uint32_t width) {
1347 Bfi(al, rd, rn, lsb, width);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001348 }
1349
1350 void Bic(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001351 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1352 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1353 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001354 VIXL_ASSERT(allow_macro_instructions_);
1355 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001356 MacroEmissionCheckScope guard(this);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001357 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001358 uint32_t immediate = operand.GetImmediate();
Vincent Belliarde2aa8942016-10-12 15:30:17 -07001359 if ((immediate == 0) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01001360 return;
1361 }
1362 if (immediate == 0xffffffff) {
1363 mov(rd, 0);
1364 return;
1365 }
1366 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001367 bool can_use_it =
1368 // BIC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1369 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1370 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001371 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001372 bic(cond, rd, rn, operand);
1373 }
1374 void Bic(Register rd, Register rn, const Operand& operand) {
1375 Bic(al, rd, rn, operand);
1376 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001377 void Bic(FlagsUpdate flags,
1378 Condition cond,
1379 Register rd,
1380 Register rn,
1381 const Operand& operand) {
1382 switch (flags) {
1383 case LeaveFlags:
1384 Bic(cond, rd, rn, operand);
1385 break;
1386 case SetFlags:
1387 Bics(cond, rd, rn, operand);
1388 break;
1389 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001390 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1391 rn.Is(rd) && operand.IsPlainRegister() &&
1392 operand.GetBaseRegister().IsLow();
1393 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001394 Bics(cond, rd, rn, operand);
1395 } else {
1396 Bic(cond, rd, rn, operand);
1397 }
1398 break;
1399 }
1400 }
1401 void Bic(FlagsUpdate flags,
1402 Register rd,
1403 Register rn,
1404 const Operand& operand) {
1405 Bic(flags, al, rd, rn, operand);
1406 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001407
1408 void Bics(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001409 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1410 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1411 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001412 VIXL_ASSERT(allow_macro_instructions_);
1413 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001414 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001415 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001416 bics(cond, rd, rn, operand);
1417 }
1418 void Bics(Register rd, Register rn, const Operand& operand) {
1419 Bics(al, rd, rn, operand);
1420 }
1421
1422 void Bkpt(Condition cond, uint32_t imm) {
1423 VIXL_ASSERT(allow_macro_instructions_);
1424 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001425 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001426 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001427 bkpt(cond, imm);
1428 }
1429 void Bkpt(uint32_t imm) { Bkpt(al, imm); }
1430
1431 void Bl(Condition cond, Label* label) {
1432 VIXL_ASSERT(allow_macro_instructions_);
1433 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001434 MacroEmissionCheckScope::PoolPolicy pool_policy =
1435 MacroEmissionCheckScope::kBlockPools;
1436 if (!label->IsBound()) {
1437 const ReferenceInfo* info;
1438 bool can_encode = bl_info(cond, label, &info);
1439 VIXL_CHECK(can_encode);
1440 CheckEmitPoolForInstruction(info, label, &cond);
1441 // We have already checked for pool emission.
1442 pool_policy = MacroEmissionCheckScope::kIgnorePools;
1443 }
1444 MacroEmissionCheckScope guard(this, pool_policy);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001445 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001446 bl(cond, label);
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001447 RegisterForwardReference(label);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001448 }
1449 void Bl(Label* label) { Bl(al, label); }
1450
1451 void Blx(Condition cond, Label* label) {
1452 VIXL_ASSERT(allow_macro_instructions_);
1453 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001454 MacroEmissionCheckScope::PoolPolicy pool_policy =
1455 MacroEmissionCheckScope::kBlockPools;
1456 if (!label->IsBound()) {
1457 const ReferenceInfo* info;
1458 bool can_encode = blx_info(cond, label, &info);
1459 VIXL_CHECK(can_encode);
1460 CheckEmitPoolForInstruction(info, label, &cond);
1461 // We have already checked for pool emission.
1462 pool_policy = MacroEmissionCheckScope::kIgnorePools;
1463 }
1464 MacroEmissionCheckScope guard(this, pool_policy);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001465 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001466 blx(cond, label);
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001467 RegisterForwardReference(label);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001468 }
1469 void Blx(Label* label) { Blx(al, label); }
1470
1471 void Blx(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001472 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001473 VIXL_ASSERT(allow_macro_instructions_);
1474 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001475 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001476 bool can_use_it =
1477 // BLX{<c>}{<q>} <Rm> ; T1
1478 !rm.IsPC();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001479 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001480 blx(cond, rm);
1481 }
1482 void Blx(Register rm) { Blx(al, rm); }
1483
1484 void Bx(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001485 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001486 VIXL_ASSERT(allow_macro_instructions_);
1487 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001488 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001489 bool can_use_it =
1490 // BX{<c>}{<q>} <Rm> ; T1
1491 !rm.IsPC();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001492 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001493 bx(cond, rm);
1494 }
1495 void Bx(Register rm) { Bx(al, rm); }
1496
1497 void Bxj(Condition cond, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001498 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001499 VIXL_ASSERT(allow_macro_instructions_);
1500 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001501 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001502 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001503 bxj(cond, rm);
1504 }
1505 void Bxj(Register rm) { Bxj(al, rm); }
1506
1507 void Cbnz(Register rn, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001508 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001509 VIXL_ASSERT(allow_macro_instructions_);
1510 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001511 MacroEmissionCheckScope::PoolPolicy pool_policy =
1512 MacroEmissionCheckScope::kBlockPools;
1513 if (!label->IsBound()) {
1514 const ReferenceInfo* info;
1515 bool can_encode = cbnz_info(rn, label, &info);
1516 VIXL_CHECK(can_encode);
1517 CheckEmitPoolForInstruction(info, label);
1518 // We have already checked for pool emission.
1519 pool_policy = MacroEmissionCheckScope::kIgnorePools;
1520 }
1521 MacroEmissionCheckScope guard(this, pool_policy);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001522 cbnz(rn, label);
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001523 RegisterForwardReference(label);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001524 }
1525
1526 void Cbz(Register rn, Label* label) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001527 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001528 VIXL_ASSERT(allow_macro_instructions_);
1529 VIXL_ASSERT(OutsideITBlock());
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001530 MacroEmissionCheckScope::PoolPolicy pool_policy =
1531 MacroEmissionCheckScope::kBlockPools;
1532 if (!label->IsBound()) {
1533 const ReferenceInfo* info;
1534 bool can_encode = cbz_info(rn, label, &info);
1535 VIXL_CHECK(can_encode);
1536 CheckEmitPoolForInstruction(info, label);
1537 // We have already checked for pool emission.
1538 pool_policy = MacroEmissionCheckScope::kIgnorePools;
1539 }
1540 MacroEmissionCheckScope guard(this, pool_policy);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001541 cbz(rn, label);
Georgia Kouveli8b57c862017-03-02 15:18:58 +00001542 RegisterForwardReference(label);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001543 }
1544
1545 void Clrex(Condition cond) {
1546 VIXL_ASSERT(allow_macro_instructions_);
1547 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001548 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001549 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001550 clrex(cond);
1551 }
1552 void Clrex() { Clrex(al); }
1553
1554 void Clz(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001555 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1556 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001557 VIXL_ASSERT(allow_macro_instructions_);
1558 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001559 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001560 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001561 clz(cond, rd, rm);
1562 }
1563 void Clz(Register rd, Register rm) { Clz(al, rd, rm); }
1564
1565 void Cmn(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001566 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1567 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001568 VIXL_ASSERT(allow_macro_instructions_);
1569 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001570 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001571 bool can_use_it =
1572 // CMN{<c>}{<q>} <Rn>, <Rm> ; T1
1573 operand.IsPlainRegister() && rn.IsLow() &&
1574 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001575 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001576 cmn(cond, rn, operand);
1577 }
1578 void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); }
1579
1580 void Cmp(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001581 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1582 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001583 VIXL_ASSERT(allow_macro_instructions_);
1584 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001585 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001586 bool can_use_it =
1587 // CMP{<c>}{<q>} <Rn>, #<imm8> ; T1
1588 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
1589 rn.IsLow()) ||
1590 // CMP{<c>}{<q>} <Rn>, <Rm> ; T1 T2
1591 (operand.IsPlainRegister() && !rn.IsPC() &&
1592 !operand.GetBaseRegister().IsPC());
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001593 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001594 cmp(cond, rn, operand);
1595 }
1596 void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); }
1597
1598 void Crc32b(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001599 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1600 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1601 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001602 VIXL_ASSERT(allow_macro_instructions_);
1603 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001604 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001605 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001606 crc32b(cond, rd, rn, rm);
1607 }
1608 void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); }
1609
1610 void Crc32cb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001611 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1612 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1613 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001614 VIXL_ASSERT(allow_macro_instructions_);
1615 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001616 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001617 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001618 crc32cb(cond, rd, rn, rm);
1619 }
1620 void Crc32cb(Register rd, Register rn, Register rm) {
1621 Crc32cb(al, rd, rn, rm);
1622 }
1623
1624 void Crc32ch(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001625 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1626 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1627 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001628 VIXL_ASSERT(allow_macro_instructions_);
1629 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001630 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001631 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001632 crc32ch(cond, rd, rn, rm);
1633 }
1634 void Crc32ch(Register rd, Register rn, Register rm) {
1635 Crc32ch(al, rd, rn, rm);
1636 }
1637
1638 void Crc32cw(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001639 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1640 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1641 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001642 VIXL_ASSERT(allow_macro_instructions_);
1643 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001644 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001645 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001646 crc32cw(cond, rd, rn, rm);
1647 }
1648 void Crc32cw(Register rd, Register rn, Register rm) {
1649 Crc32cw(al, rd, rn, rm);
1650 }
1651
1652 void Crc32h(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001653 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1654 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1655 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001656 VIXL_ASSERT(allow_macro_instructions_);
1657 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001658 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001659 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001660 crc32h(cond, rd, rn, rm);
1661 }
1662 void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); }
1663
1664 void Crc32w(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001665 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1666 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1667 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001668 VIXL_ASSERT(allow_macro_instructions_);
1669 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001670 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001671 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001672 crc32w(cond, rd, rn, rm);
1673 }
1674 void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); }
1675
1676 void Dmb(Condition cond, MemoryBarrier option) {
1677 VIXL_ASSERT(allow_macro_instructions_);
1678 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001679 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001680 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001681 dmb(cond, option);
1682 }
1683 void Dmb(MemoryBarrier option) { Dmb(al, option); }
1684
1685 void Dsb(Condition cond, MemoryBarrier option) {
1686 VIXL_ASSERT(allow_macro_instructions_);
1687 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001688 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001689 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001690 dsb(cond, option);
1691 }
1692 void Dsb(MemoryBarrier option) { Dsb(al, option); }
1693
1694 void Eor(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1696 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1697 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001698 VIXL_ASSERT(allow_macro_instructions_);
1699 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001700 MacroEmissionCheckScope guard(this);
Alexandre Rames628c5262016-09-21 11:52:30 +01001701 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
1702 uint32_t immediate = operand.GetImmediate();
1703 if (immediate == 0) {
1704 return;
1705 }
1706 if (immediate == 0xffffffff) {
1707 mvn(rd, rn);
1708 return;
1709 }
1710 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001711 bool can_use_it =
1712 // EOR<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
1713 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
1714 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001715 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001716 eor(cond, rd, rn, operand);
1717 }
1718 void Eor(Register rd, Register rn, const Operand& operand) {
1719 Eor(al, rd, rn, operand);
1720 }
Vincent Belliard934696d2016-08-18 11:03:56 -07001721 void Eor(FlagsUpdate flags,
1722 Condition cond,
1723 Register rd,
1724 Register rn,
1725 const Operand& operand) {
1726 switch (flags) {
1727 case LeaveFlags:
1728 Eor(cond, rd, rn, operand);
1729 break;
1730 case SetFlags:
1731 Eors(cond, rd, rn, operand);
1732 break;
1733 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00001734 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
1735 rn.Is(rd) && operand.IsPlainRegister() &&
1736 operand.GetBaseRegister().IsLow();
1737 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07001738 Eors(cond, rd, rn, operand);
1739 } else {
1740 Eor(cond, rd, rn, operand);
1741 }
1742 break;
1743 }
1744 }
1745 void Eor(FlagsUpdate flags,
1746 Register rd,
1747 Register rn,
1748 const Operand& operand) {
1749 Eor(flags, al, rd, rn, operand);
1750 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01001751
1752 void Eors(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001753 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
1754 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1755 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001756 VIXL_ASSERT(allow_macro_instructions_);
1757 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001758 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001759 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001760 eors(cond, rd, rn, operand);
1761 }
1762 void Eors(Register rd, Register rn, const Operand& operand) {
1763 Eors(al, rd, rn, operand);
1764 }
1765
1766 void Fldmdbx(Condition cond,
1767 Register rn,
1768 WriteBack write_back,
1769 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001770 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1771 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001772 VIXL_ASSERT(allow_macro_instructions_);
1773 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001774 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001775 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001776 fldmdbx(cond, rn, write_back, dreglist);
1777 }
1778 void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) {
1779 Fldmdbx(al, rn, write_back, dreglist);
1780 }
1781
1782 void Fldmiax(Condition cond,
1783 Register rn,
1784 WriteBack write_back,
1785 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001786 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1787 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001788 VIXL_ASSERT(allow_macro_instructions_);
1789 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001790 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001791 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001792 fldmiax(cond, rn, write_back, dreglist);
1793 }
1794 void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) {
1795 Fldmiax(al, rn, write_back, dreglist);
1796 }
1797
1798 void Fstmdbx(Condition cond,
1799 Register rn,
1800 WriteBack write_back,
1801 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001802 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1803 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001804 VIXL_ASSERT(allow_macro_instructions_);
1805 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001806 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001807 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001808 fstmdbx(cond, rn, write_back, dreglist);
1809 }
1810 void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) {
1811 Fstmdbx(al, rn, write_back, dreglist);
1812 }
1813
1814 void Fstmiax(Condition cond,
1815 Register rn,
1816 WriteBack write_back,
1817 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001818 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1819 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001820 VIXL_ASSERT(allow_macro_instructions_);
1821 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001822 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001823 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001824 fstmiax(cond, rn, write_back, dreglist);
1825 }
1826 void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) {
1827 Fstmiax(al, rn, write_back, dreglist);
1828 }
1829
1830 void Hlt(Condition cond, uint32_t imm) {
1831 VIXL_ASSERT(allow_macro_instructions_);
1832 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001833 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001834 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001835 hlt(cond, imm);
1836 }
1837 void Hlt(uint32_t imm) { Hlt(al, imm); }
1838
1839 void Hvc(Condition cond, uint32_t imm) {
1840 VIXL_ASSERT(allow_macro_instructions_);
1841 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001842 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001843 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001844 hvc(cond, imm);
1845 }
1846 void Hvc(uint32_t imm) { Hvc(al, imm); }
1847
1848 void Isb(Condition cond, MemoryBarrier option) {
1849 VIXL_ASSERT(allow_macro_instructions_);
1850 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001851 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001852 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001853 isb(cond, option);
1854 }
1855 void Isb(MemoryBarrier option) { Isb(al, option); }
1856
Alexandre Ramesd3832962016-07-04 15:03:43 +01001857 void Lda(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001858 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1859 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001860 VIXL_ASSERT(allow_macro_instructions_);
1861 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001862 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001863 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001864 lda(cond, rt, operand);
1865 }
1866 void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); }
1867
1868 void Ldab(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001869 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1870 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001871 VIXL_ASSERT(allow_macro_instructions_);
1872 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001873 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001874 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001875 ldab(cond, rt, operand);
1876 }
1877 void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); }
1878
1879 void Ldaex(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001880 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1881 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001882 VIXL_ASSERT(allow_macro_instructions_);
1883 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001884 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001885 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001886 ldaex(cond, rt, operand);
1887 }
1888 void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); }
1889
1890 void Ldaexb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001891 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1892 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001893 VIXL_ASSERT(allow_macro_instructions_);
1894 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001895 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001896 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001897 ldaexb(cond, rt, operand);
1898 }
1899 void Ldaexb(Register rt, const MemOperand& operand) {
1900 Ldaexb(al, rt, operand);
1901 }
1902
1903 void Ldaexd(Condition cond,
1904 Register rt,
1905 Register rt2,
1906 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001907 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1908 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
1909 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001910 VIXL_ASSERT(allow_macro_instructions_);
1911 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001912 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001913 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001914 ldaexd(cond, rt, rt2, operand);
1915 }
1916 void Ldaexd(Register rt, Register rt2, const MemOperand& operand) {
1917 Ldaexd(al, rt, rt2, operand);
1918 }
1919
1920 void Ldaexh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001921 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1922 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001923 VIXL_ASSERT(allow_macro_instructions_);
1924 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001925 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001926 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001927 ldaexh(cond, rt, operand);
1928 }
1929 void Ldaexh(Register rt, const MemOperand& operand) {
1930 Ldaexh(al, rt, operand);
1931 }
1932
1933 void Ldah(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001934 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
1935 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001936 VIXL_ASSERT(allow_macro_instructions_);
1937 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001938 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001939 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001940 ldah(cond, rt, operand);
1941 }
1942 void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); }
1943
1944 void Ldm(Condition cond,
1945 Register rn,
1946 WriteBack write_back,
1947 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001948 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1949 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001950 VIXL_ASSERT(allow_macro_instructions_);
1951 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001952 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001953 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001954 ldm(cond, rn, write_back, registers);
1955 }
1956 void Ldm(Register rn, WriteBack write_back, RegisterList registers) {
1957 Ldm(al, rn, write_back, registers);
1958 }
1959
1960 void Ldmda(Condition cond,
1961 Register rn,
1962 WriteBack write_back,
1963 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001964 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1965 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001966 VIXL_ASSERT(allow_macro_instructions_);
1967 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001968 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001969 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001970 ldmda(cond, rn, write_back, registers);
1971 }
1972 void Ldmda(Register rn, WriteBack write_back, RegisterList registers) {
1973 Ldmda(al, rn, write_back, registers);
1974 }
1975
1976 void Ldmdb(Condition cond,
1977 Register rn,
1978 WriteBack write_back,
1979 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001980 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1981 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001982 VIXL_ASSERT(allow_macro_instructions_);
1983 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00001984 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00001985 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01001986 ldmdb(cond, rn, write_back, registers);
1987 }
1988 void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) {
1989 Ldmdb(al, rn, write_back, registers);
1990 }
1991
1992 void Ldmea(Condition cond,
1993 Register rn,
1994 WriteBack write_back,
1995 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00001996 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
1997 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01001998 VIXL_ASSERT(allow_macro_instructions_);
1999 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002000 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002001 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002002 ldmea(cond, rn, write_back, registers);
2003 }
2004 void Ldmea(Register rn, WriteBack write_back, RegisterList registers) {
2005 Ldmea(al, rn, write_back, registers);
2006 }
2007
2008 void Ldmed(Condition cond,
2009 Register rn,
2010 WriteBack write_back,
2011 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002012 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2013 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002014 VIXL_ASSERT(allow_macro_instructions_);
2015 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002016 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002017 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002018 ldmed(cond, rn, write_back, registers);
2019 }
2020 void Ldmed(Register rn, WriteBack write_back, RegisterList registers) {
2021 Ldmed(al, rn, write_back, registers);
2022 }
2023
2024 void Ldmfa(Condition cond,
2025 Register rn,
2026 WriteBack write_back,
2027 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002028 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2029 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002030 VIXL_ASSERT(allow_macro_instructions_);
2031 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002032 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002033 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002034 ldmfa(cond, rn, write_back, registers);
2035 }
2036 void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) {
2037 Ldmfa(al, rn, write_back, registers);
2038 }
2039
2040 void Ldmfd(Condition cond,
2041 Register rn,
2042 WriteBack write_back,
2043 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002044 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2045 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002046 VIXL_ASSERT(allow_macro_instructions_);
2047 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002048 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002049 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002050 ldmfd(cond, rn, write_back, registers);
2051 }
2052 void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) {
2053 Ldmfd(al, rn, write_back, registers);
2054 }
2055
2056 void Ldmib(Condition cond,
2057 Register rn,
2058 WriteBack write_back,
2059 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002060 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2061 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002062 VIXL_ASSERT(allow_macro_instructions_);
2063 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002064 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002065 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002066 ldmib(cond, rn, write_back, registers);
2067 }
2068 void Ldmib(Register rn, WriteBack write_back, RegisterList registers) {
2069 Ldmib(al, rn, write_back, registers);
2070 }
2071
2072 void Ldr(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002073 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2074 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002075 VIXL_ASSERT(allow_macro_instructions_);
2076 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002077 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002078 bool can_use_it =
2079 // LDR{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
2080 (operand.IsImmediate() && rt.IsLow() &&
2081 operand.GetBaseRegister().IsLow() &&
2082 operand.IsOffsetImmediateWithinRange(0, 124, 4) &&
2083 (operand.GetAddrMode() == Offset)) ||
2084 // LDR{<c>}{<q>} <Rt>, [SP{, #{+}<imm>}] ; T2
2085 (operand.IsImmediate() && rt.IsLow() &&
2086 operand.GetBaseRegister().IsSP() &&
2087 operand.IsOffsetImmediateWithinRange(0, 1020, 4) &&
2088 (operand.GetAddrMode() == Offset)) ||
2089 // LDR{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2090 (operand.IsPlainRegister() && rt.IsLow() &&
2091 operand.GetBaseRegister().IsLow() &&
2092 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2093 (operand.GetAddrMode() == Offset));
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002094 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002095 ldr(cond, rt, operand);
2096 }
2097 void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); }
2098
Alexandre Ramesd3832962016-07-04 15:03:43 +01002099
2100 void Ldrb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002101 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2102 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002103 VIXL_ASSERT(allow_macro_instructions_);
2104 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002105 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002106 bool can_use_it =
2107 // LDRB{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
2108 (operand.IsImmediate() && rt.IsLow() &&
2109 operand.GetBaseRegister().IsLow() &&
2110 operand.IsOffsetImmediateWithinRange(0, 31) &&
2111 (operand.GetAddrMode() == Offset)) ||
2112 // LDRB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2113 (operand.IsPlainRegister() && rt.IsLow() &&
2114 operand.GetBaseRegister().IsLow() &&
2115 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2116 (operand.GetAddrMode() == Offset));
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002117 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002118 ldrb(cond, rt, operand);
2119 }
2120 void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); }
2121
Alexandre Ramesd3832962016-07-04 15:03:43 +01002122
2123 void Ldrd(Condition cond,
2124 Register rt,
2125 Register rt2,
2126 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002127 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2128 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
2129 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002130 VIXL_ASSERT(allow_macro_instructions_);
2131 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002132 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002133 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002134 ldrd(cond, rt, rt2, operand);
2135 }
2136 void Ldrd(Register rt, Register rt2, const MemOperand& operand) {
2137 Ldrd(al, rt, rt2, operand);
2138 }
2139
Alexandre Ramesd3832962016-07-04 15:03:43 +01002140
2141 void Ldrex(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002142 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2143 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002144 VIXL_ASSERT(allow_macro_instructions_);
2145 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002146 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002147 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002148 ldrex(cond, rt, operand);
2149 }
2150 void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); }
2151
2152 void Ldrexb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002153 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2154 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002155 VIXL_ASSERT(allow_macro_instructions_);
2156 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002157 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002158 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002159 ldrexb(cond, rt, operand);
2160 }
2161 void Ldrexb(Register rt, const MemOperand& operand) {
2162 Ldrexb(al, rt, operand);
2163 }
2164
2165 void Ldrexd(Condition cond,
2166 Register rt,
2167 Register rt2,
2168 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002169 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2170 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
2171 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002172 VIXL_ASSERT(allow_macro_instructions_);
2173 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002174 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002175 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002176 ldrexd(cond, rt, rt2, operand);
2177 }
2178 void Ldrexd(Register rt, Register rt2, const MemOperand& operand) {
2179 Ldrexd(al, rt, rt2, operand);
2180 }
2181
2182 void Ldrexh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002183 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2184 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002185 VIXL_ASSERT(allow_macro_instructions_);
2186 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002187 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002188 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002189 ldrexh(cond, rt, operand);
2190 }
2191 void Ldrexh(Register rt, const MemOperand& operand) {
2192 Ldrexh(al, rt, operand);
2193 }
2194
2195 void Ldrh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002196 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2197 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002198 VIXL_ASSERT(allow_macro_instructions_);
2199 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002200 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002201 bool can_use_it =
2202 // LDRH{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
2203 (operand.IsImmediate() && rt.IsLow() &&
2204 operand.GetBaseRegister().IsLow() &&
2205 operand.IsOffsetImmediateWithinRange(0, 62, 2) &&
2206 (operand.GetAddrMode() == Offset)) ||
2207 // LDRH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2208 (operand.IsPlainRegister() && rt.IsLow() &&
2209 operand.GetBaseRegister().IsLow() &&
2210 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2211 (operand.GetAddrMode() == Offset));
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002212 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002213 ldrh(cond, rt, operand);
2214 }
2215 void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); }
2216
Alexandre Ramesd3832962016-07-04 15:03:43 +01002217
2218 void Ldrsb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002219 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2220 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002221 VIXL_ASSERT(allow_macro_instructions_);
2222 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002223 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002224 bool can_use_it =
2225 // LDRSB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2226 operand.IsPlainRegister() && rt.IsLow() &&
2227 operand.GetBaseRegister().IsLow() &&
2228 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2229 (operand.GetAddrMode() == Offset);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002230 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002231 ldrsb(cond, rt, operand);
2232 }
2233 void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); }
2234
Alexandre Ramesd3832962016-07-04 15:03:43 +01002235
2236 void Ldrsh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002237 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
2238 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002239 VIXL_ASSERT(allow_macro_instructions_);
2240 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002241 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002242 bool can_use_it =
2243 // LDRSH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
2244 operand.IsPlainRegister() && rt.IsLow() &&
2245 operand.GetBaseRegister().IsLow() &&
2246 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
2247 (operand.GetAddrMode() == Offset);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002248 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002249 ldrsh(cond, rt, operand);
2250 }
2251 void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); }
2252
Alexandre Ramesd3832962016-07-04 15:03:43 +01002253
2254 void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002255 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2256 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2257 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002258 VIXL_ASSERT(allow_macro_instructions_);
2259 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002260 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002261 bool can_use_it =
2262 // LSL<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
2263 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2264 (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) ||
2265 // LSL<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
2266 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
2267 operand.GetBaseRegister().IsLow());
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002268 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002269 lsl(cond, rd, rm, operand);
2270 }
2271 void Lsl(Register rd, Register rm, const Operand& operand) {
2272 Lsl(al, rd, rm, operand);
2273 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002274 void Lsl(FlagsUpdate flags,
2275 Condition cond,
2276 Register rd,
2277 Register rm,
2278 const Operand& operand) {
2279 switch (flags) {
2280 case LeaveFlags:
2281 Lsl(cond, rd, rm, operand);
2282 break;
2283 case SetFlags:
2284 Lsls(cond, rd, rm, operand);
2285 break;
2286 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002287 bool setflags_is_smaller =
2288 IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() &&
2289 ((operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2290 (operand.GetImmediate() < 32)) ||
2291 (operand.IsPlainRegister() && rd.Is(rm)));
2292 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002293 Lsls(cond, rd, rm, operand);
2294 } else {
2295 Lsl(cond, rd, rm, operand);
2296 }
2297 break;
2298 }
2299 }
2300 void Lsl(FlagsUpdate flags,
2301 Register rd,
2302 Register rm,
2303 const Operand& operand) {
2304 Lsl(flags, al, rd, rm, operand);
2305 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002306
2307 void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002308 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2309 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2310 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002311 VIXL_ASSERT(allow_macro_instructions_);
2312 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002313 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002314 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002315 lsls(cond, rd, rm, operand);
2316 }
2317 void Lsls(Register rd, Register rm, const Operand& operand) {
2318 Lsls(al, rd, rm, operand);
2319 }
2320
2321 void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002322 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2323 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2324 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002325 VIXL_ASSERT(allow_macro_instructions_);
2326 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002327 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002328 bool can_use_it =
2329 // LSR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2
2330 (operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2331 (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) ||
2332 // LSR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
2333 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
2334 operand.GetBaseRegister().IsLow());
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002335 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002336 lsr(cond, rd, rm, operand);
2337 }
2338 void Lsr(Register rd, Register rm, const Operand& operand) {
2339 Lsr(al, rd, rm, operand);
2340 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002341 void Lsr(FlagsUpdate flags,
2342 Condition cond,
2343 Register rd,
2344 Register rm,
2345 const Operand& operand) {
2346 switch (flags) {
2347 case LeaveFlags:
2348 Lsr(cond, rd, rm, operand);
2349 break;
2350 case SetFlags:
2351 Lsrs(cond, rd, rm, operand);
2352 break;
2353 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002354 bool setflags_is_smaller =
2355 IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() &&
2356 ((operand.IsImmediate() && (operand.GetImmediate() >= 1) &&
2357 (operand.GetImmediate() <= 32)) ||
2358 (operand.IsPlainRegister() && rd.Is(rm)));
2359 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002360 Lsrs(cond, rd, rm, operand);
2361 } else {
2362 Lsr(cond, rd, rm, operand);
2363 }
2364 break;
2365 }
2366 }
2367 void Lsr(FlagsUpdate flags,
2368 Register rd,
2369 Register rm,
2370 const Operand& operand) {
2371 Lsr(flags, al, rd, rm, operand);
2372 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002373
2374 void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002375 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2376 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2377 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002378 VIXL_ASSERT(allow_macro_instructions_);
2379 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002380 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002381 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002382 lsrs(cond, rd, rm, operand);
2383 }
2384 void Lsrs(Register rd, Register rm, const Operand& operand) {
2385 Lsrs(al, rd, rm, operand);
2386 }
2387
2388 void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002389 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2390 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2391 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2392 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002393 VIXL_ASSERT(allow_macro_instructions_);
2394 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002395 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002396 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002397 mla(cond, rd, rn, rm, ra);
2398 }
2399 void Mla(Register rd, Register rn, Register rm, Register ra) {
2400 Mla(al, rd, rn, rm, ra);
2401 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002402 void Mla(FlagsUpdate flags,
2403 Condition cond,
2404 Register rd,
2405 Register rn,
2406 Register rm,
2407 Register ra) {
2408 switch (flags) {
2409 case LeaveFlags:
2410 Mla(cond, rd, rn, rm, ra);
2411 break;
2412 case SetFlags:
2413 Mlas(cond, rd, rn, rm, ra);
2414 break;
2415 case DontCare:
2416 Mla(cond, rd, rn, rm, ra);
2417 break;
2418 }
2419 }
2420 void Mla(
2421 FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) {
2422 Mla(flags, al, rd, rn, rm, ra);
2423 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002424
2425 void Mlas(
2426 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002427 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2428 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2429 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2430 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002431 VIXL_ASSERT(allow_macro_instructions_);
2432 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002433 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002434 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002435 mlas(cond, rd, rn, rm, ra);
2436 }
2437 void Mlas(Register rd, Register rn, Register rm, Register ra) {
2438 Mlas(al, rd, rn, rm, ra);
2439 }
2440
2441 void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002442 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2443 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2444 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2445 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002446 VIXL_ASSERT(allow_macro_instructions_);
2447 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002448 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002449 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002450 mls(cond, rd, rn, rm, ra);
2451 }
2452 void Mls(Register rd, Register rn, Register rm, Register ra) {
2453 Mls(al, rd, rn, rm, ra);
2454 }
2455
2456 void Mov(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002457 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2458 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002459 VIXL_ASSERT(allow_macro_instructions_);
2460 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002461 MacroEmissionCheckScope guard(this);
Vincent Belliarda576eb92016-12-13 14:38:55 -08002462 if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) {
2463 return;
2464 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002465 bool can_use_it =
2466 // MOV<c>{<q>} <Rd>, #<imm8> ; T1
2467 (operand.IsImmediate() && rd.IsLow() &&
2468 (operand.GetImmediate() <= 255)) ||
2469 // MOV{<c>}{<q>} <Rd>, <Rm> ; T1
2470 (operand.IsPlainRegister() && !rd.IsPC() &&
2471 !operand.GetBaseRegister().IsPC()) ||
2472 // MOV<c>{<q>} <Rd>, <Rm> {, <shift> #<amount>} ; T2
2473 (operand.IsImmediateShiftedRegister() && rd.IsLow() &&
2474 operand.GetBaseRegister().IsLow() &&
2475 (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) ||
2476 operand.GetShift().Is(ASR))) ||
2477 // MOV<c>{<q>} <Rdm>, <Rdm>, LSL <Rs> ; T1
2478 // MOV<c>{<q>} <Rdm>, <Rdm>, LSR <Rs> ; T1
2479 // MOV<c>{<q>} <Rdm>, <Rdm>, ASR <Rs> ; T1
2480 // MOV<c>{<q>} <Rdm>, <Rdm>, ROR <Rs> ; T1
2481 (operand.IsRegisterShiftedRegister() &&
2482 rd.Is(operand.GetBaseRegister()) && rd.IsLow() &&
2483 (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) ||
2484 operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) &&
2485 operand.GetShiftRegister().IsLow());
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002486 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002487 mov(cond, rd, operand);
2488 }
2489 void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002490 void Mov(FlagsUpdate flags,
2491 Condition cond,
2492 Register rd,
2493 const Operand& operand) {
2494 switch (flags) {
2495 case LeaveFlags:
2496 Mov(cond, rd, operand);
2497 break;
2498 case SetFlags:
2499 Movs(cond, rd, operand);
2500 break;
2501 case DontCare:
Vincent Belliarda576eb92016-12-13 14:38:55 -08002502 if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) {
2503 return;
2504 }
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002505 bool setflags_is_smaller =
Vincent Belliard934696d2016-08-18 11:03:56 -07002506 IsUsingT32() && cond.Is(al) &&
2507 ((operand.IsImmediateShiftedRegister() && rd.IsLow() &&
2508 operand.GetBaseRegister().IsLow() &&
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002509 (operand.GetShiftAmount() >= 1) &&
2510 (((operand.GetShiftAmount() <= 32) &&
2511 ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) ||
2512 ((operand.GetShiftAmount() < 32) &&
2513 operand.GetShift().IsLSL()))) ||
Vincent Belliard934696d2016-08-18 11:03:56 -07002514 (operand.IsRegisterShiftedRegister() && rd.IsLow() &&
2515 operand.GetBaseRegister().Is(rd) &&
2516 operand.GetShiftRegister().IsLow() &&
2517 (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() ||
2518 operand.GetShift().IsASR() || operand.GetShift().IsROR())) ||
2519 (operand.IsImmediate() && rd.IsLow() &&
2520 (operand.GetImmediate() < 256)));
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002521 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002522 Movs(cond, rd, operand);
2523 } else {
2524 Mov(cond, rd, operand);
2525 }
2526 break;
2527 }
2528 }
2529 void Mov(FlagsUpdate flags, Register rd, const Operand& operand) {
2530 Mov(flags, al, rd, operand);
2531 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002532
2533 void Movs(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002534 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2535 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002536 VIXL_ASSERT(allow_macro_instructions_);
2537 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002538 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002539 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002540 movs(cond, rd, operand);
2541 }
2542 void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); }
2543
2544 void Movt(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002545 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2546 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002547 VIXL_ASSERT(allow_macro_instructions_);
2548 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002549 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002550 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002551 movt(cond, rd, operand);
2552 }
2553 void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); }
2554
Alexandre Ramesd3832962016-07-04 15:03:43 +01002555 void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002556 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002557 VIXL_ASSERT(allow_macro_instructions_);
2558 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002559 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002560 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002561 mrs(cond, rd, spec_reg);
2562 }
2563 void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); }
2564
2565 void Msr(Condition cond,
2566 MaskedSpecialRegister spec_reg,
2567 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002568 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002569 VIXL_ASSERT(allow_macro_instructions_);
2570 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002571 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002572 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002573 msr(cond, spec_reg, operand);
2574 }
2575 void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) {
2576 Msr(al, spec_reg, operand);
2577 }
2578
2579 void Mul(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002580 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2581 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2582 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002583 VIXL_ASSERT(allow_macro_instructions_);
2584 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002585 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002586 bool can_use_it =
2587 // MUL<c>{<q>} <Rdm>, <Rn>{, <Rdm>} ; T1
2588 rd.Is(rm) && rn.IsLow() && rm.IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002589 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002590 mul(cond, rd, rn, rm);
2591 }
2592 void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002593 void Mul(FlagsUpdate flags,
2594 Condition cond,
2595 Register rd,
2596 Register rn,
2597 Register rm) {
2598 switch (flags) {
2599 case LeaveFlags:
2600 Mul(cond, rd, rn, rm);
2601 break;
2602 case SetFlags:
2603 Muls(cond, rd, rn, rm);
2604 break;
2605 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002606 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2607 rn.IsLow() && rm.Is(rd);
2608 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002609 Muls(cond, rd, rn, rm);
2610 } else {
2611 Mul(cond, rd, rn, rm);
2612 }
2613 break;
2614 }
2615 }
2616 void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) {
2617 Mul(flags, al, rd, rn, rm);
2618 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002619
2620 void Muls(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002621 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2622 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2623 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002624 VIXL_ASSERT(allow_macro_instructions_);
2625 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002626 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002627 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002628 muls(cond, rd, rn, rm);
2629 }
2630 void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); }
2631
2632 void Mvn(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002633 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2634 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002635 VIXL_ASSERT(allow_macro_instructions_);
2636 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002637 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002638 bool can_use_it =
2639 // MVN<c>{<q>} <Rd>, <Rm> ; T1
2640 operand.IsPlainRegister() && rd.IsLow() &&
2641 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002642 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002643 mvn(cond, rd, operand);
2644 }
2645 void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); }
Vincent Belliard934696d2016-08-18 11:03:56 -07002646 void Mvn(FlagsUpdate flags,
2647 Condition cond,
2648 Register rd,
2649 const Operand& operand) {
2650 switch (flags) {
2651 case LeaveFlags:
2652 Mvn(cond, rd, operand);
2653 break;
2654 case SetFlags:
2655 Mvns(cond, rd, operand);
2656 break;
2657 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002658 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2659 operand.IsPlainRegister() &&
2660 operand.GetBaseRegister().IsLow();
2661 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002662 Mvns(cond, rd, operand);
2663 } else {
2664 Mvn(cond, rd, operand);
2665 }
2666 break;
2667 }
2668 }
2669 void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) {
2670 Mvn(flags, al, rd, operand);
2671 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002672
2673 void Mvns(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002674 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2675 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002676 VIXL_ASSERT(allow_macro_instructions_);
2677 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002678 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002679 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002680 mvns(cond, rd, operand);
2681 }
2682 void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); }
2683
2684 void Nop(Condition cond) {
2685 VIXL_ASSERT(allow_macro_instructions_);
2686 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002687 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002688 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002689 nop(cond);
2690 }
2691 void Nop() { Nop(al); }
2692
2693 void Orn(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002694 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2696 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002697 VIXL_ASSERT(allow_macro_instructions_);
2698 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002699 MacroEmissionCheckScope guard(this);
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002700 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002701 uint32_t immediate = operand.GetImmediate();
2702 if (immediate == 0) {
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002703 mvn(rd, 0);
Alexandre Rames628c5262016-09-21 11:52:30 +01002704 return;
2705 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002706 if ((immediate == 0xffffffff) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002707 return;
2708 }
2709 }
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002710 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002711 orn(cond, rd, rn, operand);
2712 }
2713 void Orn(Register rd, Register rn, const Operand& operand) {
2714 Orn(al, rd, rn, operand);
2715 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002716 void Orn(FlagsUpdate flags,
2717 Condition cond,
2718 Register rd,
2719 Register rn,
2720 const Operand& operand) {
2721 switch (flags) {
2722 case LeaveFlags:
2723 Orn(cond, rd, rn, operand);
2724 break;
2725 case SetFlags:
2726 Orns(cond, rd, rn, operand);
2727 break;
2728 case DontCare:
2729 Orn(cond, rd, rn, operand);
2730 break;
2731 }
2732 }
2733 void Orn(FlagsUpdate flags,
2734 Register rd,
2735 Register rn,
2736 const Operand& operand) {
2737 Orn(flags, al, rd, rn, operand);
2738 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002739
2740 void Orns(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002741 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2742 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2743 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002744 VIXL_ASSERT(allow_macro_instructions_);
2745 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002746 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002747 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002748 orns(cond, rd, rn, operand);
2749 }
2750 void Orns(Register rd, Register rn, const Operand& operand) {
2751 Orns(al, rd, rn, operand);
2752 }
2753
2754 void Orr(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002755 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2756 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2757 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002758 VIXL_ASSERT(allow_macro_instructions_);
2759 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002760 MacroEmissionCheckScope guard(this);
Vincent Belliarda576eb92016-12-13 14:38:55 -08002761 if (rd.Is(rn) && operand.IsPlainRegister() &&
2762 rd.Is(operand.GetBaseRegister())) {
2763 return;
2764 }
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002765 if (cond.Is(al) && operand.IsImmediate()) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002766 uint32_t immediate = operand.GetImmediate();
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002767 if ((immediate == 0) && rd.Is(rn)) {
Alexandre Rames628c5262016-09-21 11:52:30 +01002768 return;
2769 }
2770 if (immediate == 0xffffffff) {
Vincent Belliarde2aa8942016-10-12 15:30:17 -07002771 mvn(rd, 0);
Alexandre Rames628c5262016-09-21 11:52:30 +01002772 return;
2773 }
2774 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002775 bool can_use_it =
2776 // ORR<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
2777 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() &&
2778 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002779 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002780 orr(cond, rd, rn, operand);
2781 }
2782 void Orr(Register rd, Register rn, const Operand& operand) {
2783 Orr(al, rd, rn, operand);
2784 }
Vincent Belliard934696d2016-08-18 11:03:56 -07002785 void Orr(FlagsUpdate flags,
2786 Condition cond,
2787 Register rd,
2788 Register rn,
2789 const Operand& operand) {
2790 switch (flags) {
2791 case LeaveFlags:
2792 Orr(cond, rd, rn, operand);
2793 break;
2794 case SetFlags:
2795 Orrs(cond, rd, rn, operand);
2796 break;
2797 case DontCare:
Vincent Belliarda576eb92016-12-13 14:38:55 -08002798 if (operand.IsPlainRegister() && rd.Is(rn) &&
2799 rd.Is(operand.GetBaseRegister())) {
2800 return;
2801 }
Georgia Kouveli4443cf92016-12-08 11:34:57 +00002802 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
2803 rn.Is(rd) && operand.IsPlainRegister() &&
2804 operand.GetBaseRegister().IsLow();
2805 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07002806 Orrs(cond, rd, rn, operand);
2807 } else {
2808 Orr(cond, rd, rn, operand);
2809 }
2810 break;
2811 }
2812 }
2813 void Orr(FlagsUpdate flags,
2814 Register rd,
2815 Register rn,
2816 const Operand& operand) {
2817 Orr(flags, al, rd, rn, operand);
2818 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002819
2820 void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002821 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2822 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2823 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002824 VIXL_ASSERT(allow_macro_instructions_);
2825 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002826 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002827 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002828 orrs(cond, rd, rn, operand);
2829 }
2830 void Orrs(Register rd, Register rn, const Operand& operand) {
2831 Orrs(al, rd, rn, operand);
2832 }
2833
2834 void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002835 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2836 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2837 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002838 VIXL_ASSERT(allow_macro_instructions_);
2839 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002840 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002841 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002842 pkhbt(cond, rd, rn, operand);
2843 }
2844 void Pkhbt(Register rd, Register rn, const Operand& operand) {
2845 Pkhbt(al, rd, rn, operand);
2846 }
2847
2848 void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002849 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2850 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2851 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002852 VIXL_ASSERT(allow_macro_instructions_);
2853 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002854 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002855 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002856 pkhtb(cond, rd, rn, operand);
2857 }
2858 void Pkhtb(Register rd, Register rn, const Operand& operand) {
2859 Pkhtb(al, rd, rn, operand);
2860 }
2861
Alexandre Ramesd3832962016-07-04 15:03:43 +01002862
2863 void Pld(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002864 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002865 VIXL_ASSERT(allow_macro_instructions_);
2866 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002867 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002868 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002869 pld(cond, operand);
2870 }
2871 void Pld(const MemOperand& operand) { Pld(al, operand); }
2872
2873 void Pldw(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002874 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002875 VIXL_ASSERT(allow_macro_instructions_);
2876 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002877 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002878 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002879 pldw(cond, operand);
2880 }
2881 void Pldw(const MemOperand& operand) { Pldw(al, operand); }
2882
2883 void Pli(Condition cond, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002884 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002885 VIXL_ASSERT(allow_macro_instructions_);
2886 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002887 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002888 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002889 pli(cond, operand);
2890 }
2891 void Pli(const MemOperand& operand) { Pli(al, operand); }
2892
Alexandre Ramesd3832962016-07-04 15:03:43 +01002893
2894 void Pop(Condition cond, RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002895 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002896 VIXL_ASSERT(allow_macro_instructions_);
2897 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002898 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002899 ITScope it_scope(this, &cond, guard);
Peter Collingbourne920189b2021-01-22 17:42:36 -08002900 if (registers.IsSingleRegister() &&
2901 (!IsUsingT32() || !registers.IsR0toR7orPC())) {
2902 pop(cond, registers.GetFirstAvailableRegister());
2903 } else if (!registers.IsEmpty()) {
2904 pop(cond, registers);
2905 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002906 }
2907 void Pop(RegisterList registers) { Pop(al, registers); }
2908
2909 void Pop(Condition cond, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002910 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002911 VIXL_ASSERT(allow_macro_instructions_);
2912 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002913 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002914 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002915 pop(cond, rt);
2916 }
2917 void Pop(Register rt) { Pop(al, rt); }
2918
2919 void Push(Condition cond, RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002920 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002921 VIXL_ASSERT(allow_macro_instructions_);
2922 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002923 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002924 ITScope it_scope(this, &cond, guard);
Jacob Bramley5dc3c762021-02-08 14:39:30 +00002925 if (registers.IsSingleRegister() && !registers.Includes(sp) &&
Peter Collingbourne920189b2021-01-22 17:42:36 -08002926 (!IsUsingT32() || !registers.IsR0toR7orLR())) {
2927 push(cond, registers.GetFirstAvailableRegister());
2928 } else if (!registers.IsEmpty()) {
2929 push(cond, registers);
2930 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002931 }
2932 void Push(RegisterList registers) { Push(al, registers); }
2933
2934 void Push(Condition cond, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002935 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002936 VIXL_ASSERT(allow_macro_instructions_);
2937 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002938 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002939 ITScope it_scope(this, &cond, guard);
Jacob Bramley5dc3c762021-02-08 14:39:30 +00002940 if (IsUsingA32() && rt.IsSP()) {
2941 // Only the A32 multiple-register form can push sp.
2942 push(cond, RegisterList(rt));
2943 } else {
2944 push(cond, rt);
2945 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01002946 }
2947 void Push(Register rt) { Push(al, rt); }
2948
2949 void Qadd(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002950 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2951 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
2952 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002953 VIXL_ASSERT(allow_macro_instructions_);
2954 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002955 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002956 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002957 qadd(cond, rd, rm, rn);
2958 }
2959 void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); }
2960
2961 void Qadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002962 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2963 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2964 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002965 VIXL_ASSERT(allow_macro_instructions_);
2966 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002967 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002968 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002969 qadd16(cond, rd, rn, rm);
2970 }
2971 void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); }
2972
2973 void Qadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002974 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2975 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2976 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002977 VIXL_ASSERT(allow_macro_instructions_);
2978 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002979 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002980 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002981 qadd8(cond, rd, rn, rm);
2982 }
2983 void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); }
2984
2985 void Qasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002986 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2987 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
2988 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01002989 VIXL_ASSERT(allow_macro_instructions_);
2990 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00002991 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00002992 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01002993 qasx(cond, rd, rn, rm);
2994 }
2995 void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); }
2996
2997 void Qdadd(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00002998 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
2999 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3000 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003001 VIXL_ASSERT(allow_macro_instructions_);
3002 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003003 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003004 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003005 qdadd(cond, rd, rm, rn);
3006 }
3007 void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); }
3008
3009 void Qdsub(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003010 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3011 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3012 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003013 VIXL_ASSERT(allow_macro_instructions_);
3014 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003015 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003016 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003017 qdsub(cond, rd, rm, rn);
3018 }
3019 void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); }
3020
3021 void Qsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003022 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3023 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3024 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003025 VIXL_ASSERT(allow_macro_instructions_);
3026 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003027 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003028 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003029 qsax(cond, rd, rn, rm);
3030 }
3031 void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); }
3032
3033 void Qsub(Condition cond, Register rd, Register rm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003034 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3035 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3036 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003037 VIXL_ASSERT(allow_macro_instructions_);
3038 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003039 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003040 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003041 qsub(cond, rd, rm, rn);
3042 }
3043 void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); }
3044
3045 void Qsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003046 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3047 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3048 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003049 VIXL_ASSERT(allow_macro_instructions_);
3050 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003051 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003052 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003053 qsub16(cond, rd, rn, rm);
3054 }
3055 void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); }
3056
3057 void Qsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003058 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3059 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3060 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003061 VIXL_ASSERT(allow_macro_instructions_);
3062 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003063 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003064 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003065 qsub8(cond, rd, rn, rm);
3066 }
3067 void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); }
3068
3069 void Rbit(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003070 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3071 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003072 VIXL_ASSERT(allow_macro_instructions_);
3073 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003074 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003075 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003076 rbit(cond, rd, rm);
3077 }
3078 void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); }
3079
3080 void Rev(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003081 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3082 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003083 VIXL_ASSERT(allow_macro_instructions_);
3084 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003085 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003086 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003087 rev(cond, rd, rm);
3088 }
3089 void Rev(Register rd, Register rm) { Rev(al, rd, rm); }
3090
3091 void Rev16(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003092 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3093 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003094 VIXL_ASSERT(allow_macro_instructions_);
3095 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003096 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003097 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003098 rev16(cond, rd, rm);
3099 }
3100 void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); }
3101
3102 void Revsh(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003103 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3104 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003105 VIXL_ASSERT(allow_macro_instructions_);
3106 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003107 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003108 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003109 revsh(cond, rd, rm);
3110 }
3111 void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); }
3112
3113 void Ror(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003114 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3115 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3116 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003117 VIXL_ASSERT(allow_macro_instructions_);
3118 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003119 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003120 bool can_use_it =
Alexandre Ramesd3832962016-07-04 15:03:43 +01003121 // ROR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1
Georgia Kouvelie7a16902016-11-23 16:13:22 +00003122 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() &&
3123 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003124 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003125 ror(cond, rd, rm, operand);
3126 }
3127 void Ror(Register rd, Register rm, const Operand& operand) {
3128 Ror(al, rd, rm, operand);
3129 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003130 void Ror(FlagsUpdate flags,
3131 Condition cond,
3132 Register rd,
3133 Register rm,
3134 const Operand& operand) {
3135 switch (flags) {
3136 case LeaveFlags:
3137 Ror(cond, rd, rm, operand);
3138 break;
3139 case SetFlags:
3140 Rors(cond, rd, rm, operand);
3141 break;
3142 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00003143 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
3144 rm.IsLow() && operand.IsPlainRegister() &&
3145 rd.Is(rm);
3146 if (setflags_is_smaller) {
3147 Rors(cond, rd, rm, operand);
3148 } else {
3149 Ror(cond, rd, rm, operand);
3150 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003151 break;
3152 }
3153 }
3154 void Ror(FlagsUpdate flags,
3155 Register rd,
3156 Register rm,
3157 const Operand& operand) {
3158 Ror(flags, al, rd, rm, operand);
3159 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003160
3161 void Rors(Condition cond, Register rd, Register rm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003162 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3163 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3164 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003165 VIXL_ASSERT(allow_macro_instructions_);
3166 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003167 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003168 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003169 rors(cond, rd, rm, operand);
3170 }
3171 void Rors(Register rd, Register rm, const Operand& operand) {
3172 Rors(al, rd, rm, operand);
3173 }
3174
3175 void Rrx(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003176 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3177 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003178 VIXL_ASSERT(allow_macro_instructions_);
3179 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003180 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003181 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003182 rrx(cond, rd, rm);
3183 }
3184 void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); }
Vincent Belliard934696d2016-08-18 11:03:56 -07003185 void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) {
3186 switch (flags) {
3187 case LeaveFlags:
3188 Rrx(cond, rd, rm);
3189 break;
3190 case SetFlags:
3191 Rrxs(cond, rd, rm);
3192 break;
3193 case DontCare:
3194 Rrx(cond, rd, rm);
3195 break;
3196 }
3197 }
3198 void Rrx(FlagsUpdate flags, Register rd, Register rm) {
3199 Rrx(flags, al, rd, rm);
3200 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003201
3202 void Rrxs(Condition cond, Register rd, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003203 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3204 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003205 VIXL_ASSERT(allow_macro_instructions_);
3206 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003207 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003208 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003209 rrxs(cond, rd, rm);
3210 }
3211 void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); }
3212
3213 void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003214 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3215 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3216 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003217 VIXL_ASSERT(allow_macro_instructions_);
3218 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003219 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003220 bool can_use_it =
3221 // RSB<c>{<q>} {<Rd>, }<Rn>, #0 ; T1
3222 operand.IsImmediate() && rd.IsLow() && rn.IsLow() &&
3223 (operand.GetImmediate() == 0);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003224 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003225 rsb(cond, rd, rn, operand);
3226 }
3227 void Rsb(Register rd, Register rn, const Operand& operand) {
3228 Rsb(al, rd, rn, operand);
3229 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003230 void Rsb(FlagsUpdate flags,
3231 Condition cond,
3232 Register rd,
3233 Register rn,
3234 const Operand& operand) {
3235 switch (flags) {
3236 case LeaveFlags:
3237 Rsb(cond, rd, rn, operand);
3238 break;
3239 case SetFlags:
3240 Rsbs(cond, rd, rn, operand);
3241 break;
3242 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00003243 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
3244 rn.IsLow() && operand.IsImmediate() &&
3245 (operand.GetImmediate() == 0);
3246 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07003247 Rsbs(cond, rd, rn, operand);
3248 } else {
3249 Rsb(cond, rd, rn, operand);
3250 }
3251 break;
3252 }
3253 }
3254 void Rsb(FlagsUpdate flags,
3255 Register rd,
3256 Register rn,
3257 const Operand& operand) {
3258 Rsb(flags, al, rd, rn, operand);
3259 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003260
3261 void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003262 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3263 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3264 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003265 VIXL_ASSERT(allow_macro_instructions_);
3266 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003267 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003268 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003269 rsbs(cond, rd, rn, operand);
3270 }
3271 void Rsbs(Register rd, Register rn, const Operand& operand) {
3272 Rsbs(al, rd, rn, operand);
3273 }
3274
3275 void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003276 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3277 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3278 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003279 VIXL_ASSERT(allow_macro_instructions_);
3280 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003281 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003282 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003283 rsc(cond, rd, rn, operand);
3284 }
3285 void Rsc(Register rd, Register rn, const Operand& operand) {
3286 Rsc(al, rd, rn, operand);
3287 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003288 void Rsc(FlagsUpdate flags,
3289 Condition cond,
3290 Register rd,
3291 Register rn,
3292 const Operand& operand) {
3293 switch (flags) {
3294 case LeaveFlags:
3295 Rsc(cond, rd, rn, operand);
3296 break;
3297 case SetFlags:
3298 Rscs(cond, rd, rn, operand);
3299 break;
3300 case DontCare:
3301 Rsc(cond, rd, rn, operand);
3302 break;
3303 }
3304 }
3305 void Rsc(FlagsUpdate flags,
3306 Register rd,
3307 Register rn,
3308 const Operand& operand) {
3309 Rsc(flags, al, rd, rn, operand);
3310 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003311
3312 void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003313 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3314 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3315 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003316 VIXL_ASSERT(allow_macro_instructions_);
3317 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003318 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003319 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003320 rscs(cond, rd, rn, operand);
3321 }
3322 void Rscs(Register rd, Register rn, const Operand& operand) {
3323 Rscs(al, rd, rn, operand);
3324 }
3325
3326 void Sadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003327 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3328 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3329 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003330 VIXL_ASSERT(allow_macro_instructions_);
3331 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003332 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003333 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003334 sadd16(cond, rd, rn, rm);
3335 }
3336 void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); }
3337
3338 void Sadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003339 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3340 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3341 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003342 VIXL_ASSERT(allow_macro_instructions_);
3343 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003344 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003345 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003346 sadd8(cond, rd, rn, rm);
3347 }
3348 void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); }
3349
3350 void Sasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003351 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3352 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3353 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003354 VIXL_ASSERT(allow_macro_instructions_);
3355 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003356 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003357 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003358 sasx(cond, rd, rn, rm);
3359 }
3360 void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); }
3361
3362 void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003363 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3364 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3365 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003366 VIXL_ASSERT(allow_macro_instructions_);
3367 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003368 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003369 bool can_use_it =
3370 // SBC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1
3371 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) &&
3372 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003373 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003374 sbc(cond, rd, rn, operand);
3375 }
3376 void Sbc(Register rd, Register rn, const Operand& operand) {
3377 Sbc(al, rd, rn, operand);
3378 }
Vincent Belliard934696d2016-08-18 11:03:56 -07003379 void Sbc(FlagsUpdate flags,
3380 Condition cond,
3381 Register rd,
3382 Register rn,
3383 const Operand& operand) {
3384 switch (flags) {
3385 case LeaveFlags:
3386 Sbc(cond, rd, rn, operand);
3387 break;
3388 case SetFlags:
3389 Sbcs(cond, rd, rn, operand);
3390 break;
3391 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00003392 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() &&
3393 rn.Is(rd) && operand.IsPlainRegister() &&
3394 operand.GetBaseRegister().IsLow();
3395 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07003396 Sbcs(cond, rd, rn, operand);
3397 } else {
3398 Sbc(cond, rd, rn, operand);
3399 }
3400 break;
3401 }
3402 }
3403 void Sbc(FlagsUpdate flags,
3404 Register rd,
3405 Register rn,
3406 const Operand& operand) {
3407 Sbc(flags, al, rd, rn, operand);
3408 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01003409
3410 void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003411 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3412 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3413 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003414 VIXL_ASSERT(allow_macro_instructions_);
3415 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003416 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003417 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003418 sbcs(cond, rd, rn, operand);
3419 }
3420 void Sbcs(Register rd, Register rn, const Operand& operand) {
3421 Sbcs(al, rd, rn, operand);
3422 }
3423
Vincent Belliard609821f2017-02-08 14:17:25 -08003424 void Sbfx(
3425 Condition cond, Register rd, Register rn, uint32_t lsb, uint32_t width) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003426 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3427 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003428 VIXL_ASSERT(allow_macro_instructions_);
3429 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003430 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003431 ITScope it_scope(this, &cond, guard);
Vincent Belliard609821f2017-02-08 14:17:25 -08003432 sbfx(cond, rd, rn, lsb, width);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003433 }
Vincent Belliard609821f2017-02-08 14:17:25 -08003434 void Sbfx(Register rd, Register rn, uint32_t lsb, uint32_t width) {
3435 Sbfx(al, rd, rn, lsb, width);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003436 }
3437
3438 void Sdiv(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003439 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3440 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3441 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003442 VIXL_ASSERT(allow_macro_instructions_);
3443 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003444 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003445 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003446 sdiv(cond, rd, rn, rm);
3447 }
3448 void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); }
3449
3450 void Sel(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003451 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3452 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3453 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003454 VIXL_ASSERT(allow_macro_instructions_);
3455 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003456 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003457 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003458 sel(cond, rd, rn, rm);
3459 }
3460 void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); }
3461
3462 void Shadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003463 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3464 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3465 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003466 VIXL_ASSERT(allow_macro_instructions_);
3467 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003468 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003469 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003470 shadd16(cond, rd, rn, rm);
3471 }
3472 void Shadd16(Register rd, Register rn, Register rm) {
3473 Shadd16(al, rd, rn, rm);
3474 }
3475
3476 void Shadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003477 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3478 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3479 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003480 VIXL_ASSERT(allow_macro_instructions_);
3481 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003482 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003483 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003484 shadd8(cond, rd, rn, rm);
3485 }
3486 void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); }
3487
3488 void Shasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003489 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3490 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3491 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003492 VIXL_ASSERT(allow_macro_instructions_);
3493 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003494 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003495 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003496 shasx(cond, rd, rn, rm);
3497 }
3498 void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); }
3499
3500 void Shsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003501 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3502 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3503 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003504 VIXL_ASSERT(allow_macro_instructions_);
3505 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003506 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003507 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003508 shsax(cond, rd, rn, rm);
3509 }
3510 void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); }
3511
3512 void Shsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003513 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3514 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3515 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003516 VIXL_ASSERT(allow_macro_instructions_);
3517 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003518 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003519 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003520 shsub16(cond, rd, rn, rm);
3521 }
3522 void Shsub16(Register rd, Register rn, Register rm) {
3523 Shsub16(al, rd, rn, rm);
3524 }
3525
3526 void Shsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003527 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3528 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3529 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003530 VIXL_ASSERT(allow_macro_instructions_);
3531 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003532 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003533 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003534 shsub8(cond, rd, rn, rm);
3535 }
3536 void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); }
3537
3538 void Smlabb(
3539 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003540 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3541 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3542 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3543 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003544 VIXL_ASSERT(allow_macro_instructions_);
3545 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003546 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003547 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003548 smlabb(cond, rd, rn, rm, ra);
3549 }
3550 void Smlabb(Register rd, Register rn, Register rm, Register ra) {
3551 Smlabb(al, rd, rn, rm, ra);
3552 }
3553
3554 void Smlabt(
3555 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003556 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3557 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3558 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3559 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003560 VIXL_ASSERT(allow_macro_instructions_);
3561 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003562 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003563 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003564 smlabt(cond, rd, rn, rm, ra);
3565 }
3566 void Smlabt(Register rd, Register rn, Register rm, Register ra) {
3567 Smlabt(al, rd, rn, rm, ra);
3568 }
3569
3570 void Smlad(
3571 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003572 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3573 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3574 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3575 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003576 VIXL_ASSERT(allow_macro_instructions_);
3577 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003578 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003579 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003580 smlad(cond, rd, rn, rm, ra);
3581 }
3582 void Smlad(Register rd, Register rn, Register rm, Register ra) {
3583 Smlad(al, rd, rn, rm, ra);
3584 }
3585
3586 void Smladx(
3587 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003588 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3589 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3590 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3591 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003592 VIXL_ASSERT(allow_macro_instructions_);
3593 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003594 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003595 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003596 smladx(cond, rd, rn, rm, ra);
3597 }
3598 void Smladx(Register rd, Register rn, Register rm, Register ra) {
3599 Smladx(al, rd, rn, rm, ra);
3600 }
3601
3602 void Smlal(
3603 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003604 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3605 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3606 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3607 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003608 VIXL_ASSERT(allow_macro_instructions_);
3609 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003610 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003611 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003612 smlal(cond, rdlo, rdhi, rn, rm);
3613 }
3614 void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) {
3615 Smlal(al, rdlo, rdhi, rn, rm);
3616 }
3617
3618 void Smlalbb(
3619 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003620 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3621 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3622 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3623 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003624 VIXL_ASSERT(allow_macro_instructions_);
3625 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003626 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003627 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003628 smlalbb(cond, rdlo, rdhi, rn, rm);
3629 }
3630 void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) {
3631 Smlalbb(al, rdlo, rdhi, rn, rm);
3632 }
3633
3634 void Smlalbt(
3635 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003636 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3637 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3638 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3639 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003640 VIXL_ASSERT(allow_macro_instructions_);
3641 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003642 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003643 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003644 smlalbt(cond, rdlo, rdhi, rn, rm);
3645 }
3646 void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) {
3647 Smlalbt(al, rdlo, rdhi, rn, rm);
3648 }
3649
3650 void Smlald(
3651 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003652 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3653 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3654 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3655 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003656 VIXL_ASSERT(allow_macro_instructions_);
3657 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003658 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003659 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003660 smlald(cond, rdlo, rdhi, rn, rm);
3661 }
3662 void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) {
3663 Smlald(al, rdlo, rdhi, rn, rm);
3664 }
3665
3666 void Smlaldx(
3667 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003668 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3669 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3670 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3671 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003672 VIXL_ASSERT(allow_macro_instructions_);
3673 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003674 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003675 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003676 smlaldx(cond, rdlo, rdhi, rn, rm);
3677 }
3678 void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) {
3679 Smlaldx(al, rdlo, rdhi, rn, rm);
3680 }
3681
3682 void Smlals(
3683 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003684 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3685 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3686 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3687 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003688 VIXL_ASSERT(allow_macro_instructions_);
3689 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003690 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003691 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003692 smlals(cond, rdlo, rdhi, rn, rm);
3693 }
3694 void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) {
3695 Smlals(al, rdlo, rdhi, rn, rm);
3696 }
3697
3698 void Smlaltb(
3699 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003700 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3701 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3702 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3703 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003704 VIXL_ASSERT(allow_macro_instructions_);
3705 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003706 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003707 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003708 smlaltb(cond, rdlo, rdhi, rn, rm);
3709 }
3710 void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) {
3711 Smlaltb(al, rdlo, rdhi, rn, rm);
3712 }
3713
3714 void Smlaltt(
3715 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003716 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3717 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3718 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3719 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003720 VIXL_ASSERT(allow_macro_instructions_);
3721 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003722 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003723 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003724 smlaltt(cond, rdlo, rdhi, rn, rm);
3725 }
3726 void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) {
3727 Smlaltt(al, rdlo, rdhi, rn, rm);
3728 }
3729
3730 void Smlatb(
3731 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003732 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3733 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3734 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3735 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003736 VIXL_ASSERT(allow_macro_instructions_);
3737 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003738 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003739 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003740 smlatb(cond, rd, rn, rm, ra);
3741 }
3742 void Smlatb(Register rd, Register rn, Register rm, Register ra) {
3743 Smlatb(al, rd, rn, rm, ra);
3744 }
3745
3746 void Smlatt(
3747 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003748 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3749 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3750 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3751 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003752 VIXL_ASSERT(allow_macro_instructions_);
3753 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003754 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003755 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003756 smlatt(cond, rd, rn, rm, ra);
3757 }
3758 void Smlatt(Register rd, Register rn, Register rm, Register ra) {
3759 Smlatt(al, rd, rn, rm, ra);
3760 }
3761
3762 void Smlawb(
3763 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003764 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3765 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3766 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3767 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003768 VIXL_ASSERT(allow_macro_instructions_);
3769 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003770 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003771 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003772 smlawb(cond, rd, rn, rm, ra);
3773 }
3774 void Smlawb(Register rd, Register rn, Register rm, Register ra) {
3775 Smlawb(al, rd, rn, rm, ra);
3776 }
3777
3778 void Smlawt(
3779 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003780 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3781 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3782 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3783 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003784 VIXL_ASSERT(allow_macro_instructions_);
3785 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003786 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003787 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003788 smlawt(cond, rd, rn, rm, ra);
3789 }
3790 void Smlawt(Register rd, Register rn, Register rm, Register ra) {
3791 Smlawt(al, rd, rn, rm, ra);
3792 }
3793
3794 void Smlsd(
3795 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003796 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3797 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3798 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3799 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003800 VIXL_ASSERT(allow_macro_instructions_);
3801 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003802 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003803 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003804 smlsd(cond, rd, rn, rm, ra);
3805 }
3806 void Smlsd(Register rd, Register rn, Register rm, Register ra) {
3807 Smlsd(al, rd, rn, rm, ra);
3808 }
3809
3810 void Smlsdx(
3811 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003812 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3813 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3814 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3815 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003816 VIXL_ASSERT(allow_macro_instructions_);
3817 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003818 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003819 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003820 smlsdx(cond, rd, rn, rm, ra);
3821 }
3822 void Smlsdx(Register rd, Register rn, Register rm, Register ra) {
3823 Smlsdx(al, rd, rn, rm, ra);
3824 }
3825
3826 void Smlsld(
3827 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003828 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3829 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3830 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3831 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003832 VIXL_ASSERT(allow_macro_instructions_);
3833 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003834 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003835 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003836 smlsld(cond, rdlo, rdhi, rn, rm);
3837 }
3838 void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) {
3839 Smlsld(al, rdlo, rdhi, rn, rm);
3840 }
3841
3842 void Smlsldx(
3843 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003844 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3845 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3846 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3847 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003848 VIXL_ASSERT(allow_macro_instructions_);
3849 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003850 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003851 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003852 smlsldx(cond, rdlo, rdhi, rn, rm);
3853 }
3854 void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) {
3855 Smlsldx(al, rdlo, rdhi, rn, rm);
3856 }
3857
3858 void Smmla(
3859 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003860 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3861 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3862 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3863 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003864 VIXL_ASSERT(allow_macro_instructions_);
3865 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003866 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003867 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003868 smmla(cond, rd, rn, rm, ra);
3869 }
3870 void Smmla(Register rd, Register rn, Register rm, Register ra) {
3871 Smmla(al, rd, rn, rm, ra);
3872 }
3873
3874 void Smmlar(
3875 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003876 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3877 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3878 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3879 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003880 VIXL_ASSERT(allow_macro_instructions_);
3881 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003882 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003883 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003884 smmlar(cond, rd, rn, rm, ra);
3885 }
3886 void Smmlar(Register rd, Register rn, Register rm, Register ra) {
3887 Smmlar(al, rd, rn, rm, ra);
3888 }
3889
3890 void Smmls(
3891 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003892 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3893 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3894 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3895 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003896 VIXL_ASSERT(allow_macro_instructions_);
3897 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003898 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003899 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003900 smmls(cond, rd, rn, rm, ra);
3901 }
3902 void Smmls(Register rd, Register rn, Register rm, Register ra) {
3903 Smmls(al, rd, rn, rm, ra);
3904 }
3905
3906 void Smmlsr(
3907 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003908 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3909 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3910 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
3911 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003912 VIXL_ASSERT(allow_macro_instructions_);
3913 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003914 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003915 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003916 smmlsr(cond, rd, rn, rm, ra);
3917 }
3918 void Smmlsr(Register rd, Register rn, Register rm, Register ra) {
3919 Smmlsr(al, rd, rn, rm, ra);
3920 }
3921
3922 void Smmul(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003923 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3924 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3925 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003926 VIXL_ASSERT(allow_macro_instructions_);
3927 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003928 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003929 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003930 smmul(cond, rd, rn, rm);
3931 }
3932 void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); }
3933
3934 void Smmulr(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003935 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3936 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3937 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003938 VIXL_ASSERT(allow_macro_instructions_);
3939 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003940 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003941 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003942 smmulr(cond, rd, rn, rm);
3943 }
3944 void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); }
3945
3946 void Smuad(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003947 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3948 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3949 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003950 VIXL_ASSERT(allow_macro_instructions_);
3951 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003952 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003953 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003954 smuad(cond, rd, rn, rm);
3955 }
3956 void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); }
3957
3958 void Smuadx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003959 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3960 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3961 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003962 VIXL_ASSERT(allow_macro_instructions_);
3963 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003964 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003965 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003966 smuadx(cond, rd, rn, rm);
3967 }
3968 void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); }
3969
3970 void Smulbb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003971 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3972 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3973 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003974 VIXL_ASSERT(allow_macro_instructions_);
3975 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003976 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003977 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003978 smulbb(cond, rd, rn, rm);
3979 }
3980 void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); }
3981
3982 void Smulbt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003983 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
3984 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3985 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01003986 VIXL_ASSERT(allow_macro_instructions_);
3987 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00003988 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00003989 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01003990 smulbt(cond, rd, rn, rm);
3991 }
3992 void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); }
3993
3994 void Smull(
3995 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00003996 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
3997 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
3998 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
3999 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004000 VIXL_ASSERT(allow_macro_instructions_);
4001 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004002 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004003 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004004 smull(cond, rdlo, rdhi, rn, rm);
4005 }
4006 void Smull(Register rdlo, Register rdhi, Register rn, Register rm) {
4007 Smull(al, rdlo, rdhi, rn, rm);
4008 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004009 void Smull(FlagsUpdate flags,
4010 Condition cond,
4011 Register rdlo,
4012 Register rdhi,
4013 Register rn,
4014 Register rm) {
4015 switch (flags) {
4016 case LeaveFlags:
4017 Smull(cond, rdlo, rdhi, rn, rm);
4018 break;
4019 case SetFlags:
4020 Smulls(cond, rdlo, rdhi, rn, rm);
4021 break;
4022 case DontCare:
4023 Smull(cond, rdlo, rdhi, rn, rm);
4024 break;
4025 }
4026 }
4027 void Smull(FlagsUpdate flags,
4028 Register rdlo,
4029 Register rdhi,
4030 Register rn,
4031 Register rm) {
4032 Smull(flags, al, rdlo, rdhi, rn, rm);
4033 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004034
4035 void Smulls(
4036 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004037 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4038 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4039 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4040 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004041 VIXL_ASSERT(allow_macro_instructions_);
4042 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004043 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004044 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004045 smulls(cond, rdlo, rdhi, rn, rm);
4046 }
4047 void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) {
4048 Smulls(al, rdlo, rdhi, rn, rm);
4049 }
4050
4051 void Smultb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004052 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4053 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4054 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004055 VIXL_ASSERT(allow_macro_instructions_);
4056 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004057 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004058 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004059 smultb(cond, rd, rn, rm);
4060 }
4061 void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); }
4062
4063 void Smultt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004064 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4065 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4066 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004067 VIXL_ASSERT(allow_macro_instructions_);
4068 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004069 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004070 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004071 smultt(cond, rd, rn, rm);
4072 }
4073 void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); }
4074
4075 void Smulwb(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004076 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4077 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4078 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004079 VIXL_ASSERT(allow_macro_instructions_);
4080 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004081 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004082 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004083 smulwb(cond, rd, rn, rm);
4084 }
4085 void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); }
4086
4087 void Smulwt(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004088 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4089 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4090 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004091 VIXL_ASSERT(allow_macro_instructions_);
4092 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004093 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004094 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004095 smulwt(cond, rd, rn, rm);
4096 }
4097 void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); }
4098
4099 void Smusd(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004100 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4101 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4102 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004103 VIXL_ASSERT(allow_macro_instructions_);
4104 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004105 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004106 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004107 smusd(cond, rd, rn, rm);
4108 }
4109 void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); }
4110
4111 void Smusdx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004112 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4113 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4114 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004115 VIXL_ASSERT(allow_macro_instructions_);
4116 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004117 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004118 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004119 smusdx(cond, rd, rn, rm);
4120 }
4121 void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); }
4122
4123 void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004124 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4125 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004126 VIXL_ASSERT(allow_macro_instructions_);
4127 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004128 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004129 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004130 ssat(cond, rd, imm, operand);
4131 }
4132 void Ssat(Register rd, uint32_t imm, const Operand& operand) {
4133 Ssat(al, rd, imm, operand);
4134 }
4135
4136 void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004137 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4138 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004139 VIXL_ASSERT(allow_macro_instructions_);
4140 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004141 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004142 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004143 ssat16(cond, rd, imm, rn);
4144 }
4145 void Ssat16(Register rd, uint32_t imm, Register rn) {
4146 Ssat16(al, rd, imm, rn);
4147 }
4148
4149 void Ssax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004150 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4151 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4152 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004153 VIXL_ASSERT(allow_macro_instructions_);
4154 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004155 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004156 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004157 ssax(cond, rd, rn, rm);
4158 }
4159 void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); }
4160
4161 void Ssub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004162 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4163 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4164 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004165 VIXL_ASSERT(allow_macro_instructions_);
4166 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004167 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004168 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004169 ssub16(cond, rd, rn, rm);
4170 }
4171 void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); }
4172
4173 void Ssub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004174 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4175 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4176 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004177 VIXL_ASSERT(allow_macro_instructions_);
4178 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004179 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004180 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004181 ssub8(cond, rd, rn, rm);
4182 }
4183 void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); }
4184
4185 void Stl(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004186 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4187 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004188 VIXL_ASSERT(allow_macro_instructions_);
4189 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004190 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004191 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004192 stl(cond, rt, operand);
4193 }
4194 void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); }
4195
4196 void Stlb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004197 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4198 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004199 VIXL_ASSERT(allow_macro_instructions_);
4200 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004201 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004202 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004203 stlb(cond, rt, operand);
4204 }
4205 void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); }
4206
4207 void Stlex(Condition cond,
4208 Register rd,
4209 Register rt,
4210 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004211 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4212 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4213 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004214 VIXL_ASSERT(allow_macro_instructions_);
4215 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004216 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004217 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004218 stlex(cond, rd, rt, operand);
4219 }
4220 void Stlex(Register rd, Register rt, const MemOperand& operand) {
4221 Stlex(al, rd, rt, operand);
4222 }
4223
4224 void Stlexb(Condition cond,
4225 Register rd,
4226 Register rt,
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(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004231 VIXL_ASSERT(allow_macro_instructions_);
4232 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004233 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004234 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004235 stlexb(cond, rd, rt, operand);
4236 }
4237 void Stlexb(Register rd, Register rt, const MemOperand& operand) {
4238 Stlexb(al, rd, rt, operand);
4239 }
4240
4241 void Stlexd(Condition cond,
4242 Register rd,
4243 Register rt,
4244 Register rt2,
4245 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004246 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4247 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4248 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4249 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004250 VIXL_ASSERT(allow_macro_instructions_);
4251 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004252 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004253 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004254 stlexd(cond, rd, rt, rt2, operand);
4255 }
4256 void Stlexd(Register rd,
4257 Register rt,
4258 Register rt2,
4259 const MemOperand& operand) {
4260 Stlexd(al, rd, rt, rt2, operand);
4261 }
4262
4263 void Stlexh(Condition cond,
4264 Register rd,
4265 Register rt,
4266 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004267 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4268 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4269 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004270 VIXL_ASSERT(allow_macro_instructions_);
4271 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004272 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004273 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004274 stlexh(cond, rd, rt, operand);
4275 }
4276 void Stlexh(Register rd, Register rt, const MemOperand& operand) {
4277 Stlexh(al, rd, rt, operand);
4278 }
4279
4280 void Stlh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004281 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4282 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004283 VIXL_ASSERT(allow_macro_instructions_);
4284 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004285 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004286 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004287 stlh(cond, rt, operand);
4288 }
4289 void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); }
4290
4291 void Stm(Condition cond,
4292 Register rn,
4293 WriteBack write_back,
4294 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004295 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4296 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004297 VIXL_ASSERT(allow_macro_instructions_);
4298 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004299 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004300 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004301 stm(cond, rn, write_back, registers);
4302 }
4303 void Stm(Register rn, WriteBack write_back, RegisterList registers) {
4304 Stm(al, rn, write_back, registers);
4305 }
4306
4307 void Stmda(Condition cond,
4308 Register rn,
4309 WriteBack write_back,
4310 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004311 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4312 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004313 VIXL_ASSERT(allow_macro_instructions_);
4314 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004315 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004316 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004317 stmda(cond, rn, write_back, registers);
4318 }
4319 void Stmda(Register rn, WriteBack write_back, RegisterList registers) {
4320 Stmda(al, rn, write_back, registers);
4321 }
4322
4323 void Stmdb(Condition cond,
4324 Register rn,
4325 WriteBack write_back,
4326 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004327 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4328 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004329 VIXL_ASSERT(allow_macro_instructions_);
4330 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004331 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004332 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004333 stmdb(cond, rn, write_back, registers);
4334 }
4335 void Stmdb(Register rn, WriteBack write_back, RegisterList registers) {
4336 Stmdb(al, rn, write_back, registers);
4337 }
4338
4339 void Stmea(Condition cond,
4340 Register rn,
4341 WriteBack write_back,
4342 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004343 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4344 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004345 VIXL_ASSERT(allow_macro_instructions_);
4346 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004347 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004348 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004349 stmea(cond, rn, write_back, registers);
4350 }
4351 void Stmea(Register rn, WriteBack write_back, RegisterList registers) {
4352 Stmea(al, rn, write_back, registers);
4353 }
4354
4355 void Stmed(Condition cond,
4356 Register rn,
4357 WriteBack write_back,
4358 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004359 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4360 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004361 VIXL_ASSERT(allow_macro_instructions_);
4362 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004363 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004364 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004365 stmed(cond, rn, write_back, registers);
4366 }
4367 void Stmed(Register rn, WriteBack write_back, RegisterList registers) {
4368 Stmed(al, rn, write_back, registers);
4369 }
4370
4371 void Stmfa(Condition cond,
4372 Register rn,
4373 WriteBack write_back,
4374 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004375 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4376 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004377 VIXL_ASSERT(allow_macro_instructions_);
4378 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004379 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004380 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004381 stmfa(cond, rn, write_back, registers);
4382 }
4383 void Stmfa(Register rn, WriteBack write_back, RegisterList registers) {
4384 Stmfa(al, rn, write_back, registers);
4385 }
4386
4387 void Stmfd(Condition cond,
4388 Register rn,
4389 WriteBack write_back,
4390 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004391 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4392 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004393 VIXL_ASSERT(allow_macro_instructions_);
4394 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004395 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004396 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004397 stmfd(cond, rn, write_back, registers);
4398 }
4399 void Stmfd(Register rn, WriteBack write_back, RegisterList registers) {
4400 Stmfd(al, rn, write_back, registers);
4401 }
4402
4403 void Stmib(Condition cond,
4404 Register rn,
4405 WriteBack write_back,
4406 RegisterList registers) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004407 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4408 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004409 VIXL_ASSERT(allow_macro_instructions_);
4410 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004411 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004412 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004413 stmib(cond, rn, write_back, registers);
4414 }
4415 void Stmib(Register rn, WriteBack write_back, RegisterList registers) {
4416 Stmib(al, rn, write_back, registers);
4417 }
4418
4419 void Str(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004420 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4421 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004422 VIXL_ASSERT(allow_macro_instructions_);
4423 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004424 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004425 bool can_use_it =
4426 // STR{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4427 (operand.IsImmediate() && rt.IsLow() &&
4428 operand.GetBaseRegister().IsLow() &&
4429 operand.IsOffsetImmediateWithinRange(0, 124, 4) &&
4430 (operand.GetAddrMode() == Offset)) ||
4431 // STR{<c>}{<q>} <Rt>, [SP{, #{+}<imm>}] ; T2
4432 (operand.IsImmediate() && rt.IsLow() &&
4433 operand.GetBaseRegister().IsSP() &&
4434 operand.IsOffsetImmediateWithinRange(0, 1020, 4) &&
4435 (operand.GetAddrMode() == Offset)) ||
4436 // STR{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4437 (operand.IsPlainRegister() && rt.IsLow() &&
4438 operand.GetBaseRegister().IsLow() &&
4439 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4440 (operand.GetAddrMode() == Offset));
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004441 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004442 str(cond, rt, operand);
4443 }
4444 void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); }
4445
4446 void Strb(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004447 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4448 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004449 VIXL_ASSERT(allow_macro_instructions_);
4450 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004451 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004452 bool can_use_it =
4453 // STRB{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4454 (operand.IsImmediate() && rt.IsLow() &&
4455 operand.GetBaseRegister().IsLow() &&
4456 operand.IsOffsetImmediateWithinRange(0, 31) &&
4457 (operand.GetAddrMode() == Offset)) ||
4458 // STRB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4459 (operand.IsPlainRegister() && rt.IsLow() &&
4460 operand.GetBaseRegister().IsLow() &&
4461 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4462 (operand.GetAddrMode() == Offset));
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004463 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004464 strb(cond, rt, operand);
4465 }
4466 void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); }
4467
4468 void Strd(Condition cond,
4469 Register rt,
4470 Register rt2,
4471 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004472 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4473 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4474 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004475 VIXL_ASSERT(allow_macro_instructions_);
4476 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004477 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004478 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004479 strd(cond, rt, rt2, operand);
4480 }
4481 void Strd(Register rt, Register rt2, const MemOperand& operand) {
4482 Strd(al, rt, rt2, operand);
4483 }
4484
4485 void Strex(Condition cond,
4486 Register rd,
4487 Register rt,
4488 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004489 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4490 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4491 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004492 VIXL_ASSERT(allow_macro_instructions_);
4493 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004494 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004495 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004496 strex(cond, rd, rt, operand);
4497 }
4498 void Strex(Register rd, Register rt, const MemOperand& operand) {
4499 Strex(al, rd, rt, operand);
4500 }
4501
4502 void Strexb(Condition cond,
4503 Register rd,
4504 Register rt,
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(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004509 VIXL_ASSERT(allow_macro_instructions_);
4510 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004511 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004512 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004513 strexb(cond, rd, rt, operand);
4514 }
4515 void Strexb(Register rd, Register rt, const MemOperand& operand) {
4516 Strexb(al, rd, rt, operand);
4517 }
4518
4519 void Strexd(Condition cond,
4520 Register rd,
4521 Register rt,
4522 Register rt2,
4523 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004524 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4525 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4526 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
4527 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004528 VIXL_ASSERT(allow_macro_instructions_);
4529 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004530 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004531 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004532 strexd(cond, rd, rt, rt2, operand);
4533 }
4534 void Strexd(Register rd,
4535 Register rt,
4536 Register rt2,
4537 const MemOperand& operand) {
4538 Strexd(al, rd, rt, rt2, operand);
4539 }
4540
4541 void Strexh(Condition cond,
4542 Register rd,
4543 Register rt,
4544 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004545 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4546 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4547 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004548 VIXL_ASSERT(allow_macro_instructions_);
4549 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004550 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004551 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004552 strexh(cond, rd, rt, operand);
4553 }
4554 void Strexh(Register rd, Register rt, const MemOperand& operand) {
4555 Strexh(al, rd, rt, operand);
4556 }
4557
4558 void Strh(Condition cond, Register rt, const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004559 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
4560 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004561 VIXL_ASSERT(allow_macro_instructions_);
4562 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004563 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004564 bool can_use_it =
4565 // STRH{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1
4566 (operand.IsImmediate() && rt.IsLow() &&
4567 operand.GetBaseRegister().IsLow() &&
4568 operand.IsOffsetImmediateWithinRange(0, 62, 2) &&
4569 (operand.GetAddrMode() == Offset)) ||
4570 // STRH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1
4571 (operand.IsPlainRegister() && rt.IsLow() &&
4572 operand.GetBaseRegister().IsLow() &&
4573 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() &&
4574 (operand.GetAddrMode() == Offset));
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004575 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004576 strh(cond, rt, operand);
4577 }
4578 void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); }
4579
4580 void Sub(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004581 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4582 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4583 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004584 VIXL_ASSERT(allow_macro_instructions_);
4585 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004586 MacroEmissionCheckScope guard(this);
Alexandre Rames628c5262016-09-21 11:52:30 +01004587 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) {
4588 uint32_t immediate = operand.GetImmediate();
4589 if (immediate == 0) {
4590 return;
4591 }
4592 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004593 bool can_use_it =
4594 // SUB<c>{<q>} <Rd>, <Rn>, #<imm3> ; T1
4595 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() &&
4596 rd.IsLow()) ||
4597 // SUB<c>{<q>} {<Rdn>,} <Rdn>, #<imm8> ; T2
4598 (operand.IsImmediate() && (operand.GetImmediate() <= 255) &&
4599 rd.IsLow() && rn.Is(rd)) ||
4600 // SUB<c>{<q>} <Rd>, <Rn>, <Rm>
4601 (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
4602 operand.GetBaseRegister().IsLow());
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004603 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004604 sub(cond, rd, rn, operand);
4605 }
4606 void Sub(Register rd, Register rn, const Operand& operand) {
4607 Sub(al, rd, rn, operand);
4608 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004609 void Sub(FlagsUpdate flags,
4610 Condition cond,
4611 Register rd,
4612 Register rn,
4613 const Operand& operand) {
4614 switch (flags) {
4615 case LeaveFlags:
4616 Sub(cond, rd, rn, operand);
4617 break;
4618 case SetFlags:
4619 Subs(cond, rd, rn, operand);
4620 break;
4621 case DontCare:
Georgia Kouveli4443cf92016-12-08 11:34:57 +00004622 bool setflags_is_smaller =
Vincent Belliard934696d2016-08-18 11:03:56 -07004623 IsUsingT32() && cond.Is(al) &&
4624 ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() &&
4625 operand.GetBaseRegister().IsLow()) ||
4626 (operand.IsImmediate() &&
4627 ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) ||
4628 (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256)))));
Georgia Kouveli4443cf92016-12-08 11:34:57 +00004629 if (setflags_is_smaller) {
Vincent Belliard934696d2016-08-18 11:03:56 -07004630 Subs(cond, rd, rn, operand);
4631 } else {
Georgia Kouvelidd8e4912016-12-12 16:42:30 +00004632 bool changed_op_is_smaller =
4633 operand.IsImmediate() && (operand.GetSignedImmediate() < 0) &&
4634 ((rd.IsLow() && rn.IsLow() &&
4635 (operand.GetSignedImmediate() >= -7)) ||
4636 (rd.IsLow() && rn.Is(rd) &&
4637 (operand.GetSignedImmediate() >= -255)));
4638 if (changed_op_is_smaller) {
4639 Adds(cond, rd, rn, -operand.GetSignedImmediate());
4640 } else {
4641 Sub(cond, rd, rn, operand);
4642 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004643 }
4644 break;
4645 }
4646 }
4647 void Sub(FlagsUpdate flags,
4648 Register rd,
4649 Register rn,
4650 const Operand& operand) {
4651 Sub(flags, al, rd, rn, operand);
4652 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004653
4654 void Subs(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004655 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4656 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4657 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004658 VIXL_ASSERT(allow_macro_instructions_);
4659 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004660 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004661 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004662 subs(cond, rd, rn, operand);
4663 }
4664 void Subs(Register rd, Register rn, const Operand& operand) {
4665 Subs(al, rd, rn, operand);
4666 }
4667
Alexandre Ramesd3832962016-07-04 15:03:43 +01004668 void Svc(Condition cond, uint32_t imm) {
4669 VIXL_ASSERT(allow_macro_instructions_);
4670 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004671 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004672 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004673 svc(cond, imm);
4674 }
4675 void Svc(uint32_t imm) { Svc(al, imm); }
4676
4677 void Sxtab(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004678 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4679 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4680 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004681 VIXL_ASSERT(allow_macro_instructions_);
4682 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004683 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004684 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004685 sxtab(cond, rd, rn, operand);
4686 }
4687 void Sxtab(Register rd, Register rn, const Operand& operand) {
4688 Sxtab(al, rd, rn, operand);
4689 }
4690
4691 void Sxtab16(Condition cond,
4692 Register rd,
4693 Register rn,
4694 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4696 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4697 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004698 VIXL_ASSERT(allow_macro_instructions_);
4699 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004700 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004701 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004702 sxtab16(cond, rd, rn, operand);
4703 }
4704 void Sxtab16(Register rd, Register rn, const Operand& operand) {
4705 Sxtab16(al, rd, rn, operand);
4706 }
4707
4708 void Sxtah(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004709 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4710 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4711 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004712 VIXL_ASSERT(allow_macro_instructions_);
4713 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004714 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004715 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004716 sxtah(cond, rd, rn, operand);
4717 }
4718 void Sxtah(Register rd, Register rn, const Operand& operand) {
4719 Sxtah(al, rd, rn, operand);
4720 }
4721
4722 void Sxtb(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004723 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4724 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004725 VIXL_ASSERT(allow_macro_instructions_);
4726 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004727 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004728 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004729 sxtb(cond, rd, operand);
4730 }
4731 void Sxtb(Register rd, const Operand& operand) { Sxtb(al, rd, operand); }
4732
4733 void Sxtb16(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004734 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4735 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004736 VIXL_ASSERT(allow_macro_instructions_);
4737 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004738 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004739 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004740 sxtb16(cond, rd, operand);
4741 }
4742 void Sxtb16(Register rd, const Operand& operand) { Sxtb16(al, rd, operand); }
4743
4744 void Sxth(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004745 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4746 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004747 VIXL_ASSERT(allow_macro_instructions_);
4748 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004749 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004750 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004751 sxth(cond, rd, operand);
4752 }
4753 void Sxth(Register rd, const Operand& operand) { Sxth(al, rd, operand); }
4754
Alexandre Ramesd3832962016-07-04 15:03:43 +01004755 void Teq(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004756 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4757 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004758 VIXL_ASSERT(allow_macro_instructions_);
4759 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004760 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004761 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004762 teq(cond, rn, operand);
4763 }
4764 void Teq(Register rn, const Operand& operand) { Teq(al, rn, operand); }
4765
4766 void Tst(Condition cond, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004767 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4768 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004769 VIXL_ASSERT(allow_macro_instructions_);
4770 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004771 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004772 bool can_use_it =
4773 // TST{<c>}{<q>} <Rn>, <Rm> ; T1
4774 operand.IsPlainRegister() && rn.IsLow() &&
4775 operand.GetBaseRegister().IsLow();
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004776 ITScope it_scope(this, &cond, guard, can_use_it);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004777 tst(cond, rn, operand);
4778 }
4779 void Tst(Register rn, const Operand& operand) { Tst(al, rn, operand); }
4780
4781 void Uadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004782 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4783 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4784 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004785 VIXL_ASSERT(allow_macro_instructions_);
4786 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004787 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004788 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004789 uadd16(cond, rd, rn, rm);
4790 }
4791 void Uadd16(Register rd, Register rn, Register rm) { Uadd16(al, rd, rn, rm); }
4792
4793 void Uadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004794 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4795 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4796 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004797 VIXL_ASSERT(allow_macro_instructions_);
4798 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004799 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004800 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004801 uadd8(cond, rd, rn, rm);
4802 }
4803 void Uadd8(Register rd, Register rn, Register rm) { Uadd8(al, rd, rn, rm); }
4804
4805 void Uasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004806 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4807 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4808 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004809 VIXL_ASSERT(allow_macro_instructions_);
4810 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004811 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004812 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004813 uasx(cond, rd, rn, rm);
4814 }
4815 void Uasx(Register rd, Register rn, Register rm) { Uasx(al, rd, rn, rm); }
4816
Vincent Belliard609821f2017-02-08 14:17:25 -08004817 void Ubfx(
4818 Condition cond, Register rd, Register rn, uint32_t lsb, uint32_t width) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004819 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4820 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004821 VIXL_ASSERT(allow_macro_instructions_);
4822 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004823 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004824 ITScope it_scope(this, &cond, guard);
Vincent Belliard609821f2017-02-08 14:17:25 -08004825 ubfx(cond, rd, rn, lsb, width);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004826 }
Vincent Belliard609821f2017-02-08 14:17:25 -08004827 void Ubfx(Register rd, Register rn, uint32_t lsb, uint32_t width) {
4828 Ubfx(al, rd, rn, lsb, width);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004829 }
4830
4831 void Udf(Condition cond, uint32_t imm) {
4832 VIXL_ASSERT(allow_macro_instructions_);
4833 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004834 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004835 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004836 udf(cond, imm);
4837 }
4838 void Udf(uint32_t imm) { Udf(al, imm); }
4839
4840 void Udiv(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004841 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4842 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4843 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004844 VIXL_ASSERT(allow_macro_instructions_);
4845 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004846 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004847 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004848 udiv(cond, rd, rn, rm);
4849 }
4850 void Udiv(Register rd, Register rn, Register rm) { Udiv(al, rd, rn, rm); }
4851
4852 void Uhadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004853 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4854 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4855 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004856 VIXL_ASSERT(allow_macro_instructions_);
4857 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004858 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004859 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004860 uhadd16(cond, rd, rn, rm);
4861 }
4862 void Uhadd16(Register rd, Register rn, Register rm) {
4863 Uhadd16(al, rd, rn, rm);
4864 }
4865
4866 void Uhadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004867 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4868 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4869 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004870 VIXL_ASSERT(allow_macro_instructions_);
4871 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004872 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004873 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004874 uhadd8(cond, rd, rn, rm);
4875 }
4876 void Uhadd8(Register rd, Register rn, Register rm) { Uhadd8(al, rd, rn, rm); }
4877
4878 void Uhasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004879 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4880 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4881 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004882 VIXL_ASSERT(allow_macro_instructions_);
4883 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004884 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004885 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004886 uhasx(cond, rd, rn, rm);
4887 }
4888 void Uhasx(Register rd, Register rn, Register rm) { Uhasx(al, rd, rn, rm); }
4889
4890 void Uhsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004891 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4892 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4893 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004894 VIXL_ASSERT(allow_macro_instructions_);
4895 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004896 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004897 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004898 uhsax(cond, rd, rn, rm);
4899 }
4900 void Uhsax(Register rd, Register rn, Register rm) { Uhsax(al, rd, rn, rm); }
4901
4902 void Uhsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004903 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4904 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4905 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004906 VIXL_ASSERT(allow_macro_instructions_);
4907 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004908 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004909 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004910 uhsub16(cond, rd, rn, rm);
4911 }
4912 void Uhsub16(Register rd, Register rn, Register rm) {
4913 Uhsub16(al, rd, rn, rm);
4914 }
4915
4916 void Uhsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004917 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
4918 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4919 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004920 VIXL_ASSERT(allow_macro_instructions_);
4921 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004922 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004923 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004924 uhsub8(cond, rd, rn, rm);
4925 }
4926 void Uhsub8(Register rd, Register rn, Register rm) { Uhsub8(al, rd, rn, rm); }
4927
4928 void Umaal(
4929 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004930 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4931 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4932 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4933 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004934 VIXL_ASSERT(allow_macro_instructions_);
4935 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004936 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004937 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004938 umaal(cond, rdlo, rdhi, rn, rm);
4939 }
4940 void Umaal(Register rdlo, Register rdhi, Register rn, Register rm) {
4941 Umaal(al, rdlo, rdhi, rn, rm);
4942 }
4943
4944 void Umlal(
4945 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004946 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4947 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4948 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4949 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004950 VIXL_ASSERT(allow_macro_instructions_);
4951 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004952 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004953 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004954 umlal(cond, rdlo, rdhi, rn, rm);
4955 }
4956 void Umlal(Register rdlo, Register rdhi, Register rn, Register rm) {
4957 Umlal(al, rdlo, rdhi, rn, rm);
4958 }
Vincent Belliard934696d2016-08-18 11:03:56 -07004959 void Umlal(FlagsUpdate flags,
4960 Condition cond,
4961 Register rdlo,
4962 Register rdhi,
4963 Register rn,
4964 Register rm) {
4965 switch (flags) {
4966 case LeaveFlags:
4967 Umlal(cond, rdlo, rdhi, rn, rm);
4968 break;
4969 case SetFlags:
4970 Umlals(cond, rdlo, rdhi, rn, rm);
4971 break;
4972 case DontCare:
4973 Umlal(cond, rdlo, rdhi, rn, rm);
4974 break;
4975 }
4976 }
4977 void Umlal(FlagsUpdate flags,
4978 Register rdlo,
4979 Register rdhi,
4980 Register rn,
4981 Register rm) {
4982 Umlal(flags, al, rdlo, rdhi, rn, rm);
4983 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01004984
4985 void Umlals(
4986 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00004987 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
4988 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
4989 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
4990 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01004991 VIXL_ASSERT(allow_macro_instructions_);
4992 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00004993 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00004994 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01004995 umlals(cond, rdlo, rdhi, rn, rm);
4996 }
4997 void Umlals(Register rdlo, Register rdhi, Register rn, Register rm) {
4998 Umlals(al, rdlo, rdhi, rn, rm);
4999 }
5000
5001 void Umull(
5002 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005003 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
5004 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
5005 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5006 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005007 VIXL_ASSERT(allow_macro_instructions_);
5008 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005009 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005010 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005011 umull(cond, rdlo, rdhi, rn, rm);
5012 }
5013 void Umull(Register rdlo, Register rdhi, Register rn, Register rm) {
5014 Umull(al, rdlo, rdhi, rn, rm);
5015 }
Vincent Belliard934696d2016-08-18 11:03:56 -07005016 void Umull(FlagsUpdate flags,
5017 Condition cond,
5018 Register rdlo,
5019 Register rdhi,
5020 Register rn,
5021 Register rm) {
5022 switch (flags) {
5023 case LeaveFlags:
5024 Umull(cond, rdlo, rdhi, rn, rm);
5025 break;
5026 case SetFlags:
5027 Umulls(cond, rdlo, rdhi, rn, rm);
5028 break;
5029 case DontCare:
5030 Umull(cond, rdlo, rdhi, rn, rm);
5031 break;
5032 }
5033 }
5034 void Umull(FlagsUpdate flags,
5035 Register rdlo,
5036 Register rdhi,
5037 Register rn,
5038 Register rm) {
5039 Umull(flags, al, rdlo, rdhi, rn, rm);
5040 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01005041
5042 void Umulls(
5043 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005044 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo));
5045 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi));
5046 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5047 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005048 VIXL_ASSERT(allow_macro_instructions_);
5049 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005050 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005051 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005052 umulls(cond, rdlo, rdhi, rn, rm);
5053 }
5054 void Umulls(Register rdlo, Register rdhi, Register rn, Register rm) {
5055 Umulls(al, rdlo, rdhi, rn, rm);
5056 }
5057
5058 void Uqadd16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005059 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5060 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5061 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005062 VIXL_ASSERT(allow_macro_instructions_);
5063 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005064 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005065 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005066 uqadd16(cond, rd, rn, rm);
5067 }
5068 void Uqadd16(Register rd, Register rn, Register rm) {
5069 Uqadd16(al, rd, rn, rm);
5070 }
5071
5072 void Uqadd8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005073 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5074 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5075 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005076 VIXL_ASSERT(allow_macro_instructions_);
5077 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005078 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005079 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005080 uqadd8(cond, rd, rn, rm);
5081 }
5082 void Uqadd8(Register rd, Register rn, Register rm) { Uqadd8(al, rd, rn, rm); }
5083
5084 void Uqasx(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005085 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5086 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5087 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005088 VIXL_ASSERT(allow_macro_instructions_);
5089 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005090 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005091 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005092 uqasx(cond, rd, rn, rm);
5093 }
5094 void Uqasx(Register rd, Register rn, Register rm) { Uqasx(al, rd, rn, rm); }
5095
5096 void Uqsax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005097 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5098 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5099 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005100 VIXL_ASSERT(allow_macro_instructions_);
5101 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005102 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005103 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005104 uqsax(cond, rd, rn, rm);
5105 }
5106 void Uqsax(Register rd, Register rn, Register rm) { Uqsax(al, rd, rn, rm); }
5107
5108 void Uqsub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005109 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5110 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5111 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005112 VIXL_ASSERT(allow_macro_instructions_);
5113 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005114 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005115 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005116 uqsub16(cond, rd, rn, rm);
5117 }
5118 void Uqsub16(Register rd, Register rn, Register rm) {
5119 Uqsub16(al, rd, rn, rm);
5120 }
5121
5122 void Uqsub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005123 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5124 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5125 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005126 VIXL_ASSERT(allow_macro_instructions_);
5127 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005128 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005129 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005130 uqsub8(cond, rd, rn, rm);
5131 }
5132 void Uqsub8(Register rd, Register rn, Register rm) { Uqsub8(al, rd, rn, rm); }
5133
5134 void Usad8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005135 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5136 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5137 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005138 VIXL_ASSERT(allow_macro_instructions_);
5139 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005140 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005141 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005142 usad8(cond, rd, rn, rm);
5143 }
5144 void Usad8(Register rd, Register rn, Register rm) { Usad8(al, rd, rn, rm); }
5145
5146 void Usada8(
5147 Condition cond, Register rd, Register rn, Register rm, Register ra) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005148 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5149 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5150 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5151 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005152 VIXL_ASSERT(allow_macro_instructions_);
5153 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005154 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005155 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005156 usada8(cond, rd, rn, rm, ra);
5157 }
5158 void Usada8(Register rd, Register rn, Register rm, Register ra) {
5159 Usada8(al, rd, rn, rm, ra);
5160 }
5161
5162 void Usat(Condition cond, Register rd, uint32_t imm, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005163 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5164 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005165 VIXL_ASSERT(allow_macro_instructions_);
5166 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005167 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005168 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005169 usat(cond, rd, imm, operand);
5170 }
5171 void Usat(Register rd, uint32_t imm, const Operand& operand) {
5172 Usat(al, rd, imm, operand);
5173 }
5174
5175 void Usat16(Condition cond, Register rd, uint32_t imm, Register rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005176 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5177 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005178 VIXL_ASSERT(allow_macro_instructions_);
5179 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005180 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005181 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005182 usat16(cond, rd, imm, rn);
5183 }
5184 void Usat16(Register rd, uint32_t imm, Register rn) {
5185 Usat16(al, rd, imm, rn);
5186 }
5187
5188 void Usax(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005189 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5190 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5191 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005192 VIXL_ASSERT(allow_macro_instructions_);
5193 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005194 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005195 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005196 usax(cond, rd, rn, rm);
5197 }
5198 void Usax(Register rd, Register rn, Register rm) { Usax(al, rd, rn, rm); }
5199
5200 void Usub16(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005201 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5202 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5203 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005204 VIXL_ASSERT(allow_macro_instructions_);
5205 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005206 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005207 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005208 usub16(cond, rd, rn, rm);
5209 }
5210 void Usub16(Register rd, Register rn, Register rm) { Usub16(al, rd, rn, rm); }
5211
5212 void Usub8(Condition cond, Register rd, Register rn, Register rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005213 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5214 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5215 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005216 VIXL_ASSERT(allow_macro_instructions_);
5217 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005218 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005219 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005220 usub8(cond, rd, rn, rm);
5221 }
5222 void Usub8(Register rd, Register rn, Register rm) { Usub8(al, rd, rn, rm); }
5223
5224 void Uxtab(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005225 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5226 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5227 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005228 VIXL_ASSERT(allow_macro_instructions_);
5229 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005230 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005231 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005232 uxtab(cond, rd, rn, operand);
5233 }
5234 void Uxtab(Register rd, Register rn, const Operand& operand) {
5235 Uxtab(al, rd, rn, operand);
5236 }
5237
5238 void Uxtab16(Condition cond,
5239 Register rd,
5240 Register rn,
5241 const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005242 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5243 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5244 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005245 VIXL_ASSERT(allow_macro_instructions_);
5246 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005247 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005248 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005249 uxtab16(cond, rd, rn, operand);
5250 }
5251 void Uxtab16(Register rd, Register rn, const Operand& operand) {
5252 Uxtab16(al, rd, rn, operand);
5253 }
5254
5255 void Uxtah(Condition cond, Register rd, Register rn, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005256 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5257 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5258 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005259 VIXL_ASSERT(allow_macro_instructions_);
5260 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005261 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005262 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005263 uxtah(cond, rd, rn, operand);
5264 }
5265 void Uxtah(Register rd, Register rn, const Operand& operand) {
5266 Uxtah(al, rd, rn, operand);
5267 }
5268
5269 void Uxtb(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005270 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5271 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005272 VIXL_ASSERT(allow_macro_instructions_);
5273 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005274 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005275 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005276 uxtb(cond, rd, operand);
5277 }
5278 void Uxtb(Register rd, const Operand& operand) { Uxtb(al, rd, operand); }
5279
5280 void Uxtb16(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005281 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5282 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005283 VIXL_ASSERT(allow_macro_instructions_);
5284 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005285 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005286 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005287 uxtb16(cond, rd, operand);
5288 }
5289 void Uxtb16(Register rd, const Operand& operand) { Uxtb16(al, rd, operand); }
5290
5291 void Uxth(Condition cond, Register rd, const Operand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005292 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5293 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005294 VIXL_ASSERT(allow_macro_instructions_);
5295 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005296 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005297 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005298 uxth(cond, rd, operand);
5299 }
5300 void Uxth(Register rd, const Operand& operand) { Uxth(al, rd, operand); }
5301
5302 void Vaba(
5303 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005304 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5305 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5306 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005307 VIXL_ASSERT(allow_macro_instructions_);
5308 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005309 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005310 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005311 vaba(cond, dt, rd, rn, rm);
5312 }
5313 void Vaba(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5314 Vaba(al, dt, rd, rn, rm);
5315 }
5316
5317 void Vaba(
5318 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005319 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5320 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5321 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005322 VIXL_ASSERT(allow_macro_instructions_);
5323 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005324 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005325 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005326 vaba(cond, dt, rd, rn, rm);
5327 }
5328 void Vaba(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5329 Vaba(al, dt, rd, rn, rm);
5330 }
5331
5332 void Vabal(
5333 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005334 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5335 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5336 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005337 VIXL_ASSERT(allow_macro_instructions_);
5338 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005339 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005340 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005341 vabal(cond, dt, rd, rn, rm);
5342 }
5343 void Vabal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5344 Vabal(al, dt, rd, rn, rm);
5345 }
5346
5347 void Vabd(
5348 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005349 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5350 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5351 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005352 VIXL_ASSERT(allow_macro_instructions_);
5353 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005354 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005355 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005356 vabd(cond, dt, rd, rn, rm);
5357 }
5358 void Vabd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5359 Vabd(al, dt, rd, rn, rm);
5360 }
5361
5362 void Vabd(
5363 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005364 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5365 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5366 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005367 VIXL_ASSERT(allow_macro_instructions_);
5368 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005369 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005370 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005371 vabd(cond, dt, rd, rn, rm);
5372 }
5373 void Vabd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5374 Vabd(al, dt, rd, rn, rm);
5375 }
5376
5377 void Vabdl(
5378 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005379 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5380 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5381 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005382 VIXL_ASSERT(allow_macro_instructions_);
5383 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005384 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005385 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005386 vabdl(cond, dt, rd, rn, rm);
5387 }
5388 void Vabdl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5389 Vabdl(al, dt, rd, rn, rm);
5390 }
5391
5392 void Vabs(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005393 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5394 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005395 VIXL_ASSERT(allow_macro_instructions_);
5396 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005397 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005398 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005399 vabs(cond, dt, rd, rm);
5400 }
5401 void Vabs(DataType dt, DRegister rd, DRegister rm) { Vabs(al, dt, rd, rm); }
5402
5403 void Vabs(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005404 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5405 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005406 VIXL_ASSERT(allow_macro_instructions_);
5407 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005408 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005409 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005410 vabs(cond, dt, rd, rm);
5411 }
5412 void Vabs(DataType dt, QRegister rd, QRegister rm) { Vabs(al, dt, rd, rm); }
5413
5414 void Vabs(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005415 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5416 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005417 VIXL_ASSERT(allow_macro_instructions_);
5418 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005419 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005420 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005421 vabs(cond, dt, rd, rm);
5422 }
5423 void Vabs(DataType dt, SRegister rd, SRegister rm) { Vabs(al, dt, rd, rm); }
5424
5425 void Vacge(
5426 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005427 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5428 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5429 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005430 VIXL_ASSERT(allow_macro_instructions_);
5431 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005432 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005433 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005434 vacge(cond, dt, rd, rn, rm);
5435 }
5436 void Vacge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5437 Vacge(al, dt, rd, rn, rm);
5438 }
5439
5440 void Vacge(
5441 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005442 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5443 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5444 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005445 VIXL_ASSERT(allow_macro_instructions_);
5446 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005447 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005448 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005449 vacge(cond, dt, rd, rn, rm);
5450 }
5451 void Vacge(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5452 Vacge(al, dt, rd, rn, rm);
5453 }
5454
5455 void Vacgt(
5456 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005457 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5458 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5459 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005460 VIXL_ASSERT(allow_macro_instructions_);
5461 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005462 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005463 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005464 vacgt(cond, dt, rd, rn, rm);
5465 }
5466 void Vacgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5467 Vacgt(al, dt, rd, rn, rm);
5468 }
5469
5470 void Vacgt(
5471 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005472 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5473 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5474 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005475 VIXL_ASSERT(allow_macro_instructions_);
5476 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005477 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005478 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005479 vacgt(cond, dt, rd, rn, rm);
5480 }
5481 void Vacgt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5482 Vacgt(al, dt, rd, rn, rm);
5483 }
5484
5485 void Vacle(
5486 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005487 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5488 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5489 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005490 VIXL_ASSERT(allow_macro_instructions_);
5491 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005492 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005493 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005494 vacle(cond, dt, rd, rn, rm);
5495 }
5496 void Vacle(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5497 Vacle(al, dt, rd, rn, rm);
5498 }
5499
5500 void Vacle(
5501 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005502 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5503 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5504 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005505 VIXL_ASSERT(allow_macro_instructions_);
5506 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005507 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005508 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005509 vacle(cond, dt, rd, rn, rm);
5510 }
5511 void Vacle(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5512 Vacle(al, dt, rd, rn, rm);
5513 }
5514
5515 void Vaclt(
5516 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005517 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5518 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5519 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005520 VIXL_ASSERT(allow_macro_instructions_);
5521 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005522 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005523 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005524 vaclt(cond, dt, rd, rn, rm);
5525 }
5526 void Vaclt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5527 Vaclt(al, dt, rd, rn, rm);
5528 }
5529
5530 void Vaclt(
5531 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005532 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5533 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5534 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005535 VIXL_ASSERT(allow_macro_instructions_);
5536 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005537 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005538 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005539 vaclt(cond, dt, rd, rn, rm);
5540 }
5541 void Vaclt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5542 Vaclt(al, dt, rd, rn, rm);
5543 }
5544
5545 void Vadd(
5546 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005547 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5548 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5549 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005550 VIXL_ASSERT(allow_macro_instructions_);
5551 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005552 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005553 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005554 vadd(cond, dt, rd, rn, rm);
5555 }
5556 void Vadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5557 Vadd(al, dt, rd, rn, rm);
5558 }
5559
5560 void Vadd(
5561 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005562 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5564 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005565 VIXL_ASSERT(allow_macro_instructions_);
5566 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005567 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005568 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005569 vadd(cond, dt, rd, rn, rm);
5570 }
5571 void Vadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5572 Vadd(al, dt, rd, rn, rm);
5573 }
5574
5575 void Vadd(
5576 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005577 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5578 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5579 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005580 VIXL_ASSERT(allow_macro_instructions_);
5581 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005582 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005583 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005584 vadd(cond, dt, rd, rn, rm);
5585 }
5586 void Vadd(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
5587 Vadd(al, dt, rd, rn, rm);
5588 }
5589
5590 void Vaddhn(
5591 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005592 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5593 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5594 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005595 VIXL_ASSERT(allow_macro_instructions_);
5596 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005597 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005598 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005599 vaddhn(cond, dt, rd, rn, rm);
5600 }
5601 void Vaddhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
5602 Vaddhn(al, dt, rd, rn, rm);
5603 }
5604
5605 void Vaddl(
5606 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005607 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5608 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5609 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005610 VIXL_ASSERT(allow_macro_instructions_);
5611 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005612 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005613 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005614 vaddl(cond, dt, rd, rn, rm);
5615 }
5616 void Vaddl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
5617 Vaddl(al, dt, rd, rn, rm);
5618 }
5619
5620 void Vaddw(
5621 Condition cond, DataType dt, QRegister rd, QRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005622 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5623 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5624 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
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 vaddw(cond, dt, rd, rn, rm);
5630 }
5631 void Vaddw(DataType dt, QRegister rd, QRegister rn, DRegister rm) {
5632 Vaddw(al, dt, rd, rn, rm);
5633 }
5634
5635 void Vand(Condition cond,
5636 DataType dt,
5637 DRegister rd,
5638 DRegister rn,
5639 const DOperand& 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, DRegister rd, DRegister rn, const DOperand& operand) {
5650 Vand(al, dt, rd, rn, operand);
5651 }
5652
5653 void Vand(Condition cond,
5654 DataType dt,
5655 QRegister rd,
5656 QRegister rn,
5657 const QOperand& 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 vand(cond, dt, rd, rn, operand);
5666 }
5667 void Vand(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
5668 Vand(al, dt, rd, rn, operand);
5669 }
5670
5671 void Vbic(Condition cond,
5672 DataType dt,
5673 DRegister rd,
5674 DRegister rn,
5675 const DOperand& 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, DRegister rd, DRegister rn, const DOperand& operand) {
5686 Vbic(al, dt, rd, rn, operand);
5687 }
5688
5689 void Vbic(Condition cond,
5690 DataType dt,
5691 QRegister rd,
5692 QRegister rn,
5693 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005694 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5696 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005697 VIXL_ASSERT(allow_macro_instructions_);
5698 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005699 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005700 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005701 vbic(cond, dt, rd, rn, operand);
5702 }
5703 void Vbic(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
5704 Vbic(al, dt, rd, rn, operand);
5705 }
5706
5707 void Vbif(
5708 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005709 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5710 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5711 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005712 VIXL_ASSERT(allow_macro_instructions_);
5713 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005714 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005715 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005716 vbif(cond, dt, rd, rn, rm);
5717 }
5718 void Vbif(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5719 Vbif(al, dt, rd, rn, rm);
5720 }
5721 void Vbif(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5722 Vbif(cond, kDataTypeValueNone, rd, rn, rm);
5723 }
5724 void Vbif(DRegister rd, DRegister rn, DRegister rm) {
5725 Vbif(al, kDataTypeValueNone, rd, rn, rm);
5726 }
5727
5728 void Vbif(
5729 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005730 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5731 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5732 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005733 VIXL_ASSERT(allow_macro_instructions_);
5734 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005735 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005736 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005737 vbif(cond, dt, rd, rn, rm);
5738 }
5739 void Vbif(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5740 Vbif(al, dt, rd, rn, rm);
5741 }
5742 void Vbif(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5743 Vbif(cond, kDataTypeValueNone, rd, rn, rm);
5744 }
5745 void Vbif(QRegister rd, QRegister rn, QRegister rm) {
5746 Vbif(al, kDataTypeValueNone, rd, rn, rm);
5747 }
5748
5749 void Vbit(
5750 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005751 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5752 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5753 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005754 VIXL_ASSERT(allow_macro_instructions_);
5755 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005756 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005757 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005758 vbit(cond, dt, rd, rn, rm);
5759 }
5760 void Vbit(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5761 Vbit(al, dt, rd, rn, rm);
5762 }
5763 void Vbit(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5764 Vbit(cond, kDataTypeValueNone, rd, rn, rm);
5765 }
5766 void Vbit(DRegister rd, DRegister rn, DRegister rm) {
5767 Vbit(al, kDataTypeValueNone, rd, rn, rm);
5768 }
5769
5770 void Vbit(
5771 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005772 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5773 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5774 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005775 VIXL_ASSERT(allow_macro_instructions_);
5776 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005777 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005778 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005779 vbit(cond, dt, rd, rn, rm);
5780 }
5781 void Vbit(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5782 Vbit(al, dt, rd, rn, rm);
5783 }
5784 void Vbit(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5785 Vbit(cond, kDataTypeValueNone, rd, rn, rm);
5786 }
5787 void Vbit(QRegister rd, QRegister rn, QRegister rm) {
5788 Vbit(al, kDataTypeValueNone, rd, rn, rm);
5789 }
5790
5791 void Vbsl(
5792 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005793 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5794 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5795 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005796 VIXL_ASSERT(allow_macro_instructions_);
5797 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005798 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005799 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005800 vbsl(cond, dt, rd, rn, rm);
5801 }
5802 void Vbsl(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5803 Vbsl(al, dt, rd, rn, rm);
5804 }
5805 void Vbsl(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
5806 Vbsl(cond, kDataTypeValueNone, rd, rn, rm);
5807 }
5808 void Vbsl(DRegister rd, DRegister rn, DRegister rm) {
5809 Vbsl(al, kDataTypeValueNone, rd, rn, rm);
5810 }
5811
5812 void Vbsl(
5813 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005814 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5815 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5816 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005817 VIXL_ASSERT(allow_macro_instructions_);
5818 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005819 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005820 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005821 vbsl(cond, dt, rd, rn, rm);
5822 }
5823 void Vbsl(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5824 Vbsl(al, dt, rd, rn, rm);
5825 }
5826 void Vbsl(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
5827 Vbsl(cond, kDataTypeValueNone, rd, rn, rm);
5828 }
5829 void Vbsl(QRegister rd, QRegister rn, QRegister rm) {
5830 Vbsl(al, kDataTypeValueNone, rd, rn, rm);
5831 }
5832
5833 void Vceq(Condition cond,
5834 DataType dt,
5835 DRegister rd,
5836 DRegister rm,
5837 const DOperand& 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, DRegister rd, DRegister rm, const DOperand& operand) {
5848 Vceq(al, dt, rd, rm, operand);
5849 }
5850
5851 void Vceq(Condition cond,
5852 DataType dt,
5853 QRegister rd,
5854 QRegister rm,
5855 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005856 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5857 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5858 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005859 VIXL_ASSERT(allow_macro_instructions_);
5860 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005861 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005862 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005863 vceq(cond, dt, rd, rm, operand);
5864 }
5865 void Vceq(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5866 Vceq(al, dt, rd, rm, operand);
5867 }
5868
5869 void Vceq(
5870 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005871 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5872 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5873 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005874 VIXL_ASSERT(allow_macro_instructions_);
5875 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005876 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005877 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005878 vceq(cond, dt, rd, rn, rm);
5879 }
5880 void Vceq(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5881 Vceq(al, dt, rd, rn, rm);
5882 }
5883
5884 void Vceq(
5885 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005886 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5887 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5888 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
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 vceq(cond, dt, rd, rn, rm);
5894 }
5895 void Vceq(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5896 Vceq(al, dt, rd, rn, rm);
5897 }
5898
5899 void Vcge(Condition cond,
5900 DataType dt,
5901 DRegister rd,
5902 DRegister rm,
5903 const DOperand& 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, DRegister rd, DRegister rm, const DOperand& operand) {
5914 Vcge(al, dt, rd, rm, operand);
5915 }
5916
5917 void Vcge(Condition cond,
5918 DataType dt,
5919 QRegister rd,
5920 QRegister rm,
5921 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005922 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5923 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5924 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005925 VIXL_ASSERT(allow_macro_instructions_);
5926 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005927 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005928 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005929 vcge(cond, dt, rd, rm, operand);
5930 }
5931 void Vcge(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5932 Vcge(al, dt, rd, rm, operand);
5933 }
5934
5935 void Vcge(
5936 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005937 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5938 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5939 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005940 VIXL_ASSERT(allow_macro_instructions_);
5941 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005942 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005943 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005944 vcge(cond, dt, rd, rn, rm);
5945 }
5946 void Vcge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
5947 Vcge(al, dt, rd, rn, rm);
5948 }
5949
5950 void Vcge(
5951 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005952 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5953 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
5954 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
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 vcge(cond, dt, rd, rn, rm);
5960 }
5961 void Vcge(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
5962 Vcge(al, dt, rd, rn, rm);
5963 }
5964
5965 void Vcgt(Condition cond,
5966 DataType dt,
5967 DRegister rd,
5968 DRegister rm,
5969 const DOperand& 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, DRegister rd, DRegister rm, const DOperand& operand) {
5980 Vcgt(al, dt, rd, rm, operand);
5981 }
5982
5983 void Vcgt(Condition cond,
5984 DataType dt,
5985 QRegister rd,
5986 QRegister rm,
5987 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00005988 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
5989 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
5990 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01005991 VIXL_ASSERT(allow_macro_instructions_);
5992 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00005993 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00005994 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01005995 vcgt(cond, dt, rd, rm, operand);
5996 }
5997 void Vcgt(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
5998 Vcgt(al, dt, rd, rm, operand);
5999 }
6000
6001 void Vcgt(
6002 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006003 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6004 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6005 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006006 VIXL_ASSERT(allow_macro_instructions_);
6007 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006008 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006009 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006010 vcgt(cond, dt, rd, rn, rm);
6011 }
6012 void Vcgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6013 Vcgt(al, dt, rd, rn, rm);
6014 }
6015
6016 void Vcgt(
6017 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006018 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6019 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6020 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
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 vcgt(cond, dt, rd, rn, rm);
6026 }
6027 void Vcgt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6028 Vcgt(al, dt, rd, rn, rm);
6029 }
6030
6031 void Vcle(Condition cond,
6032 DataType dt,
6033 DRegister rd,
6034 DRegister rm,
6035 const DOperand& 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, DRegister rd, DRegister rm, const DOperand& operand) {
6046 Vcle(al, dt, rd, rm, operand);
6047 }
6048
6049 void Vcle(Condition cond,
6050 DataType dt,
6051 QRegister rd,
6052 QRegister rm,
6053 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006054 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6055 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6056 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006057 VIXL_ASSERT(allow_macro_instructions_);
6058 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006059 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006060 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006061 vcle(cond, dt, rd, rm, operand);
6062 }
6063 void Vcle(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
6064 Vcle(al, dt, rd, rm, operand);
6065 }
6066
6067 void Vcle(
6068 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006069 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6070 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6071 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006072 VIXL_ASSERT(allow_macro_instructions_);
6073 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006074 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006075 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006076 vcle(cond, dt, rd, rn, rm);
6077 }
6078 void Vcle(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6079 Vcle(al, dt, rd, rn, rm);
6080 }
6081
6082 void Vcle(
6083 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006084 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6085 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6086 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006087 VIXL_ASSERT(allow_macro_instructions_);
6088 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006089 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006090 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006091 vcle(cond, dt, rd, rn, rm);
6092 }
6093 void Vcle(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6094 Vcle(al, dt, rd, rn, rm);
6095 }
6096
6097 void Vcls(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006098 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6099 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006100 VIXL_ASSERT(allow_macro_instructions_);
6101 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006102 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006103 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006104 vcls(cond, dt, rd, rm);
6105 }
6106 void Vcls(DataType dt, DRegister rd, DRegister rm) { Vcls(al, dt, rd, rm); }
6107
6108 void Vcls(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006109 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6110 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006111 VIXL_ASSERT(allow_macro_instructions_);
6112 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006113 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006114 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006115 vcls(cond, dt, rd, rm);
6116 }
6117 void Vcls(DataType dt, QRegister rd, QRegister rm) { Vcls(al, dt, rd, rm); }
6118
6119 void Vclt(Condition cond,
6120 DataType dt,
6121 DRegister rd,
6122 DRegister rm,
6123 const DOperand& 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, DRegister rd, DRegister rm, const DOperand& operand) {
6134 Vclt(al, dt, rd, rm, operand);
6135 }
6136
6137 void Vclt(Condition cond,
6138 DataType dt,
6139 QRegister rd,
6140 QRegister rm,
6141 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006142 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6143 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6144 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006145 VIXL_ASSERT(allow_macro_instructions_);
6146 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006147 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006148 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006149 vclt(cond, dt, rd, rm, operand);
6150 }
6151 void Vclt(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
6152 Vclt(al, dt, rd, rm, operand);
6153 }
6154
6155 void Vclt(
6156 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006157 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6158 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6159 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006160 VIXL_ASSERT(allow_macro_instructions_);
6161 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006162 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006163 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006164 vclt(cond, dt, rd, rn, rm);
6165 }
6166 void Vclt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6167 Vclt(al, dt, rd, rn, rm);
6168 }
6169
6170 void Vclt(
6171 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006172 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6173 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6174 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006175 VIXL_ASSERT(allow_macro_instructions_);
6176 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006177 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006178 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006179 vclt(cond, dt, rd, rn, rm);
6180 }
6181 void Vclt(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6182 Vclt(al, dt, rd, rn, rm);
6183 }
6184
6185 void Vclz(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006186 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6187 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006188 VIXL_ASSERT(allow_macro_instructions_);
6189 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006190 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006191 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006192 vclz(cond, dt, rd, rm);
6193 }
6194 void Vclz(DataType dt, DRegister rd, DRegister rm) { Vclz(al, dt, rd, rm); }
6195
6196 void Vclz(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006197 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6198 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006199 VIXL_ASSERT(allow_macro_instructions_);
6200 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006201 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006202 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006203 vclz(cond, dt, rd, rm);
6204 }
6205 void Vclz(DataType dt, QRegister rd, QRegister rm) { Vclz(al, dt, rd, rm); }
6206
Vincent Belliard07f9e742017-04-21 13:10:07 -07006207 void Vcmp(Condition cond,
6208 DataType dt,
6209 SRegister rd,
6210 const SOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006211 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Vincent Belliard07f9e742017-04-21 13:10:07 -07006212 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006213 VIXL_ASSERT(allow_macro_instructions_);
6214 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006215 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006216 ITScope it_scope(this, &cond, guard);
Vincent Belliard07f9e742017-04-21 13:10:07 -07006217 vcmp(cond, dt, rd, operand);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006218 }
Vincent Belliard07f9e742017-04-21 13:10:07 -07006219 void Vcmp(DataType dt, SRegister rd, const SOperand& operand) {
6220 Vcmp(al, dt, rd, operand);
6221 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01006222
Vincent Belliard07f9e742017-04-21 13:10:07 -07006223 void Vcmp(Condition cond,
6224 DataType dt,
6225 DRegister rd,
6226 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006227 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Vincent Belliard07f9e742017-04-21 13:10:07 -07006228 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006229 VIXL_ASSERT(allow_macro_instructions_);
6230 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006231 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006232 ITScope it_scope(this, &cond, guard);
Vincent Belliard07f9e742017-04-21 13:10:07 -07006233 vcmp(cond, dt, rd, operand);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006234 }
Vincent Belliard07f9e742017-04-21 13:10:07 -07006235 void Vcmp(DataType dt, DRegister rd, const DOperand& operand) {
6236 Vcmp(al, dt, rd, operand);
6237 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01006238
Vincent Belliard07f9e742017-04-21 13:10:07 -07006239 void Vcmpe(Condition cond,
6240 DataType dt,
6241 SRegister rd,
6242 const SOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006243 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Vincent Belliard07f9e742017-04-21 13:10:07 -07006244 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006245 VIXL_ASSERT(allow_macro_instructions_);
6246 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006247 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006248 ITScope it_scope(this, &cond, guard);
Vincent Belliard07f9e742017-04-21 13:10:07 -07006249 vcmpe(cond, dt, rd, operand);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006250 }
Vincent Belliard07f9e742017-04-21 13:10:07 -07006251 void Vcmpe(DataType dt, SRegister rd, const SOperand& operand) {
6252 Vcmpe(al, dt, rd, operand);
6253 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01006254
Vincent Belliard07f9e742017-04-21 13:10:07 -07006255 void Vcmpe(Condition cond,
6256 DataType dt,
6257 DRegister rd,
6258 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006259 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
Vincent Belliard07f9e742017-04-21 13:10:07 -07006260 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006261 VIXL_ASSERT(allow_macro_instructions_);
6262 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006263 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006264 ITScope it_scope(this, &cond, guard);
Vincent Belliard07f9e742017-04-21 13:10:07 -07006265 vcmpe(cond, dt, rd, operand);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006266 }
Vincent Belliard07f9e742017-04-21 13:10:07 -07006267 void Vcmpe(DataType dt, DRegister rd, const DOperand& operand) {
6268 Vcmpe(al, dt, rd, operand);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006269 }
Alexandre Ramesd3832962016-07-04 15:03:43 +01006270
6271 void Vcnt(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006272 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6273 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006274 VIXL_ASSERT(allow_macro_instructions_);
6275 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006276 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006277 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006278 vcnt(cond, dt, rd, rm);
6279 }
6280 void Vcnt(DataType dt, DRegister rd, DRegister rm) { Vcnt(al, dt, rd, rm); }
6281
6282 void Vcnt(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006283 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6284 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006285 VIXL_ASSERT(allow_macro_instructions_);
6286 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006287 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006288 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006289 vcnt(cond, dt, rd, rm);
6290 }
6291 void Vcnt(DataType dt, QRegister rd, QRegister rm) { Vcnt(al, dt, rd, rm); }
6292
6293 void Vcvt(
6294 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006295 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6296 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006297 VIXL_ASSERT(allow_macro_instructions_);
6298 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006299 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006300 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006301 vcvt(cond, dt1, dt2, rd, rm);
6302 }
6303 void Vcvt(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6304 Vcvt(al, dt1, dt2, rd, rm);
6305 }
6306
6307 void Vcvt(
6308 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
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);
6316 }
6317 void Vcvt(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6318 Vcvt(al, dt1, dt2, rd, rm);
6319 }
6320
6321 void Vcvt(Condition cond,
6322 DataType dt1,
6323 DataType dt2,
6324 DRegister rd,
6325 DRegister rm,
6326 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006327 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6328 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006329 VIXL_ASSERT(allow_macro_instructions_);
6330 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006331 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006332 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006333 vcvt(cond, dt1, dt2, rd, rm, fbits);
6334 }
6335 void Vcvt(
6336 DataType dt1, DataType dt2, DRegister rd, DRegister rm, int32_t fbits) {
6337 Vcvt(al, dt1, dt2, rd, rm, fbits);
6338 }
6339
6340 void Vcvt(Condition cond,
6341 DataType dt1,
6342 DataType dt2,
6343 QRegister rd,
6344 QRegister rm,
6345 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006346 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6347 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006348 VIXL_ASSERT(allow_macro_instructions_);
6349 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006350 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006351 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006352 vcvt(cond, dt1, dt2, rd, rm, fbits);
6353 }
6354 void Vcvt(
6355 DataType dt1, DataType dt2, QRegister rd, QRegister rm, int32_t fbits) {
6356 Vcvt(al, dt1, dt2, rd, rm, fbits);
6357 }
6358
6359 void Vcvt(Condition cond,
6360 DataType dt1,
6361 DataType dt2,
6362 SRegister rd,
6363 SRegister rm,
6364 int32_t fbits) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006365 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6366 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006367 VIXL_ASSERT(allow_macro_instructions_);
6368 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006369 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006370 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006371 vcvt(cond, dt1, dt2, rd, rm, fbits);
6372 }
6373 void Vcvt(
6374 DataType dt1, DataType dt2, SRegister rd, SRegister rm, int32_t fbits) {
6375 Vcvt(al, dt1, dt2, rd, rm, fbits);
6376 }
6377
6378 void Vcvt(
6379 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006380 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6381 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006382 VIXL_ASSERT(allow_macro_instructions_);
6383 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006384 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006385 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006386 vcvt(cond, dt1, dt2, rd, rm);
6387 }
6388 void Vcvt(DataType dt1, DataType dt2, DRegister rd, DRegister rm) {
6389 Vcvt(al, dt1, dt2, rd, rm);
6390 }
6391
6392 void Vcvt(
6393 Condition cond, DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006394 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6395 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006396 VIXL_ASSERT(allow_macro_instructions_);
6397 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006398 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006399 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006400 vcvt(cond, dt1, dt2, rd, rm);
6401 }
6402 void Vcvt(DataType dt1, DataType dt2, QRegister rd, QRegister rm) {
6403 Vcvt(al, dt1, dt2, rd, rm);
6404 }
6405
6406 void Vcvt(
6407 Condition cond, DataType dt1, DataType dt2, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006408 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6409 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006410 VIXL_ASSERT(allow_macro_instructions_);
6411 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006412 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006413 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006414 vcvt(cond, dt1, dt2, rd, rm);
6415 }
6416 void Vcvt(DataType dt1, DataType dt2, DRegister rd, QRegister rm) {
6417 Vcvt(al, dt1, dt2, rd, rm);
6418 }
6419
6420 void Vcvt(
6421 Condition cond, DataType dt1, DataType dt2, QRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006422 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6423 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006424 VIXL_ASSERT(allow_macro_instructions_);
6425 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006426 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006427 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006428 vcvt(cond, dt1, dt2, rd, rm);
6429 }
6430 void Vcvt(DataType dt1, DataType dt2, QRegister rd, DRegister rm) {
6431 Vcvt(al, dt1, dt2, rd, rm);
6432 }
6433
6434 void Vcvt(
6435 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006436 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6437 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006438 VIXL_ASSERT(allow_macro_instructions_);
6439 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006440 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006441 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006442 vcvt(cond, dt1, dt2, rd, rm);
6443 }
6444 void Vcvt(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6445 Vcvt(al, dt1, dt2, rd, rm);
6446 }
6447
6448 void Vcvta(DataType dt1, DataType dt2, DRegister rd, DRegister 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, QRegister rd, QRegister 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 Vcvta(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006467 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6468 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006469 VIXL_ASSERT(allow_macro_instructions_);
6470 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006471 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006472 vcvta(dt1, dt2, rd, rm);
6473 }
6474
6475 void Vcvta(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006476 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6477 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006478 VIXL_ASSERT(allow_macro_instructions_);
6479 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006480 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006481 vcvta(dt1, dt2, rd, rm);
6482 }
6483
6484 void Vcvtb(
6485 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006486 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6487 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006488 VIXL_ASSERT(allow_macro_instructions_);
6489 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006490 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006491 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006492 vcvtb(cond, dt1, dt2, rd, rm);
6493 }
6494 void Vcvtb(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6495 Vcvtb(al, dt1, dt2, rd, rm);
6496 }
6497
6498 void Vcvtb(
6499 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006500 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6501 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006502 VIXL_ASSERT(allow_macro_instructions_);
6503 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006504 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006505 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006506 vcvtb(cond, dt1, dt2, rd, rm);
6507 }
6508 void Vcvtb(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6509 Vcvtb(al, dt1, dt2, rd, rm);
6510 }
6511
6512 void Vcvtb(
6513 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006514 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6515 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006516 VIXL_ASSERT(allow_macro_instructions_);
6517 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006518 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006519 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006520 vcvtb(cond, dt1, dt2, rd, rm);
6521 }
6522 void Vcvtb(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6523 Vcvtb(al, dt1, dt2, rd, rm);
6524 }
6525
6526 void Vcvtm(DataType dt1, DataType dt2, DRegister rd, DRegister 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, QRegister rd, QRegister 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 Vcvtm(DataType dt1, DataType dt2, SRegister rd, SRegister 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 vcvtm(dt1, dt2, rd, rm);
6551 }
6552
6553 void Vcvtm(DataType dt1, DataType dt2, SRegister rd, DRegister 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 vcvtm(dt1, dt2, rd, rm);
6560 }
6561
6562 void Vcvtn(DataType dt1, DataType dt2, DRegister rd, DRegister 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, QRegister rd, QRegister 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 Vcvtn(DataType dt1, DataType dt2, SRegister rd, SRegister 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 vcvtn(dt1, dt2, rd, rm);
6587 }
6588
6589 void Vcvtn(DataType dt1, DataType dt2, SRegister rd, DRegister 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 vcvtn(dt1, dt2, rd, rm);
6596 }
6597
6598 void Vcvtp(DataType dt1, DataType dt2, DRegister rd, DRegister 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, QRegister rd, QRegister 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 Vcvtp(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006617 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6618 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006619 VIXL_ASSERT(allow_macro_instructions_);
6620 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006621 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006622 vcvtp(dt1, dt2, rd, rm);
6623 }
6624
6625 void Vcvtp(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006626 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6627 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006628 VIXL_ASSERT(allow_macro_instructions_);
6629 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006630 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006631 vcvtp(dt1, dt2, rd, rm);
6632 }
6633
6634 void Vcvtr(
6635 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006636 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6637 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006638 VIXL_ASSERT(allow_macro_instructions_);
6639 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006640 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006641 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006642 vcvtr(cond, dt1, dt2, rd, rm);
6643 }
6644 void Vcvtr(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6645 Vcvtr(al, dt1, dt2, rd, rm);
6646 }
6647
6648 void Vcvtr(
6649 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006650 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6651 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006652 VIXL_ASSERT(allow_macro_instructions_);
6653 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006654 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006655 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006656 vcvtr(cond, dt1, dt2, rd, rm);
6657 }
6658 void Vcvtr(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6659 Vcvtr(al, dt1, dt2, rd, rm);
6660 }
6661
6662 void Vcvtt(
6663 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006664 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6665 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006666 VIXL_ASSERT(allow_macro_instructions_);
6667 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006668 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006669 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006670 vcvtt(cond, dt1, dt2, rd, rm);
6671 }
6672 void Vcvtt(DataType dt1, DataType dt2, SRegister rd, SRegister rm) {
6673 Vcvtt(al, dt1, dt2, rd, rm);
6674 }
6675
6676 void Vcvtt(
6677 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006678 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6679 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006680 VIXL_ASSERT(allow_macro_instructions_);
6681 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006682 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006683 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006684 vcvtt(cond, dt1, dt2, rd, rm);
6685 }
6686 void Vcvtt(DataType dt1, DataType dt2, DRegister rd, SRegister rm) {
6687 Vcvtt(al, dt1, dt2, rd, rm);
6688 }
6689
6690 void Vcvtt(
6691 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6693 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006694 VIXL_ASSERT(allow_macro_instructions_);
6695 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006696 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006697 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006698 vcvtt(cond, dt1, dt2, rd, rm);
6699 }
6700 void Vcvtt(DataType dt1, DataType dt2, SRegister rd, DRegister rm) {
6701 Vcvtt(al, dt1, dt2, rd, rm);
6702 }
6703
6704 void Vdiv(
6705 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006706 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6707 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6708 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006709 VIXL_ASSERT(allow_macro_instructions_);
6710 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006711 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006712 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006713 vdiv(cond, dt, rd, rn, rm);
6714 }
6715 void Vdiv(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6716 Vdiv(al, dt, rd, rn, rm);
6717 }
6718
6719 void Vdiv(
6720 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006721 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6722 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6723 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006724 VIXL_ASSERT(allow_macro_instructions_);
6725 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006726 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006727 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006728 vdiv(cond, dt, rd, rn, rm);
6729 }
6730 void Vdiv(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6731 Vdiv(al, dt, rd, rn, rm);
6732 }
6733
6734 void Vdup(Condition cond, DataType dt, QRegister rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006735 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6736 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006737 VIXL_ASSERT(allow_macro_instructions_);
6738 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006739 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006740 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006741 vdup(cond, dt, rd, rt);
6742 }
6743 void Vdup(DataType dt, QRegister rd, Register rt) { Vdup(al, dt, rd, rt); }
6744
6745 void Vdup(Condition cond, DataType dt, DRegister rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006746 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6747 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006748 VIXL_ASSERT(allow_macro_instructions_);
6749 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006750 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006751 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006752 vdup(cond, dt, rd, rt);
6753 }
6754 void Vdup(DataType dt, DRegister rd, Register rt) { Vdup(al, dt, rd, rt); }
6755
6756 void Vdup(Condition cond, DataType dt, DRegister rd, DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006757 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6758 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006759 VIXL_ASSERT(allow_macro_instructions_);
6760 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006761 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006762 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006763 vdup(cond, dt, rd, rm);
6764 }
6765 void Vdup(DataType dt, DRegister rd, DRegisterLane rm) {
6766 Vdup(al, dt, rd, rm);
6767 }
6768
6769 void Vdup(Condition cond, DataType dt, QRegister rd, DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006770 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6771 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006772 VIXL_ASSERT(allow_macro_instructions_);
6773 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006774 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006775 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006776 vdup(cond, dt, rd, rm);
6777 }
6778 void Vdup(DataType dt, QRegister rd, DRegisterLane rm) {
6779 Vdup(al, dt, rd, rm);
6780 }
6781
6782 void Veor(
6783 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006784 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6785 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6786 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006787 VIXL_ASSERT(allow_macro_instructions_);
6788 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006789 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006790 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006791 veor(cond, dt, rd, rn, rm);
6792 }
6793 void Veor(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6794 Veor(al, dt, rd, rn, rm);
6795 }
6796 void Veor(Condition cond, DRegister rd, DRegister rn, DRegister rm) {
6797 Veor(cond, kDataTypeValueNone, rd, rn, rm);
6798 }
6799 void Veor(DRegister rd, DRegister rn, DRegister rm) {
6800 Veor(al, kDataTypeValueNone, rd, rn, rm);
6801 }
6802
6803 void Veor(
6804 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006805 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6806 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6807 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006808 VIXL_ASSERT(allow_macro_instructions_);
6809 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006810 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006811 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006812 veor(cond, dt, rd, rn, rm);
6813 }
6814 void Veor(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6815 Veor(al, dt, rd, rn, rm);
6816 }
6817 void Veor(Condition cond, QRegister rd, QRegister rn, QRegister rm) {
6818 Veor(cond, kDataTypeValueNone, rd, rn, rm);
6819 }
6820 void Veor(QRegister rd, QRegister rn, QRegister rm) {
6821 Veor(al, kDataTypeValueNone, rd, rn, rm);
6822 }
6823
6824 void Vext(Condition cond,
6825 DataType dt,
6826 DRegister rd,
6827 DRegister rn,
6828 DRegister rm,
6829 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006830 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6831 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6832 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6833 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006834 VIXL_ASSERT(allow_macro_instructions_);
6835 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006836 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006837 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006838 vext(cond, dt, rd, rn, rm, operand);
6839 }
6840 void Vext(DataType dt,
6841 DRegister rd,
6842 DRegister rn,
6843 DRegister rm,
6844 const DOperand& operand) {
6845 Vext(al, dt, rd, rn, rm, operand);
6846 }
6847
6848 void Vext(Condition cond,
6849 DataType dt,
6850 QRegister rd,
6851 QRegister rn,
6852 QRegister rm,
6853 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006854 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6855 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6856 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
6857 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006858 VIXL_ASSERT(allow_macro_instructions_);
6859 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006860 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006861 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006862 vext(cond, dt, rd, rn, rm, operand);
6863 }
6864 void Vext(DataType dt,
6865 QRegister rd,
6866 QRegister rn,
6867 QRegister rm,
6868 const QOperand& operand) {
6869 Vext(al, dt, rd, rn, rm, operand);
6870 }
6871
6872 void Vfma(
6873 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006874 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6875 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6876 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006877 VIXL_ASSERT(allow_macro_instructions_);
6878 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006879 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006880 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006881 vfma(cond, dt, rd, rn, rm);
6882 }
6883 void Vfma(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6884 Vfma(al, dt, rd, rn, rm);
6885 }
6886
6887 void Vfma(
6888 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006889 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6890 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6891 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006892 VIXL_ASSERT(allow_macro_instructions_);
6893 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006894 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006895 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006896 vfma(cond, dt, rd, rn, rm);
6897 }
6898 void Vfma(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6899 Vfma(al, dt, rd, rn, rm);
6900 }
6901
6902 void Vfma(
6903 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006904 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6905 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6906 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006907 VIXL_ASSERT(allow_macro_instructions_);
6908 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006909 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006910 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006911 vfma(cond, dt, rd, rn, rm);
6912 }
6913 void Vfma(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6914 Vfma(al, dt, rd, rn, rm);
6915 }
6916
6917 void Vfms(
6918 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006919 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6920 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6921 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006922 VIXL_ASSERT(allow_macro_instructions_);
6923 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006924 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006925 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006926 vfms(cond, dt, rd, rn, rm);
6927 }
6928 void Vfms(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6929 Vfms(al, dt, rd, rn, rm);
6930 }
6931
6932 void Vfms(
6933 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006934 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6935 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6936 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006937 VIXL_ASSERT(allow_macro_instructions_);
6938 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006939 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006940 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006941 vfms(cond, dt, rd, rn, rm);
6942 }
6943 void Vfms(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
6944 Vfms(al, dt, rd, rn, rm);
6945 }
6946
6947 void Vfms(
6948 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006949 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6950 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6951 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006952 VIXL_ASSERT(allow_macro_instructions_);
6953 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006954 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006955 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006956 vfms(cond, dt, rd, rn, rm);
6957 }
6958 void Vfms(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6959 Vfms(al, dt, rd, rn, rm);
6960 }
6961
6962 void Vfnma(
6963 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006964 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6965 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6966 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006967 VIXL_ASSERT(allow_macro_instructions_);
6968 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006969 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006970 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006971 vfnma(cond, dt, rd, rn, rm);
6972 }
6973 void Vfnma(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
6974 Vfnma(al, dt, rd, rn, rm);
6975 }
6976
6977 void Vfnma(
6978 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006979 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6980 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6981 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006982 VIXL_ASSERT(allow_macro_instructions_);
6983 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006984 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00006985 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01006986 vfnma(cond, dt, rd, rn, rm);
6987 }
6988 void Vfnma(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
6989 Vfnma(al, dt, rd, rn, rm);
6990 }
6991
6992 void Vfnms(
6993 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00006994 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
6995 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
6996 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01006997 VIXL_ASSERT(allow_macro_instructions_);
6998 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00006999 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007000 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007001 vfnms(cond, dt, rd, rn, rm);
7002 }
7003 void Vfnms(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7004 Vfnms(al, dt, rd, rn, rm);
7005 }
7006
7007 void Vfnms(
7008 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007009 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7010 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7011 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007012 VIXL_ASSERT(allow_macro_instructions_);
7013 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007014 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007015 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007016 vfnms(cond, dt, rd, rn, rm);
7017 }
7018 void Vfnms(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7019 Vfnms(al, dt, rd, rn, rm);
7020 }
7021
7022 void Vhadd(
7023 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007024 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7025 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7026 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007027 VIXL_ASSERT(allow_macro_instructions_);
7028 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007029 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007030 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007031 vhadd(cond, dt, rd, rn, rm);
7032 }
7033 void Vhadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7034 Vhadd(al, dt, rd, rn, rm);
7035 }
7036
7037 void Vhadd(
7038 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007039 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7040 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7041 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007042 VIXL_ASSERT(allow_macro_instructions_);
7043 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007044 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007045 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007046 vhadd(cond, dt, rd, rn, rm);
7047 }
7048 void Vhadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7049 Vhadd(al, dt, rd, rn, rm);
7050 }
7051
7052 void Vhsub(
7053 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007054 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7055 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7056 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007057 VIXL_ASSERT(allow_macro_instructions_);
7058 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007059 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007060 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007061 vhsub(cond, dt, rd, rn, rm);
7062 }
7063 void Vhsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7064 Vhsub(al, dt, rd, rn, rm);
7065 }
7066
7067 void Vhsub(
7068 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007069 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7070 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7071 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007072 VIXL_ASSERT(allow_macro_instructions_);
7073 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007074 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007075 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007076 vhsub(cond, dt, rd, rn, rm);
7077 }
7078 void Vhsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7079 Vhsub(al, dt, rd, rn, rm);
7080 }
7081
7082 void Vld1(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 vld1(cond, dt, nreglist, operand);
7093 }
7094 void Vld1(DataType dt,
7095 const NeonRegisterList& nreglist,
7096 const AlignedMemOperand& operand) {
7097 Vld1(al, dt, nreglist, operand);
7098 }
7099
7100 void Vld2(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 vld2(cond, dt, nreglist, operand);
7111 }
7112 void Vld2(DataType dt,
7113 const NeonRegisterList& nreglist,
7114 const AlignedMemOperand& operand) {
7115 Vld2(al, dt, nreglist, operand);
7116 }
7117
7118 void Vld3(Condition cond,
7119 DataType dt,
7120 const NeonRegisterList& nreglist,
7121 const AlignedMemOperand& 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 AlignedMemOperand& operand) {
7133 Vld3(al, dt, nreglist, operand);
7134 }
7135
7136 void Vld3(Condition cond,
7137 DataType dt,
7138 const NeonRegisterList& nreglist,
7139 const MemOperand& 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 vld3(cond, dt, nreglist, operand);
7147 }
7148 void Vld3(DataType dt,
7149 const NeonRegisterList& nreglist,
7150 const MemOperand& operand) {
7151 Vld3(al, dt, nreglist, operand);
7152 }
7153
7154 void Vld4(Condition cond,
7155 DataType dt,
7156 const NeonRegisterList& nreglist,
7157 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007158 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
7159 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007160 VIXL_ASSERT(allow_macro_instructions_);
7161 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007162 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007163 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007164 vld4(cond, dt, nreglist, operand);
7165 }
7166 void Vld4(DataType dt,
7167 const NeonRegisterList& nreglist,
7168 const AlignedMemOperand& operand) {
7169 Vld4(al, dt, nreglist, operand);
7170 }
7171
7172 void Vldm(Condition cond,
7173 DataType dt,
7174 Register rn,
7175 WriteBack write_back,
7176 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007177 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7178 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007179 VIXL_ASSERT(allow_macro_instructions_);
7180 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007181 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007182 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007183 vldm(cond, dt, rn, write_back, dreglist);
7184 }
7185 void Vldm(DataType dt,
7186 Register rn,
7187 WriteBack write_back,
7188 DRegisterList dreglist) {
7189 Vldm(al, dt, rn, write_back, dreglist);
7190 }
7191 void Vldm(Condition cond,
7192 Register rn,
7193 WriteBack write_back,
7194 DRegisterList dreglist) {
7195 Vldm(cond, kDataTypeValueNone, rn, write_back, dreglist);
7196 }
7197 void Vldm(Register rn, WriteBack write_back, DRegisterList dreglist) {
7198 Vldm(al, kDataTypeValueNone, rn, write_back, dreglist);
7199 }
7200
7201 void Vldm(Condition cond,
7202 DataType dt,
7203 Register rn,
7204 WriteBack write_back,
7205 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007206 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7207 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007208 VIXL_ASSERT(allow_macro_instructions_);
7209 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007210 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007211 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007212 vldm(cond, dt, rn, write_back, sreglist);
7213 }
7214 void Vldm(DataType dt,
7215 Register rn,
7216 WriteBack write_back,
7217 SRegisterList sreglist) {
7218 Vldm(al, dt, rn, write_back, sreglist);
7219 }
7220 void Vldm(Condition cond,
7221 Register rn,
7222 WriteBack write_back,
7223 SRegisterList sreglist) {
7224 Vldm(cond, kDataTypeValueNone, rn, write_back, sreglist);
7225 }
7226 void Vldm(Register rn, WriteBack write_back, SRegisterList sreglist) {
7227 Vldm(al, kDataTypeValueNone, rn, write_back, sreglist);
7228 }
7229
7230 void Vldmdb(Condition cond,
7231 DataType dt,
7232 Register rn,
7233 WriteBack write_back,
7234 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007235 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7236 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007237 VIXL_ASSERT(allow_macro_instructions_);
7238 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007239 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007240 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007241 vldmdb(cond, dt, rn, write_back, dreglist);
7242 }
7243 void Vldmdb(DataType dt,
7244 Register rn,
7245 WriteBack write_back,
7246 DRegisterList dreglist) {
7247 Vldmdb(al, dt, rn, write_back, dreglist);
7248 }
7249 void Vldmdb(Condition cond,
7250 Register rn,
7251 WriteBack write_back,
7252 DRegisterList dreglist) {
7253 Vldmdb(cond, kDataTypeValueNone, rn, write_back, dreglist);
7254 }
7255 void Vldmdb(Register rn, WriteBack write_back, DRegisterList dreglist) {
7256 Vldmdb(al, kDataTypeValueNone, rn, write_back, dreglist);
7257 }
7258
7259 void Vldmdb(Condition cond,
7260 DataType dt,
7261 Register rn,
7262 WriteBack write_back,
7263 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007264 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7265 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007266 VIXL_ASSERT(allow_macro_instructions_);
7267 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007268 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007269 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007270 vldmdb(cond, dt, rn, write_back, sreglist);
7271 }
7272 void Vldmdb(DataType dt,
7273 Register rn,
7274 WriteBack write_back,
7275 SRegisterList sreglist) {
7276 Vldmdb(al, dt, rn, write_back, sreglist);
7277 }
7278 void Vldmdb(Condition cond,
7279 Register rn,
7280 WriteBack write_back,
7281 SRegisterList sreglist) {
7282 Vldmdb(cond, kDataTypeValueNone, rn, write_back, sreglist);
7283 }
7284 void Vldmdb(Register rn, WriteBack write_back, SRegisterList sreglist) {
7285 Vldmdb(al, kDataTypeValueNone, rn, write_back, sreglist);
7286 }
7287
7288 void Vldmia(Condition cond,
7289 DataType dt,
7290 Register rn,
7291 WriteBack write_back,
7292 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007293 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7294 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007295 VIXL_ASSERT(allow_macro_instructions_);
7296 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007297 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007298 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007299 vldmia(cond, dt, rn, write_back, dreglist);
7300 }
7301 void Vldmia(DataType dt,
7302 Register rn,
7303 WriteBack write_back,
7304 DRegisterList dreglist) {
7305 Vldmia(al, dt, rn, write_back, dreglist);
7306 }
7307 void Vldmia(Condition cond,
7308 Register rn,
7309 WriteBack write_back,
7310 DRegisterList dreglist) {
7311 Vldmia(cond, kDataTypeValueNone, rn, write_back, dreglist);
7312 }
7313 void Vldmia(Register rn, WriteBack write_back, DRegisterList dreglist) {
7314 Vldmia(al, kDataTypeValueNone, rn, write_back, dreglist);
7315 }
7316
7317 void Vldmia(Condition cond,
7318 DataType dt,
7319 Register rn,
7320 WriteBack write_back,
7321 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007322 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7323 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007324 VIXL_ASSERT(allow_macro_instructions_);
7325 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007326 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007327 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007328 vldmia(cond, dt, rn, write_back, sreglist);
7329 }
7330 void Vldmia(DataType dt,
7331 Register rn,
7332 WriteBack write_back,
7333 SRegisterList sreglist) {
7334 Vldmia(al, dt, rn, write_back, sreglist);
7335 }
7336 void Vldmia(Condition cond,
7337 Register rn,
7338 WriteBack write_back,
7339 SRegisterList sreglist) {
7340 Vldmia(cond, kDataTypeValueNone, rn, write_back, sreglist);
7341 }
7342 void Vldmia(Register rn, WriteBack write_back, SRegisterList sreglist) {
7343 Vldmia(al, kDataTypeValueNone, rn, write_back, sreglist);
7344 }
7345
Alexandre Ramesd3832962016-07-04 15:03:43 +01007346
7347 void Vldr(Condition cond,
7348 DataType dt,
7349 DRegister rd,
7350 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007351 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7352 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007353 VIXL_ASSERT(allow_macro_instructions_);
7354 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007355 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007356 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007357 vldr(cond, dt, rd, operand);
7358 }
7359 void Vldr(DataType dt, DRegister rd, const MemOperand& operand) {
7360 Vldr(al, dt, rd, operand);
7361 }
7362 void Vldr(Condition cond, DRegister rd, const MemOperand& operand) {
7363 Vldr(cond, Untyped64, rd, operand);
7364 }
7365 void Vldr(DRegister rd, const MemOperand& operand) {
7366 Vldr(al, Untyped64, rd, operand);
7367 }
7368
Alexandre Ramesd3832962016-07-04 15:03:43 +01007369
7370 void Vldr(Condition cond,
7371 DataType dt,
7372 SRegister rd,
7373 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007374 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7375 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007376 VIXL_ASSERT(allow_macro_instructions_);
7377 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007378 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007379 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007380 vldr(cond, dt, rd, operand);
7381 }
7382 void Vldr(DataType dt, SRegister rd, const MemOperand& operand) {
7383 Vldr(al, dt, rd, operand);
7384 }
7385 void Vldr(Condition cond, SRegister rd, const MemOperand& operand) {
7386 Vldr(cond, Untyped32, rd, operand);
7387 }
7388 void Vldr(SRegister rd, const MemOperand& operand) {
7389 Vldr(al, Untyped32, rd, operand);
7390 }
7391
7392 void Vmax(
7393 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007394 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7395 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7396 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007397 VIXL_ASSERT(allow_macro_instructions_);
7398 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007399 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007400 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007401 vmax(cond, dt, rd, rn, rm);
7402 }
7403 void Vmax(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7404 Vmax(al, dt, rd, rn, rm);
7405 }
7406
7407 void Vmax(
7408 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007409 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7410 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7411 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007412 VIXL_ASSERT(allow_macro_instructions_);
7413 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007414 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007415 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007416 vmax(cond, dt, rd, rn, rm);
7417 }
7418 void Vmax(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7419 Vmax(al, dt, rd, rn, rm);
7420 }
7421
7422 void Vmaxnm(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007423 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7424 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7425 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007426 VIXL_ASSERT(allow_macro_instructions_);
7427 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007428 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007429 vmaxnm(dt, rd, rn, rm);
7430 }
7431
7432 void Vmaxnm(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007433 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7434 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7435 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007436 VIXL_ASSERT(allow_macro_instructions_);
7437 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007438 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007439 vmaxnm(dt, rd, rn, rm);
7440 }
7441
7442 void Vmaxnm(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007443 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7444 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7445 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007446 VIXL_ASSERT(allow_macro_instructions_);
7447 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007448 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007449 vmaxnm(dt, rd, rn, rm);
7450 }
7451
7452 void Vmin(
7453 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007454 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7455 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7456 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007457 VIXL_ASSERT(allow_macro_instructions_);
7458 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007459 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007460 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007461 vmin(cond, dt, rd, rn, rm);
7462 }
7463 void Vmin(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7464 Vmin(al, dt, rd, rn, rm);
7465 }
7466
7467 void Vmin(
7468 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007469 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7470 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7471 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007472 VIXL_ASSERT(allow_macro_instructions_);
7473 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007474 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007475 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007476 vmin(cond, dt, rd, rn, rm);
7477 }
7478 void Vmin(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7479 Vmin(al, dt, rd, rn, rm);
7480 }
7481
7482 void Vminnm(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007483 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7485 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007486 VIXL_ASSERT(allow_macro_instructions_);
7487 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007488 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007489 vminnm(dt, rd, rn, rm);
7490 }
7491
7492 void Vminnm(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007493 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7494 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7495 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007496 VIXL_ASSERT(allow_macro_instructions_);
7497 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007498 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007499 vminnm(dt, rd, rn, rm);
7500 }
7501
7502 void Vminnm(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007503 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7504 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7505 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007506 VIXL_ASSERT(allow_macro_instructions_);
7507 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007508 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007509 vminnm(dt, rd, rn, rm);
7510 }
7511
7512 void Vmla(Condition cond,
7513 DataType dt,
7514 DRegister rd,
7515 DRegister 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, DRegister rd, DRegister rn, DRegisterLane rm) {
7527 Vmla(al, dt, rd, rn, rm);
7528 }
7529
7530 void Vmla(Condition cond,
7531 DataType dt,
7532 QRegister rd,
7533 QRegister rn,
7534 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007535 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7536 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7537 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007538 VIXL_ASSERT(allow_macro_instructions_);
7539 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007540 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007541 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007542 vmla(cond, dt, rd, rn, rm);
7543 }
7544 void Vmla(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
7545 Vmla(al, dt, rd, rn, rm);
7546 }
7547
7548 void Vmla(
7549 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007550 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7551 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7552 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007553 VIXL_ASSERT(allow_macro_instructions_);
7554 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007555 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007556 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007557 vmla(cond, dt, rd, rn, rm);
7558 }
7559 void Vmla(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7560 Vmla(al, dt, rd, rn, rm);
7561 }
7562
7563 void Vmla(
7564 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007565 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7566 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7567 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007568 VIXL_ASSERT(allow_macro_instructions_);
7569 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007570 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007571 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007572 vmla(cond, dt, rd, rn, rm);
7573 }
7574 void Vmla(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7575 Vmla(al, dt, rd, rn, rm);
7576 }
7577
7578 void Vmla(
7579 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister 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 vmla(cond, dt, rd, rn, rm);
7588 }
7589 void Vmla(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7590 Vmla(al, dt, rd, rn, rm);
7591 }
7592
7593 void Vmlal(Condition cond,
7594 DataType dt,
7595 QRegister rd,
7596 DRegister rn,
7597 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007598 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7599 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7600 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007601 VIXL_ASSERT(allow_macro_instructions_);
7602 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007603 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007604 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007605 vmlal(cond, dt, rd, rn, rm);
7606 }
7607 void Vmlal(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
7608 Vmlal(al, dt, rd, rn, rm);
7609 }
7610
7611 void Vmlal(
7612 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister 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 vmlal(cond, dt, rd, rn, rm);
7621 }
7622 void Vmlal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7623 Vmlal(al, dt, rd, rn, rm);
7624 }
7625
7626 void Vmls(Condition cond,
7627 DataType dt,
7628 DRegister rd,
7629 DRegister 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, DRegister rd, DRegister rn, DRegisterLane rm) {
7641 Vmls(al, dt, rd, rn, rm);
7642 }
7643
7644 void Vmls(Condition cond,
7645 DataType dt,
7646 QRegister rd,
7647 QRegister rn,
7648 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007649 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7650 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7651 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007652 VIXL_ASSERT(allow_macro_instructions_);
7653 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007654 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007655 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007656 vmls(cond, dt, rd, rn, rm);
7657 }
7658 void Vmls(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
7659 Vmls(al, dt, rd, rn, rm);
7660 }
7661
7662 void Vmls(
7663 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007664 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7665 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7666 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007667 VIXL_ASSERT(allow_macro_instructions_);
7668 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007669 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007670 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007671 vmls(cond, dt, rd, rn, rm);
7672 }
7673 void Vmls(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
7674 Vmls(al, dt, rd, rn, rm);
7675 }
7676
7677 void Vmls(
7678 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007679 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7680 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7681 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007682 VIXL_ASSERT(allow_macro_instructions_);
7683 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007684 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007685 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007686 vmls(cond, dt, rd, rn, rm);
7687 }
7688 void Vmls(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
7689 Vmls(al, dt, rd, rn, rm);
7690 }
7691
7692 void Vmls(
7693 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister 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 vmls(cond, dt, rd, rn, rm);
7702 }
7703 void Vmls(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
7704 Vmls(al, dt, rd, rn, rm);
7705 }
7706
7707 void Vmlsl(Condition cond,
7708 DataType dt,
7709 QRegister rd,
7710 DRegister rn,
7711 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007712 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7713 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7714 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007715 VIXL_ASSERT(allow_macro_instructions_);
7716 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007717 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007718 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007719 vmlsl(cond, dt, rd, rn, rm);
7720 }
7721 void Vmlsl(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
7722 Vmlsl(al, dt, rd, rn, rm);
7723 }
7724
7725 void Vmlsl(
7726 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007727 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7728 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7729 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007730 VIXL_ASSERT(allow_macro_instructions_);
7731 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007732 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007733 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007734 vmlsl(cond, dt, rd, rn, rm);
7735 }
7736 void Vmlsl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
7737 Vmlsl(al, dt, rd, rn, rm);
7738 }
7739
7740 void Vmov(Condition cond, Register rt, SRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007741 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7742 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007743 VIXL_ASSERT(allow_macro_instructions_);
7744 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007745 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007746 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007747 vmov(cond, rt, rn);
7748 }
7749 void Vmov(Register rt, SRegister rn) { Vmov(al, rt, rn); }
7750
7751 void Vmov(Condition cond, SRegister rn, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007752 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7753 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007754 VIXL_ASSERT(allow_macro_instructions_);
7755 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007756 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007757 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007758 vmov(cond, rn, rt);
7759 }
7760 void Vmov(SRegister rn, Register rt) { Vmov(al, rn, rt); }
7761
7762 void Vmov(Condition cond, Register rt, Register rt2, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007763 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7764 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
7765 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007766 VIXL_ASSERT(allow_macro_instructions_);
7767 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007768 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007769 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007770 vmov(cond, rt, rt2, rm);
7771 }
7772 void Vmov(Register rt, Register rt2, DRegister rm) { Vmov(al, rt, rt2, rm); }
7773
7774 void Vmov(Condition cond, DRegister rm, Register rt, Register rt2) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007775 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7776 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7777 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007778 VIXL_ASSERT(allow_macro_instructions_);
7779 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007780 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007781 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007782 vmov(cond, rm, rt, rt2);
7783 }
7784 void Vmov(DRegister rm, Register rt, Register rt2) { Vmov(al, rm, rt, rt2); }
7785
7786 void Vmov(
7787 Condition cond, Register rt, Register rt2, SRegister rm, SRegister rm1) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007788 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7789 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
7790 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7791 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm1));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007792 VIXL_ASSERT(allow_macro_instructions_);
7793 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007794 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007795 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007796 vmov(cond, rt, rt2, rm, rm1);
7797 }
7798 void Vmov(Register rt, Register rt2, SRegister rm, SRegister rm1) {
7799 Vmov(al, rt, rt2, rm, rm1);
7800 }
7801
7802 void Vmov(
7803 Condition cond, SRegister rm, SRegister rm1, Register rt, Register rt2) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007804 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
7805 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm1));
7806 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7807 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007808 VIXL_ASSERT(allow_macro_instructions_);
7809 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007810 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007811 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007812 vmov(cond, rm, rm1, rt, rt2);
7813 }
7814 void Vmov(SRegister rm, SRegister rm1, Register rt, Register rt2) {
7815 Vmov(al, rm, rm1, rt, rt2);
7816 }
7817
7818 void Vmov(Condition cond, DataType dt, DRegisterLane rd, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007819 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7820 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007821 VIXL_ASSERT(allow_macro_instructions_);
7822 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007823 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007824 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007825 vmov(cond, dt, rd, rt);
7826 }
7827 void Vmov(DataType dt, DRegisterLane rd, Register rt) {
7828 Vmov(al, dt, rd, rt);
7829 }
7830 void Vmov(Condition cond, DRegisterLane rd, Register rt) {
7831 Vmov(cond, kDataTypeValueNone, rd, rt);
7832 }
7833 void Vmov(DRegisterLane rd, Register rt) {
7834 Vmov(al, kDataTypeValueNone, rd, rt);
7835 }
7836
7837 void Vmov(Condition cond,
7838 DataType dt,
7839 DRegister rd,
7840 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007841 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7842 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007843 VIXL_ASSERT(allow_macro_instructions_);
7844 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007845 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007846 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007847 vmov(cond, dt, rd, operand);
7848 }
7849 void Vmov(DataType dt, DRegister rd, const DOperand& operand) {
7850 Vmov(al, dt, rd, operand);
7851 }
7852
7853 void Vmov(Condition cond,
7854 DataType dt,
7855 QRegister rd,
7856 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007857 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7858 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007859 VIXL_ASSERT(allow_macro_instructions_);
7860 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007861 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007862 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007863 vmov(cond, dt, rd, operand);
7864 }
7865 void Vmov(DataType dt, QRegister rd, const QOperand& operand) {
7866 Vmov(al, dt, rd, operand);
7867 }
7868
7869 void Vmov(Condition cond,
7870 DataType dt,
7871 SRegister rd,
7872 const SOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007873 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7874 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007875 VIXL_ASSERT(allow_macro_instructions_);
7876 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007877 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007878 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007879 vmov(cond, dt, rd, operand);
7880 }
7881 void Vmov(DataType dt, SRegister rd, const SOperand& operand) {
7882 Vmov(al, dt, rd, operand);
7883 }
7884
7885 void Vmov(Condition cond, DataType dt, Register rt, DRegisterLane rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007886 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
7887 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007888 VIXL_ASSERT(allow_macro_instructions_);
7889 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007890 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007891 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007892 vmov(cond, dt, rt, rn);
7893 }
7894 void Vmov(DataType dt, Register rt, DRegisterLane rn) {
7895 Vmov(al, dt, rt, rn);
7896 }
7897 void Vmov(Condition cond, Register rt, DRegisterLane rn) {
7898 Vmov(cond, kDataTypeValueNone, rt, rn);
7899 }
7900 void Vmov(Register rt, DRegisterLane rn) {
7901 Vmov(al, kDataTypeValueNone, rt, rn);
7902 }
7903
7904 void Vmovl(Condition cond, DataType dt, QRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007905 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7906 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007907 VIXL_ASSERT(allow_macro_instructions_);
7908 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007909 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007910 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007911 vmovl(cond, dt, rd, rm);
7912 }
7913 void Vmovl(DataType dt, QRegister rd, DRegister rm) { Vmovl(al, dt, rd, rm); }
7914
7915 void Vmovn(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007916 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7917 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007918 VIXL_ASSERT(allow_macro_instructions_);
7919 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007920 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007921 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007922 vmovn(cond, dt, rd, rm);
7923 }
7924 void Vmovn(DataType dt, DRegister rd, QRegister rm) { Vmovn(al, dt, rd, rm); }
7925
7926 void Vmrs(Condition cond,
7927 RegisterOrAPSR_nzcv rt,
7928 SpecialFPRegister spec_reg) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007929 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007930 VIXL_ASSERT(allow_macro_instructions_);
7931 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007932 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007933 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007934 vmrs(cond, rt, spec_reg);
7935 }
7936 void Vmrs(RegisterOrAPSR_nzcv rt, SpecialFPRegister spec_reg) {
7937 Vmrs(al, rt, spec_reg);
7938 }
7939
7940 void Vmsr(Condition cond, SpecialFPRegister spec_reg, Register rt) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007941 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007942 VIXL_ASSERT(allow_macro_instructions_);
7943 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007944 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007945 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007946 vmsr(cond, spec_reg, rt);
7947 }
7948 void Vmsr(SpecialFPRegister spec_reg, Register rt) { Vmsr(al, spec_reg, rt); }
7949
7950 void Vmul(Condition cond,
7951 DataType dt,
7952 DRegister rd,
7953 DRegister rn,
7954 DRegister dm,
7955 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007956 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7957 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7958 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007959 VIXL_ASSERT(allow_macro_instructions_);
7960 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007961 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007962 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007963 vmul(cond, dt, rd, rn, dm, index);
7964 }
7965 void Vmul(
7966 DataType dt, DRegister rd, DRegister rn, DRegister dm, unsigned index) {
7967 Vmul(al, dt, rd, rn, dm, index);
7968 }
7969
7970 void Vmul(Condition cond,
7971 DataType dt,
7972 QRegister rd,
7973 QRegister rn,
7974 DRegister dm,
7975 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007976 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7977 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7978 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007979 VIXL_ASSERT(allow_macro_instructions_);
7980 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007981 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007982 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007983 vmul(cond, dt, rd, rn, dm, index);
7984 }
7985 void Vmul(
7986 DataType dt, QRegister rd, QRegister rn, DRegister dm, unsigned index) {
7987 Vmul(al, dt, rd, rn, dm, index);
7988 }
7989
7990 void Vmul(
7991 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00007992 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
7993 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
7994 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01007995 VIXL_ASSERT(allow_macro_instructions_);
7996 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00007997 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00007998 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01007999 vmul(cond, dt, rd, rn, rm);
8000 }
8001 void Vmul(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8002 Vmul(al, dt, rd, rn, rm);
8003 }
8004
8005 void Vmul(
8006 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008007 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8008 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8009 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008010 VIXL_ASSERT(allow_macro_instructions_);
8011 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008012 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008013 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008014 vmul(cond, dt, rd, rn, rm);
8015 }
8016 void Vmul(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8017 Vmul(al, dt, rd, rn, rm);
8018 }
8019
8020 void Vmul(
8021 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008022 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8023 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8024 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008025 VIXL_ASSERT(allow_macro_instructions_);
8026 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008027 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008028 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008029 vmul(cond, dt, rd, rn, rm);
8030 }
8031 void Vmul(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8032 Vmul(al, dt, rd, rn, rm);
8033 }
8034
8035 void Vmull(Condition cond,
8036 DataType dt,
8037 QRegister rd,
8038 DRegister rn,
8039 DRegister dm,
8040 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008041 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8042 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8043 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008044 VIXL_ASSERT(allow_macro_instructions_);
8045 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008046 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008047 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008048 vmull(cond, dt, rd, rn, dm, index);
8049 }
8050 void Vmull(
8051 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
8052 Vmull(al, dt, rd, rn, dm, index);
8053 }
8054
8055 void Vmull(
8056 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008057 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8058 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8059 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008060 VIXL_ASSERT(allow_macro_instructions_);
8061 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008062 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008063 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008064 vmull(cond, dt, rd, rn, rm);
8065 }
8066 void Vmull(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8067 Vmull(al, dt, rd, rn, rm);
8068 }
8069
8070 void Vmvn(Condition cond,
8071 DataType dt,
8072 DRegister rd,
8073 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008074 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8075 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008076 VIXL_ASSERT(allow_macro_instructions_);
8077 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008078 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008079 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008080 vmvn(cond, dt, rd, operand);
8081 }
8082 void Vmvn(DataType dt, DRegister rd, const DOperand& operand) {
8083 Vmvn(al, dt, rd, operand);
8084 }
8085
8086 void Vmvn(Condition cond,
8087 DataType dt,
8088 QRegister rd,
8089 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008090 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8091 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008092 VIXL_ASSERT(allow_macro_instructions_);
8093 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008094 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008095 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008096 vmvn(cond, dt, rd, operand);
8097 }
8098 void Vmvn(DataType dt, QRegister rd, const QOperand& operand) {
8099 Vmvn(al, dt, rd, operand);
8100 }
8101
8102 void Vneg(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008103 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8104 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008105 VIXL_ASSERT(allow_macro_instructions_);
8106 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008107 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008108 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008109 vneg(cond, dt, rd, rm);
8110 }
8111 void Vneg(DataType dt, DRegister rd, DRegister rm) { Vneg(al, dt, rd, rm); }
8112
8113 void Vneg(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008114 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8115 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008116 VIXL_ASSERT(allow_macro_instructions_);
8117 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008118 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008119 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008120 vneg(cond, dt, rd, rm);
8121 }
8122 void Vneg(DataType dt, QRegister rd, QRegister rm) { Vneg(al, dt, rd, rm); }
8123
8124 void Vneg(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008125 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8126 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008127 VIXL_ASSERT(allow_macro_instructions_);
8128 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008129 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008130 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008131 vneg(cond, dt, rd, rm);
8132 }
8133 void Vneg(DataType dt, SRegister rd, SRegister rm) { Vneg(al, dt, rd, rm); }
8134
8135 void Vnmla(
8136 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008137 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8138 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8139 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008140 VIXL_ASSERT(allow_macro_instructions_);
8141 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008142 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008143 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008144 vnmla(cond, dt, rd, rn, rm);
8145 }
8146 void Vnmla(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8147 Vnmla(al, dt, rd, rn, rm);
8148 }
8149
8150 void Vnmla(
8151 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008152 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8153 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8154 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008155 VIXL_ASSERT(allow_macro_instructions_);
8156 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008157 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008158 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008159 vnmla(cond, dt, rd, rn, rm);
8160 }
8161 void Vnmla(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8162 Vnmla(al, dt, rd, rn, rm);
8163 }
8164
8165 void Vnmls(
8166 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008167 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8168 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8169 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008170 VIXL_ASSERT(allow_macro_instructions_);
8171 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008172 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008173 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008174 vnmls(cond, dt, rd, rn, rm);
8175 }
8176 void Vnmls(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8177 Vnmls(al, dt, rd, rn, rm);
8178 }
8179
8180 void Vnmls(
8181 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008182 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8183 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8184 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008185 VIXL_ASSERT(allow_macro_instructions_);
8186 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008187 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008188 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008189 vnmls(cond, dt, rd, rn, rm);
8190 }
8191 void Vnmls(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8192 Vnmls(al, dt, rd, rn, rm);
8193 }
8194
8195 void Vnmul(
8196 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008197 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8198 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8199 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008200 VIXL_ASSERT(allow_macro_instructions_);
8201 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008202 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008203 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008204 vnmul(cond, dt, rd, rn, rm);
8205 }
8206 void Vnmul(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
8207 Vnmul(al, dt, rd, rn, rm);
8208 }
8209
8210 void Vnmul(
8211 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008212 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8213 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8214 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
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 vnmul(cond, dt, rd, rn, rm);
8220 }
8221 void Vnmul(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8222 Vnmul(al, dt, rd, rn, rm);
8223 }
8224
8225 void Vorn(Condition cond,
8226 DataType dt,
8227 DRegister rd,
8228 DRegister rn,
8229 const DOperand& 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, DRegister rd, DRegister rn, const DOperand& operand) {
8240 Vorn(al, dt, rd, rn, operand);
8241 }
8242
8243 void Vorn(Condition cond,
8244 DataType dt,
8245 QRegister rd,
8246 QRegister rn,
8247 const QOperand& 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 vorn(cond, dt, rd, rn, operand);
8256 }
8257 void Vorn(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
8258 Vorn(al, dt, rd, rn, operand);
8259 }
8260
8261 void Vorr(Condition cond,
8262 DataType dt,
8263 DRegister rd,
8264 DRegister rn,
8265 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008266 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8267 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8268 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008269 VIXL_ASSERT(allow_macro_instructions_);
8270 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008271 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008272 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008273 vorr(cond, dt, rd, rn, operand);
8274 }
8275 void Vorr(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) {
8276 Vorr(al, dt, rd, rn, operand);
8277 }
8278 void Vorr(Condition cond,
8279 DRegister rd,
8280 DRegister rn,
8281 const DOperand& operand) {
8282 Vorr(cond, kDataTypeValueNone, rd, rn, operand);
8283 }
8284 void Vorr(DRegister rd, DRegister rn, const DOperand& operand) {
8285 Vorr(al, kDataTypeValueNone, rd, rn, operand);
8286 }
8287
8288 void Vorr(Condition cond,
8289 DataType dt,
8290 QRegister rd,
8291 QRegister rn,
8292 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008293 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8294 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8295 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008296 VIXL_ASSERT(allow_macro_instructions_);
8297 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008298 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008299 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008300 vorr(cond, dt, rd, rn, operand);
8301 }
8302 void Vorr(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) {
8303 Vorr(al, dt, rd, rn, operand);
8304 }
8305 void Vorr(Condition cond,
8306 QRegister rd,
8307 QRegister rn,
8308 const QOperand& operand) {
8309 Vorr(cond, kDataTypeValueNone, rd, rn, operand);
8310 }
8311 void Vorr(QRegister rd, QRegister rn, const QOperand& operand) {
8312 Vorr(al, kDataTypeValueNone, rd, rn, operand);
8313 }
8314
8315 void Vpadal(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008316 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8317 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008318 VIXL_ASSERT(allow_macro_instructions_);
8319 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008320 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008321 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008322 vpadal(cond, dt, rd, rm);
8323 }
8324 void Vpadal(DataType dt, DRegister rd, DRegister rm) {
8325 Vpadal(al, dt, rd, rm);
8326 }
8327
8328 void Vpadal(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008329 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8330 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008331 VIXL_ASSERT(allow_macro_instructions_);
8332 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008333 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008334 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008335 vpadal(cond, dt, rd, rm);
8336 }
8337 void Vpadal(DataType dt, QRegister rd, QRegister rm) {
8338 Vpadal(al, dt, rd, rm);
8339 }
8340
8341 void Vpadd(
8342 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008343 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8344 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8345 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008346 VIXL_ASSERT(allow_macro_instructions_);
8347 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008348 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008349 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008350 vpadd(cond, dt, rd, rn, rm);
8351 }
8352 void Vpadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8353 Vpadd(al, dt, rd, rn, rm);
8354 }
8355
8356 void Vpaddl(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008357 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8358 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008359 VIXL_ASSERT(allow_macro_instructions_);
8360 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008361 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008362 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008363 vpaddl(cond, dt, rd, rm);
8364 }
8365 void Vpaddl(DataType dt, DRegister rd, DRegister rm) {
8366 Vpaddl(al, dt, rd, rm);
8367 }
8368
8369 void Vpaddl(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008370 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8371 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008372 VIXL_ASSERT(allow_macro_instructions_);
8373 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008374 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008375 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008376 vpaddl(cond, dt, rd, rm);
8377 }
8378 void Vpaddl(DataType dt, QRegister rd, QRegister rm) {
8379 Vpaddl(al, dt, rd, rm);
8380 }
8381
8382 void Vpmax(
8383 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008384 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8385 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8386 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008387 VIXL_ASSERT(allow_macro_instructions_);
8388 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008389 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008390 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008391 vpmax(cond, dt, rd, rn, rm);
8392 }
8393 void Vpmax(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8394 Vpmax(al, dt, rd, rn, rm);
8395 }
8396
8397 void Vpmin(
8398 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008399 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8400 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8401 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008402 VIXL_ASSERT(allow_macro_instructions_);
8403 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008404 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008405 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008406 vpmin(cond, dt, rd, rn, rm);
8407 }
8408 void Vpmin(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8409 Vpmin(al, dt, rd, rn, rm);
8410 }
8411
8412 void Vpop(Condition cond, DataType dt, DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008413 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008414 VIXL_ASSERT(allow_macro_instructions_);
8415 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008416 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008417 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008418 vpop(cond, dt, dreglist);
8419 }
8420 void Vpop(DataType dt, DRegisterList dreglist) { Vpop(al, dt, dreglist); }
8421 void Vpop(Condition cond, DRegisterList dreglist) {
8422 Vpop(cond, kDataTypeValueNone, dreglist);
8423 }
8424 void Vpop(DRegisterList dreglist) { Vpop(al, kDataTypeValueNone, dreglist); }
8425
8426 void Vpop(Condition cond, DataType dt, SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008427 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008428 VIXL_ASSERT(allow_macro_instructions_);
8429 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008430 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008431 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008432 vpop(cond, dt, sreglist);
8433 }
8434 void Vpop(DataType dt, SRegisterList sreglist) { Vpop(al, dt, sreglist); }
8435 void Vpop(Condition cond, SRegisterList sreglist) {
8436 Vpop(cond, kDataTypeValueNone, sreglist);
8437 }
8438 void Vpop(SRegisterList sreglist) { Vpop(al, kDataTypeValueNone, sreglist); }
8439
8440 void Vpush(Condition cond, DataType dt, DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008441 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008442 VIXL_ASSERT(allow_macro_instructions_);
8443 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008444 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008445 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008446 vpush(cond, dt, dreglist);
8447 }
8448 void Vpush(DataType dt, DRegisterList dreglist) { Vpush(al, dt, dreglist); }
8449 void Vpush(Condition cond, DRegisterList dreglist) {
8450 Vpush(cond, kDataTypeValueNone, dreglist);
8451 }
8452 void Vpush(DRegisterList dreglist) {
8453 Vpush(al, kDataTypeValueNone, dreglist);
8454 }
8455
8456 void Vpush(Condition cond, DataType dt, SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008457 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008458 VIXL_ASSERT(allow_macro_instructions_);
8459 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008460 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008461 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008462 vpush(cond, dt, sreglist);
8463 }
8464 void Vpush(DataType dt, SRegisterList sreglist) { Vpush(al, dt, sreglist); }
8465 void Vpush(Condition cond, SRegisterList sreglist) {
8466 Vpush(cond, kDataTypeValueNone, sreglist);
8467 }
8468 void Vpush(SRegisterList sreglist) {
8469 Vpush(al, kDataTypeValueNone, sreglist);
8470 }
8471
8472 void Vqabs(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008473 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8474 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008475 VIXL_ASSERT(allow_macro_instructions_);
8476 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008477 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008478 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008479 vqabs(cond, dt, rd, rm);
8480 }
8481 void Vqabs(DataType dt, DRegister rd, DRegister rm) { Vqabs(al, dt, rd, rm); }
8482
8483 void Vqabs(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8485 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008486 VIXL_ASSERT(allow_macro_instructions_);
8487 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008488 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008489 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008490 vqabs(cond, dt, rd, rm);
8491 }
8492 void Vqabs(DataType dt, QRegister rd, QRegister rm) { Vqabs(al, dt, rd, rm); }
8493
8494 void Vqadd(
8495 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008496 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8497 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8498 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008499 VIXL_ASSERT(allow_macro_instructions_);
8500 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008501 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008502 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008503 vqadd(cond, dt, rd, rn, rm);
8504 }
8505 void Vqadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8506 Vqadd(al, dt, rd, rn, rm);
8507 }
8508
8509 void Vqadd(
8510 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008511 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8512 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8513 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008514 VIXL_ASSERT(allow_macro_instructions_);
8515 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008516 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008517 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008518 vqadd(cond, dt, rd, rn, rm);
8519 }
8520 void Vqadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
8521 Vqadd(al, dt, rd, rn, rm);
8522 }
8523
8524 void Vqdmlal(
8525 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008526 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8527 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8528 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008529 VIXL_ASSERT(allow_macro_instructions_);
8530 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008531 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008532 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008533 vqdmlal(cond, dt, rd, rn, rm);
8534 }
8535 void Vqdmlal(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8536 Vqdmlal(al, dt, rd, rn, rm);
8537 }
8538
8539 void Vqdmlal(Condition cond,
8540 DataType dt,
8541 QRegister rd,
8542 DRegister rn,
8543 DRegister dm,
8544 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008545 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8546 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8547 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008548 VIXL_ASSERT(allow_macro_instructions_);
8549 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008550 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008551 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008552 vqdmlal(cond, dt, rd, rn, dm, index);
8553 }
8554 void Vqdmlal(
8555 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
8556 Vqdmlal(al, dt, rd, rn, dm, index);
8557 }
8558
8559 void Vqdmlsl(
8560 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008561 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8562 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008564 VIXL_ASSERT(allow_macro_instructions_);
8565 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008566 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008567 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008568 vqdmlsl(cond, dt, rd, rn, rm);
8569 }
8570 void Vqdmlsl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
8571 Vqdmlsl(al, dt, rd, rn, rm);
8572 }
8573
8574 void Vqdmlsl(Condition cond,
8575 DataType dt,
8576 QRegister rd,
8577 DRegister rn,
8578 DRegister dm,
8579 unsigned index) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008580 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8581 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8582 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008583 VIXL_ASSERT(allow_macro_instructions_);
8584 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008585 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008586 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008587 vqdmlsl(cond, dt, rd, rn, dm, index);
8588 }
8589 void Vqdmlsl(
8590 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) {
8591 Vqdmlsl(al, dt, rd, rn, dm, index);
8592 }
8593
8594 void Vqdmulh(
8595 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008596 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8597 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8598 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008599 VIXL_ASSERT(allow_macro_instructions_);
8600 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008601 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008602 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008603 vqdmulh(cond, dt, rd, rn, rm);
8604 }
8605 void Vqdmulh(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8606 Vqdmulh(al, dt, rd, rn, rm);
8607 }
8608
8609 void Vqdmulh(
8610 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister 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, QRegister rd, QRegister rn, QRegister rm) {
8621 Vqdmulh(al, dt, rd, rn, rm);
8622 }
8623
8624 void Vqdmulh(Condition cond,
8625 DataType dt,
8626 DRegister rd,
8627 DRegister 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, DRegister rd, DRegister rn, DRegisterLane rm) {
8639 Vqdmulh(al, dt, rd, rn, rm);
8640 }
8641
8642 void Vqdmulh(Condition cond,
8643 DataType dt,
8644 QRegister rd,
8645 QRegister rn,
8646 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008647 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8648 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8649 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008650 VIXL_ASSERT(allow_macro_instructions_);
8651 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008652 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008653 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008654 vqdmulh(cond, dt, rd, rn, rm);
8655 }
8656 void Vqdmulh(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
8657 Vqdmulh(al, dt, rd, rn, rm);
8658 }
8659
8660 void Vqdmull(
8661 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister 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, DRegister rm) {
8672 Vqdmull(al, dt, rd, rn, rm);
8673 }
8674
8675 void Vqdmull(Condition cond,
8676 DataType dt,
8677 QRegister rd,
8678 DRegister rn,
8679 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008680 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8681 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8682 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008683 VIXL_ASSERT(allow_macro_instructions_);
8684 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008685 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008686 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008687 vqdmull(cond, dt, rd, rn, rm);
8688 }
8689 void Vqdmull(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) {
8690 Vqdmull(al, dt, rd, rn, rm);
8691 }
8692
8693 void Vqmovn(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008694 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008696 VIXL_ASSERT(allow_macro_instructions_);
8697 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008698 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008699 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008700 vqmovn(cond, dt, rd, rm);
8701 }
8702 void Vqmovn(DataType dt, DRegister rd, QRegister rm) {
8703 Vqmovn(al, dt, rd, rm);
8704 }
8705
8706 void Vqmovun(Condition cond, DataType dt, DRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008707 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8708 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008709 VIXL_ASSERT(allow_macro_instructions_);
8710 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008711 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008712 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008713 vqmovun(cond, dt, rd, rm);
8714 }
8715 void Vqmovun(DataType dt, DRegister rd, QRegister rm) {
8716 Vqmovun(al, dt, rd, rm);
8717 }
8718
8719 void Vqneg(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008720 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8721 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008722 VIXL_ASSERT(allow_macro_instructions_);
8723 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008724 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008725 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008726 vqneg(cond, dt, rd, rm);
8727 }
8728 void Vqneg(DataType dt, DRegister rd, DRegister rm) { Vqneg(al, dt, rd, rm); }
8729
8730 void Vqneg(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008731 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8732 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008733 VIXL_ASSERT(allow_macro_instructions_);
8734 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008735 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008736 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008737 vqneg(cond, dt, rd, rm);
8738 }
8739 void Vqneg(DataType dt, QRegister rd, QRegister rm) { Vqneg(al, dt, rd, rm); }
8740
8741 void Vqrdmulh(
8742 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008743 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8744 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8745 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008746 VIXL_ASSERT(allow_macro_instructions_);
8747 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008748 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008749 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008750 vqrdmulh(cond, dt, rd, rn, rm);
8751 }
8752 void Vqrdmulh(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
8753 Vqrdmulh(al, dt, rd, rn, rm);
8754 }
8755
8756 void Vqrdmulh(
8757 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister 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, QRegister rd, QRegister rn, QRegister rm) {
8768 Vqrdmulh(al, dt, rd, rn, rm);
8769 }
8770
8771 void Vqrdmulh(Condition cond,
8772 DataType dt,
8773 DRegister rd,
8774 DRegister 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, DRegister rd, DRegister rn, DRegisterLane rm) {
8786 Vqrdmulh(al, dt, rd, rn, rm);
8787 }
8788
8789 void Vqrdmulh(Condition cond,
8790 DataType dt,
8791 QRegister rd,
8792 QRegister rn,
8793 DRegisterLane rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008794 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8795 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
8796 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008797 VIXL_ASSERT(allow_macro_instructions_);
8798 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008799 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008800 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008801 vqrdmulh(cond, dt, rd, rn, rm);
8802 }
8803 void Vqrdmulh(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) {
8804 Vqrdmulh(al, dt, rd, rn, rm);
8805 }
8806
8807 void Vqrshl(
8808 Condition cond, DataType dt, DRegister rd, DRegister rm, DRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008809 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8810 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8811 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008812 VIXL_ASSERT(allow_macro_instructions_);
8813 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008814 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008815 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008816 vqrshl(cond, dt, rd, rm, rn);
8817 }
8818 void Vqrshl(DataType dt, DRegister rd, DRegister rm, DRegister rn) {
8819 Vqrshl(al, dt, rd, rm, rn);
8820 }
8821
8822 void Vqrshl(
8823 Condition cond, DataType dt, QRegister rd, QRegister rm, QRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008824 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8825 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8826 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
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 vqrshl(cond, dt, rd, rm, rn);
8832 }
8833 void Vqrshl(DataType dt, QRegister rd, QRegister rm, QRegister rn) {
8834 Vqrshl(al, dt, rd, rm, rn);
8835 }
8836
8837 void Vqrshrn(Condition cond,
8838 DataType dt,
8839 DRegister rd,
8840 QRegister rm,
8841 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008842 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8843 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8844 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008845 VIXL_ASSERT(allow_macro_instructions_);
8846 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008847 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008848 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008849 vqrshrn(cond, dt, rd, rm, operand);
8850 }
8851 void Vqrshrn(DataType dt,
8852 DRegister rd,
8853 QRegister rm,
8854 const QOperand& operand) {
8855 Vqrshrn(al, dt, rd, rm, operand);
8856 }
8857
8858 void Vqrshrun(Condition cond,
8859 DataType dt,
8860 DRegister rd,
8861 QRegister rm,
8862 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008863 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8864 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8865 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008866 VIXL_ASSERT(allow_macro_instructions_);
8867 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008868 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008869 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008870 vqrshrun(cond, dt, rd, rm, operand);
8871 }
8872 void Vqrshrun(DataType dt,
8873 DRegister rd,
8874 QRegister rm,
8875 const QOperand& operand) {
8876 Vqrshrun(al, dt, rd, rm, operand);
8877 }
8878
8879 void Vqshl(Condition cond,
8880 DataType dt,
8881 DRegister rd,
8882 DRegister rm,
8883 const DOperand& 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, DRegister rd, DRegister rm, const DOperand& operand) {
8894 Vqshl(al, dt, rd, rm, operand);
8895 }
8896
8897 void Vqshl(Condition cond,
8898 DataType dt,
8899 QRegister rd,
8900 QRegister rm,
8901 const QOperand& 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 vqshl(cond, dt, rd, rm, operand);
8910 }
8911 void Vqshl(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
8912 Vqshl(al, dt, rd, rm, operand);
8913 }
8914
8915 void Vqshlu(Condition cond,
8916 DataType dt,
8917 DRegister rd,
8918 DRegister rm,
8919 const DOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008920 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8921 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8922 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008923 VIXL_ASSERT(allow_macro_instructions_);
8924 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008925 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008926 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008927 vqshlu(cond, dt, rd, rm, operand);
8928 }
8929 void Vqshlu(DataType dt,
8930 DRegister rd,
8931 DRegister rm,
8932 const DOperand& operand) {
8933 Vqshlu(al, dt, rd, rm, operand);
8934 }
8935
8936 void Vqshlu(Condition cond,
8937 DataType dt,
8938 QRegister rd,
8939 QRegister rm,
8940 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008941 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8942 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8943 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008944 VIXL_ASSERT(allow_macro_instructions_);
8945 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008946 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008947 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008948 vqshlu(cond, dt, rd, rm, operand);
8949 }
8950 void Vqshlu(DataType dt,
8951 QRegister rd,
8952 QRegister rm,
8953 const QOperand& operand) {
8954 Vqshlu(al, dt, rd, rm, operand);
8955 }
8956
8957 void Vqshrn(Condition cond,
8958 DataType dt,
8959 DRegister rd,
8960 QRegister rm,
8961 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008962 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8963 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8964 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01008965 VIXL_ASSERT(allow_macro_instructions_);
8966 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00008967 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00008968 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01008969 vqshrn(cond, dt, rd, rm, operand);
8970 }
8971 void Vqshrn(DataType dt,
8972 DRegister rd,
8973 QRegister rm,
8974 const QOperand& operand) {
8975 Vqshrn(al, dt, rd, rm, operand);
8976 }
8977
8978 void Vqshrun(Condition cond,
8979 DataType dt,
8980 DRegister rd,
8981 QRegister rm,
8982 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00008983 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
8984 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
8985 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
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 vqshrun(cond, dt, rd, rm, operand);
8991 }
8992 void Vqshrun(DataType dt,
8993 DRegister rd,
8994 QRegister rm,
8995 const QOperand& operand) {
8996 Vqshrun(al, dt, rd, rm, operand);
8997 }
8998
8999 void Vqsub(
9000 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009001 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9002 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9003 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009004 VIXL_ASSERT(allow_macro_instructions_);
9005 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009006 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009007 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009008 vqsub(cond, dt, rd, rn, rm);
9009 }
9010 void Vqsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9011 Vqsub(al, dt, rd, rn, rm);
9012 }
9013
9014 void Vqsub(
9015 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009016 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9017 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9018 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009019 VIXL_ASSERT(allow_macro_instructions_);
9020 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009021 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009022 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009023 vqsub(cond, dt, rd, rn, rm);
9024 }
9025 void Vqsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9026 Vqsub(al, dt, rd, rn, rm);
9027 }
9028
9029 void Vraddhn(
9030 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009031 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9032 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9033 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009034 VIXL_ASSERT(allow_macro_instructions_);
9035 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009036 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009037 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009038 vraddhn(cond, dt, rd, rn, rm);
9039 }
9040 void Vraddhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
9041 Vraddhn(al, dt, rd, rn, rm);
9042 }
9043
9044 void Vrecpe(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009045 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9046 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009047 VIXL_ASSERT(allow_macro_instructions_);
9048 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009049 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009050 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009051 vrecpe(cond, dt, rd, rm);
9052 }
9053 void Vrecpe(DataType dt, DRegister rd, DRegister rm) {
9054 Vrecpe(al, dt, rd, rm);
9055 }
9056
9057 void Vrecpe(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009058 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9059 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009060 VIXL_ASSERT(allow_macro_instructions_);
9061 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009062 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009063 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009064 vrecpe(cond, dt, rd, rm);
9065 }
9066 void Vrecpe(DataType dt, QRegister rd, QRegister rm) {
9067 Vrecpe(al, dt, rd, rm);
9068 }
9069
9070 void Vrecps(
9071 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009072 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9073 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9074 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009075 VIXL_ASSERT(allow_macro_instructions_);
9076 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009077 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009078 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009079 vrecps(cond, dt, rd, rn, rm);
9080 }
9081 void Vrecps(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9082 Vrecps(al, dt, rd, rn, rm);
9083 }
9084
9085 void Vrecps(
9086 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009087 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9088 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9089 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009090 VIXL_ASSERT(allow_macro_instructions_);
9091 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009092 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009093 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009094 vrecps(cond, dt, rd, rn, rm);
9095 }
9096 void Vrecps(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9097 Vrecps(al, dt, rd, rn, rm);
9098 }
9099
9100 void Vrev16(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009101 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9102 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009103 VIXL_ASSERT(allow_macro_instructions_);
9104 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009105 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009106 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009107 vrev16(cond, dt, rd, rm);
9108 }
9109 void Vrev16(DataType dt, DRegister rd, DRegister rm) {
9110 Vrev16(al, dt, rd, rm);
9111 }
9112
9113 void Vrev16(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009114 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9115 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009116 VIXL_ASSERT(allow_macro_instructions_);
9117 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009118 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009119 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009120 vrev16(cond, dt, rd, rm);
9121 }
9122 void Vrev16(DataType dt, QRegister rd, QRegister rm) {
9123 Vrev16(al, dt, rd, rm);
9124 }
9125
9126 void Vrev32(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009127 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9128 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009129 VIXL_ASSERT(allow_macro_instructions_);
9130 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009131 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009132 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009133 vrev32(cond, dt, rd, rm);
9134 }
9135 void Vrev32(DataType dt, DRegister rd, DRegister rm) {
9136 Vrev32(al, dt, rd, rm);
9137 }
9138
9139 void Vrev32(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009140 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9141 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009142 VIXL_ASSERT(allow_macro_instructions_);
9143 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009144 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009145 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009146 vrev32(cond, dt, rd, rm);
9147 }
9148 void Vrev32(DataType dt, QRegister rd, QRegister rm) {
9149 Vrev32(al, dt, rd, rm);
9150 }
9151
9152 void Vrev64(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009153 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9154 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009155 VIXL_ASSERT(allow_macro_instructions_);
9156 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009157 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009158 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009159 vrev64(cond, dt, rd, rm);
9160 }
9161 void Vrev64(DataType dt, DRegister rd, DRegister rm) {
9162 Vrev64(al, dt, rd, rm);
9163 }
9164
9165 void Vrev64(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009166 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9167 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009168 VIXL_ASSERT(allow_macro_instructions_);
9169 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009170 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009171 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009172 vrev64(cond, dt, rd, rm);
9173 }
9174 void Vrev64(DataType dt, QRegister rd, QRegister rm) {
9175 Vrev64(al, dt, rd, rm);
9176 }
9177
9178 void Vrhadd(
9179 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009180 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9181 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9182 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009183 VIXL_ASSERT(allow_macro_instructions_);
9184 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009185 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009186 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009187 vrhadd(cond, dt, rd, rn, rm);
9188 }
9189 void Vrhadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9190 Vrhadd(al, dt, rd, rn, rm);
9191 }
9192
9193 void Vrhadd(
9194 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009195 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9196 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9197 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009198 VIXL_ASSERT(allow_macro_instructions_);
9199 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009200 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009201 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009202 vrhadd(cond, dt, rd, rn, rm);
9203 }
9204 void Vrhadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9205 Vrhadd(al, dt, rd, rn, rm);
9206 }
9207
Vincent Belliard564c10c2018-02-06 08:21:16 -08009208 void Vrinta(DataType dt, DRegister rd, DRegister 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 Vrinta(DataType dt, QRegister rd, QRegister 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 vrinta(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009224 }
9225
Vincent Belliard564c10c2018-02-06 08:21:16 -08009226 void Vrinta(DataType dt, SRegister rd, SRegister 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 vrinta(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009233 }
9234
Vincent Belliard564c10c2018-02-06 08:21:16 -08009235 void Vrintm(DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009236 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9237 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009238 VIXL_ASSERT(allow_macro_instructions_);
9239 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009240 MacroEmissionCheckScope guard(this);
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 Vrintm(DataType dt, QRegister rd, QRegister 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 vrintm(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009251 }
9252
Vincent Belliard564c10c2018-02-06 08:21:16 -08009253 void Vrintm(DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009254 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9255 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009256 VIXL_ASSERT(allow_macro_instructions_);
9257 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009258 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009259 vrintm(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009260 }
9261
Vincent Belliard564c10c2018-02-06 08:21:16 -08009262 void Vrintn(DataType dt, DRegister rd, DRegister 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 Vrintn(DataType dt, QRegister rd, QRegister 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 vrintn(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009278 }
9279
Vincent Belliard564c10c2018-02-06 08:21:16 -08009280 void Vrintn(DataType dt, SRegister rd, SRegister 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 vrintn(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009287 }
9288
Vincent Belliard564c10c2018-02-06 08:21:16 -08009289 void Vrintp(DataType dt, DRegister rd, DRegister 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 Vrintp(DataType dt, QRegister rd, QRegister 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);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009304 vrintp(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009305 }
9306
Vincent Belliard564c10c2018-02-06 08:21:16 -08009307 void Vrintp(DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009308 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9309 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009310 VIXL_ASSERT(allow_macro_instructions_);
9311 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009312 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009313 vrintp(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009314 }
9315
Vincent Belliard564c10c2018-02-06 08:21:16 -08009316 void Vrintr(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009317 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9318 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009319 VIXL_ASSERT(allow_macro_instructions_);
9320 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009321 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009322 ITScope it_scope(this, &cond, guard);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009323 vrintr(cond, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009324 }
Vincent Belliard564c10c2018-02-06 08:21:16 -08009325 void Vrintr(DataType dt, SRegister rd, SRegister rm) {
9326 Vrintr(al, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009327 }
9328
Vincent Belliard564c10c2018-02-06 08:21:16 -08009329 void Vrintr(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009330 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9331 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009332 VIXL_ASSERT(allow_macro_instructions_);
9333 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009334 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009335 ITScope it_scope(this, &cond, guard);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009336 vrintr(cond, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009337 }
Vincent Belliard564c10c2018-02-06 08:21:16 -08009338 void Vrintr(DataType dt, DRegister rd, DRegister rm) {
9339 Vrintr(al, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009340 }
9341
Vincent Belliard564c10c2018-02-06 08:21:16 -08009342 void Vrintx(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009343 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9344 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009345 VIXL_ASSERT(allow_macro_instructions_);
9346 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009347 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009348 ITScope it_scope(this, &cond, guard);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009349 vrintx(cond, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009350 }
Vincent Belliard564c10c2018-02-06 08:21:16 -08009351 void Vrintx(DataType dt, DRegister rd, DRegister rm) {
9352 Vrintx(al, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009353 }
9354
Vincent Belliard564c10c2018-02-06 08:21:16 -08009355 void Vrintx(DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009356 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9357 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009358 VIXL_ASSERT(allow_macro_instructions_);
9359 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009360 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009361 vrintx(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009362 }
9363
Vincent Belliard564c10c2018-02-06 08:21:16 -08009364 void Vrintx(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009365 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9366 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009367 VIXL_ASSERT(allow_macro_instructions_);
9368 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009369 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009370 ITScope it_scope(this, &cond, guard);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009371 vrintx(cond, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009372 }
Vincent Belliard564c10c2018-02-06 08:21:16 -08009373 void Vrintx(DataType dt, SRegister rd, SRegister rm) {
9374 Vrintx(al, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009375 }
9376
Vincent Belliard564c10c2018-02-06 08:21:16 -08009377 void Vrintz(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009378 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9379 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009380 VIXL_ASSERT(allow_macro_instructions_);
9381 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009382 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009383 ITScope it_scope(this, &cond, guard);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009384 vrintz(cond, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009385 }
Vincent Belliard564c10c2018-02-06 08:21:16 -08009386 void Vrintz(DataType dt, DRegister rd, DRegister rm) {
9387 Vrintz(al, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009388 }
9389
Vincent Belliard564c10c2018-02-06 08:21:16 -08009390 void Vrintz(DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009391 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9392 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009393 VIXL_ASSERT(allow_macro_instructions_);
9394 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009395 MacroEmissionCheckScope guard(this);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009396 vrintz(dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009397 }
9398
Vincent Belliard564c10c2018-02-06 08:21:16 -08009399 void Vrintz(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009400 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9401 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009402 VIXL_ASSERT(allow_macro_instructions_);
9403 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009404 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009405 ITScope it_scope(this, &cond, guard);
Vincent Belliard564c10c2018-02-06 08:21:16 -08009406 vrintz(cond, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009407 }
Vincent Belliard564c10c2018-02-06 08:21:16 -08009408 void Vrintz(DataType dt, SRegister rd, SRegister rm) {
9409 Vrintz(al, dt, rd, rm);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009410 }
9411
9412 void Vrshl(
9413 Condition cond, DataType dt, DRegister rd, DRegister rm, DRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009414 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9415 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9416 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009417 VIXL_ASSERT(allow_macro_instructions_);
9418 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009419 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009420 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009421 vrshl(cond, dt, rd, rm, rn);
9422 }
9423 void Vrshl(DataType dt, DRegister rd, DRegister rm, DRegister rn) {
9424 Vrshl(al, dt, rd, rm, rn);
9425 }
9426
9427 void Vrshl(
9428 Condition cond, DataType dt, QRegister rd, QRegister rm, QRegister rn) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009429 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9430 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9431 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
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 vrshl(cond, dt, rd, rm, rn);
9437 }
9438 void Vrshl(DataType dt, QRegister rd, QRegister rm, QRegister rn) {
9439 Vrshl(al, dt, rd, rm, rn);
9440 }
9441
9442 void Vrshr(Condition cond,
9443 DataType dt,
9444 DRegister rd,
9445 DRegister rm,
9446 const DOperand& 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, DRegister rd, DRegister rm, const DOperand& operand) {
9457 Vrshr(al, dt, rd, rm, operand);
9458 }
9459
9460 void Vrshr(Condition cond,
9461 DataType dt,
9462 QRegister 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 vrshr(cond, dt, rd, rm, operand);
9473 }
9474 void Vrshr(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9475 Vrshr(al, dt, rd, rm, operand);
9476 }
9477
9478 void Vrshrn(Condition cond,
9479 DataType dt,
9480 DRegister rd,
9481 QRegister rm,
9482 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009483 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9485 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009486 VIXL_ASSERT(allow_macro_instructions_);
9487 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009488 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009489 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009490 vrshrn(cond, dt, rd, rm, operand);
9491 }
9492 void Vrshrn(DataType dt,
9493 DRegister rd,
9494 QRegister rm,
9495 const QOperand& operand) {
9496 Vrshrn(al, dt, rd, rm, operand);
9497 }
9498
9499 void Vrsqrte(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009500 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9501 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009502 VIXL_ASSERT(allow_macro_instructions_);
9503 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009504 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009505 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009506 vrsqrte(cond, dt, rd, rm);
9507 }
9508 void Vrsqrte(DataType dt, DRegister rd, DRegister rm) {
9509 Vrsqrte(al, dt, rd, rm);
9510 }
9511
9512 void Vrsqrte(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009513 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9514 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009515 VIXL_ASSERT(allow_macro_instructions_);
9516 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009517 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009518 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009519 vrsqrte(cond, dt, rd, rm);
9520 }
9521 void Vrsqrte(DataType dt, QRegister rd, QRegister rm) {
9522 Vrsqrte(al, dt, rd, rm);
9523 }
9524
9525 void Vrsqrts(
9526 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009527 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9528 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9529 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009530 VIXL_ASSERT(allow_macro_instructions_);
9531 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009532 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009533 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009534 vrsqrts(cond, dt, rd, rn, rm);
9535 }
9536 void Vrsqrts(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
9537 Vrsqrts(al, dt, rd, rn, rm);
9538 }
9539
9540 void Vrsqrts(
9541 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009542 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9543 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9544 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
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 vrsqrts(cond, dt, rd, rn, rm);
9550 }
9551 void Vrsqrts(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
9552 Vrsqrts(al, dt, rd, rn, rm);
9553 }
9554
9555 void Vrsra(Condition cond,
9556 DataType dt,
9557 DRegister rd,
9558 DRegister rm,
9559 const DOperand& 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, DRegister rd, DRegister rm, const DOperand& operand) {
9570 Vrsra(al, dt, rd, rm, operand);
9571 }
9572
9573 void Vrsra(Condition cond,
9574 DataType dt,
9575 QRegister rd,
9576 QRegister rm,
9577 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009578 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9579 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9580 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009581 VIXL_ASSERT(allow_macro_instructions_);
9582 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009583 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009584 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009585 vrsra(cond, dt, rd, rm, operand);
9586 }
9587 void Vrsra(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9588 Vrsra(al, dt, rd, rm, operand);
9589 }
9590
9591 void Vrsubhn(
9592 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009593 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9594 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9595 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009596 VIXL_ASSERT(allow_macro_instructions_);
9597 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009598 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009599 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009600 vrsubhn(cond, dt, rd, rn, rm);
9601 }
9602 void Vrsubhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
9603 Vrsubhn(al, dt, rd, rn, rm);
9604 }
9605
9606 void Vseleq(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009607 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9608 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9609 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009610 VIXL_ASSERT(allow_macro_instructions_);
9611 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009612 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009613 vseleq(dt, rd, rn, rm);
9614 }
9615
9616 void Vseleq(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009617 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9618 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9619 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009620 VIXL_ASSERT(allow_macro_instructions_);
9621 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009622 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009623 vseleq(dt, rd, rn, rm);
9624 }
9625
9626 void Vselge(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009627 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9628 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9629 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009630 VIXL_ASSERT(allow_macro_instructions_);
9631 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009632 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009633 vselge(dt, rd, rn, rm);
9634 }
9635
9636 void Vselge(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009637 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9638 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9639 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009640 VIXL_ASSERT(allow_macro_instructions_);
9641 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009642 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009643 vselge(dt, rd, rn, rm);
9644 }
9645
9646 void Vselgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009647 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9648 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9649 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009650 VIXL_ASSERT(allow_macro_instructions_);
9651 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009652 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009653 vselgt(dt, rd, rn, rm);
9654 }
9655
9656 void Vselgt(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009657 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9658 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9659 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009660 VIXL_ASSERT(allow_macro_instructions_);
9661 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009662 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009663 vselgt(dt, rd, rn, rm);
9664 }
9665
9666 void Vselvs(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009667 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9668 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9669 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009670 VIXL_ASSERT(allow_macro_instructions_);
9671 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009672 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009673 vselvs(dt, rd, rn, rm);
9674 }
9675
9676 void Vselvs(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009677 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9678 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
9679 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009680 VIXL_ASSERT(allow_macro_instructions_);
9681 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009682 MacroEmissionCheckScope guard(this);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009683 vselvs(dt, rd, rn, rm);
9684 }
9685
9686 void Vshl(Condition cond,
9687 DataType dt,
9688 DRegister rd,
9689 DRegister rm,
9690 const DOperand& 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, DRegister rd, DRegister rm, const DOperand& operand) {
9701 Vshl(al, dt, rd, rm, operand);
9702 }
9703
9704 void Vshl(Condition cond,
9705 DataType dt,
9706 QRegister rd,
9707 QRegister rm,
9708 const QOperand& 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 vshl(cond, dt, rd, rm, operand);
9717 }
9718 void Vshl(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9719 Vshl(al, dt, rd, rm, operand);
9720 }
9721
9722 void Vshll(Condition cond,
9723 DataType dt,
9724 QRegister 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 vshll(cond, dt, rd, rm, operand);
9735 }
9736 void Vshll(DataType dt, QRegister rd, DRegister rm, const DOperand& operand) {
9737 Vshll(al, dt, rd, rm, operand);
9738 }
9739
9740 void Vshr(Condition cond,
9741 DataType dt,
9742 DRegister rd,
9743 DRegister rm,
9744 const DOperand& 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, DRegister rd, DRegister rm, const DOperand& operand) {
9755 Vshr(al, dt, rd, rm, operand);
9756 }
9757
9758 void Vshr(Condition cond,
9759 DataType dt,
9760 QRegister 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 vshr(cond, dt, rd, rm, operand);
9771 }
9772 void Vshr(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9773 Vshr(al, dt, rd, rm, operand);
9774 }
9775
9776 void Vshrn(Condition cond,
9777 DataType dt,
9778 DRegister rd,
9779 QRegister rm,
9780 const QOperand& 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 vshrn(cond, dt, rd, rm, operand);
9789 }
9790 void Vshrn(DataType dt, DRegister rd, QRegister rm, const QOperand& operand) {
9791 Vshrn(al, dt, rd, rm, operand);
9792 }
9793
9794 void Vsli(Condition cond,
9795 DataType dt,
9796 DRegister rd,
9797 DRegister rm,
9798 const DOperand& 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, DRegister rd, DRegister rm, const DOperand& operand) {
9809 Vsli(al, dt, rd, rm, operand);
9810 }
9811
9812 void Vsli(Condition cond,
9813 DataType dt,
9814 QRegister rd,
9815 QRegister rm,
9816 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009817 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9818 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9819 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009820 VIXL_ASSERT(allow_macro_instructions_);
9821 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009822 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009823 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009824 vsli(cond, dt, rd, rm, operand);
9825 }
9826 void Vsli(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9827 Vsli(al, dt, rd, rm, operand);
9828 }
9829
9830 void Vsqrt(Condition cond, DataType dt, SRegister rd, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009831 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9832 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009833 VIXL_ASSERT(allow_macro_instructions_);
9834 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009835 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009836 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009837 vsqrt(cond, dt, rd, rm);
9838 }
9839 void Vsqrt(DataType dt, SRegister rd, SRegister rm) { Vsqrt(al, dt, rd, rm); }
9840
9841 void Vsqrt(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009842 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9843 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009844 VIXL_ASSERT(allow_macro_instructions_);
9845 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009846 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009847 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009848 vsqrt(cond, dt, rd, rm);
9849 }
9850 void Vsqrt(DataType dt, DRegister rd, DRegister rm) { Vsqrt(al, dt, rd, rm); }
9851
9852 void Vsra(Condition cond,
9853 DataType dt,
9854 DRegister rd,
9855 DRegister rm,
9856 const DOperand& 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, DRegister rd, DRegister rm, const DOperand& operand) {
9867 Vsra(al, dt, rd, rm, operand);
9868 }
9869
9870 void Vsra(Condition cond,
9871 DataType dt,
9872 QRegister rd,
9873 QRegister rm,
9874 const QOperand& 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 vsra(cond, dt, rd, rm, operand);
9883 }
9884 void Vsra(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9885 Vsra(al, dt, rd, rm, operand);
9886 }
9887
9888 void Vsri(Condition cond,
9889 DataType dt,
9890 DRegister rd,
9891 DRegister rm,
9892 const DOperand& 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, DRegister rd, DRegister rm, const DOperand& operand) {
9903 Vsri(al, dt, rd, rm, operand);
9904 }
9905
9906 void Vsri(Condition cond,
9907 DataType dt,
9908 QRegister rd,
9909 QRegister rm,
9910 const QOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +00009911 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
9912 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
9913 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +01009914 VIXL_ASSERT(allow_macro_instructions_);
9915 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +00009916 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +00009917 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +01009918 vsri(cond, dt, rd, rm, operand);
9919 }
9920 void Vsri(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) {
9921 Vsri(al, dt, rd, rm, operand);
9922 }
9923
9924 void Vst1(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 vst1(cond, dt, nreglist, operand);
9935 }
9936 void Vst1(DataType dt,
9937 const NeonRegisterList& nreglist,
9938 const AlignedMemOperand& operand) {
9939 Vst1(al, dt, nreglist, operand);
9940 }
9941
9942 void Vst2(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 vst2(cond, dt, nreglist, operand);
9953 }
9954 void Vst2(DataType dt,
9955 const NeonRegisterList& nreglist,
9956 const AlignedMemOperand& operand) {
9957 Vst2(al, dt, nreglist, operand);
9958 }
9959
9960 void Vst3(Condition cond,
9961 DataType dt,
9962 const NeonRegisterList& nreglist,
9963 const AlignedMemOperand& 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 AlignedMemOperand& operand) {
9975 Vst3(al, dt, nreglist, operand);
9976 }
9977
9978 void Vst3(Condition cond,
9979 DataType dt,
9980 const NeonRegisterList& nreglist,
9981 const MemOperand& 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 vst3(cond, dt, nreglist, operand);
9989 }
9990 void Vst3(DataType dt,
9991 const NeonRegisterList& nreglist,
9992 const MemOperand& operand) {
9993 Vst3(al, dt, nreglist, operand);
9994 }
9995
9996 void Vst4(Condition cond,
9997 DataType dt,
9998 const NeonRegisterList& nreglist,
9999 const AlignedMemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010000 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10001 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010002 VIXL_ASSERT(allow_macro_instructions_);
10003 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010004 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010005 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010006 vst4(cond, dt, nreglist, operand);
10007 }
10008 void Vst4(DataType dt,
10009 const NeonRegisterList& nreglist,
10010 const AlignedMemOperand& operand) {
10011 Vst4(al, dt, nreglist, operand);
10012 }
10013
10014 void Vstm(Condition cond,
10015 DataType dt,
10016 Register rn,
10017 WriteBack write_back,
10018 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010019 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10020 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010021 VIXL_ASSERT(allow_macro_instructions_);
10022 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010023 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010024 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010025 vstm(cond, dt, rn, write_back, dreglist);
10026 }
10027 void Vstm(DataType dt,
10028 Register rn,
10029 WriteBack write_back,
10030 DRegisterList dreglist) {
10031 Vstm(al, dt, rn, write_back, dreglist);
10032 }
10033 void Vstm(Condition cond,
10034 Register rn,
10035 WriteBack write_back,
10036 DRegisterList dreglist) {
10037 Vstm(cond, kDataTypeValueNone, rn, write_back, dreglist);
10038 }
10039 void Vstm(Register rn, WriteBack write_back, DRegisterList dreglist) {
10040 Vstm(al, kDataTypeValueNone, rn, write_back, dreglist);
10041 }
10042
10043 void Vstm(Condition cond,
10044 DataType dt,
10045 Register rn,
10046 WriteBack write_back,
10047 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010048 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10049 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010050 VIXL_ASSERT(allow_macro_instructions_);
10051 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010052 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010053 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010054 vstm(cond, dt, rn, write_back, sreglist);
10055 }
10056 void Vstm(DataType dt,
10057 Register rn,
10058 WriteBack write_back,
10059 SRegisterList sreglist) {
10060 Vstm(al, dt, rn, write_back, sreglist);
10061 }
10062 void Vstm(Condition cond,
10063 Register rn,
10064 WriteBack write_back,
10065 SRegisterList sreglist) {
10066 Vstm(cond, kDataTypeValueNone, rn, write_back, sreglist);
10067 }
10068 void Vstm(Register rn, WriteBack write_back, SRegisterList sreglist) {
10069 Vstm(al, kDataTypeValueNone, rn, write_back, sreglist);
10070 }
10071
10072 void Vstmdb(Condition cond,
10073 DataType dt,
10074 Register rn,
10075 WriteBack write_back,
10076 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010077 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10078 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010079 VIXL_ASSERT(allow_macro_instructions_);
10080 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010081 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010082 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010083 vstmdb(cond, dt, rn, write_back, dreglist);
10084 }
10085 void Vstmdb(DataType dt,
10086 Register rn,
10087 WriteBack write_back,
10088 DRegisterList dreglist) {
10089 Vstmdb(al, dt, rn, write_back, dreglist);
10090 }
10091 void Vstmdb(Condition cond,
10092 Register rn,
10093 WriteBack write_back,
10094 DRegisterList dreglist) {
10095 Vstmdb(cond, kDataTypeValueNone, rn, write_back, dreglist);
10096 }
10097 void Vstmdb(Register rn, WriteBack write_back, DRegisterList dreglist) {
10098 Vstmdb(al, kDataTypeValueNone, rn, write_back, dreglist);
10099 }
10100
10101 void Vstmdb(Condition cond,
10102 DataType dt,
10103 Register rn,
10104 WriteBack write_back,
10105 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010106 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10107 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010108 VIXL_ASSERT(allow_macro_instructions_);
10109 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010110 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010111 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010112 vstmdb(cond, dt, rn, write_back, sreglist);
10113 }
10114 void Vstmdb(DataType dt,
10115 Register rn,
10116 WriteBack write_back,
10117 SRegisterList sreglist) {
10118 Vstmdb(al, dt, rn, write_back, sreglist);
10119 }
10120 void Vstmdb(Condition cond,
10121 Register rn,
10122 WriteBack write_back,
10123 SRegisterList sreglist) {
10124 Vstmdb(cond, kDataTypeValueNone, rn, write_back, sreglist);
10125 }
10126 void Vstmdb(Register rn, WriteBack write_back, SRegisterList sreglist) {
10127 Vstmdb(al, kDataTypeValueNone, rn, write_back, sreglist);
10128 }
10129
10130 void Vstmia(Condition cond,
10131 DataType dt,
10132 Register rn,
10133 WriteBack write_back,
10134 DRegisterList dreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010135 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10136 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010137 VIXL_ASSERT(allow_macro_instructions_);
10138 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010139 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010140 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010141 vstmia(cond, dt, rn, write_back, dreglist);
10142 }
10143 void Vstmia(DataType dt,
10144 Register rn,
10145 WriteBack write_back,
10146 DRegisterList dreglist) {
10147 Vstmia(al, dt, rn, write_back, dreglist);
10148 }
10149 void Vstmia(Condition cond,
10150 Register rn,
10151 WriteBack write_back,
10152 DRegisterList dreglist) {
10153 Vstmia(cond, kDataTypeValueNone, rn, write_back, dreglist);
10154 }
10155 void Vstmia(Register rn, WriteBack write_back, DRegisterList dreglist) {
10156 Vstmia(al, kDataTypeValueNone, rn, write_back, dreglist);
10157 }
10158
10159 void Vstmia(Condition cond,
10160 DataType dt,
10161 Register rn,
10162 WriteBack write_back,
10163 SRegisterList sreglist) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010164 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10165 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010166 VIXL_ASSERT(allow_macro_instructions_);
10167 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010168 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010169 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010170 vstmia(cond, dt, rn, write_back, sreglist);
10171 }
10172 void Vstmia(DataType dt,
10173 Register rn,
10174 WriteBack write_back,
10175 SRegisterList sreglist) {
10176 Vstmia(al, dt, rn, write_back, sreglist);
10177 }
10178 void Vstmia(Condition cond,
10179 Register rn,
10180 WriteBack write_back,
10181 SRegisterList sreglist) {
10182 Vstmia(cond, kDataTypeValueNone, rn, write_back, sreglist);
10183 }
10184 void Vstmia(Register rn, WriteBack write_back, SRegisterList sreglist) {
10185 Vstmia(al, kDataTypeValueNone, rn, write_back, sreglist);
10186 }
10187
10188 void Vstr(Condition cond,
10189 DataType dt,
10190 DRegister rd,
10191 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010192 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10193 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010194 VIXL_ASSERT(allow_macro_instructions_);
10195 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010196 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010197 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010198 vstr(cond, dt, rd, operand);
10199 }
10200 void Vstr(DataType dt, DRegister rd, const MemOperand& operand) {
10201 Vstr(al, dt, rd, operand);
10202 }
10203 void Vstr(Condition cond, DRegister rd, const MemOperand& operand) {
10204 Vstr(cond, Untyped64, rd, operand);
10205 }
10206 void Vstr(DRegister rd, const MemOperand& operand) {
10207 Vstr(al, Untyped64, rd, operand);
10208 }
10209
10210 void Vstr(Condition cond,
10211 DataType dt,
10212 SRegister rd,
10213 const MemOperand& operand) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010214 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10215 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010216 VIXL_ASSERT(allow_macro_instructions_);
10217 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010218 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010219 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010220 vstr(cond, dt, rd, operand);
10221 }
10222 void Vstr(DataType dt, SRegister rd, const MemOperand& operand) {
10223 Vstr(al, dt, rd, operand);
10224 }
10225 void Vstr(Condition cond, SRegister rd, const MemOperand& operand) {
10226 Vstr(cond, Untyped32, rd, operand);
10227 }
10228 void Vstr(SRegister rd, const MemOperand& operand) {
10229 Vstr(al, Untyped32, rd, operand);
10230 }
10231
10232 void Vsub(
10233 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010234 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10235 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10236 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010237 VIXL_ASSERT(allow_macro_instructions_);
10238 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010239 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010240 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010241 vsub(cond, dt, rd, rn, rm);
10242 }
10243 void Vsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
10244 Vsub(al, dt, rd, rn, rm);
10245 }
10246
10247 void Vsub(
10248 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010249 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10250 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10251 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010252 VIXL_ASSERT(allow_macro_instructions_);
10253 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010254 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010255 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010256 vsub(cond, dt, rd, rn, rm);
10257 }
10258 void Vsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
10259 Vsub(al, dt, rd, rn, rm);
10260 }
10261
10262 void Vsub(
10263 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010264 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10265 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10266 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010267 VIXL_ASSERT(allow_macro_instructions_);
10268 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010269 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010270 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010271 vsub(cond, dt, rd, rn, rm);
10272 }
10273 void Vsub(DataType dt, SRegister rd, SRegister rn, SRegister rm) {
10274 Vsub(al, dt, rd, rn, rm);
10275 }
10276
10277 void Vsubhn(
10278 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010279 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10280 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10281 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010282 VIXL_ASSERT(allow_macro_instructions_);
10283 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010284 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010285 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010286 vsubhn(cond, dt, rd, rn, rm);
10287 }
10288 void Vsubhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) {
10289 Vsubhn(al, dt, rd, rn, rm);
10290 }
10291
10292 void Vsubl(
10293 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010294 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10295 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10296 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010297 VIXL_ASSERT(allow_macro_instructions_);
10298 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010299 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010300 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010301 vsubl(cond, dt, rd, rn, rm);
10302 }
10303 void Vsubl(DataType dt, QRegister rd, DRegister rn, DRegister rm) {
10304 Vsubl(al, dt, rd, rn, rm);
10305 }
10306
10307 void Vsubw(
10308 Condition cond, DataType dt, QRegister rd, QRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010309 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10310 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10311 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010312 VIXL_ASSERT(allow_macro_instructions_);
10313 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010314 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010315 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010316 vsubw(cond, dt, rd, rn, rm);
10317 }
10318 void Vsubw(DataType dt, QRegister rd, QRegister rn, DRegister rm) {
10319 Vsubw(al, dt, rd, rn, rm);
10320 }
10321
10322 void Vswp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010323 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10324 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010325 VIXL_ASSERT(allow_macro_instructions_);
10326 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010327 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010328 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010329 vswp(cond, dt, rd, rm);
10330 }
10331 void Vswp(DataType dt, DRegister rd, DRegister rm) { Vswp(al, dt, rd, rm); }
10332 void Vswp(Condition cond, DRegister rd, DRegister rm) {
10333 Vswp(cond, kDataTypeValueNone, rd, rm);
10334 }
10335 void Vswp(DRegister rd, DRegister rm) {
10336 Vswp(al, kDataTypeValueNone, rd, rm);
10337 }
10338
10339 void Vswp(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010340 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10341 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010342 VIXL_ASSERT(allow_macro_instructions_);
10343 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010344 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010345 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010346 vswp(cond, dt, rd, rm);
10347 }
10348 void Vswp(DataType dt, QRegister rd, QRegister rm) { Vswp(al, dt, rd, rm); }
10349 void Vswp(Condition cond, QRegister rd, QRegister rm) {
10350 Vswp(cond, kDataTypeValueNone, rd, rm);
10351 }
10352 void Vswp(QRegister rd, QRegister rm) {
10353 Vswp(al, kDataTypeValueNone, rd, rm);
10354 }
10355
10356 void Vtbl(Condition cond,
10357 DataType dt,
10358 DRegister rd,
10359 const NeonRegisterList& nreglist,
10360 DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010361 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10362 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10363 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010364 VIXL_ASSERT(allow_macro_instructions_);
10365 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010366 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010367 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010368 vtbl(cond, dt, rd, nreglist, rm);
10369 }
10370 void Vtbl(DataType dt,
10371 DRegister rd,
10372 const NeonRegisterList& nreglist,
10373 DRegister rm) {
10374 Vtbl(al, dt, rd, nreglist, rm);
10375 }
10376
10377 void Vtbx(Condition cond,
10378 DataType dt,
10379 DRegister rd,
10380 const NeonRegisterList& nreglist,
10381 DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010382 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10383 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist));
10384 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010385 VIXL_ASSERT(allow_macro_instructions_);
10386 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010387 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010388 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010389 vtbx(cond, dt, rd, nreglist, rm);
10390 }
10391 void Vtbx(DataType dt,
10392 DRegister rd,
10393 const NeonRegisterList& nreglist,
10394 DRegister rm) {
10395 Vtbx(al, dt, rd, nreglist, rm);
10396 }
10397
10398 void Vtrn(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010399 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10400 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010401 VIXL_ASSERT(allow_macro_instructions_);
10402 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010403 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010404 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010405 vtrn(cond, dt, rd, rm);
10406 }
10407 void Vtrn(DataType dt, DRegister rd, DRegister rm) { Vtrn(al, dt, rd, rm); }
10408
10409 void Vtrn(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010410 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10411 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010412 VIXL_ASSERT(allow_macro_instructions_);
10413 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010414 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010415 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010416 vtrn(cond, dt, rd, rm);
10417 }
10418 void Vtrn(DataType dt, QRegister rd, QRegister rm) { Vtrn(al, dt, rd, rm); }
10419
10420 void Vtst(
10421 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010422 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10423 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10424 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010425 VIXL_ASSERT(allow_macro_instructions_);
10426 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010427 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010428 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010429 vtst(cond, dt, rd, rn, rm);
10430 }
10431 void Vtst(DataType dt, DRegister rd, DRegister rn, DRegister rm) {
10432 Vtst(al, dt, rd, rn, rm);
10433 }
10434
10435 void Vtst(
10436 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010437 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10438 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn));
10439 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010440 VIXL_ASSERT(allow_macro_instructions_);
10441 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010442 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010443 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010444 vtst(cond, dt, rd, rn, rm);
10445 }
10446 void Vtst(DataType dt, QRegister rd, QRegister rn, QRegister rm) {
10447 Vtst(al, dt, rd, rn, rm);
10448 }
10449
10450 void Vuzp(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010451 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10452 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010453 VIXL_ASSERT(allow_macro_instructions_);
10454 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010455 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010456 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010457 vuzp(cond, dt, rd, rm);
10458 }
10459 void Vuzp(DataType dt, DRegister rd, DRegister rm) { Vuzp(al, dt, rd, rm); }
10460
10461 void Vuzp(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010462 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10463 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010464 VIXL_ASSERT(allow_macro_instructions_);
10465 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010466 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010467 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010468 vuzp(cond, dt, rd, rm);
10469 }
10470 void Vuzp(DataType dt, QRegister rd, QRegister rm) { Vuzp(al, dt, rd, rm); }
10471
10472 void Vzip(Condition cond, DataType dt, DRegister rd, DRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010473 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10474 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010475 VIXL_ASSERT(allow_macro_instructions_);
10476 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010477 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010478 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010479 vzip(cond, dt, rd, rm);
10480 }
10481 void Vzip(DataType dt, DRegister rd, DRegister rm) { Vzip(al, dt, rd, rm); }
10482
10483 void Vzip(Condition cond, DataType dt, QRegister rd, QRegister rm) {
Jacob Bramleycf4d2842016-11-15 11:27:34 +000010484 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd));
10485 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm));
Alexandre Ramesd3832962016-07-04 15:03:43 +010010486 VIXL_ASSERT(allow_macro_instructions_);
10487 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010488 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010489 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010490 vzip(cond, dt, rd, rm);
10491 }
10492 void Vzip(DataType dt, QRegister rd, QRegister rm) { Vzip(al, dt, rd, rm); }
10493
10494 void Yield(Condition cond) {
10495 VIXL_ASSERT(allow_macro_instructions_);
10496 VIXL_ASSERT(OutsideITBlock());
Alexandre Rames8d191ab2016-11-29 11:23:27 +000010497 MacroEmissionCheckScope guard(this);
Georgia Kouvelia6090f82017-02-01 16:03:44 +000010498 ITScope it_scope(this, &cond, guard);
Alexandre Ramesd3832962016-07-04 15:03:43 +010010499 yield(cond);
10500 }
10501 void Yield() { Yield(al); }
Vincent Belliardf6786182016-09-21 11:55:28 +010010502 void Vabs(Condition cond, VRegister rd, VRegister rm) {
10503 VIXL_ASSERT(rd.IsS() || rd.IsD());
10504 VIXL_ASSERT(rd.GetType() == rm.GetType());
10505 if (rd.IsS()) {
10506 Vabs(cond, F32, rd.S(), rm.S());
10507 } else {
10508 Vabs(cond, F64, rd.D(), rm.D());
10509 }
10510 }
10511 void Vabs(VRegister rd, VRegister rm) { Vabs(al, rd, rm); }
10512 void Vadd(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10513 VIXL_ASSERT(rd.IsS() || rd.IsD());
10514 VIXL_ASSERT(rd.GetType() == rn.GetType());
10515 VIXL_ASSERT(rd.GetType() == rm.GetType());
10516 if (rd.IsS()) {
10517 Vadd(cond, F32, rd.S(), rn.S(), rm.S());
10518 } else {
10519 Vadd(cond, F64, rd.D(), rn.D(), rm.D());
10520 }
10521 }
10522 void Vadd(VRegister rd, VRegister rn, VRegister rm) { Vadd(al, rd, rn, rm); }
10523 void Vcmp(Condition cond, VRegister rd, VRegister rm) {
10524 VIXL_ASSERT(rd.IsS() || rd.IsD());
10525 VIXL_ASSERT(rd.GetType() == rm.GetType());
10526 if (rd.IsS()) {
10527 Vcmp(cond, F32, rd.S(), rm.S());
10528 } else {
10529 Vcmp(cond, F64, rd.D(), rm.D());
10530 }
10531 }
10532 void Vcmp(VRegister rd, VRegister rm) { Vcmp(al, rd, rm); }
10533 void Vcmpe(Condition cond, VRegister rd, VRegister rm) {
10534 VIXL_ASSERT(rd.IsS() || rd.IsD());
10535 VIXL_ASSERT(rd.GetType() == rm.GetType());
10536 if (rd.IsS()) {
10537 Vcmpe(cond, F32, rd.S(), rm.S());
10538 } else {
10539 Vcmpe(cond, F64, rd.D(), rm.D());
10540 }
10541 }
10542 void Vcmpe(VRegister rd, VRegister rm) { Vcmpe(al, rd, rm); }
10543 void Vdiv(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10544 VIXL_ASSERT(rd.IsS() || rd.IsD());
10545 VIXL_ASSERT(rd.GetType() == rn.GetType());
10546 VIXL_ASSERT(rd.GetType() == rm.GetType());
10547 if (rd.IsS()) {
10548 Vdiv(cond, F32, rd.S(), rn.S(), rm.S());
10549 } else {
10550 Vdiv(cond, F64, rd.D(), rn.D(), rm.D());
10551 }
10552 }
10553 void Vdiv(VRegister rd, VRegister rn, VRegister rm) { Vdiv(al, rd, rn, rm); }
10554 void Vfma(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10555 VIXL_ASSERT(rd.IsS() || rd.IsD());
10556 VIXL_ASSERT(rd.GetType() == rn.GetType());
10557 VIXL_ASSERT(rd.GetType() == rm.GetType());
10558 if (rd.IsS()) {
10559 Vfma(cond, F32, rd.S(), rn.S(), rm.S());
10560 } else {
10561 Vfma(cond, F64, rd.D(), rn.D(), rm.D());
10562 }
10563 }
10564 void Vfma(VRegister rd, VRegister rn, VRegister rm) { Vfma(al, rd, rn, rm); }
10565 void Vfms(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10566 VIXL_ASSERT(rd.IsS() || rd.IsD());
10567 VIXL_ASSERT(rd.GetType() == rn.GetType());
10568 VIXL_ASSERT(rd.GetType() == rm.GetType());
10569 if (rd.IsS()) {
10570 Vfms(cond, F32, rd.S(), rn.S(), rm.S());
10571 } else {
10572 Vfms(cond, F64, rd.D(), rn.D(), rm.D());
10573 }
10574 }
10575 void Vfms(VRegister rd, VRegister rn, VRegister rm) { Vfms(al, rd, rn, rm); }
10576 void Vfnma(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10577 VIXL_ASSERT(rd.IsS() || rd.IsD());
10578 VIXL_ASSERT(rd.GetType() == rn.GetType());
10579 VIXL_ASSERT(rd.GetType() == rm.GetType());
10580 if (rd.IsS()) {
10581 Vfnma(cond, F32, rd.S(), rn.S(), rm.S());
10582 } else {
10583 Vfnma(cond, F64, rd.D(), rn.D(), rm.D());
10584 }
10585 }
10586 void Vfnma(VRegister rd, VRegister rn, VRegister rm) {
10587 Vfnma(al, rd, rn, rm);
10588 }
10589 void Vfnms(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10590 VIXL_ASSERT(rd.IsS() || rd.IsD());
10591 VIXL_ASSERT(rd.GetType() == rn.GetType());
10592 VIXL_ASSERT(rd.GetType() == rm.GetType());
10593 if (rd.IsS()) {
10594 Vfnms(cond, F32, rd.S(), rn.S(), rm.S());
10595 } else {
10596 Vfnms(cond, F64, rd.D(), rn.D(), rm.D());
10597 }
10598 }
10599 void Vfnms(VRegister rd, VRegister rn, VRegister rm) {
10600 Vfnms(al, rd, rn, rm);
10601 }
10602 void Vmaxnm(VRegister rd, VRegister rn, VRegister rm) {
10603 VIXL_ASSERT(rd.IsS() || rd.IsD());
10604 VIXL_ASSERT(rd.GetType() == rn.GetType());
10605 VIXL_ASSERT(rd.GetType() == rm.GetType());
10606 if (rd.IsS()) {
10607 Vmaxnm(F32, rd.S(), rn.S(), rm.S());
10608 } else {
10609 Vmaxnm(F64, rd.D(), rn.D(), rm.D());
10610 }
10611 }
10612 void Vminnm(VRegister rd, VRegister rn, VRegister rm) {
10613 VIXL_ASSERT(rd.IsS() || rd.IsD());
10614 VIXL_ASSERT(rd.GetType() == rn.GetType());
10615 VIXL_ASSERT(rd.GetType() == rm.GetType());
10616 if (rd.IsS()) {
10617 Vminnm(F32, rd.S(), rn.S(), rm.S());
10618 } else {
10619 Vminnm(F64, rd.D(), rn.D(), rm.D());
10620 }
10621 }
10622 void Vmla(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10623 VIXL_ASSERT(rd.IsS() || rd.IsD());
10624 VIXL_ASSERT(rd.GetType() == rn.GetType());
10625 VIXL_ASSERT(rd.GetType() == rm.GetType());
10626 if (rd.IsS()) {
10627 Vmla(cond, F32, rd.S(), rn.S(), rm.S());
10628 } else {
10629 Vmla(cond, F64, rd.D(), rn.D(), rm.D());
10630 }
10631 }
10632 void Vmla(VRegister rd, VRegister rn, VRegister rm) { Vmla(al, rd, rn, rm); }
10633 void Vmls(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10634 VIXL_ASSERT(rd.IsS() || rd.IsD());
10635 VIXL_ASSERT(rd.GetType() == rn.GetType());
10636 VIXL_ASSERT(rd.GetType() == rm.GetType());
10637 if (rd.IsS()) {
10638 Vmls(cond, F32, rd.S(), rn.S(), rm.S());
10639 } else {
10640 Vmls(cond, F64, rd.D(), rn.D(), rm.D());
10641 }
10642 }
10643 void Vmls(VRegister rd, VRegister rn, VRegister rm) { Vmls(al, rd, rn, rm); }
10644 void Vmov(Condition cond, VRegister rd, VRegister rm) {
10645 VIXL_ASSERT(rd.IsS() || rd.IsD());
10646 VIXL_ASSERT(rd.GetType() == rm.GetType());
10647 if (rd.IsS()) {
10648 Vmov(cond, F32, rd.S(), rm.S());
10649 } else {
10650 Vmov(cond, F64, rd.D(), rm.D());
10651 }
10652 }
10653 void Vmov(VRegister rd, VRegister rm) { Vmov(al, rd, rm); }
10654 void Vmul(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10655 VIXL_ASSERT(rd.IsS() || rd.IsD());
10656 VIXL_ASSERT(rd.GetType() == rn.GetType());
10657 VIXL_ASSERT(rd.GetType() == rm.GetType());
10658 if (rd.IsS()) {
10659 Vmul(cond, F32, rd.S(), rn.S(), rm.S());
10660 } else {
10661 Vmul(cond, F64, rd.D(), rn.D(), rm.D());
10662 }
10663 }
10664 void Vmul(VRegister rd, VRegister rn, VRegister rm) { Vmul(al, rd, rn, rm); }
10665 void Vneg(Condition cond, VRegister rd, VRegister rm) {
10666 VIXL_ASSERT(rd.IsS() || rd.IsD());
10667 VIXL_ASSERT(rd.GetType() == rm.GetType());
10668 if (rd.IsS()) {
10669 Vneg(cond, F32, rd.S(), rm.S());
10670 } else {
10671 Vneg(cond, F64, rd.D(), rm.D());
10672 }
10673 }
10674 void Vneg(VRegister rd, VRegister rm) { Vneg(al, rd, rm); }
10675 void Vnmla(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10676 VIXL_ASSERT(rd.IsS() || rd.IsD());
10677 VIXL_ASSERT(rd.GetType() == rn.GetType());
10678 VIXL_ASSERT(rd.GetType() == rm.GetType());
10679 if (rd.IsS()) {
10680 Vnmla(cond, F32, rd.S(), rn.S(), rm.S());
10681 } else {
10682 Vnmla(cond, F64, rd.D(), rn.D(), rm.D());
10683 }
10684 }
10685 void Vnmla(VRegister rd, VRegister rn, VRegister rm) {
10686 Vnmla(al, rd, rn, rm);
10687 }
10688 void Vnmls(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10689 VIXL_ASSERT(rd.IsS() || rd.IsD());
10690 VIXL_ASSERT(rd.GetType() == rn.GetType());
10691 VIXL_ASSERT(rd.GetType() == rm.GetType());
10692 if (rd.IsS()) {
10693 Vnmls(cond, F32, rd.S(), rn.S(), rm.S());
10694 } else {
10695 Vnmls(cond, F64, rd.D(), rn.D(), rm.D());
10696 }
10697 }
10698 void Vnmls(VRegister rd, VRegister rn, VRegister rm) {
10699 Vnmls(al, rd, rn, rm);
10700 }
10701 void Vnmul(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10702 VIXL_ASSERT(rd.IsS() || rd.IsD());
10703 VIXL_ASSERT(rd.GetType() == rn.GetType());
10704 VIXL_ASSERT(rd.GetType() == rm.GetType());
10705 if (rd.IsS()) {
10706 Vnmul(cond, F32, rd.S(), rn.S(), rm.S());
10707 } else {
10708 Vnmul(cond, F64, rd.D(), rn.D(), rm.D());
10709 }
10710 }
10711 void Vnmul(VRegister rd, VRegister rn, VRegister rm) {
10712 Vnmul(al, rd, rn, rm);
10713 }
Vincent Belliard564c10c2018-02-06 08:21:16 -080010714 void Vrinta(VRegister rd, VRegister rm) {
10715 VIXL_ASSERT(rd.IsS() || rd.IsD());
10716 VIXL_ASSERT(rd.GetType() == rm.GetType());
10717 if (rd.IsS()) {
10718 Vrinta(F32, rd.S(), rm.S());
10719 } else {
10720 Vrinta(F64, rd.D(), rm.D());
10721 }
10722 }
10723 void Vrintm(VRegister rd, VRegister rm) {
10724 VIXL_ASSERT(rd.IsS() || rd.IsD());
10725 VIXL_ASSERT(rd.GetType() == rm.GetType());
10726 if (rd.IsS()) {
10727 Vrintm(F32, rd.S(), rm.S());
10728 } else {
10729 Vrintm(F64, rd.D(), rm.D());
10730 }
10731 }
10732 void Vrintn(VRegister rd, VRegister rm) {
10733 VIXL_ASSERT(rd.IsS() || rd.IsD());
10734 VIXL_ASSERT(rd.GetType() == rm.GetType());
10735 if (rd.IsS()) {
10736 Vrintn(F32, rd.S(), rm.S());
10737 } else {
10738 Vrintn(F64, rd.D(), rm.D());
10739 }
10740 }
10741 void Vrintp(VRegister rd, VRegister rm) {
10742 VIXL_ASSERT(rd.IsS() || rd.IsD());
10743 VIXL_ASSERT(rd.GetType() == rm.GetType());
10744 if (rd.IsS()) {
10745 Vrintp(F32, rd.S(), rm.S());
10746 } else {
10747 Vrintp(F64, rd.D(), rm.D());
10748 }
10749 }
10750 void Vrintr(Condition cond, VRegister rd, VRegister rm) {
10751 VIXL_ASSERT(rd.IsS() || rd.IsD());
10752 VIXL_ASSERT(rd.GetType() == rm.GetType());
10753 if (rd.IsS()) {
10754 Vrintr(cond, F32, rd.S(), rm.S());
10755 } else {
10756 Vrintr(cond, F64, rd.D(), rm.D());
10757 }
10758 }
10759 void Vrintr(VRegister rd, VRegister rm) { Vrintr(al, rd, rm); }
10760 void Vrintx(Condition cond, VRegister rd, VRegister rm) {
10761 VIXL_ASSERT(rd.IsS() || rd.IsD());
10762 VIXL_ASSERT(rd.GetType() == rm.GetType());
10763 if (rd.IsS()) {
10764 Vrintx(cond, F32, rd.S(), rm.S());
10765 } else {
10766 Vrintx(cond, F64, rd.D(), rm.D());
10767 }
10768 }
10769 void Vrintx(VRegister rd, VRegister rm) { Vrintx(al, rd, rm); }
10770 void Vrintz(Condition cond, VRegister rd, VRegister rm) {
10771 VIXL_ASSERT(rd.IsS() || rd.IsD());
10772 VIXL_ASSERT(rd.GetType() == rm.GetType());
10773 if (rd.IsS()) {
10774 Vrintz(cond, F32, rd.S(), rm.S());
10775 } else {
10776 Vrintz(cond, F64, rd.D(), rm.D());
10777 }
10778 }
10779 void Vrintz(VRegister rd, VRegister rm) { Vrintz(al, rd, rm); }
Vincent Belliardf6786182016-09-21 11:55:28 +010010780 void Vseleq(VRegister rd, VRegister rn, VRegister rm) {
10781 VIXL_ASSERT(rd.IsS() || rd.IsD());
10782 VIXL_ASSERT(rd.GetType() == rn.GetType());
10783 VIXL_ASSERT(rd.GetType() == rm.GetType());
10784 if (rd.IsS()) {
10785 Vseleq(F32, rd.S(), rn.S(), rm.S());
10786 } else {
10787 Vseleq(F64, rd.D(), rn.D(), rm.D());
10788 }
10789 }
10790 void Vselge(VRegister rd, VRegister rn, VRegister rm) {
10791 VIXL_ASSERT(rd.IsS() || rd.IsD());
10792 VIXL_ASSERT(rd.GetType() == rn.GetType());
10793 VIXL_ASSERT(rd.GetType() == rm.GetType());
10794 if (rd.IsS()) {
10795 Vselge(F32, rd.S(), rn.S(), rm.S());
10796 } else {
10797 Vselge(F64, rd.D(), rn.D(), rm.D());
10798 }
10799 }
10800 void Vselgt(VRegister rd, VRegister rn, VRegister rm) {
10801 VIXL_ASSERT(rd.IsS() || rd.IsD());
10802 VIXL_ASSERT(rd.GetType() == rn.GetType());
10803 VIXL_ASSERT(rd.GetType() == rm.GetType());
10804 if (rd.IsS()) {
10805 Vselgt(F32, rd.S(), rn.S(), rm.S());
10806 } else {
10807 Vselgt(F64, rd.D(), rn.D(), rm.D());
10808 }
10809 }
10810 void Vselvs(VRegister rd, VRegister rn, VRegister rm) {
10811 VIXL_ASSERT(rd.IsS() || rd.IsD());
10812 VIXL_ASSERT(rd.GetType() == rn.GetType());
10813 VIXL_ASSERT(rd.GetType() == rm.GetType());
10814 if (rd.IsS()) {
10815 Vselvs(F32, rd.S(), rn.S(), rm.S());
10816 } else {
10817 Vselvs(F64, rd.D(), rn.D(), rm.D());
10818 }
10819 }
10820 void Vsqrt(Condition cond, VRegister rd, VRegister rm) {
10821 VIXL_ASSERT(rd.IsS() || rd.IsD());
10822 VIXL_ASSERT(rd.GetType() == rm.GetType());
10823 if (rd.IsS()) {
10824 Vsqrt(cond, F32, rd.S(), rm.S());
10825 } else {
10826 Vsqrt(cond, F64, rd.D(), rm.D());
10827 }
10828 }
10829 void Vsqrt(VRegister rd, VRegister rm) { Vsqrt(al, rd, rm); }
10830 void Vsub(Condition cond, VRegister rd, VRegister rn, VRegister rm) {
10831 VIXL_ASSERT(rd.IsS() || rd.IsD());
10832 VIXL_ASSERT(rd.GetType() == rn.GetType());
10833 VIXL_ASSERT(rd.GetType() == rm.GetType());
10834 if (rd.IsS()) {
10835 Vsub(cond, F32, rd.S(), rn.S(), rm.S());
10836 } else {
10837 Vsub(cond, F64, rd.D(), rn.D(), rm.D());
10838 }
10839 }
10840 void Vsub(VRegister rd, VRegister rn, VRegister rm) { Vsub(al, rd, rn, rm); }
Alexandre Ramesd3832962016-07-04 15:03:43 +010010841 // End of generated code.
Vincent Belliardd17e3482016-11-22 15:46:43 -080010842
Pierre Langlois0cc43be2016-12-22 15:17:50 +000010843 virtual bool AllowUnpredictable() VIXL_OVERRIDE {
10844 VIXL_ABORT_WITH_MSG("Unpredictable instruction.\n");
10845 return false;
10846 }
10847 virtual bool AllowStronglyDiscouraged() VIXL_OVERRIDE {
10848 VIXL_ABORT_WITH_MSG(
10849 "ARM strongly recommends to not use this instruction.\n");
10850 return false;
10851 }
Vincent Belliard564c10c2018-02-06 08:21:16 -080010852 // Old syntax of vrint instructions.
10853 VIXL_DEPRECATED(
10854 "void Vrinta(DataType dt, DRegister rd, DRegister rm)",
10855 void Vrinta(DataType dt1, DataType dt2, DRegister rd, DRegister rm)) {
10856 USE(dt2);
10857 VIXL_ASSERT(dt1.Is(dt2));
10858 return Vrinta(dt1, rd, rm);
10859 }
10860 VIXL_DEPRECATED(
10861 "void Vrinta(DataType dt, QRegister rd, QRegister rm)",
10862 void Vrinta(DataType dt1, DataType dt2, QRegister rd, QRegister rm)) {
10863 USE(dt2);
10864 VIXL_ASSERT(dt1.Is(dt2));
10865 return Vrinta(dt1, rd, rm);
10866 }
10867 VIXL_DEPRECATED(
10868 "void Vrinta(DataType dt, SRegister rd, SRegister rm)",
10869 void Vrinta(DataType dt1, DataType dt2, SRegister rd, SRegister rm)) {
10870 USE(dt2);
10871 VIXL_ASSERT(dt1.Is(dt2));
10872 return Vrinta(dt1, rd, rm);
10873 }
10874
10875 VIXL_DEPRECATED(
10876 "void Vrintm(DataType dt, DRegister rd, DRegister rm)",
10877 void Vrintm(DataType dt1, DataType dt2, DRegister rd, DRegister rm)) {
10878 USE(dt2);
10879 VIXL_ASSERT(dt1.Is(dt2));
10880 return Vrintm(dt1, rd, rm);
10881 }
10882 VIXL_DEPRECATED(
10883 "void Vrintm(DataType dt, QRegister rd, QRegister rm)",
10884 void Vrintm(DataType dt1, DataType dt2, QRegister rd, QRegister rm)) {
10885 USE(dt2);
10886 VIXL_ASSERT(dt1.Is(dt2));
10887 return Vrintm(dt1, rd, rm);
10888 }
10889 VIXL_DEPRECATED(
10890 "void Vrintm(DataType dt, SRegister rd, SRegister rm)",
10891 void Vrintm(DataType dt1, DataType dt2, SRegister rd, SRegister rm)) {
10892 USE(dt2);
10893 VIXL_ASSERT(dt1.Is(dt2));
10894 return Vrintm(dt1, rd, rm);
10895 }
10896
10897 VIXL_DEPRECATED(
10898 "void Vrintn(DataType dt, DRegister rd, DRegister rm)",
10899 void Vrintn(DataType dt1, DataType dt2, DRegister rd, DRegister rm)) {
10900 USE(dt2);
10901 VIXL_ASSERT(dt1.Is(dt2));
10902 return Vrintn(dt1, rd, rm);
10903 }
10904 VIXL_DEPRECATED(
10905 "void Vrintn(DataType dt, QRegister rd, QRegister rm)",
10906 void Vrintn(DataType dt1, DataType dt2, QRegister rd, QRegister rm)) {
10907 USE(dt2);
10908 VIXL_ASSERT(dt1.Is(dt2));
10909 return Vrintn(dt1, rd, rm);
10910 }
10911 VIXL_DEPRECATED(
10912 "void Vrintn(DataType dt, SRegister rd, SRegister rm)",
10913 void Vrintn(DataType dt1, DataType dt2, SRegister rd, SRegister rm)) {
10914 USE(dt2);
10915 VIXL_ASSERT(dt1.Is(dt2));
10916 return Vrintn(dt1, rd, rm);
10917 }
10918
10919 VIXL_DEPRECATED(
10920 "void Vrintp(DataType dt, DRegister rd, DRegister rm)",
10921 void Vrintp(DataType dt1, DataType dt2, DRegister rd, DRegister rm)) {
10922 USE(dt2);
10923 VIXL_ASSERT(dt1.Is(dt2));
10924 return Vrintp(dt1, rd, rm);
10925 }
10926 VIXL_DEPRECATED(
10927 "void Vrintp(DataType dt, QRegister rd, QRegister rm)",
10928 void Vrintp(DataType dt1, DataType dt2, QRegister rd, QRegister rm)) {
10929 USE(dt2);
10930 VIXL_ASSERT(dt1.Is(dt2));
10931 return Vrintp(dt1, rd, rm);
10932 }
10933 VIXL_DEPRECATED(
10934 "void Vrintp(DataType dt, SRegister rd, SRegister rm)",
10935 void Vrintp(DataType dt1, DataType dt2, SRegister rd, SRegister rm)) {
10936 USE(dt2);
10937 VIXL_ASSERT(dt1.Is(dt2));
10938 return Vrintp(dt1, rd, rm);
10939 }
10940
10941 VIXL_DEPRECATED(
10942 "void Vrintr(Condition cond, DataType dt, SRegister rd, SRegister rm)",
10943 void Vrintr(Condition cond,
10944 DataType dt1,
10945 DataType dt2,
10946 SRegister rd,
10947 SRegister rm)) {
10948 USE(dt2);
10949 VIXL_ASSERT(dt1.Is(dt2));
10950 return Vrintr(cond, dt1, rd, rm);
10951 }
10952 VIXL_DEPRECATED(
10953 "void Vrintr(DataType dt, SRegister rd, SRegister rm)",
10954 void Vrintr(DataType dt1, DataType dt2, SRegister rd, SRegister rm)) {
10955 USE(dt2);
10956 VIXL_ASSERT(dt1.Is(dt2));
10957 return Vrintr(dt1, rd, rm);
10958 }
10959
10960 VIXL_DEPRECATED(
10961 "void Vrintr(Condition cond, DataType dt, DRegister rd, DRegister rm)",
10962 void Vrintr(Condition cond,
10963 DataType dt1,
10964 DataType dt2,
10965 DRegister rd,
10966 DRegister rm)) {
10967 USE(dt2);
10968 VIXL_ASSERT(dt1.Is(dt2));
10969 return Vrintr(cond, dt1, rd, rm);
10970 }
10971 VIXL_DEPRECATED(
10972 "void Vrintr(DataType dt, DRegister rd, DRegister rm)",
10973 void Vrintr(DataType dt1, DataType dt2, DRegister rd, DRegister rm)) {
10974 USE(dt2);
10975 VIXL_ASSERT(dt1.Is(dt2));
10976 return Vrintr(dt1, rd, rm);
10977 }
10978
10979 VIXL_DEPRECATED(
10980 "void Vrintx(Condition cond, DataType dt, DRegister rd, DRegister rm)",
10981 void Vrintx(Condition cond,
10982 DataType dt1,
10983 DataType dt2,
10984 DRegister rd,
10985 DRegister rm)) {
10986 USE(dt2);
10987 VIXL_ASSERT(dt1.Is(dt2));
10988 return Vrintx(cond, dt1, rd, rm);
10989 }
10990 VIXL_DEPRECATED(
10991 "void Vrintx(DataType dt, DRegister rd, DRegister rm)",
10992 void Vrintx(DataType dt1, DataType dt2, DRegister rd, DRegister rm)) {
10993 USE(dt2);
10994 VIXL_ASSERT(dt1.Is(dt2));
10995 return Vrintx(dt1, rd, rm);
10996 }
10997
10998 VIXL_DEPRECATED(
10999 "void Vrintx(DataType dt, QRegister rd, QRegister rm)",
11000 void Vrintx(DataType dt1, DataType dt2, QRegister rd, QRegister rm)) {
11001 USE(dt2);
11002 VIXL_ASSERT(dt1.Is(dt2));
11003 return Vrintx(dt1, rd, rm);
11004 }
11005
11006 VIXL_DEPRECATED(
11007 "void Vrintx(Condition cond, DataType dt, SRegister rd, SRegister rm)",
11008 void Vrintx(Condition cond,
11009 DataType dt1,
11010 DataType dt2,
11011 SRegister rd,
11012 SRegister rm)) {
11013 USE(dt2);
11014 VIXL_ASSERT(dt1.Is(dt2));
11015 return Vrintx(cond, dt1, rd, rm);
11016 }
11017 VIXL_DEPRECATED(
11018 "void Vrintx(DataType dt, SRegister rd, SRegister rm)",
11019 void Vrintx(DataType dt1, DataType dt2, SRegister rd, SRegister rm)) {
11020 USE(dt2);
11021 VIXL_ASSERT(dt1.Is(dt2));
11022 return Vrintx(dt1, rd, rm);
11023 }
11024
11025 VIXL_DEPRECATED(
11026 "void Vrintz(Condition cond, DataType dt, DRegister rd, DRegister rm)",
11027 void Vrintz(Condition cond,
11028 DataType dt1,
11029 DataType dt2,
11030 DRegister rd,
11031 DRegister rm)) {
11032 USE(dt2);
11033 VIXL_ASSERT(dt1.Is(dt2));
11034 return Vrintz(cond, dt1, rd, rm);
11035 }
11036 VIXL_DEPRECATED(
11037 "void Vrintz(DataType dt, DRegister rd, DRegister rm)",
11038 void Vrintz(DataType dt1, DataType dt2, DRegister rd, DRegister rm)) {
11039 USE(dt2);
11040 VIXL_ASSERT(dt1.Is(dt2));
11041 return Vrintz(dt1, rd, rm);
11042 }
11043
11044 VIXL_DEPRECATED(
11045 "void Vrintz(DataType dt, QRegister rd, QRegister rm)",
11046 void Vrintz(DataType dt1, DataType dt2, QRegister rd, QRegister rm)) {
11047 USE(dt2);
11048 VIXL_ASSERT(dt1.Is(dt2));
11049 return Vrintz(dt1, rd, rm);
11050 }
11051
11052 VIXL_DEPRECATED(
11053 "void Vrintz(Condition cond, DataType dt, SRegister rd, SRegister rm)",
11054 void Vrintz(Condition cond,
11055 DataType dt1,
11056 DataType dt2,
11057 SRegister rd,
11058 SRegister rm)) {
11059 USE(dt2);
11060 VIXL_ASSERT(dt1.Is(dt2));
11061 return Vrintz(cond, dt1, rd, rm);
11062 }
11063 VIXL_DEPRECATED(
11064 "void Vrintz(DataType dt, SRegister rd, SRegister rm)",
11065 void Vrintz(DataType dt1, DataType dt2, SRegister rd, SRegister rm)) {
11066 USE(dt2);
11067 VIXL_ASSERT(dt1.Is(dt2));
11068 return Vrintz(dt1, rd, rm);
11069 }
Pierre Langlois0cc43be2016-12-22 15:17:50 +000011070
Alexandre Ramesd3832962016-07-04 15:03:43 +010011071 private:
Georgia Kouveli8b57c862017-03-02 15:18:58 +000011072 bool NeedBranch(Condition* cond) { return !cond->Is(al) && IsUsingT32(); }
11073 static const int kBranchSize = kMaxInstructionSizeInBytes;
11074
Alexandre Ramesd3832962016-07-04 15:03:43 +010011075 RegisterList available_;
11076 VRegisterList available_vfp_;
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000011077 UseScratchRegisterScope* current_scratch_scope_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010011078 MacroAssemblerContext context_;
Georgia Kouveli8b57c862017-03-02 15:18:58 +000011079 PoolManager<int32_t> pool_manager_;
Pierre Langlois1e85b7f2016-08-05 14:20:36 +010011080 bool generate_simulator_code_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010011081 bool allow_macro_instructions_;
Georgia Kouveli8b57c862017-03-02 15:18:58 +000011082 Label* pool_end_;
11083
11084 friend class TestMacroAssembler;
Alexandre Ramesd3832962016-07-04 15:03:43 +010011085};
11086
Alexandre Ramesd3832962016-07-04 15:03:43 +010011087// This scope utility allows scratch registers to be managed safely. The
11088// MacroAssembler's GetScratchRegisterList() is used as a pool of scratch
11089// registers. These registers can be allocated on demand, and will be returned
11090// at the end of the scope.
11091//
11092// When the scope ends, the MacroAssembler's lists will be restored to their
11093// original state, even if the lists were modified by some other means.
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000011094//
11095// Scopes must nest perfectly. That is, they must be destructed in reverse
11096// construction order. Otherwise, it is not clear how to handle cases where one
11097// scope acquires a register that was included in a now-closing scope. With
11098// perfect nesting, this cannot occur.
Alexandre Ramesd3832962016-07-04 15:03:43 +010011099class UseScratchRegisterScope {
11100 public:
11101 // This constructor implicitly calls the `Open` function to initialise the
11102 // scope, so it is ready to use immediately after it has been constructed.
11103 explicit UseScratchRegisterScope(MacroAssembler* masm)
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000011104 : masm_(NULL), parent_(NULL), old_available_(0), old_available_vfp_(0) {
Alexandre Ramesd3832962016-07-04 15:03:43 +010011105 Open(masm);
11106 }
11107 // This constructor allows deferred and optional initialisation of the scope.
11108 // The user is required to explicitly call the `Open` function before using
11109 // the scope.
11110 UseScratchRegisterScope()
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000011111 : masm_(NULL), parent_(NULL), old_available_(0), old_available_vfp_(0) {}
Alexandre Ramesd3832962016-07-04 15:03:43 +010011112
11113 // This function performs the actual initialisation work.
11114 void Open(MacroAssembler* masm);
11115
11116 // The destructor always implicitly calls the `Close` function.
11117 ~UseScratchRegisterScope() { Close(); }
11118
11119 // This function performs the cleaning-up work. It must succeed even if the
11120 // scope has not been opened. It is safe to call multiple times.
11121 void Close();
11122
11123 bool IsAvailable(const Register& reg) const;
11124 bool IsAvailable(const VRegister& reg) const;
11125
11126 // Take a register from the temp list. It will be returned automatically when
11127 // the scope ends.
11128 Register Acquire();
11129 VRegister AcquireV(unsigned size_in_bits);
11130 QRegister AcquireQ();
11131 DRegister AcquireD();
11132 SRegister AcquireS();
11133
11134 // Explicitly release an acquired (or excluded) register, putting it back in
11135 // the temp list.
11136 void Release(const Register& reg);
11137 void Release(const VRegister& reg);
11138
11139 // Make the specified registers available as scratch registers for the
11140 // duration of this scope.
11141 void Include(const RegisterList& list);
11142 void Include(const Register& reg1,
11143 const Register& reg2 = NoReg,
11144 const Register& reg3 = NoReg,
11145 const Register& reg4 = NoReg) {
11146 Include(RegisterList(reg1, reg2, reg3, reg4));
11147 }
11148 void Include(const VRegisterList& list);
11149 void Include(const VRegister& reg1,
11150 const VRegister& reg2 = NoVReg,
11151 const VRegister& reg3 = NoVReg,
11152 const VRegister& reg4 = NoVReg) {
11153 Include(VRegisterList(reg1, reg2, reg3, reg4));
11154 }
11155
11156 // Make sure that the specified registers are not available in this scope.
11157 // This can be used to prevent helper functions from using sensitive
11158 // registers, for example.
11159 void Exclude(const RegisterList& list);
11160 void Exclude(const Register& reg1,
11161 const Register& reg2 = NoReg,
11162 const Register& reg3 = NoReg,
11163 const Register& reg4 = NoReg) {
11164 Exclude(RegisterList(reg1, reg2, reg3, reg4));
11165 }
11166 void Exclude(const VRegisterList& list);
11167 void Exclude(const VRegister& reg1,
11168 const VRegister& reg2 = NoVReg,
11169 const VRegister& reg3 = NoVReg,
11170 const VRegister& reg4 = NoVReg) {
11171 Exclude(VRegisterList(reg1, reg2, reg3, reg4));
11172 }
11173
Jacob Bramley9ee25b52016-12-02 10:58:09 +000011174 // A convenience helper to exclude any registers used by the operand.
11175 void Exclude(const Operand& operand);
11176
Alexandre Ramesd3832962016-07-04 15:03:43 +010011177 // Prevent any scratch registers from being used in this scope.
11178 void ExcludeAll();
11179
11180 private:
Jacob Bramleye8ce9f02016-12-14 16:03:31 +000011181 // The MacroAssembler maintains a list of available scratch registers, and
11182 // also keeps track of the most recently-opened scope so that on destruction
11183 // we can check that scopes do not outlive their parents.
11184 MacroAssembler* masm_;
11185 UseScratchRegisterScope* parent_;
Alexandre Ramesd3832962016-07-04 15:03:43 +010011186
11187 // The state of the available lists at the start of this scope.
11188 uint32_t old_available_; // kRRegister
11189 uint64_t old_available_vfp_; // kVRegister
11190
Jacob Bramleycff5a2e2019-03-15 09:34:56 +000011191 VIXL_NO_RETURN_IN_DEBUG_MODE UseScratchRegisterScope(
11192 const UseScratchRegisterScope&) {
Alexandre Ramesd3832962016-07-04 15:03:43 +010011193 VIXL_UNREACHABLE();
11194 }
Jacob Bramleycff5a2e2019-03-15 09:34:56 +000011195 VIXL_NO_RETURN_IN_DEBUG_MODE void operator=(const UseScratchRegisterScope&) {
Alexandre Ramesd3832962016-07-04 15:03:43 +010011196 VIXL_UNREACHABLE();
11197 }
11198};
11199
Alexandre Ramesd3832962016-07-04 15:03:43 +010011200
11201} // namespace aarch32
11202} // namespace vixl
11203
11204#endif // VIXL_AARCH32_MACRO_ASSEMBLER_AARCH32_H_