1 // Copyright 2015, VIXL authors 2 // All rights reserved. 3 // 4 // Redistribution and use in source and binary forms, with or without 5 // modification, are permitted provided that the following conditions are met: 6 // 7 // * Redistributions of source code must retain the above copyright notice, 8 // this list of conditions and the following disclaimer. 9 // * Redistributions in binary form must reproduce the above copyright 10 // notice, this list of conditions and the following disclaimer in the 11 // documentation and/or other materials provided with the distribution. 12 // * Neither the name of ARM Limited nor the names of its contributors may 13 // be used to endorse or promote products derived from this software 14 // without specific prior written permission. 15 // 16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND 17 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 20 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 // POSSIBILITY OF SUCH DAMAGE. 27 28 #ifndef VIXL_AARCH32_MACRO_ASSEMBLER_AARCH32_H_ 29 #define VIXL_AARCH32_MACRO_ASSEMBLER_AARCH32_H_ 30 31 #include "code-generation-scopes-vixl.h" 32 #include "macro-assembler-interface.h" 33 #include "utils-vixl.h" 34 35 #include "aarch32/instructions-aarch32.h" 36 #include "aarch32/assembler-aarch32.h" 37 #include "aarch32/operands-aarch32.h" 38 39 namespace vixl { 40 namespace aarch32 { 41 42 class UseScratchRegisterScope; 43 44 enum FlagsUpdate { LeaveFlags = 0, SetFlags = 1, DontCare = 2 }; 45 46 // LiteralPool class, defined as a container for literals 47 class LiteralPool { 48 public: 49 typedef std::list<RawLiteral*>::iterator RawLiteralListIterator; 50 51 public: 52 LiteralPool() : size_(0) {} 53 ~LiteralPool() { 54 VIXL_ASSERT(literals_.empty() && (size_ == 0)); 55 for (RawLiteralListIterator literal_it = keep_until_delete_.begin(); 56 literal_it != keep_until_delete_.end(); 57 literal_it++) { 58 delete *literal_it; 59 } 60 keep_until_delete_.clear(); 61 } 62 63 unsigned GetSize() const { return size_; } 64 65 // Add a literal to the literal container. 66 void AddLiteral(RawLiteral* literal) { 67 // Manually placed literals can't be added to a literal pool. 68 VIXL_ASSERT(!literal->IsManuallyPlaced()); 69 VIXL_ASSERT(!literal->IsBound()); 70 if (literal->GetPositionInPool() == Label::kMaxOffset) { 71 uint32_t position = GetSize(); 72 literal->SetPositionInPool(position); 73 literals_.push_back(literal); 74 size_ += literal->GetAlignedSize(); 75 } 76 } 77 78 // First literal to be emitted. 79 RawLiteralListIterator GetFirst() { return literals_.begin(); } 80 81 // Mark the end of the literal container. 82 RawLiteralListIterator GetEnd() { return literals_.end(); } 83 84 // Remove all the literals from the container. 85 // If the literal's memory management has been delegated to the container 86 // it will be delete'd. 87 void Clear() { 88 for (RawLiteralListIterator literal_it = GetFirst(); literal_it != GetEnd(); 89 literal_it++) { 90 RawLiteral* literal = *literal_it; 91 switch (literal->GetDeletionPolicy()) { 92 case RawLiteral::kDeletedOnPlacementByPool: 93 delete literal; 94 break; 95 case RawLiteral::kDeletedOnPoolDestruction: 96 keep_until_delete_.push_back(literal); 97 break; 98 case RawLiteral::kManuallyDeleted: 99 break; 100 } 101 } 102 literals_.clear(); 103 size_ = 0; 104 } 105 106 private: 107 // Size (in bytes and including alignments) of the literal pool. 108 unsigned size_; 109 110 // Literal container. 111 std::list<RawLiteral*> literals_; 112 // Already bound Literal container the app requested this pool to keep. 113 std::list<RawLiteral*> keep_until_delete_; 114 }; 115 116 117 // Macro assembler for aarch32 instruction set. 118 class MacroAssembler : public Assembler, public MacroAssemblerInterface { 119 public: 120 enum EmitOption { kBranchRequired, kNoBranchRequired }; 121 122 virtual internal::AssemblerBase* AsAssemblerBase() VIXL_OVERRIDE { 123 return this; 124 } 125 126 virtual bool ArePoolsBlocked() const VIXL_OVERRIDE { 127 return IsLiteralPoolBlocked() && IsVeneerPoolBlocked(); 128 } 129 130 private: 131 class MacroEmissionCheckScope : public EmissionCheckScope { 132 public: 133 explicit MacroEmissionCheckScope(MacroAssemblerInterface* masm) 134 : EmissionCheckScope(masm, kTypicalMacroInstructionMaxSize) {} 135 136 private: 137 static const size_t kTypicalMacroInstructionMaxSize = 138 8 * kMaxInstructionSizeInBytes; 139 }; 140 141 class MacroAssemblerContext { 142 public: 143 MacroAssemblerContext() : count_(0) {} 144 ~MacroAssemblerContext() {} 145 unsigned GetRecursiveCount() const { return count_; } 146 void Up(const char* loc) { 147 location_stack_[count_] = loc; 148 count_++; 149 if (count_ >= kMaxRecursion) { 150 printf( 151 "Recursion limit reached; unable to resolve macro assembler " 152 "call.\n"); 153 printf("Macro assembler context stack:\n"); 154 for (unsigned i = 0; i < kMaxRecursion; i++) { 155 printf("%10s %s\n", (i == 0) ? "oldest -> " : "", location_stack_[i]); 156 } 157 VIXL_ABORT(); 158 } 159 } 160 void Down() { 161 VIXL_ASSERT((count_ > 0) && (count_ < kMaxRecursion)); 162 count_--; 163 } 164 165 private: 166 unsigned count_; 167 static const uint32_t kMaxRecursion = 6; 168 const char* location_stack_[kMaxRecursion]; 169 }; 170 171 // This scope is used at each Delegate entry to avoid infinite recursion of 172 // Delegate calls. The limit is defined by 173 // MacroAssemblerContext::kMaxRecursion. 174 class ContextScope { 175 public: 176 explicit ContextScope(MacroAssembler* const masm, const char* loc) 177 : masm_(masm) { 178 VIXL_ASSERT(masm_->AllowMacroInstructions()); 179 masm_->GetContext()->Up(loc); 180 } 181 ~ContextScope() { masm_->GetContext()->Down(); } 182 183 private: 184 MacroAssembler* const masm_; 185 }; 186 187 MacroAssemblerContext* GetContext() { return &context_; } 188 189 class ITScope { 190 public: 191 ITScope(MacroAssembler* masm, Condition* cond, bool can_use_it = false) 192 : masm_(masm), cond_(*cond), can_use_it_(can_use_it) { 193 if (!cond_.Is(al) && masm->IsUsingT32()) { 194 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. 201 // TODO: Use a scope utility with a size check. To do that, we'd need 202 // one with Open() and Close() implemented. 203 masm_->EnsureEmitFor(kMaxT32MacroInstructionSizeInBytes); 204 // Generate the branch. 205 masm_->b(cond_.Negate(), Narrow, &label_); 206 // Tell the macro-assembler to generate unconditional instructions. 207 *cond = al; 208 } 209 } 210 #ifdef VIXL_DEBUG 211 initial_cursor_offset_ = masm->GetCursorOffset(); 212 #else 213 USE(initial_cursor_offset_); 214 #endif 215 } 216 ~ITScope() { 217 if (label_.IsReferenced()) { 218 // We only use the label for conditional T32 instructions for which we 219 // cannot use IT. 220 VIXL_ASSERT(!cond_.Is(al)); 221 VIXL_ASSERT(masm_->IsUsingT32()); 222 VIXL_ASSERT(!can_use_it_); 223 VIXL_ASSERT(masm_->GetCursorOffset() - initial_cursor_offset_ <= 224 kMaxT32MacroInstructionSizeInBytes); 225 masm_->BindHelper(&label_); 226 } else if (masm_->IsUsingT32() && !cond_.Is(al)) { 227 // If we've generated a conditional T32 instruction but haven't used the 228 // label, we must have used IT. Check that we did not generate a 229 // deprecated sequence. 230 VIXL_ASSERT(can_use_it_); 231 VIXL_ASSERT(masm_->GetCursorOffset() - initial_cursor_offset_ <= 232 k16BitT32InstructionSizeInBytes); 233 } 234 } 235 236 private: 237 MacroAssembler* masm_; 238 Condition cond_; 239 Label label_; 240 bool can_use_it_; 241 uint32_t initial_cursor_offset_; 242 }; 243 244 template <Assembler::InstructionCondDtDL asmfn> 245 class EmitLiteralCondDtDL { 246 public: 247 EmitLiteralCondDtDL(DataType dt, DRegister rt) : dt_(dt), rt_(rt) {} 248 void emit(MacroAssembler* const masm, 249 Condition cond, 250 RawLiteral* const literal) { 251 (masm->*asmfn)(cond, dt_, rt_, literal); 252 } 253 254 private: 255 DataType dt_; 256 DRegister rt_; 257 }; 258 259 template <Assembler::InstructionCondDtSL asmfn> 260 class EmitLiteralCondDtSL { 261 public: 262 EmitLiteralCondDtSL(DataType dt, SRegister rt) : dt_(dt), rt_(rt) {} 263 void emit(MacroAssembler* const masm, 264 Condition cond, 265 RawLiteral* const literal) { 266 (masm->*asmfn)(cond, dt_, rt_, literal); 267 } 268 269 private: 270 DataType dt_; 271 SRegister rt_; 272 }; 273 274 template <Assembler::InstructionCondRL asmfn> 275 class EmitLiteralCondRL { 276 public: 277 explicit EmitLiteralCondRL(Register rt) : rt_(rt) {} 278 void emit(MacroAssembler* const masm, 279 Condition cond, 280 RawLiteral* const literal) { 281 (masm->*asmfn)(cond, rt_, literal); 282 } 283 284 private: 285 Register rt_; 286 }; 287 288 template <Assembler::InstructionCondRRL asmfn> 289 class EmitLiteralCondRRL { 290 public: 291 EmitLiteralCondRRL(Register rt, Register rt2) : rt_(rt), rt2_(rt2) {} 292 void emit(MacroAssembler* const masm, 293 Condition cond, 294 RawLiteral* const literal) { 295 (masm->*asmfn)(cond, rt_, rt2_, literal); 296 } 297 298 private: 299 Register rt_, rt2_; 300 }; 301 302 class LiteralPoolManager { 303 public: 304 explicit LiteralPoolManager(MacroAssembler* const masm) 305 : masm_(masm), monitor_(0) { 306 ResetCheckpoint(); 307 } 308 309 void ResetCheckpoint() { checkpoint_ = Label::kMaxOffset; } 310 311 LiteralPool* GetLiteralPool() { return &literal_pool_; } 312 Label::Offset GetCheckpoint() const { 313 // Make room for a branch over the pools. 314 return checkpoint_ - kMaxInstructionSizeInBytes; 315 } 316 size_t GetLiteralPoolSize() const { return literal_pool_.GetSize(); } 317 318 // Checks if the insertion of the literal will put the forward reference 319 // too far in the literal pool. 320 // This function is called after generating an instruction with a literal. 321 // We want to know if the literal can be reached by the instruction. 322 // If not, we will unwind the instruction, generate the pool (without the 323 // last literal) and generate the instruction again. 324 // "literal" is the literal we want to insert into the pool. 325 // "from" is the location where the instruction which uses the literal has 326 // been generated. 327 bool WasInsertedTooFar(RawLiteral* literal) const { 328 // Last accessible location for the instruction we just generated, which 329 // uses the literal. 330 Label::ForwardReference& reference = literal->GetBackForwardRef(); 331 Label::Offset new_checkpoint = AlignDown(reference.GetCheckpoint(), 4); 332 333 // TODO: We should not need to get the min of new_checkpoint and the 334 // existing checkpoint. The existing checkpoint should already have 335 // been checked when reserving space for this load literal instruction. 336 // The assertion below asserts that we don't need the min operation here. 337 Label::Offset checkpoint = 338 std::min(new_checkpoint, literal->GetAlignedCheckpoint(4)); 339 bool literal_in_pool = 340 (literal->GetPositionInPool() != Label::kMaxOffset); 341 Label::Offset position_in_pool = literal_in_pool 342 ? literal->GetPositionInPool() 343 : literal_pool_.GetSize(); 344 // Compare the checkpoint to the location where the literal should be 345 // added. 346 // We add space for two instructions: one branch and one potential veneer 347 // which may be added after the check. In this particular use case, no 348 // veneer can be added but, this way, we are consistent with all the 349 // literal pool checks. 350 int32_t from = 351 reference.GetLocation() + masm_->GetArchitectureStatePCOffset(); 352 bool too_far = 353 checkpoint < from + position_in_pool + 354 2 * static_cast<int32_t>(kMaxInstructionSizeInBytes); 355 // Assert if the literal is already in the pool and the existing 356 // checkpoint triggers a rewind here, as this means the pool should 357 // already have been emitted (perhaps we have not reserved enough space 358 // for the instruction we are about to rewind). 359 VIXL_ASSERT(!(too_far && (literal->GetCheckpoint() < new_checkpoint))); 360 return too_far; 361 } 362 363 // Set the different checkpoints where the literal pool has to be emited. 364 void UpdateCheckpoint(RawLiteral* literal) { 365 // The literal should have been placed somewhere in the literal pool 366 VIXL_ASSERT(literal->GetPositionInPool() != Label::kMaxOffset); 367 // TODO(all): Consider AddForwardRef as a virtual so the checkpoint is 368 // updated when inserted. Or move checkpoint_ into Label, 369 literal->UpdateCheckpoint(); 370 Label::Offset tmp = 371 literal->GetAlignedCheckpoint(4) - literal->GetPositionInPool(); 372 if (checkpoint_ > tmp) { 373 checkpoint_ = tmp; 374 masm_->ComputeCheckpoint(); 375 } 376 } 377 378 bool IsEmpty() const { return GetLiteralPoolSize() == 0; } 379 380 void Block() { monitor_++; } 381 void Release() { 382 VIXL_ASSERT(IsBlocked()); 383 if (--monitor_ == 0) { 384 // Ensure the pool has not been blocked for too long. 385 VIXL_ASSERT(masm_->GetCursorOffset() <= checkpoint_); 386 } 387 } 388 bool IsBlocked() const { return monitor_ != 0; } 389 390 private: 391 MacroAssembler* const masm_; 392 LiteralPool literal_pool_; 393 394 // Max offset in the code buffer where the literal needs to be 395 // emitted. A default value of Label::kMaxOffset means that the checkpoint 396 // is invalid. 397 Label::Offset checkpoint_; 398 // Indicates whether the emission of this pool is blocked. 399 int monitor_; 400 }; 401 402 void PerformEnsureEmit(Label::Offset target, uint32_t extra_size); 403 404 protected: 405 virtual void BlockPools() VIXL_OVERRIDE { 406 BlockLiteralPool(); 407 BlockVeneerPool(); 408 } 409 virtual void ReleasePools() VIXL_OVERRIDE { 410 ReleaseLiteralPool(); 411 ReleaseVeneerPool(); 412 } 413 virtual void EnsureEmitPoolsFor(size_t size) VIXL_OVERRIDE { 414 // TODO: Optimise this. It also checks that there is space in the buffer, 415 // which we do not need to do here. 416 VIXL_ASSERT(IsUint32(size)); 417 EnsureEmitFor(static_cast<uint32_t>(size)); 418 } 419 420 // Tell whether any of the macro instruction can be used. When false the 421 // MacroAssembler will assert if a method which can emit a variable number 422 // of instructions is called. 423 virtual void SetAllowMacroInstructions(bool value) VIXL_OVERRIDE { 424 allow_macro_instructions_ = value; 425 } 426 427 void BlockLiteralPool() { literal_pool_manager_.Block(); } 428 void ReleaseLiteralPool() { literal_pool_manager_.Release(); } 429 bool IsLiteralPoolBlocked() const { 430 return literal_pool_manager_.IsBlocked(); 431 } 432 void BlockVeneerPool() { veneer_pool_manager_.Block(); } 433 void ReleaseVeneerPool() { veneer_pool_manager_.Release(); } 434 bool IsVeneerPoolBlocked() const { return veneer_pool_manager_.IsBlocked(); } 435 436 void HandleOutOfBoundsImmediate(Condition cond, Register tmp, uint32_t imm); 437 void PadToMinimumBranchRange(Label* label); 438 439 // Generate the instruction and if it's not possible revert the whole thing. 440 // emit the literal pool and regenerate the instruction. 441 // Note: The instruction is generated via 442 // void T::emit(MacroAssembler* const, RawLiteral* const) 443 template <typename T> 444 void GenerateInstruction(Condition cond, 445 T instr_callback, 446 RawLiteral* const literal) { 447 int32_t cursor = GetCursorOffset(); 448 // Emit the instruction, via the assembler 449 { 450 MacroEmissionCheckScope guard(this); 451 // The ITScope can change the condition and we want to be able to revert 452 // this. 453 Condition c(cond); 454 ITScope it_scope(this, &c); 455 instr_callback.emit(this, c, literal); 456 } 457 if (!literal->IsManuallyPlaced() && !literal->IsBound() && 458 !IsLiteralPoolBlocked()) { 459 if (WasInsertedTooFar(literal)) { 460 // The instruction's data is too far: revert the emission 461 GetBuffer()->Rewind(cursor); 462 literal->InvalidateLastForwardReference(RawLiteral::kNoUpdateNecessary); 463 EmitLiteralPool(kBranchRequired); 464 MacroEmissionCheckScope guard(this); 465 ITScope it_scope(this, &cond); 466 instr_callback.emit(this, cond, literal); 467 } 468 // The literal pool above might have included the literal - in which 469 // case it will now be bound. 470 if (!literal->IsBound()) { 471 literal_pool_manager_.GetLiteralPool()->AddLiteral(literal); 472 literal_pool_manager_.UpdateCheckpoint(literal); 473 } 474 } 475 } 476 477 public: 478 explicit MacroAssembler(InstructionSet isa = kDefaultISA) 479 : Assembler(isa), 480 available_(r12), 481 current_scratch_scope_(NULL), 482 checkpoint_(Label::kMaxOffset), 483 literal_pool_manager_(this), 484 veneer_pool_manager_(this), 485 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE) { 486 #ifdef VIXL_DEBUG 487 SetAllowMacroInstructions(true); 488 #else 489 USE(literal_pool_manager_); 490 USE(allow_macro_instructions_); 491 #endif 492 ComputeCheckpoint(); 493 } 494 explicit MacroAssembler(size_t size, InstructionSet isa = kDefaultISA) 495 : Assembler(size, isa), 496 available_(r12), 497 current_scratch_scope_(NULL), 498 checkpoint_(Label::kMaxOffset), 499 literal_pool_manager_(this), 500 veneer_pool_manager_(this), 501 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE) { 502 #ifdef VIXL_DEBUG 503 SetAllowMacroInstructions(true); 504 #endif 505 ComputeCheckpoint(); 506 } 507 MacroAssembler(byte* buffer, size_t size, InstructionSet isa = kDefaultISA) 508 : Assembler(buffer, size, isa), 509 available_(r12), 510 current_scratch_scope_(NULL), 511 checkpoint_(Label::kMaxOffset), 512 literal_pool_manager_(this), 513 veneer_pool_manager_(this), 514 generate_simulator_code_(VIXL_AARCH32_GENERATE_SIMULATOR_CODE) { 515 #ifdef VIXL_DEBUG 516 SetAllowMacroInstructions(true); 517 #endif 518 ComputeCheckpoint(); 519 } 520 521 bool GenerateSimulatorCode() const { return generate_simulator_code_; } 522 523 virtual bool AllowMacroInstructions() const VIXL_OVERRIDE { 524 return allow_macro_instructions_; 525 } 526 527 void FinalizeCode() { 528 EmitLiteralPool(kNoBranchRequired); 529 Assembler::FinalizeCode(); 530 } 531 532 RegisterList* GetScratchRegisterList() { return &available_; } 533 VRegisterList* GetScratchVRegisterList() { return &available_vfp_; } 534 535 // Get or set the current (most-deeply-nested) UseScratchRegisterScope. 536 void SetCurrentScratchRegisterScope(UseScratchRegisterScope* scope) { 537 current_scratch_scope_ = scope; 538 } 539 UseScratchRegisterScope* GetCurrentScratchRegisterScope() { 540 return current_scratch_scope_; 541 } 542 543 // Given an address calculation (Register + immediate), generate code to 544 // partially compute the address. The returned MemOperand will perform any 545 // remaining computation in a subsequent load or store instruction. 546 // 547 // The offset provided should be the offset that would be used in a load or 548 // store instruction (if it had sufficient range). This only matters where 549 // base.Is(pc), since load and store instructions align the pc before 550 // dereferencing it. 551 // 552 // TODO: Improve the handling of negative offsets. They are not implemented 553 // precisely for now because they only have a marginal benefit for the 554 // existing uses (in delegates). 555 MemOperand MemOperandComputationHelper(Condition cond, 556 Register scratch, 557 Register base, 558 uint32_t offset, 559 uint32_t extra_offset_mask = 0); 560 561 MemOperand MemOperandComputationHelper(Register scratch, 562 Register base, 563 uint32_t offset, 564 uint32_t extra_offset_mask = 0) { 565 return MemOperandComputationHelper(al, 566 scratch, 567 base, 568 offset, 569 extra_offset_mask); 570 } 571 MemOperand MemOperandComputationHelper(Condition cond, 572 Register scratch, 573 Label* label, 574 uint32_t extra_offset_mask = 0) { 575 // Check for buffer space _before_ calculating the offset, in case we 576 // generate a pool that affects the offset calculation. 577 CodeBufferCheckScope scope(this, 4 * kMaxInstructionSizeInBytes); 578 Label::Offset offset = 579 label->GetLocation() - 580 AlignDown(GetCursorOffset() + GetArchitectureStatePCOffset(), 4); 581 return MemOperandComputationHelper(cond, 582 scratch, 583 pc, 584 offset, 585 extra_offset_mask); 586 } 587 MemOperand MemOperandComputationHelper(Register scratch, 588 Label* label, 589 uint32_t extra_offset_mask = 0) { 590 return MemOperandComputationHelper(al, scratch, label, extra_offset_mask); 591 } 592 593 // Determine the appropriate mask to pass into MemOperandComputationHelper. 594 uint32_t GetOffsetMask(InstructionType type, AddrMode addrmode); 595 596 // State and type helpers. 597 bool IsModifiedImmediate(uint32_t imm) { 598 return IsUsingT32() ? ImmediateT32::IsImmediateT32(imm) 599 : ImmediateA32::IsImmediateA32(imm); 600 } 601 602 void Bind(Label* label) { 603 VIXL_ASSERT(allow_macro_instructions_); 604 PadToMinimumBranchRange(label); 605 BindHelper(label); 606 } 607 608 void AddBranchLabel(Label* label) { 609 if (label->IsBound()) return; 610 veneer_pool_manager_.AddLabel(label); 611 } 612 613 void Place(RawLiteral* literal) { 614 VIXL_ASSERT(allow_macro_instructions_); 615 VIXL_ASSERT(literal->IsManuallyPlaced()); 616 // We have two calls to `GetBuffer()->Align()` below, that aligns on word 617 // (4 bytes) boundaries. Only one is taken into account in 618 // `GetAlignedSize()`. 619 static const size_t kMaxAlignSize = 3; 620 size_t size = literal->GetAlignedSize() + kMaxAlignSize; 621 VIXL_ASSERT(IsUint32(size)); 622 // TODO: We should use a scope here to check the size of data emitted. We 623 // currently cannot because `aarch32::CodeBufferCheckScope` currently checks 624 // for pools, so that could lead to an infinite loop. 625 EnsureEmitFor(static_cast<uint32_t>(size)); 626 // Literals must be emitted aligned on word (4 bytes) boundaries. 627 GetBuffer()->Align(); 628 PlaceHelper(literal); 629 GetBuffer()->Align(); 630 } 631 632 void ComputeCheckpoint(); 633 634 int32_t GetMarginBeforeVeneerEmission() const { 635 return veneer_pool_manager_.GetCheckpoint() - GetCursorOffset(); 636 } 637 638 Label::Offset GetTargetForLiteralEmission() const { 639 if (literal_pool_manager_.IsEmpty()) return Label::kMaxOffset; 640 // We add an instruction to the size as the instruction which calls this 641 // function may add a veneer and, without this extra instruction, could put 642 // the literals out of range. For example, it's the case for a "B" 643 // instruction. At the beginning of the instruction we call EnsureEmitFor 644 // which calls this function. However, the target of the branch hasn't been 645 // inserted yet in the veneer pool. 646 size_t veneer_max_size = 647 veneer_pool_manager_.GetMaxSize() + kMaxInstructionSizeInBytes; 648 VIXL_ASSERT(IsInt32(veneer_max_size)); 649 // We must be able to generate the veneer pool first. 650 Label::Offset tmp = literal_pool_manager_.GetCheckpoint() - 651 static_cast<Label::Offset>(veneer_max_size); 652 VIXL_ASSERT(tmp >= 0); 653 return tmp; 654 } 655 656 int32_t GetMarginBeforeLiteralEmission() const { 657 Label::Offset tmp = GetTargetForLiteralEmission(); 658 VIXL_ASSERT(tmp >= GetCursorOffset()); 659 return tmp - GetCursorOffset(); 660 } 661 662 bool VeneerPoolIsEmpty() const { return veneer_pool_manager_.IsEmpty(); } 663 bool LiteralPoolIsEmpty() const { return literal_pool_manager_.IsEmpty(); } 664 665 void EnsureEmitFor(uint32_t size) { 666 Label::Offset target = GetCursorOffset() + size; 667 if (target <= checkpoint_) return; 668 PerformEnsureEmit(target, size); 669 } 670 671 bool WasInsertedTooFar(RawLiteral* literal) { 672 return literal_pool_manager_.WasInsertedTooFar(literal); 673 } 674 675 bool AliasesAvailableScratchRegister(Register reg) { 676 return GetScratchRegisterList()->Includes(reg); 677 } 678 679 bool AliasesAvailableScratchRegister(RegisterOrAPSR_nzcv reg) { 680 if (reg.IsAPSR_nzcv()) return false; 681 return GetScratchRegisterList()->Includes(reg.AsRegister()); 682 } 683 684 bool AliasesAvailableScratchRegister(VRegister reg) { 685 return GetScratchVRegisterList()->IncludesAliasOf(reg); 686 } 687 688 bool AliasesAvailableScratchRegister(const Operand& operand) { 689 if (operand.IsImmediate()) return false; 690 return AliasesAvailableScratchRegister(operand.GetBaseRegister()) || 691 (operand.IsRegisterShiftedRegister() && 692 AliasesAvailableScratchRegister(operand.GetShiftRegister())); 693 } 694 695 bool AliasesAvailableScratchRegister(const NeonOperand& operand) { 696 if (operand.IsImmediate()) return false; 697 return AliasesAvailableScratchRegister(operand.GetRegister()); 698 } 699 700 bool AliasesAvailableScratchRegister(SRegisterList list) { 701 for (int n = 0; n < list.GetLength(); n++) { 702 if (AliasesAvailableScratchRegister(list.GetSRegister(n))) return true; 703 } 704 return false; 705 } 706 707 bool AliasesAvailableScratchRegister(DRegisterList list) { 708 for (int n = 0; n < list.GetLength(); n++) { 709 if (AliasesAvailableScratchRegister(list.GetDRegister(n))) return true; 710 } 711 return false; 712 } 713 714 bool AliasesAvailableScratchRegister(NeonRegisterList list) { 715 for (int n = 0; n < list.GetLength(); n++) { 716 if (AliasesAvailableScratchRegister(list.GetDRegister(n))) return true; 717 } 718 return false; 719 } 720 721 bool AliasesAvailableScratchRegister(RegisterList list) { 722 return GetScratchRegisterList()->Overlaps(list); 723 } 724 725 bool AliasesAvailableScratchRegister(const MemOperand& operand) { 726 return AliasesAvailableScratchRegister(operand.GetBaseRegister()) || 727 (operand.IsShiftedRegister() && 728 AliasesAvailableScratchRegister(operand.GetOffsetRegister())); 729 } 730 731 // Emit the literal pool in the code buffer. 732 // Every literal is placed on a 32bit boundary 733 // All the literals in the pool will be removed from the pool and potentially 734 // delete'd. 735 void EmitLiteralPool(LiteralPool* const literal_pool, EmitOption option); 736 void EmitLiteralPool(EmitOption option = kBranchRequired) { 737 VIXL_ASSERT(!IsLiteralPoolBlocked()); 738 EmitLiteralPool(literal_pool_manager_.GetLiteralPool(), option); 739 literal_pool_manager_.ResetCheckpoint(); 740 ComputeCheckpoint(); 741 } 742 743 size_t GetLiteralPoolSize() const { 744 return literal_pool_manager_.GetLiteralPoolSize(); 745 } 746 747 // Adr with a literal already constructed. Add the literal to the pool if it 748 // is not already done. 749 void Adr(Condition cond, Register rd, RawLiteral* literal) { 750 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 751 VIXL_ASSERT(allow_macro_instructions_); 752 VIXL_ASSERT(OutsideITBlock()); 753 EmitLiteralCondRL<&Assembler::adr> emit_helper(rd); 754 GenerateInstruction(cond, emit_helper, literal); 755 } 756 void Adr(Register rd, RawLiteral* literal) { Adr(al, rd, literal); } 757 758 // Loads with literals already constructed. Add the literal to the pool 759 // if it is not already done. 760 void Ldr(Condition cond, Register rt, RawLiteral* literal) { 761 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 762 VIXL_ASSERT(allow_macro_instructions_); 763 VIXL_ASSERT(OutsideITBlock()); 764 EmitLiteralCondRL<&Assembler::ldr> emit_helper(rt); 765 GenerateInstruction(cond, emit_helper, literal); 766 } 767 void Ldr(Register rt, RawLiteral* literal) { Ldr(al, rt, literal); } 768 769 void Ldrb(Condition cond, Register rt, RawLiteral* literal) { 770 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 771 VIXL_ASSERT(allow_macro_instructions_); 772 VIXL_ASSERT(OutsideITBlock()); 773 EmitLiteralCondRL<&Assembler::ldrb> emit_helper(rt); 774 GenerateInstruction(cond, emit_helper, literal); 775 } 776 void Ldrb(Register rt, RawLiteral* literal) { Ldrb(al, rt, literal); } 777 778 void Ldrd(Condition cond, Register rt, Register rt2, RawLiteral* literal) { 779 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 780 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); 781 VIXL_ASSERT(allow_macro_instructions_); 782 VIXL_ASSERT(OutsideITBlock()); 783 EmitLiteralCondRRL<&Assembler::ldrd> emit_helper(rt, rt2); 784 GenerateInstruction(cond, emit_helper, literal); 785 } 786 void Ldrd(Register rt, Register rt2, RawLiteral* literal) { 787 Ldrd(al, rt, rt2, literal); 788 } 789 790 void Ldrh(Condition cond, Register rt, RawLiteral* literal) { 791 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 792 VIXL_ASSERT(allow_macro_instructions_); 793 VIXL_ASSERT(OutsideITBlock()); 794 EmitLiteralCondRL<&Assembler::ldrh> emit_helper(rt); 795 GenerateInstruction(cond, emit_helper, literal); 796 } 797 void Ldrh(Register rt, RawLiteral* literal) { Ldrh(al, rt, literal); } 798 799 void Ldrsb(Condition cond, Register rt, RawLiteral* literal) { 800 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 801 VIXL_ASSERT(allow_macro_instructions_); 802 VIXL_ASSERT(OutsideITBlock()); 803 EmitLiteralCondRL<&Assembler::ldrsb> emit_helper(rt); 804 GenerateInstruction(cond, emit_helper, literal); 805 } 806 void Ldrsb(Register rt, RawLiteral* literal) { Ldrsb(al, rt, literal); } 807 808 void Ldrsh(Condition cond, Register rt, RawLiteral* literal) { 809 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 810 VIXL_ASSERT(allow_macro_instructions_); 811 VIXL_ASSERT(OutsideITBlock()); 812 EmitLiteralCondRL<&Assembler::ldrsh> emit_helper(rt); 813 GenerateInstruction(cond, emit_helper, literal); 814 } 815 void Ldrsh(Register rt, RawLiteral* literal) { Ldrsh(al, rt, literal); } 816 817 void Vldr(Condition cond, DataType dt, DRegister rd, RawLiteral* literal) { 818 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 819 VIXL_ASSERT(allow_macro_instructions_); 820 VIXL_ASSERT(OutsideITBlock()); 821 EmitLiteralCondDtDL<&Assembler::vldr> emit_helper(dt, rd); 822 GenerateInstruction(cond, emit_helper, literal); 823 } 824 void Vldr(DataType dt, DRegister rd, RawLiteral* literal) { 825 Vldr(al, dt, rd, literal); 826 } 827 void Vldr(Condition cond, DRegister rd, RawLiteral* literal) { 828 Vldr(cond, Untyped64, rd, literal); 829 } 830 void Vldr(DRegister rd, RawLiteral* literal) { 831 Vldr(al, Untyped64, rd, literal); 832 } 833 834 void Vldr(Condition cond, DataType dt, SRegister rd, RawLiteral* literal) { 835 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 836 VIXL_ASSERT(allow_macro_instructions_); 837 VIXL_ASSERT(OutsideITBlock()); 838 EmitLiteralCondDtSL<&Assembler::vldr> emit_helper(dt, rd); 839 GenerateInstruction(cond, emit_helper, literal); 840 } 841 void Vldr(DataType dt, SRegister rd, RawLiteral* literal) { 842 Vldr(al, dt, rd, literal); 843 } 844 void Vldr(Condition cond, SRegister rd, RawLiteral* literal) { 845 Vldr(cond, Untyped32, rd, literal); 846 } 847 void Vldr(SRegister rd, RawLiteral* literal) { 848 Vldr(al, Untyped32, rd, literal); 849 } 850 851 // Generic Ldr(register, data) 852 void Ldr(Condition cond, Register rt, uint32_t v) { 853 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 854 VIXL_ASSERT(allow_macro_instructions_); 855 VIXL_ASSERT(OutsideITBlock()); 856 RawLiteral* literal = 857 new Literal<uint32_t>(v, RawLiteral::kDeletedOnPlacementByPool); 858 EmitLiteralCondRL<&Assembler::ldr> emit_helper(rt); 859 GenerateInstruction(cond, emit_helper, literal); 860 } 861 template <typename T> 862 void Ldr(Register rt, T v) { 863 Ldr(al, rt, v); 864 } 865 866 // Generic Ldrd(rt, rt2, data) 867 void Ldrd(Condition cond, Register rt, Register rt2, uint64_t v) { 868 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 869 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); 870 VIXL_ASSERT(allow_macro_instructions_); 871 VIXL_ASSERT(OutsideITBlock()); 872 RawLiteral* literal = 873 new Literal<uint64_t>(v, RawLiteral::kDeletedOnPlacementByPool); 874 EmitLiteralCondRRL<&Assembler::ldrd> emit_helper(rt, rt2); 875 GenerateInstruction(cond, emit_helper, literal); 876 } 877 template <typename T> 878 void Ldrd(Register rt, Register rt2, T v) { 879 Ldrd(al, rt, rt2, v); 880 } 881 882 void Vldr(Condition cond, SRegister rd, float v) { 883 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 884 VIXL_ASSERT(allow_macro_instructions_); 885 VIXL_ASSERT(OutsideITBlock()); 886 RawLiteral* literal = 887 new Literal<float>(v, RawLiteral::kDeletedOnPlacementByPool); 888 EmitLiteralCondDtSL<&Assembler::vldr> emit_helper(Untyped32, rd); 889 GenerateInstruction(cond, emit_helper, literal); 890 } 891 void Vldr(SRegister rd, float v) { Vldr(al, rd, v); } 892 893 void Vldr(Condition cond, DRegister rd, double v) { 894 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 895 VIXL_ASSERT(allow_macro_instructions_); 896 VIXL_ASSERT(OutsideITBlock()); 897 RawLiteral* literal = 898 new Literal<double>(v, RawLiteral::kDeletedOnPlacementByPool); 899 EmitLiteralCondDtDL<&Assembler::vldr> emit_helper(Untyped64, rd); 900 GenerateInstruction(cond, emit_helper, literal); 901 } 902 void Vldr(DRegister rd, double v) { Vldr(al, rd, v); } 903 904 void Vmov(Condition cond, DRegister rt, double v) { Vmov(cond, F64, rt, v); } 905 void Vmov(DRegister rt, double v) { Vmov(al, F64, rt, v); } 906 void Vmov(Condition cond, SRegister rt, float v) { Vmov(cond, F32, rt, v); } 907 void Vmov(SRegister rt, float v) { Vmov(al, F32, rt, v); } 908 909 // Claim memory on the stack. 910 // Note that the Claim, Drop, and Peek helpers below ensure that offsets used 911 // are multiples of 32 bits to help maintain 32-bit SP alignment. 912 // We could `Align{Up,Down}(size, 4)`, but that's potentially problematic: 913 // Claim(3) 914 // Claim(1) 915 // Drop(4) 916 // would seem correct, when in fact: 917 // Claim(3) -> sp = sp - 4 918 // Claim(1) -> sp = sp - 4 919 // Drop(4) -> sp = sp + 4 920 // 921 void Claim(int32_t size) { 922 if (size == 0) return; 923 // The stack must be kept 32bit aligned. 924 VIXL_ASSERT((size > 0) && ((size % 4) == 0)); 925 Sub(sp, sp, size); 926 } 927 // Release memory on the stack 928 void Drop(int32_t size) { 929 if (size == 0) return; 930 // The stack must be kept 32bit aligned. 931 VIXL_ASSERT((size > 0) && ((size % 4) == 0)); 932 Add(sp, sp, size); 933 } 934 void Peek(Register dst, int32_t offset) { 935 VIXL_ASSERT((offset >= 0) && ((offset % 4) == 0)); 936 Ldr(dst, MemOperand(sp, offset)); 937 } 938 void Poke(Register src, int32_t offset) { 939 VIXL_ASSERT((offset >= 0) && ((offset % 4) == 0)); 940 Str(src, MemOperand(sp, offset)); 941 } 942 void Printf(const char* format, 943 CPURegister reg1 = NoReg, 944 CPURegister reg2 = NoReg, 945 CPURegister reg3 = NoReg, 946 CPURegister reg4 = NoReg); 947 // Functions used by Printf for generation. 948 void PushRegister(CPURegister reg); 949 void PreparePrintfArgument(CPURegister reg, 950 int* core_count, 951 int* vfp_count, 952 uint32_t* printf_type); 953 // Handlers for cases not handled by the assembler. 954 // ADD, MOVT, MOVW, SUB, SXTB16, TEQ, UXTB16 955 virtual void Delegate(InstructionType type, 956 InstructionCondROp instruction, 957 Condition cond, 958 Register rn, 959 const Operand& operand) VIXL_OVERRIDE; 960 // CMN, CMP, MOV, MOVS, MVN, MVNS, SXTB, SXTH, TST, UXTB, UXTH 961 virtual void Delegate(InstructionType type, 962 InstructionCondSizeROp instruction, 963 Condition cond, 964 EncodingSize size, 965 Register rn, 966 const Operand& operand) VIXL_OVERRIDE; 967 // ADDW, ORN, ORNS, PKHBT, PKHTB, RSC, RSCS, SUBW, SXTAB, SXTAB16, SXTAH, 968 // UXTAB, UXTAB16, UXTAH 969 virtual void Delegate(InstructionType type, 970 InstructionCondRROp instruction, 971 Condition cond, 972 Register rd, 973 Register rn, 974 const Operand& operand) VIXL_OVERRIDE; 975 // ADC, ADCS, ADD, ADDS, AND, ANDS, ASR, ASRS, BIC, BICS, EOR, EORS, LSL, 976 // LSLS, LSR, LSRS, ORR, ORRS, ROR, RORS, RSB, RSBS, SBC, SBCS, SUB, SUBS 977 virtual void Delegate(InstructionType type, 978 InstructionCondSizeRL instruction, 979 Condition cond, 980 EncodingSize size, 981 Register rd, 982 Label* label) VIXL_OVERRIDE; 983 bool GenerateSplitInstruction(InstructionCondSizeRROp instruction, 984 Condition cond, 985 Register rd, 986 Register rn, 987 uint32_t imm, 988 uint32_t mask); 989 virtual void Delegate(InstructionType type, 990 InstructionCondSizeRROp instruction, 991 Condition cond, 992 EncodingSize size, 993 Register rd, 994 Register rn, 995 const Operand& operand) VIXL_OVERRIDE; 996 // CBNZ, CBZ 997 virtual void Delegate(InstructionType type, 998 InstructionRL instruction, 999 Register rn, 1000 Label* label) VIXL_OVERRIDE; 1001 // VMOV 1002 virtual void Delegate(InstructionType type, 1003 InstructionCondDtSSop instruction, 1004 Condition cond, 1005 DataType dt, 1006 SRegister rd, 1007 const SOperand& operand) VIXL_OVERRIDE; 1008 // VMOV, VMVN 1009 virtual void Delegate(InstructionType type, 1010 InstructionCondDtDDop instruction, 1011 Condition cond, 1012 DataType dt, 1013 DRegister rd, 1014 const DOperand& operand) VIXL_OVERRIDE; 1015 // VMOV, VMVN 1016 virtual void Delegate(InstructionType type, 1017 InstructionCondDtQQop instruction, 1018 Condition cond, 1019 DataType dt, 1020 QRegister rd, 1021 const QOperand& operand) VIXL_OVERRIDE; 1022 // LDR, LDRB, LDRH, LDRSB, LDRSH, STR, STRB, STRH 1023 virtual void Delegate(InstructionType type, 1024 InstructionCondSizeRMop instruction, 1025 Condition cond, 1026 EncodingSize size, 1027 Register rd, 1028 const MemOperand& operand) VIXL_OVERRIDE; 1029 // LDAEXD, LDRD, LDREXD, STLEX, STLEXB, STLEXH, STRD, STREX, STREXB, STREXH 1030 virtual void Delegate(InstructionType type, 1031 InstructionCondRL instruction, 1032 Condition cond, 1033 Register rt, 1034 Label* label) VIXL_OVERRIDE; 1035 virtual void Delegate(InstructionType type, 1036 InstructionCondRRL instruction, 1037 Condition cond, 1038 Register rt, 1039 Register rt2, 1040 Label* label) VIXL_OVERRIDE; 1041 virtual void Delegate(InstructionType type, 1042 InstructionCondRRMop instruction, 1043 Condition cond, 1044 Register rt, 1045 Register rt2, 1046 const MemOperand& operand) VIXL_OVERRIDE; 1047 // VLDR, VSTR 1048 virtual void Delegate(InstructionType type, 1049 InstructionCondDtSMop instruction, 1050 Condition cond, 1051 DataType dt, 1052 SRegister rd, 1053 const MemOperand& operand) VIXL_OVERRIDE; 1054 // VLDR, VSTR 1055 virtual void Delegate(InstructionType type, 1056 InstructionCondDtDMop instruction, 1057 Condition cond, 1058 DataType dt, 1059 DRegister rd, 1060 const MemOperand& operand) VIXL_OVERRIDE; 1061 // MSR 1062 virtual void Delegate(InstructionType type, 1063 InstructionCondMsrOp instruction, 1064 Condition cond, 1065 MaskedSpecialRegister spec_reg, 1066 const Operand& operand) VIXL_OVERRIDE; 1067 virtual void Delegate(InstructionType type, 1068 InstructionCondDtDL instruction, 1069 Condition cond, 1070 DataType dt, 1071 DRegister rd, 1072 Label* label) VIXL_OVERRIDE; 1073 virtual void Delegate(InstructionType type, 1074 InstructionCondDtSL instruction, 1075 Condition cond, 1076 DataType dt, 1077 SRegister rd, 1078 Label* label) VIXL_OVERRIDE; 1079 1080 // Start of generated code. 1081 1082 void Adc(Condition cond, Register rd, Register rn, const Operand& operand) { 1083 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1084 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1085 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1086 VIXL_ASSERT(allow_macro_instructions_); 1087 VIXL_ASSERT(OutsideITBlock()); 1088 MacroEmissionCheckScope guard(this); 1089 bool can_use_it = 1090 // ADC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1 1091 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && 1092 operand.GetBaseRegister().IsLow(); 1093 ITScope it_scope(this, &cond, can_use_it); 1094 adc(cond, rd, rn, operand); 1095 } 1096 void Adc(Register rd, Register rn, const Operand& operand) { 1097 Adc(al, rd, rn, operand); 1098 } 1099 void Adc(FlagsUpdate flags, 1100 Condition cond, 1101 Register rd, 1102 Register rn, 1103 const Operand& operand) { 1104 switch (flags) { 1105 case LeaveFlags: 1106 Adc(cond, rd, rn, operand); 1107 break; 1108 case SetFlags: 1109 Adcs(cond, rd, rn, operand); 1110 break; 1111 case DontCare: 1112 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && 1113 rn.Is(rd) && operand.IsPlainRegister() && 1114 operand.GetBaseRegister().IsLow(); 1115 if (setflags_is_smaller) { 1116 Adcs(cond, rd, rn, operand); 1117 } else { 1118 Adc(cond, rd, rn, operand); 1119 } 1120 break; 1121 } 1122 } 1123 void Adc(FlagsUpdate flags, 1124 Register rd, 1125 Register rn, 1126 const Operand& operand) { 1127 Adc(flags, al, rd, rn, operand); 1128 } 1129 1130 void Adcs(Condition cond, Register rd, Register rn, const Operand& operand) { 1131 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1132 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1133 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1134 VIXL_ASSERT(allow_macro_instructions_); 1135 VIXL_ASSERT(OutsideITBlock()); 1136 MacroEmissionCheckScope guard(this); 1137 ITScope it_scope(this, &cond); 1138 adcs(cond, rd, rn, operand); 1139 } 1140 void Adcs(Register rd, Register rn, const Operand& operand) { 1141 Adcs(al, rd, rn, operand); 1142 } 1143 1144 void Add(Condition cond, Register rd, Register rn, const Operand& operand) { 1145 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1146 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1147 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1148 VIXL_ASSERT(allow_macro_instructions_); 1149 VIXL_ASSERT(OutsideITBlock()); 1150 MacroEmissionCheckScope guard(this); 1151 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { 1152 uint32_t immediate = operand.GetImmediate(); 1153 if (immediate == 0) { 1154 return; 1155 } 1156 } 1157 bool can_use_it = 1158 // ADD<c>{<q>} <Rd>, <Rn>, #<imm3> ; T1 1159 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() && 1160 rd.IsLow()) || 1161 // ADD<c>{<q>} {<Rdn>,} <Rdn>, #<imm8> ; T2 1162 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && 1163 rd.IsLow() && rn.Is(rd)) || 1164 // ADD{<c>}{<q>} <Rd>, SP, #<imm8> ; T1 1165 (operand.IsImmediate() && (operand.GetImmediate() <= 1020) && 1166 ((operand.GetImmediate() & 0x3) == 0) && rd.IsLow() && rn.IsSP()) || 1167 // ADD<c>{<q>} <Rd>, <Rn>, <Rm> 1168 (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() && 1169 operand.GetBaseRegister().IsLow()) || 1170 // ADD<c>{<q>} <Rdn>, <Rm> ; T2 1171 (operand.IsPlainRegister() && !rd.IsPC() && rn.Is(rd) && 1172 !operand.GetBaseRegister().IsSP() && 1173 !operand.GetBaseRegister().IsPC()) || 1174 // ADD{<c>}{<q>} {<Rdm>,} SP, <Rdm> ; T1 1175 (operand.IsPlainRegister() && !rd.IsPC() && rn.IsSP() && 1176 operand.GetBaseRegister().Is(rd)); 1177 ITScope it_scope(this, &cond, can_use_it); 1178 add(cond, rd, rn, operand); 1179 } 1180 void Add(Register rd, Register rn, const Operand& operand) { 1181 Add(al, rd, rn, operand); 1182 } 1183 void Add(FlagsUpdate flags, 1184 Condition cond, 1185 Register rd, 1186 Register rn, 1187 const Operand& operand) { 1188 switch (flags) { 1189 case LeaveFlags: 1190 Add(cond, rd, rn, operand); 1191 break; 1192 case SetFlags: 1193 Adds(cond, rd, rn, operand); 1194 break; 1195 case DontCare: 1196 bool setflags_is_smaller = 1197 IsUsingT32() && cond.Is(al) && 1198 ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() && 1199 !rd.Is(rn) && operand.GetBaseRegister().IsLow()) || 1200 (operand.IsImmediate() && 1201 ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) || 1202 (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256))))); 1203 if (setflags_is_smaller) { 1204 Adds(cond, rd, rn, operand); 1205 } else { 1206 bool changed_op_is_smaller = 1207 operand.IsImmediate() && (operand.GetSignedImmediate() < 0) && 1208 ((rd.IsLow() && rn.IsLow() && 1209 (operand.GetSignedImmediate() >= -7)) || 1210 (rd.IsLow() && rn.Is(rd) && 1211 (operand.GetSignedImmediate() >= -255))); 1212 if (changed_op_is_smaller) { 1213 Subs(cond, rd, rn, -operand.GetSignedImmediate()); 1214 } else { 1215 Add(cond, rd, rn, operand); 1216 } 1217 } 1218 break; 1219 } 1220 } 1221 void Add(FlagsUpdate flags, 1222 Register rd, 1223 Register rn, 1224 const Operand& operand) { 1225 Add(flags, al, rd, rn, operand); 1226 } 1227 1228 void Adds(Condition cond, Register rd, Register rn, const Operand& operand) { 1229 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1230 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1231 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1232 VIXL_ASSERT(allow_macro_instructions_); 1233 VIXL_ASSERT(OutsideITBlock()); 1234 MacroEmissionCheckScope guard(this); 1235 ITScope it_scope(this, &cond); 1236 adds(cond, rd, rn, operand); 1237 } 1238 void Adds(Register rd, Register rn, const Operand& operand) { 1239 Adds(al, rd, rn, operand); 1240 } 1241 1242 void And(Condition cond, Register rd, Register rn, const Operand& operand) { 1243 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1244 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1245 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1246 VIXL_ASSERT(allow_macro_instructions_); 1247 VIXL_ASSERT(OutsideITBlock()); 1248 MacroEmissionCheckScope guard(this); 1249 if (rd.Is(rn) && operand.IsPlainRegister() && 1250 rd.Is(operand.GetBaseRegister())) { 1251 return; 1252 } 1253 if (cond.Is(al) && operand.IsImmediate()) { 1254 uint32_t immediate = operand.GetImmediate(); 1255 if (immediate == 0) { 1256 mov(rd, 0); 1257 return; 1258 } 1259 if ((immediate == 0xffffffff) && rd.Is(rn)) { 1260 return; 1261 } 1262 } 1263 bool can_use_it = 1264 // AND<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1 1265 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && 1266 operand.GetBaseRegister().IsLow(); 1267 ITScope it_scope(this, &cond, can_use_it); 1268 and_(cond, rd, rn, operand); 1269 } 1270 void And(Register rd, Register rn, const Operand& operand) { 1271 And(al, rd, rn, operand); 1272 } 1273 void And(FlagsUpdate flags, 1274 Condition cond, 1275 Register rd, 1276 Register rn, 1277 const Operand& operand) { 1278 switch (flags) { 1279 case LeaveFlags: 1280 And(cond, rd, rn, operand); 1281 break; 1282 case SetFlags: 1283 Ands(cond, rd, rn, operand); 1284 break; 1285 case DontCare: 1286 if (operand.IsPlainRegister() && rd.Is(rn) && 1287 rd.Is(operand.GetBaseRegister())) { 1288 return; 1289 } 1290 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && 1291 rn.Is(rd) && operand.IsPlainRegister() && 1292 operand.GetBaseRegister().IsLow(); 1293 if (setflags_is_smaller) { 1294 Ands(cond, rd, rn, operand); 1295 } else { 1296 And(cond, rd, rn, operand); 1297 } 1298 break; 1299 } 1300 } 1301 void And(FlagsUpdate flags, 1302 Register rd, 1303 Register rn, 1304 const Operand& operand) { 1305 And(flags, al, rd, rn, operand); 1306 } 1307 1308 void Ands(Condition cond, Register rd, Register rn, const Operand& operand) { 1309 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1310 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1311 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1312 VIXL_ASSERT(allow_macro_instructions_); 1313 VIXL_ASSERT(OutsideITBlock()); 1314 MacroEmissionCheckScope guard(this); 1315 ITScope it_scope(this, &cond); 1316 ands(cond, rd, rn, operand); 1317 } 1318 void Ands(Register rd, Register rn, const Operand& operand) { 1319 Ands(al, rd, rn, operand); 1320 } 1321 1322 void Asr(Condition cond, Register rd, Register rm, const Operand& operand) { 1323 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1324 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 1325 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1326 VIXL_ASSERT(allow_macro_instructions_); 1327 VIXL_ASSERT(OutsideITBlock()); 1328 MacroEmissionCheckScope guard(this); 1329 bool can_use_it = 1330 // ASR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2 1331 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && 1332 (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || 1333 // ASR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1 1334 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && 1335 operand.GetBaseRegister().IsLow()); 1336 ITScope it_scope(this, &cond, can_use_it); 1337 asr(cond, rd, rm, operand); 1338 } 1339 void Asr(Register rd, Register rm, const Operand& operand) { 1340 Asr(al, rd, rm, operand); 1341 } 1342 void Asr(FlagsUpdate flags, 1343 Condition cond, 1344 Register rd, 1345 Register rm, 1346 const Operand& operand) { 1347 switch (flags) { 1348 case LeaveFlags: 1349 Asr(cond, rd, rm, operand); 1350 break; 1351 case SetFlags: 1352 Asrs(cond, rd, rm, operand); 1353 break; 1354 case DontCare: 1355 bool setflags_is_smaller = 1356 IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && 1357 ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && 1358 (operand.GetImmediate() <= 32)) || 1359 (operand.IsPlainRegister() && rd.Is(rm))); 1360 if (setflags_is_smaller) { 1361 Asrs(cond, rd, rm, operand); 1362 } else { 1363 Asr(cond, rd, rm, operand); 1364 } 1365 break; 1366 } 1367 } 1368 void Asr(FlagsUpdate flags, 1369 Register rd, 1370 Register rm, 1371 const Operand& operand) { 1372 Asr(flags, al, rd, rm, operand); 1373 } 1374 1375 void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) { 1376 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1377 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 1378 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1379 VIXL_ASSERT(allow_macro_instructions_); 1380 VIXL_ASSERT(OutsideITBlock()); 1381 MacroEmissionCheckScope guard(this); 1382 ITScope it_scope(this, &cond); 1383 asrs(cond, rd, rm, operand); 1384 } 1385 void Asrs(Register rd, Register rm, const Operand& operand) { 1386 Asrs(al, rd, rm, operand); 1387 } 1388 1389 void B(Condition cond, Label* label, BranchHint hint = kBranchWithoutHint) { 1390 VIXL_ASSERT(allow_macro_instructions_); 1391 VIXL_ASSERT(OutsideITBlock()); 1392 MacroEmissionCheckScope guard(this); 1393 if (hint == kNear) { 1394 if (label->IsBound()) { 1395 b(cond, label); 1396 } else { 1397 b(cond, Narrow, label); 1398 } 1399 } else { 1400 b(cond, label); 1401 } 1402 AddBranchLabel(label); 1403 } 1404 void B(Label* label, BranchHint hint = kBranchWithoutHint) { 1405 B(al, label, hint); 1406 } 1407 void BPreferNear(Condition cond, Label* label) { B(cond, label, kNear); } 1408 void BPreferNear(Label* label) { B(al, label, kNear); } 1409 1410 void Bfc(Condition cond, Register rd, uint32_t lsb, const Operand& operand) { 1411 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1412 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1413 VIXL_ASSERT(allow_macro_instructions_); 1414 VIXL_ASSERT(OutsideITBlock()); 1415 MacroEmissionCheckScope guard(this); 1416 ITScope it_scope(this, &cond); 1417 bfc(cond, rd, lsb, operand); 1418 } 1419 void Bfc(Register rd, uint32_t lsb, const Operand& operand) { 1420 Bfc(al, rd, lsb, operand); 1421 } 1422 1423 void Bfi(Condition cond, 1424 Register rd, 1425 Register rn, 1426 uint32_t lsb, 1427 const Operand& operand) { 1428 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1429 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1430 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1431 VIXL_ASSERT(allow_macro_instructions_); 1432 VIXL_ASSERT(OutsideITBlock()); 1433 MacroEmissionCheckScope guard(this); 1434 ITScope it_scope(this, &cond); 1435 bfi(cond, rd, rn, lsb, operand); 1436 } 1437 void Bfi(Register rd, Register rn, uint32_t lsb, const Operand& operand) { 1438 Bfi(al, rd, rn, lsb, operand); 1439 } 1440 1441 void Bic(Condition cond, Register rd, Register rn, const Operand& operand) { 1442 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1443 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1444 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1445 VIXL_ASSERT(allow_macro_instructions_); 1446 VIXL_ASSERT(OutsideITBlock()); 1447 MacroEmissionCheckScope guard(this); 1448 if (cond.Is(al) && operand.IsImmediate()) { 1449 uint32_t immediate = operand.GetImmediate(); 1450 if ((immediate == 0) && rd.Is(rn)) { 1451 return; 1452 } 1453 if (immediate == 0xffffffff) { 1454 mov(rd, 0); 1455 return; 1456 } 1457 } 1458 bool can_use_it = 1459 // BIC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1 1460 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && 1461 operand.GetBaseRegister().IsLow(); 1462 ITScope it_scope(this, &cond, can_use_it); 1463 bic(cond, rd, rn, operand); 1464 } 1465 void Bic(Register rd, Register rn, const Operand& operand) { 1466 Bic(al, rd, rn, operand); 1467 } 1468 void Bic(FlagsUpdate flags, 1469 Condition cond, 1470 Register rd, 1471 Register rn, 1472 const Operand& operand) { 1473 switch (flags) { 1474 case LeaveFlags: 1475 Bic(cond, rd, rn, operand); 1476 break; 1477 case SetFlags: 1478 Bics(cond, rd, rn, operand); 1479 break; 1480 case DontCare: 1481 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && 1482 rn.Is(rd) && operand.IsPlainRegister() && 1483 operand.GetBaseRegister().IsLow(); 1484 if (setflags_is_smaller) { 1485 Bics(cond, rd, rn, operand); 1486 } else { 1487 Bic(cond, rd, rn, operand); 1488 } 1489 break; 1490 } 1491 } 1492 void Bic(FlagsUpdate flags, 1493 Register rd, 1494 Register rn, 1495 const Operand& operand) { 1496 Bic(flags, al, rd, rn, operand); 1497 } 1498 1499 void Bics(Condition cond, Register rd, Register rn, const Operand& operand) { 1500 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1501 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1502 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1503 VIXL_ASSERT(allow_macro_instructions_); 1504 VIXL_ASSERT(OutsideITBlock()); 1505 MacroEmissionCheckScope guard(this); 1506 ITScope it_scope(this, &cond); 1507 bics(cond, rd, rn, operand); 1508 } 1509 void Bics(Register rd, Register rn, const Operand& operand) { 1510 Bics(al, rd, rn, operand); 1511 } 1512 1513 void Bkpt(Condition cond, uint32_t imm) { 1514 VIXL_ASSERT(allow_macro_instructions_); 1515 VIXL_ASSERT(OutsideITBlock()); 1516 MacroEmissionCheckScope guard(this); 1517 ITScope it_scope(this, &cond); 1518 bkpt(cond, imm); 1519 } 1520 void Bkpt(uint32_t imm) { Bkpt(al, imm); } 1521 1522 void Bl(Condition cond, Label* label) { 1523 VIXL_ASSERT(allow_macro_instructions_); 1524 VIXL_ASSERT(OutsideITBlock()); 1525 MacroEmissionCheckScope guard(this); 1526 ITScope it_scope(this, &cond); 1527 bl(cond, label); 1528 AddBranchLabel(label); 1529 } 1530 void Bl(Label* label) { Bl(al, label); } 1531 1532 void Blx(Condition cond, Label* label) { 1533 VIXL_ASSERT(allow_macro_instructions_); 1534 VIXL_ASSERT(OutsideITBlock()); 1535 MacroEmissionCheckScope guard(this); 1536 ITScope it_scope(this, &cond); 1537 blx(cond, label); 1538 AddBranchLabel(label); 1539 } 1540 void Blx(Label* label) { Blx(al, label); } 1541 1542 void Blx(Condition cond, Register rm) { 1543 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 1544 VIXL_ASSERT(allow_macro_instructions_); 1545 VIXL_ASSERT(OutsideITBlock()); 1546 MacroEmissionCheckScope guard(this); 1547 bool can_use_it = 1548 // BLX{<c>}{<q>} <Rm> ; T1 1549 !rm.IsPC(); 1550 ITScope it_scope(this, &cond, can_use_it); 1551 blx(cond, rm); 1552 } 1553 void Blx(Register rm) { Blx(al, rm); } 1554 1555 void Bx(Condition cond, Register rm) { 1556 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 1557 VIXL_ASSERT(allow_macro_instructions_); 1558 VIXL_ASSERT(OutsideITBlock()); 1559 MacroEmissionCheckScope guard(this); 1560 bool can_use_it = 1561 // BX{<c>}{<q>} <Rm> ; T1 1562 !rm.IsPC(); 1563 ITScope it_scope(this, &cond, can_use_it); 1564 bx(cond, rm); 1565 } 1566 void Bx(Register rm) { Bx(al, rm); } 1567 1568 void Bxj(Condition cond, Register rm) { 1569 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 1570 VIXL_ASSERT(allow_macro_instructions_); 1571 VIXL_ASSERT(OutsideITBlock()); 1572 MacroEmissionCheckScope guard(this); 1573 ITScope it_scope(this, &cond); 1574 bxj(cond, rm); 1575 } 1576 void Bxj(Register rm) { Bxj(al, rm); } 1577 1578 void Cbnz(Register rn, Label* label) { 1579 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1580 VIXL_ASSERT(allow_macro_instructions_); 1581 VIXL_ASSERT(OutsideITBlock()); 1582 MacroEmissionCheckScope guard(this); 1583 cbnz(rn, label); 1584 AddBranchLabel(label); 1585 } 1586 1587 void Cbz(Register rn, Label* label) { 1588 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1589 VIXL_ASSERT(allow_macro_instructions_); 1590 VIXL_ASSERT(OutsideITBlock()); 1591 MacroEmissionCheckScope guard(this); 1592 cbz(rn, label); 1593 AddBranchLabel(label); 1594 } 1595 1596 void Clrex(Condition cond) { 1597 VIXL_ASSERT(allow_macro_instructions_); 1598 VIXL_ASSERT(OutsideITBlock()); 1599 MacroEmissionCheckScope guard(this); 1600 ITScope it_scope(this, &cond); 1601 clrex(cond); 1602 } 1603 void Clrex() { Clrex(al); } 1604 1605 void Clz(Condition cond, Register rd, Register rm) { 1606 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1607 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 1608 VIXL_ASSERT(allow_macro_instructions_); 1609 VIXL_ASSERT(OutsideITBlock()); 1610 MacroEmissionCheckScope guard(this); 1611 ITScope it_scope(this, &cond); 1612 clz(cond, rd, rm); 1613 } 1614 void Clz(Register rd, Register rm) { Clz(al, rd, rm); } 1615 1616 void Cmn(Condition cond, Register rn, const Operand& operand) { 1617 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1618 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1619 VIXL_ASSERT(allow_macro_instructions_); 1620 VIXL_ASSERT(OutsideITBlock()); 1621 MacroEmissionCheckScope guard(this); 1622 bool can_use_it = 1623 // CMN{<c>}{<q>} <Rn>, <Rm> ; T1 1624 operand.IsPlainRegister() && rn.IsLow() && 1625 operand.GetBaseRegister().IsLow(); 1626 ITScope it_scope(this, &cond, can_use_it); 1627 cmn(cond, rn, operand); 1628 } 1629 void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); } 1630 1631 void Cmp(Condition cond, Register rn, const Operand& operand) { 1632 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1633 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1634 VIXL_ASSERT(allow_macro_instructions_); 1635 VIXL_ASSERT(OutsideITBlock()); 1636 MacroEmissionCheckScope guard(this); 1637 bool can_use_it = 1638 // CMP{<c>}{<q>} <Rn>, #<imm8> ; T1 1639 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && 1640 rn.IsLow()) || 1641 // CMP{<c>}{<q>} <Rn>, <Rm> ; T1 T2 1642 (operand.IsPlainRegister() && !rn.IsPC() && 1643 !operand.GetBaseRegister().IsPC()); 1644 ITScope it_scope(this, &cond, can_use_it); 1645 cmp(cond, rn, operand); 1646 } 1647 void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } 1648 1649 void Crc32b(Condition cond, Register rd, Register rn, Register rm) { 1650 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1651 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1652 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 1653 VIXL_ASSERT(allow_macro_instructions_); 1654 VIXL_ASSERT(OutsideITBlock()); 1655 MacroEmissionCheckScope guard(this); 1656 ITScope it_scope(this, &cond); 1657 crc32b(cond, rd, rn, rm); 1658 } 1659 void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } 1660 1661 void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { 1662 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1663 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1664 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 1665 VIXL_ASSERT(allow_macro_instructions_); 1666 VIXL_ASSERT(OutsideITBlock()); 1667 MacroEmissionCheckScope guard(this); 1668 ITScope it_scope(this, &cond); 1669 crc32cb(cond, rd, rn, rm); 1670 } 1671 void Crc32cb(Register rd, Register rn, Register rm) { 1672 Crc32cb(al, rd, rn, rm); 1673 } 1674 1675 void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { 1676 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1677 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1678 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 1679 VIXL_ASSERT(allow_macro_instructions_); 1680 VIXL_ASSERT(OutsideITBlock()); 1681 MacroEmissionCheckScope guard(this); 1682 ITScope it_scope(this, &cond); 1683 crc32ch(cond, rd, rn, rm); 1684 } 1685 void Crc32ch(Register rd, Register rn, Register rm) { 1686 Crc32ch(al, rd, rn, rm); 1687 } 1688 1689 void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { 1690 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1691 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 1693 VIXL_ASSERT(allow_macro_instructions_); 1694 VIXL_ASSERT(OutsideITBlock()); 1695 MacroEmissionCheckScope guard(this); 1696 ITScope it_scope(this, &cond); 1697 crc32cw(cond, rd, rn, rm); 1698 } 1699 void Crc32cw(Register rd, Register rn, Register rm) { 1700 Crc32cw(al, rd, rn, rm); 1701 } 1702 1703 void Crc32h(Condition cond, Register rd, Register rn, Register rm) { 1704 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1705 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1706 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 1707 VIXL_ASSERT(allow_macro_instructions_); 1708 VIXL_ASSERT(OutsideITBlock()); 1709 MacroEmissionCheckScope guard(this); 1710 ITScope it_scope(this, &cond); 1711 crc32h(cond, rd, rn, rm); 1712 } 1713 void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } 1714 1715 void Crc32w(Condition cond, Register rd, Register rn, Register rm) { 1716 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1717 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1718 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 1719 VIXL_ASSERT(allow_macro_instructions_); 1720 VIXL_ASSERT(OutsideITBlock()); 1721 MacroEmissionCheckScope guard(this); 1722 ITScope it_scope(this, &cond); 1723 crc32w(cond, rd, rn, rm); 1724 } 1725 void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } 1726 1727 void Dmb(Condition cond, MemoryBarrier option) { 1728 VIXL_ASSERT(allow_macro_instructions_); 1729 VIXL_ASSERT(OutsideITBlock()); 1730 MacroEmissionCheckScope guard(this); 1731 ITScope it_scope(this, &cond); 1732 dmb(cond, option); 1733 } 1734 void Dmb(MemoryBarrier option) { Dmb(al, option); } 1735 1736 void Dsb(Condition cond, MemoryBarrier option) { 1737 VIXL_ASSERT(allow_macro_instructions_); 1738 VIXL_ASSERT(OutsideITBlock()); 1739 MacroEmissionCheckScope guard(this); 1740 ITScope it_scope(this, &cond); 1741 dsb(cond, option); 1742 } 1743 void Dsb(MemoryBarrier option) { Dsb(al, option); } 1744 1745 void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { 1746 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1747 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1748 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1749 VIXL_ASSERT(allow_macro_instructions_); 1750 VIXL_ASSERT(OutsideITBlock()); 1751 MacroEmissionCheckScope guard(this); 1752 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { 1753 uint32_t immediate = operand.GetImmediate(); 1754 if (immediate == 0) { 1755 return; 1756 } 1757 if (immediate == 0xffffffff) { 1758 mvn(rd, rn); 1759 return; 1760 } 1761 } 1762 bool can_use_it = 1763 // EOR<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1 1764 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && 1765 operand.GetBaseRegister().IsLow(); 1766 ITScope it_scope(this, &cond, can_use_it); 1767 eor(cond, rd, rn, operand); 1768 } 1769 void Eor(Register rd, Register rn, const Operand& operand) { 1770 Eor(al, rd, rn, operand); 1771 } 1772 void Eor(FlagsUpdate flags, 1773 Condition cond, 1774 Register rd, 1775 Register rn, 1776 const Operand& operand) { 1777 switch (flags) { 1778 case LeaveFlags: 1779 Eor(cond, rd, rn, operand); 1780 break; 1781 case SetFlags: 1782 Eors(cond, rd, rn, operand); 1783 break; 1784 case DontCare: 1785 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && 1786 rn.Is(rd) && operand.IsPlainRegister() && 1787 operand.GetBaseRegister().IsLow(); 1788 if (setflags_is_smaller) { 1789 Eors(cond, rd, rn, operand); 1790 } else { 1791 Eor(cond, rd, rn, operand); 1792 } 1793 break; 1794 } 1795 } 1796 void Eor(FlagsUpdate flags, 1797 Register rd, 1798 Register rn, 1799 const Operand& operand) { 1800 Eor(flags, al, rd, rn, operand); 1801 } 1802 1803 void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { 1804 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 1805 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1806 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1807 VIXL_ASSERT(allow_macro_instructions_); 1808 VIXL_ASSERT(OutsideITBlock()); 1809 MacroEmissionCheckScope guard(this); 1810 ITScope it_scope(this, &cond); 1811 eors(cond, rd, rn, operand); 1812 } 1813 void Eors(Register rd, Register rn, const Operand& operand) { 1814 Eors(al, rd, rn, operand); 1815 } 1816 1817 void Fldmdbx(Condition cond, 1818 Register rn, 1819 WriteBack write_back, 1820 DRegisterList dreglist) { 1821 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1822 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); 1823 VIXL_ASSERT(allow_macro_instructions_); 1824 VIXL_ASSERT(OutsideITBlock()); 1825 MacroEmissionCheckScope guard(this); 1826 ITScope it_scope(this, &cond); 1827 fldmdbx(cond, rn, write_back, dreglist); 1828 } 1829 void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { 1830 Fldmdbx(al, rn, write_back, dreglist); 1831 } 1832 1833 void Fldmiax(Condition cond, 1834 Register rn, 1835 WriteBack write_back, 1836 DRegisterList dreglist) { 1837 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1838 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); 1839 VIXL_ASSERT(allow_macro_instructions_); 1840 VIXL_ASSERT(OutsideITBlock()); 1841 MacroEmissionCheckScope guard(this); 1842 ITScope it_scope(this, &cond); 1843 fldmiax(cond, rn, write_back, dreglist); 1844 } 1845 void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { 1846 Fldmiax(al, rn, write_back, dreglist); 1847 } 1848 1849 void Fstmdbx(Condition cond, 1850 Register rn, 1851 WriteBack write_back, 1852 DRegisterList dreglist) { 1853 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1854 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); 1855 VIXL_ASSERT(allow_macro_instructions_); 1856 VIXL_ASSERT(OutsideITBlock()); 1857 MacroEmissionCheckScope guard(this); 1858 ITScope it_scope(this, &cond); 1859 fstmdbx(cond, rn, write_back, dreglist); 1860 } 1861 void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { 1862 Fstmdbx(al, rn, write_back, dreglist); 1863 } 1864 1865 void Fstmiax(Condition cond, 1866 Register rn, 1867 WriteBack write_back, 1868 DRegisterList dreglist) { 1869 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 1870 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); 1871 VIXL_ASSERT(allow_macro_instructions_); 1872 VIXL_ASSERT(OutsideITBlock()); 1873 MacroEmissionCheckScope guard(this); 1874 ITScope it_scope(this, &cond); 1875 fstmiax(cond, rn, write_back, dreglist); 1876 } 1877 void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { 1878 Fstmiax(al, rn, write_back, dreglist); 1879 } 1880 1881 void Hlt(Condition cond, uint32_t imm) { 1882 VIXL_ASSERT(allow_macro_instructions_); 1883 VIXL_ASSERT(OutsideITBlock()); 1884 MacroEmissionCheckScope guard(this); 1885 ITScope it_scope(this, &cond); 1886 hlt(cond, imm); 1887 } 1888 void Hlt(uint32_t imm) { Hlt(al, imm); } 1889 1890 void Hvc(Condition cond, uint32_t imm) { 1891 VIXL_ASSERT(allow_macro_instructions_); 1892 VIXL_ASSERT(OutsideITBlock()); 1893 MacroEmissionCheckScope guard(this); 1894 ITScope it_scope(this, &cond); 1895 hvc(cond, imm); 1896 } 1897 void Hvc(uint32_t imm) { Hvc(al, imm); } 1898 1899 void Isb(Condition cond, MemoryBarrier option) { 1900 VIXL_ASSERT(allow_macro_instructions_); 1901 VIXL_ASSERT(OutsideITBlock()); 1902 MacroEmissionCheckScope guard(this); 1903 ITScope it_scope(this, &cond); 1904 isb(cond, option); 1905 } 1906 void Isb(MemoryBarrier option) { Isb(al, option); } 1907 1908 void Lda(Condition cond, Register rt, const MemOperand& operand) { 1909 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 1910 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1911 VIXL_ASSERT(allow_macro_instructions_); 1912 VIXL_ASSERT(OutsideITBlock()); 1913 MacroEmissionCheckScope guard(this); 1914 ITScope it_scope(this, &cond); 1915 lda(cond, rt, operand); 1916 } 1917 void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } 1918 1919 void Ldab(Condition cond, Register rt, const MemOperand& operand) { 1920 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 1921 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1922 VIXL_ASSERT(allow_macro_instructions_); 1923 VIXL_ASSERT(OutsideITBlock()); 1924 MacroEmissionCheckScope guard(this); 1925 ITScope it_scope(this, &cond); 1926 ldab(cond, rt, operand); 1927 } 1928 void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } 1929 1930 void Ldaex(Condition cond, Register rt, const MemOperand& operand) { 1931 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 1932 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1933 VIXL_ASSERT(allow_macro_instructions_); 1934 VIXL_ASSERT(OutsideITBlock()); 1935 MacroEmissionCheckScope guard(this); 1936 ITScope it_scope(this, &cond); 1937 ldaex(cond, rt, operand); 1938 } 1939 void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } 1940 1941 void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { 1942 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 1943 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1944 VIXL_ASSERT(allow_macro_instructions_); 1945 VIXL_ASSERT(OutsideITBlock()); 1946 MacroEmissionCheckScope guard(this); 1947 ITScope it_scope(this, &cond); 1948 ldaexb(cond, rt, operand); 1949 } 1950 void Ldaexb(Register rt, const MemOperand& operand) { 1951 Ldaexb(al, rt, operand); 1952 } 1953 1954 void Ldaexd(Condition cond, 1955 Register rt, 1956 Register rt2, 1957 const MemOperand& operand) { 1958 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 1959 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); 1960 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1961 VIXL_ASSERT(allow_macro_instructions_); 1962 VIXL_ASSERT(OutsideITBlock()); 1963 MacroEmissionCheckScope guard(this); 1964 ITScope it_scope(this, &cond); 1965 ldaexd(cond, rt, rt2, operand); 1966 } 1967 void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { 1968 Ldaexd(al, rt, rt2, operand); 1969 } 1970 1971 void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { 1972 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 1973 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1974 VIXL_ASSERT(allow_macro_instructions_); 1975 VIXL_ASSERT(OutsideITBlock()); 1976 MacroEmissionCheckScope guard(this); 1977 ITScope it_scope(this, &cond); 1978 ldaexh(cond, rt, operand); 1979 } 1980 void Ldaexh(Register rt, const MemOperand& operand) { 1981 Ldaexh(al, rt, operand); 1982 } 1983 1984 void Ldah(Condition cond, Register rt, const MemOperand& operand) { 1985 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 1986 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 1987 VIXL_ASSERT(allow_macro_instructions_); 1988 VIXL_ASSERT(OutsideITBlock()); 1989 MacroEmissionCheckScope guard(this); 1990 ITScope it_scope(this, &cond); 1991 ldah(cond, rt, operand); 1992 } 1993 void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } 1994 1995 void Ldm(Condition cond, 1996 Register rn, 1997 WriteBack write_back, 1998 RegisterList registers) { 1999 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2000 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 2001 VIXL_ASSERT(allow_macro_instructions_); 2002 VIXL_ASSERT(OutsideITBlock()); 2003 MacroEmissionCheckScope guard(this); 2004 ITScope it_scope(this, &cond); 2005 ldm(cond, rn, write_back, registers); 2006 } 2007 void Ldm(Register rn, WriteBack write_back, RegisterList registers) { 2008 Ldm(al, rn, write_back, registers); 2009 } 2010 2011 void Ldmda(Condition cond, 2012 Register rn, 2013 WriteBack write_back, 2014 RegisterList registers) { 2015 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2016 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 2017 VIXL_ASSERT(allow_macro_instructions_); 2018 VIXL_ASSERT(OutsideITBlock()); 2019 MacroEmissionCheckScope guard(this); 2020 ITScope it_scope(this, &cond); 2021 ldmda(cond, rn, write_back, registers); 2022 } 2023 void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { 2024 Ldmda(al, rn, write_back, registers); 2025 } 2026 2027 void Ldmdb(Condition cond, 2028 Register rn, 2029 WriteBack write_back, 2030 RegisterList registers) { 2031 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2032 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 2033 VIXL_ASSERT(allow_macro_instructions_); 2034 VIXL_ASSERT(OutsideITBlock()); 2035 MacroEmissionCheckScope guard(this); 2036 ITScope it_scope(this, &cond); 2037 ldmdb(cond, rn, write_back, registers); 2038 } 2039 void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { 2040 Ldmdb(al, rn, write_back, registers); 2041 } 2042 2043 void Ldmea(Condition cond, 2044 Register rn, 2045 WriteBack write_back, 2046 RegisterList registers) { 2047 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2048 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 2049 VIXL_ASSERT(allow_macro_instructions_); 2050 VIXL_ASSERT(OutsideITBlock()); 2051 MacroEmissionCheckScope guard(this); 2052 ITScope it_scope(this, &cond); 2053 ldmea(cond, rn, write_back, registers); 2054 } 2055 void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { 2056 Ldmea(al, rn, write_back, registers); 2057 } 2058 2059 void Ldmed(Condition cond, 2060 Register rn, 2061 WriteBack write_back, 2062 RegisterList registers) { 2063 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2064 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 2065 VIXL_ASSERT(allow_macro_instructions_); 2066 VIXL_ASSERT(OutsideITBlock()); 2067 MacroEmissionCheckScope guard(this); 2068 ITScope it_scope(this, &cond); 2069 ldmed(cond, rn, write_back, registers); 2070 } 2071 void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { 2072 Ldmed(al, rn, write_back, registers); 2073 } 2074 2075 void Ldmfa(Condition cond, 2076 Register rn, 2077 WriteBack write_back, 2078 RegisterList registers) { 2079 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2080 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 2081 VIXL_ASSERT(allow_macro_instructions_); 2082 VIXL_ASSERT(OutsideITBlock()); 2083 MacroEmissionCheckScope guard(this); 2084 ITScope it_scope(this, &cond); 2085 ldmfa(cond, rn, write_back, registers); 2086 } 2087 void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { 2088 Ldmfa(al, rn, write_back, registers); 2089 } 2090 2091 void Ldmfd(Condition cond, 2092 Register rn, 2093 WriteBack write_back, 2094 RegisterList registers) { 2095 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2096 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 2097 VIXL_ASSERT(allow_macro_instructions_); 2098 VIXL_ASSERT(OutsideITBlock()); 2099 MacroEmissionCheckScope guard(this); 2100 ITScope it_scope(this, &cond); 2101 ldmfd(cond, rn, write_back, registers); 2102 } 2103 void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { 2104 Ldmfd(al, rn, write_back, registers); 2105 } 2106 2107 void Ldmib(Condition cond, 2108 Register rn, 2109 WriteBack write_back, 2110 RegisterList registers) { 2111 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2112 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 2113 VIXL_ASSERT(allow_macro_instructions_); 2114 VIXL_ASSERT(OutsideITBlock()); 2115 MacroEmissionCheckScope guard(this); 2116 ITScope it_scope(this, &cond); 2117 ldmib(cond, rn, write_back, registers); 2118 } 2119 void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { 2120 Ldmib(al, rn, write_back, registers); 2121 } 2122 2123 void Ldr(Condition cond, Register rt, const MemOperand& operand) { 2124 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 2125 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2126 VIXL_ASSERT(allow_macro_instructions_); 2127 VIXL_ASSERT(OutsideITBlock()); 2128 MacroEmissionCheckScope guard(this); 2129 bool can_use_it = 2130 // LDR{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1 2131 (operand.IsImmediate() && rt.IsLow() && 2132 operand.GetBaseRegister().IsLow() && 2133 operand.IsOffsetImmediateWithinRange(0, 124, 4) && 2134 (operand.GetAddrMode() == Offset)) || 2135 // LDR{<c>}{<q>} <Rt>, [SP{, #{+}<imm>}] ; T2 2136 (operand.IsImmediate() && rt.IsLow() && 2137 operand.GetBaseRegister().IsSP() && 2138 operand.IsOffsetImmediateWithinRange(0, 1020, 4) && 2139 (operand.GetAddrMode() == Offset)) || 2140 // LDR{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1 2141 (operand.IsPlainRegister() && rt.IsLow() && 2142 operand.GetBaseRegister().IsLow() && 2143 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && 2144 (operand.GetAddrMode() == Offset)); 2145 ITScope it_scope(this, &cond, can_use_it); 2146 ldr(cond, rt, operand); 2147 } 2148 void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } 2149 2150 2151 void Ldrb(Condition cond, Register rt, const MemOperand& operand) { 2152 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 2153 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2154 VIXL_ASSERT(allow_macro_instructions_); 2155 VIXL_ASSERT(OutsideITBlock()); 2156 MacroEmissionCheckScope guard(this); 2157 bool can_use_it = 2158 // LDRB{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1 2159 (operand.IsImmediate() && rt.IsLow() && 2160 operand.GetBaseRegister().IsLow() && 2161 operand.IsOffsetImmediateWithinRange(0, 31) && 2162 (operand.GetAddrMode() == Offset)) || 2163 // LDRB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1 2164 (operand.IsPlainRegister() && rt.IsLow() && 2165 operand.GetBaseRegister().IsLow() && 2166 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && 2167 (operand.GetAddrMode() == Offset)); 2168 ITScope it_scope(this, &cond, can_use_it); 2169 ldrb(cond, rt, operand); 2170 } 2171 void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } 2172 2173 2174 void Ldrd(Condition cond, 2175 Register rt, 2176 Register rt2, 2177 const MemOperand& operand) { 2178 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 2179 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); 2180 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2181 VIXL_ASSERT(allow_macro_instructions_); 2182 VIXL_ASSERT(OutsideITBlock()); 2183 MacroEmissionCheckScope guard(this); 2184 ITScope it_scope(this, &cond); 2185 ldrd(cond, rt, rt2, operand); 2186 } 2187 void Ldrd(Register rt, Register rt2, const MemOperand& operand) { 2188 Ldrd(al, rt, rt2, operand); 2189 } 2190 2191 2192 void Ldrex(Condition cond, Register rt, const MemOperand& operand) { 2193 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 2194 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2195 VIXL_ASSERT(allow_macro_instructions_); 2196 VIXL_ASSERT(OutsideITBlock()); 2197 MacroEmissionCheckScope guard(this); 2198 ITScope it_scope(this, &cond); 2199 ldrex(cond, rt, operand); 2200 } 2201 void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } 2202 2203 void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { 2204 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 2205 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2206 VIXL_ASSERT(allow_macro_instructions_); 2207 VIXL_ASSERT(OutsideITBlock()); 2208 MacroEmissionCheckScope guard(this); 2209 ITScope it_scope(this, &cond); 2210 ldrexb(cond, rt, operand); 2211 } 2212 void Ldrexb(Register rt, const MemOperand& operand) { 2213 Ldrexb(al, rt, operand); 2214 } 2215 2216 void Ldrexd(Condition cond, 2217 Register rt, 2218 Register rt2, 2219 const MemOperand& operand) { 2220 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 2221 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); 2222 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2223 VIXL_ASSERT(allow_macro_instructions_); 2224 VIXL_ASSERT(OutsideITBlock()); 2225 MacroEmissionCheckScope guard(this); 2226 ITScope it_scope(this, &cond); 2227 ldrexd(cond, rt, rt2, operand); 2228 } 2229 void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { 2230 Ldrexd(al, rt, rt2, operand); 2231 } 2232 2233 void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { 2234 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 2235 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2236 VIXL_ASSERT(allow_macro_instructions_); 2237 VIXL_ASSERT(OutsideITBlock()); 2238 MacroEmissionCheckScope guard(this); 2239 ITScope it_scope(this, &cond); 2240 ldrexh(cond, rt, operand); 2241 } 2242 void Ldrexh(Register rt, const MemOperand& operand) { 2243 Ldrexh(al, rt, operand); 2244 } 2245 2246 void Ldrh(Condition cond, Register rt, const MemOperand& operand) { 2247 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 2248 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2249 VIXL_ASSERT(allow_macro_instructions_); 2250 VIXL_ASSERT(OutsideITBlock()); 2251 MacroEmissionCheckScope guard(this); 2252 bool can_use_it = 2253 // LDRH{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1 2254 (operand.IsImmediate() && rt.IsLow() && 2255 operand.GetBaseRegister().IsLow() && 2256 operand.IsOffsetImmediateWithinRange(0, 62, 2) && 2257 (operand.GetAddrMode() == Offset)) || 2258 // LDRH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1 2259 (operand.IsPlainRegister() && rt.IsLow() && 2260 operand.GetBaseRegister().IsLow() && 2261 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && 2262 (operand.GetAddrMode() == Offset)); 2263 ITScope it_scope(this, &cond, can_use_it); 2264 ldrh(cond, rt, operand); 2265 } 2266 void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } 2267 2268 2269 void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { 2270 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 2271 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2272 VIXL_ASSERT(allow_macro_instructions_); 2273 VIXL_ASSERT(OutsideITBlock()); 2274 MacroEmissionCheckScope guard(this); 2275 bool can_use_it = 2276 // LDRSB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1 2277 operand.IsPlainRegister() && rt.IsLow() && 2278 operand.GetBaseRegister().IsLow() && 2279 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && 2280 (operand.GetAddrMode() == Offset); 2281 ITScope it_scope(this, &cond, can_use_it); 2282 ldrsb(cond, rt, operand); 2283 } 2284 void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } 2285 2286 2287 void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { 2288 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 2289 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2290 VIXL_ASSERT(allow_macro_instructions_); 2291 VIXL_ASSERT(OutsideITBlock()); 2292 MacroEmissionCheckScope guard(this); 2293 bool can_use_it = 2294 // LDRSH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1 2295 operand.IsPlainRegister() && rt.IsLow() && 2296 operand.GetBaseRegister().IsLow() && 2297 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && 2298 (operand.GetAddrMode() == Offset); 2299 ITScope it_scope(this, &cond, can_use_it); 2300 ldrsh(cond, rt, operand); 2301 } 2302 void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } 2303 2304 2305 void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { 2306 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2307 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 2308 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2309 VIXL_ASSERT(allow_macro_instructions_); 2310 VIXL_ASSERT(OutsideITBlock()); 2311 MacroEmissionCheckScope guard(this); 2312 bool can_use_it = 2313 // LSL<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2 2314 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && 2315 (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || 2316 // LSL<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1 2317 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && 2318 operand.GetBaseRegister().IsLow()); 2319 ITScope it_scope(this, &cond, can_use_it); 2320 lsl(cond, rd, rm, operand); 2321 } 2322 void Lsl(Register rd, Register rm, const Operand& operand) { 2323 Lsl(al, rd, rm, operand); 2324 } 2325 void Lsl(FlagsUpdate flags, 2326 Condition cond, 2327 Register rd, 2328 Register rm, 2329 const Operand& operand) { 2330 switch (flags) { 2331 case LeaveFlags: 2332 Lsl(cond, rd, rm, operand); 2333 break; 2334 case SetFlags: 2335 Lsls(cond, rd, rm, operand); 2336 break; 2337 case DontCare: 2338 bool setflags_is_smaller = 2339 IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && 2340 ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && 2341 (operand.GetImmediate() < 32)) || 2342 (operand.IsPlainRegister() && rd.Is(rm))); 2343 if (setflags_is_smaller) { 2344 Lsls(cond, rd, rm, operand); 2345 } else { 2346 Lsl(cond, rd, rm, operand); 2347 } 2348 break; 2349 } 2350 } 2351 void Lsl(FlagsUpdate flags, 2352 Register rd, 2353 Register rm, 2354 const Operand& operand) { 2355 Lsl(flags, al, rd, rm, operand); 2356 } 2357 2358 void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { 2359 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2360 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 2361 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2362 VIXL_ASSERT(allow_macro_instructions_); 2363 VIXL_ASSERT(OutsideITBlock()); 2364 MacroEmissionCheckScope guard(this); 2365 ITScope it_scope(this, &cond); 2366 lsls(cond, rd, rm, operand); 2367 } 2368 void Lsls(Register rd, Register rm, const Operand& operand) { 2369 Lsls(al, rd, rm, operand); 2370 } 2371 2372 void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { 2373 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2374 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 2375 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2376 VIXL_ASSERT(allow_macro_instructions_); 2377 VIXL_ASSERT(OutsideITBlock()); 2378 MacroEmissionCheckScope guard(this); 2379 bool can_use_it = 2380 // LSR<c>{<q>} {<Rd>,} <Rm>, #<imm> ; T2 2381 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && 2382 (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || 2383 // LSR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1 2384 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && 2385 operand.GetBaseRegister().IsLow()); 2386 ITScope it_scope(this, &cond, can_use_it); 2387 lsr(cond, rd, rm, operand); 2388 } 2389 void Lsr(Register rd, Register rm, const Operand& operand) { 2390 Lsr(al, rd, rm, operand); 2391 } 2392 void Lsr(FlagsUpdate flags, 2393 Condition cond, 2394 Register rd, 2395 Register rm, 2396 const Operand& operand) { 2397 switch (flags) { 2398 case LeaveFlags: 2399 Lsr(cond, rd, rm, operand); 2400 break; 2401 case SetFlags: 2402 Lsrs(cond, rd, rm, operand); 2403 break; 2404 case DontCare: 2405 bool setflags_is_smaller = 2406 IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && 2407 ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && 2408 (operand.GetImmediate() <= 32)) || 2409 (operand.IsPlainRegister() && rd.Is(rm))); 2410 if (setflags_is_smaller) { 2411 Lsrs(cond, rd, rm, operand); 2412 } else { 2413 Lsr(cond, rd, rm, operand); 2414 } 2415 break; 2416 } 2417 } 2418 void Lsr(FlagsUpdate flags, 2419 Register rd, 2420 Register rm, 2421 const Operand& operand) { 2422 Lsr(flags, al, rd, rm, operand); 2423 } 2424 2425 void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { 2426 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2427 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 2428 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2429 VIXL_ASSERT(allow_macro_instructions_); 2430 VIXL_ASSERT(OutsideITBlock()); 2431 MacroEmissionCheckScope guard(this); 2432 ITScope it_scope(this, &cond); 2433 lsrs(cond, rd, rm, operand); 2434 } 2435 void Lsrs(Register rd, Register rm, const Operand& operand) { 2436 Lsrs(al, rd, rm, operand); 2437 } 2438 2439 void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { 2440 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2441 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2442 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 2443 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 2444 VIXL_ASSERT(allow_macro_instructions_); 2445 VIXL_ASSERT(OutsideITBlock()); 2446 MacroEmissionCheckScope guard(this); 2447 ITScope it_scope(this, &cond); 2448 mla(cond, rd, rn, rm, ra); 2449 } 2450 void Mla(Register rd, Register rn, Register rm, Register ra) { 2451 Mla(al, rd, rn, rm, ra); 2452 } 2453 void Mla(FlagsUpdate flags, 2454 Condition cond, 2455 Register rd, 2456 Register rn, 2457 Register rm, 2458 Register ra) { 2459 switch (flags) { 2460 case LeaveFlags: 2461 Mla(cond, rd, rn, rm, ra); 2462 break; 2463 case SetFlags: 2464 Mlas(cond, rd, rn, rm, ra); 2465 break; 2466 case DontCare: 2467 Mla(cond, rd, rn, rm, ra); 2468 break; 2469 } 2470 } 2471 void Mla( 2472 FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { 2473 Mla(flags, al, rd, rn, rm, ra); 2474 } 2475 2476 void Mlas( 2477 Condition cond, Register rd, Register rn, Register rm, Register ra) { 2478 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2479 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2480 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 2481 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 2482 VIXL_ASSERT(allow_macro_instructions_); 2483 VIXL_ASSERT(OutsideITBlock()); 2484 MacroEmissionCheckScope guard(this); 2485 ITScope it_scope(this, &cond); 2486 mlas(cond, rd, rn, rm, ra); 2487 } 2488 void Mlas(Register rd, Register rn, Register rm, Register ra) { 2489 Mlas(al, rd, rn, rm, ra); 2490 } 2491 2492 void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { 2493 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2494 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2495 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 2496 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 2497 VIXL_ASSERT(allow_macro_instructions_); 2498 VIXL_ASSERT(OutsideITBlock()); 2499 MacroEmissionCheckScope guard(this); 2500 ITScope it_scope(this, &cond); 2501 mls(cond, rd, rn, rm, ra); 2502 } 2503 void Mls(Register rd, Register rn, Register rm, Register ra) { 2504 Mls(al, rd, rn, rm, ra); 2505 } 2506 2507 void Mov(Condition cond, Register rd, const Operand& operand) { 2508 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2509 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2510 VIXL_ASSERT(allow_macro_instructions_); 2511 VIXL_ASSERT(OutsideITBlock()); 2512 MacroEmissionCheckScope guard(this); 2513 if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { 2514 return; 2515 } 2516 bool can_use_it = 2517 // MOV<c>{<q>} <Rd>, #<imm8> ; T1 2518 (operand.IsImmediate() && rd.IsLow() && 2519 (operand.GetImmediate() <= 255)) || 2520 // MOV{<c>}{<q>} <Rd>, <Rm> ; T1 2521 (operand.IsPlainRegister() && !rd.IsPC() && 2522 !operand.GetBaseRegister().IsPC()) || 2523 // MOV<c>{<q>} <Rd>, <Rm> {, <shift> #<amount>} ; T2 2524 (operand.IsImmediateShiftedRegister() && rd.IsLow() && 2525 operand.GetBaseRegister().IsLow() && 2526 (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || 2527 operand.GetShift().Is(ASR))) || 2528 // MOV<c>{<q>} <Rdm>, <Rdm>, LSL <Rs> ; T1 2529 // MOV<c>{<q>} <Rdm>, <Rdm>, LSR <Rs> ; T1 2530 // MOV<c>{<q>} <Rdm>, <Rdm>, ASR <Rs> ; T1 2531 // MOV<c>{<q>} <Rdm>, <Rdm>, ROR <Rs> ; T1 2532 (operand.IsRegisterShiftedRegister() && 2533 rd.Is(operand.GetBaseRegister()) && rd.IsLow() && 2534 (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || 2535 operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && 2536 operand.GetShiftRegister().IsLow()); 2537 ITScope it_scope(this, &cond, can_use_it); 2538 mov(cond, rd, operand); 2539 } 2540 void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } 2541 void Mov(FlagsUpdate flags, 2542 Condition cond, 2543 Register rd, 2544 const Operand& operand) { 2545 switch (flags) { 2546 case LeaveFlags: 2547 Mov(cond, rd, operand); 2548 break; 2549 case SetFlags: 2550 Movs(cond, rd, operand); 2551 break; 2552 case DontCare: 2553 if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { 2554 return; 2555 } 2556 bool setflags_is_smaller = 2557 IsUsingT32() && cond.Is(al) && 2558 ((operand.IsImmediateShiftedRegister() && rd.IsLow() && 2559 operand.GetBaseRegister().IsLow() && 2560 (operand.GetShiftAmount() >= 1) && 2561 (((operand.GetShiftAmount() <= 32) && 2562 ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || 2563 ((operand.GetShiftAmount() < 32) && 2564 operand.GetShift().IsLSL()))) || 2565 (operand.IsRegisterShiftedRegister() && rd.IsLow() && 2566 operand.GetBaseRegister().Is(rd) && 2567 operand.GetShiftRegister().IsLow() && 2568 (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || 2569 operand.GetShift().IsASR() || operand.GetShift().IsROR())) || 2570 (operand.IsImmediate() && rd.IsLow() && 2571 (operand.GetImmediate() < 256))); 2572 if (setflags_is_smaller) { 2573 Movs(cond, rd, operand); 2574 } else { 2575 Mov(cond, rd, operand); 2576 } 2577 break; 2578 } 2579 } 2580 void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { 2581 Mov(flags, al, rd, operand); 2582 } 2583 2584 void Movs(Condition cond, Register rd, const Operand& operand) { 2585 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2586 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2587 VIXL_ASSERT(allow_macro_instructions_); 2588 VIXL_ASSERT(OutsideITBlock()); 2589 MacroEmissionCheckScope guard(this); 2590 ITScope it_scope(this, &cond); 2591 movs(cond, rd, operand); 2592 } 2593 void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } 2594 2595 void Movt(Condition cond, Register rd, const Operand& operand) { 2596 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2597 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2598 VIXL_ASSERT(allow_macro_instructions_); 2599 VIXL_ASSERT(OutsideITBlock()); 2600 MacroEmissionCheckScope guard(this); 2601 ITScope it_scope(this, &cond); 2602 movt(cond, rd, operand); 2603 } 2604 void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } 2605 2606 void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { 2607 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2608 VIXL_ASSERT(allow_macro_instructions_); 2609 VIXL_ASSERT(OutsideITBlock()); 2610 MacroEmissionCheckScope guard(this); 2611 ITScope it_scope(this, &cond); 2612 mrs(cond, rd, spec_reg); 2613 } 2614 void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } 2615 2616 void Msr(Condition cond, 2617 MaskedSpecialRegister spec_reg, 2618 const Operand& operand) { 2619 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2620 VIXL_ASSERT(allow_macro_instructions_); 2621 VIXL_ASSERT(OutsideITBlock()); 2622 MacroEmissionCheckScope guard(this); 2623 ITScope it_scope(this, &cond); 2624 msr(cond, spec_reg, operand); 2625 } 2626 void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { 2627 Msr(al, spec_reg, operand); 2628 } 2629 2630 void Mul(Condition cond, Register rd, Register rn, Register rm) { 2631 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2632 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2633 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 2634 VIXL_ASSERT(allow_macro_instructions_); 2635 VIXL_ASSERT(OutsideITBlock()); 2636 MacroEmissionCheckScope guard(this); 2637 bool can_use_it = 2638 // MUL<c>{<q>} <Rdm>, <Rn>{, <Rdm>} ; T1 2639 rd.Is(rm) && rn.IsLow() && rm.IsLow(); 2640 ITScope it_scope(this, &cond, can_use_it); 2641 mul(cond, rd, rn, rm); 2642 } 2643 void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } 2644 void Mul(FlagsUpdate flags, 2645 Condition cond, 2646 Register rd, 2647 Register rn, 2648 Register rm) { 2649 switch (flags) { 2650 case LeaveFlags: 2651 Mul(cond, rd, rn, rm); 2652 break; 2653 case SetFlags: 2654 Muls(cond, rd, rn, rm); 2655 break; 2656 case DontCare: 2657 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && 2658 rn.IsLow() && rm.Is(rd); 2659 if (setflags_is_smaller) { 2660 Muls(cond, rd, rn, rm); 2661 } else { 2662 Mul(cond, rd, rn, rm); 2663 } 2664 break; 2665 } 2666 } 2667 void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { 2668 Mul(flags, al, rd, rn, rm); 2669 } 2670 2671 void Muls(Condition cond, Register rd, Register rn, Register rm) { 2672 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2673 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2674 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 2675 VIXL_ASSERT(allow_macro_instructions_); 2676 VIXL_ASSERT(OutsideITBlock()); 2677 MacroEmissionCheckScope guard(this); 2678 ITScope it_scope(this, &cond); 2679 muls(cond, rd, rn, rm); 2680 } 2681 void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } 2682 2683 void Mvn(Condition cond, Register rd, const Operand& operand) { 2684 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2685 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2686 VIXL_ASSERT(allow_macro_instructions_); 2687 VIXL_ASSERT(OutsideITBlock()); 2688 MacroEmissionCheckScope guard(this); 2689 bool can_use_it = 2690 // MVN<c>{<q>} <Rd>, <Rm> ; T1 2691 operand.IsPlainRegister() && rd.IsLow() && 2692 operand.GetBaseRegister().IsLow(); 2693 ITScope it_scope(this, &cond, can_use_it); 2694 mvn(cond, rd, operand); 2695 } 2696 void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } 2697 void Mvn(FlagsUpdate flags, 2698 Condition cond, 2699 Register rd, 2700 const Operand& operand) { 2701 switch (flags) { 2702 case LeaveFlags: 2703 Mvn(cond, rd, operand); 2704 break; 2705 case SetFlags: 2706 Mvns(cond, rd, operand); 2707 break; 2708 case DontCare: 2709 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && 2710 operand.IsPlainRegister() && 2711 operand.GetBaseRegister().IsLow(); 2712 if (setflags_is_smaller) { 2713 Mvns(cond, rd, operand); 2714 } else { 2715 Mvn(cond, rd, operand); 2716 } 2717 break; 2718 } 2719 } 2720 void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { 2721 Mvn(flags, al, rd, operand); 2722 } 2723 2724 void Mvns(Condition cond, Register rd, const Operand& operand) { 2725 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2726 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2727 VIXL_ASSERT(allow_macro_instructions_); 2728 VIXL_ASSERT(OutsideITBlock()); 2729 MacroEmissionCheckScope guard(this); 2730 ITScope it_scope(this, &cond); 2731 mvns(cond, rd, operand); 2732 } 2733 void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } 2734 2735 void Nop(Condition cond) { 2736 VIXL_ASSERT(allow_macro_instructions_); 2737 VIXL_ASSERT(OutsideITBlock()); 2738 MacroEmissionCheckScope guard(this); 2739 ITScope it_scope(this, &cond); 2740 nop(cond); 2741 } 2742 void Nop() { Nop(al); } 2743 2744 void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { 2745 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2746 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2747 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2748 VIXL_ASSERT(allow_macro_instructions_); 2749 VIXL_ASSERT(OutsideITBlock()); 2750 MacroEmissionCheckScope guard(this); 2751 if (cond.Is(al) && operand.IsImmediate()) { 2752 uint32_t immediate = operand.GetImmediate(); 2753 if (immediate == 0) { 2754 mvn(rd, 0); 2755 return; 2756 } 2757 if ((immediate == 0xffffffff) && rd.Is(rn)) { 2758 return; 2759 } 2760 } 2761 ITScope it_scope(this, &cond); 2762 orn(cond, rd, rn, operand); 2763 } 2764 void Orn(Register rd, Register rn, const Operand& operand) { 2765 Orn(al, rd, rn, operand); 2766 } 2767 void Orn(FlagsUpdate flags, 2768 Condition cond, 2769 Register rd, 2770 Register rn, 2771 const Operand& operand) { 2772 switch (flags) { 2773 case LeaveFlags: 2774 Orn(cond, rd, rn, operand); 2775 break; 2776 case SetFlags: 2777 Orns(cond, rd, rn, operand); 2778 break; 2779 case DontCare: 2780 Orn(cond, rd, rn, operand); 2781 break; 2782 } 2783 } 2784 void Orn(FlagsUpdate flags, 2785 Register rd, 2786 Register rn, 2787 const Operand& operand) { 2788 Orn(flags, al, rd, rn, operand); 2789 } 2790 2791 void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { 2792 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2793 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2794 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2795 VIXL_ASSERT(allow_macro_instructions_); 2796 VIXL_ASSERT(OutsideITBlock()); 2797 MacroEmissionCheckScope guard(this); 2798 ITScope it_scope(this, &cond); 2799 orns(cond, rd, rn, operand); 2800 } 2801 void Orns(Register rd, Register rn, const Operand& operand) { 2802 Orns(al, rd, rn, operand); 2803 } 2804 2805 void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { 2806 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2807 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2808 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2809 VIXL_ASSERT(allow_macro_instructions_); 2810 VIXL_ASSERT(OutsideITBlock()); 2811 MacroEmissionCheckScope guard(this); 2812 if (rd.Is(rn) && operand.IsPlainRegister() && 2813 rd.Is(operand.GetBaseRegister())) { 2814 return; 2815 } 2816 if (cond.Is(al) && operand.IsImmediate()) { 2817 uint32_t immediate = operand.GetImmediate(); 2818 if ((immediate == 0) && rd.Is(rn)) { 2819 return; 2820 } 2821 if (immediate == 0xffffffff) { 2822 mvn(rd, 0); 2823 return; 2824 } 2825 } 2826 bool can_use_it = 2827 // ORR<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1 2828 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && 2829 operand.GetBaseRegister().IsLow(); 2830 ITScope it_scope(this, &cond, can_use_it); 2831 orr(cond, rd, rn, operand); 2832 } 2833 void Orr(Register rd, Register rn, const Operand& operand) { 2834 Orr(al, rd, rn, operand); 2835 } 2836 void Orr(FlagsUpdate flags, 2837 Condition cond, 2838 Register rd, 2839 Register rn, 2840 const Operand& operand) { 2841 switch (flags) { 2842 case LeaveFlags: 2843 Orr(cond, rd, rn, operand); 2844 break; 2845 case SetFlags: 2846 Orrs(cond, rd, rn, operand); 2847 break; 2848 case DontCare: 2849 if (operand.IsPlainRegister() && rd.Is(rn) && 2850 rd.Is(operand.GetBaseRegister())) { 2851 return; 2852 } 2853 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && 2854 rn.Is(rd) && operand.IsPlainRegister() && 2855 operand.GetBaseRegister().IsLow(); 2856 if (setflags_is_smaller) { 2857 Orrs(cond, rd, rn, operand); 2858 } else { 2859 Orr(cond, rd, rn, operand); 2860 } 2861 break; 2862 } 2863 } 2864 void Orr(FlagsUpdate flags, 2865 Register rd, 2866 Register rn, 2867 const Operand& operand) { 2868 Orr(flags, al, rd, rn, operand); 2869 } 2870 2871 void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { 2872 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2873 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2874 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2875 VIXL_ASSERT(allow_macro_instructions_); 2876 VIXL_ASSERT(OutsideITBlock()); 2877 MacroEmissionCheckScope guard(this); 2878 ITScope it_scope(this, &cond); 2879 orrs(cond, rd, rn, operand); 2880 } 2881 void Orrs(Register rd, Register rn, const Operand& operand) { 2882 Orrs(al, rd, rn, operand); 2883 } 2884 2885 void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { 2886 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2887 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2888 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2889 VIXL_ASSERT(allow_macro_instructions_); 2890 VIXL_ASSERT(OutsideITBlock()); 2891 MacroEmissionCheckScope guard(this); 2892 ITScope it_scope(this, &cond); 2893 pkhbt(cond, rd, rn, operand); 2894 } 2895 void Pkhbt(Register rd, Register rn, const Operand& operand) { 2896 Pkhbt(al, rd, rn, operand); 2897 } 2898 2899 void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { 2900 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 2901 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 2902 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2903 VIXL_ASSERT(allow_macro_instructions_); 2904 VIXL_ASSERT(OutsideITBlock()); 2905 MacroEmissionCheckScope guard(this); 2906 ITScope it_scope(this, &cond); 2907 pkhtb(cond, rd, rn, operand); 2908 } 2909 void Pkhtb(Register rd, Register rn, const Operand& operand) { 2910 Pkhtb(al, rd, rn, operand); 2911 } 2912 2913 void Pld(Condition cond, Label* label) { 2914 VIXL_ASSERT(allow_macro_instructions_); 2915 VIXL_ASSERT(OutsideITBlock()); 2916 MacroEmissionCheckScope guard(this); 2917 ITScope it_scope(this, &cond); 2918 pld(cond, label); 2919 } 2920 void Pld(Label* label) { Pld(al, label); } 2921 2922 void Pld(Condition cond, const MemOperand& operand) { 2923 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2924 VIXL_ASSERT(allow_macro_instructions_); 2925 VIXL_ASSERT(OutsideITBlock()); 2926 MacroEmissionCheckScope guard(this); 2927 ITScope it_scope(this, &cond); 2928 pld(cond, operand); 2929 } 2930 void Pld(const MemOperand& operand) { Pld(al, operand); } 2931 2932 void Pldw(Condition cond, const MemOperand& operand) { 2933 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2934 VIXL_ASSERT(allow_macro_instructions_); 2935 VIXL_ASSERT(OutsideITBlock()); 2936 MacroEmissionCheckScope guard(this); 2937 ITScope it_scope(this, &cond); 2938 pldw(cond, operand); 2939 } 2940 void Pldw(const MemOperand& operand) { Pldw(al, operand); } 2941 2942 void Pli(Condition cond, const MemOperand& operand) { 2943 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 2944 VIXL_ASSERT(allow_macro_instructions_); 2945 VIXL_ASSERT(OutsideITBlock()); 2946 MacroEmissionCheckScope guard(this); 2947 ITScope it_scope(this, &cond); 2948 pli(cond, operand); 2949 } 2950 void Pli(const MemOperand& operand) { Pli(al, operand); } 2951 2952 void Pli(Condition cond, Label* label) { 2953 VIXL_ASSERT(allow_macro_instructions_); 2954 VIXL_ASSERT(OutsideITBlock()); 2955 MacroEmissionCheckScope guard(this); 2956 ITScope it_scope(this, &cond); 2957 pli(cond, label); 2958 } 2959 void Pli(Label* label) { Pli(al, label); } 2960 2961 void Pop(Condition cond, RegisterList registers) { 2962 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 2963 VIXL_ASSERT(allow_macro_instructions_); 2964 VIXL_ASSERT(OutsideITBlock()); 2965 MacroEmissionCheckScope guard(this); 2966 ITScope it_scope(this, &cond); 2967 pop(cond, registers); 2968 } 2969 void Pop(RegisterList registers) { Pop(al, registers); } 2970 2971 void Pop(Condition cond, Register rt) { 2972 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 2973 VIXL_ASSERT(allow_macro_instructions_); 2974 VIXL_ASSERT(OutsideITBlock()); 2975 MacroEmissionCheckScope guard(this); 2976 ITScope it_scope(this, &cond); 2977 pop(cond, rt); 2978 } 2979 void Pop(Register rt) { Pop(al, rt); } 2980 2981 void Push(Condition cond, RegisterList registers) { 2982 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 2983 VIXL_ASSERT(allow_macro_instructions_); 2984 VIXL_ASSERT(OutsideITBlock()); 2985 MacroEmissionCheckScope guard(this); 2986 ITScope it_scope(this, &cond); 2987 push(cond, registers); 2988 } 2989 void Push(RegisterList registers) { Push(al, registers); } 2990 2991 void Push(Condition cond, Register rt) { 2992 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 2993 VIXL_ASSERT(allow_macro_instructions_); 2994 VIXL_ASSERT(OutsideITBlock()); 2995 MacroEmissionCheckScope guard(this); 2996 ITScope it_scope(this, &cond); 2997 push(cond, rt); 2998 } 2999 void Push(Register rt) { Push(al, rt); } 3000 3001 void Qadd(Condition cond, Register rd, Register rm, Register rn) { 3002 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3003 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3004 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3005 VIXL_ASSERT(allow_macro_instructions_); 3006 VIXL_ASSERT(OutsideITBlock()); 3007 MacroEmissionCheckScope guard(this); 3008 ITScope it_scope(this, &cond); 3009 qadd(cond, rd, rm, rn); 3010 } 3011 void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } 3012 3013 void Qadd16(Condition cond, Register rd, Register rn, Register rm) { 3014 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3015 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3016 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3017 VIXL_ASSERT(allow_macro_instructions_); 3018 VIXL_ASSERT(OutsideITBlock()); 3019 MacroEmissionCheckScope guard(this); 3020 ITScope it_scope(this, &cond); 3021 qadd16(cond, rd, rn, rm); 3022 } 3023 void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } 3024 3025 void Qadd8(Condition cond, Register rd, Register rn, Register rm) { 3026 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3027 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3028 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3029 VIXL_ASSERT(allow_macro_instructions_); 3030 VIXL_ASSERT(OutsideITBlock()); 3031 MacroEmissionCheckScope guard(this); 3032 ITScope it_scope(this, &cond); 3033 qadd8(cond, rd, rn, rm); 3034 } 3035 void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } 3036 3037 void Qasx(Condition cond, Register rd, Register rn, Register rm) { 3038 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3039 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3040 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3041 VIXL_ASSERT(allow_macro_instructions_); 3042 VIXL_ASSERT(OutsideITBlock()); 3043 MacroEmissionCheckScope guard(this); 3044 ITScope it_scope(this, &cond); 3045 qasx(cond, rd, rn, rm); 3046 } 3047 void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } 3048 3049 void Qdadd(Condition cond, Register rd, Register rm, Register rn) { 3050 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3051 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3052 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3053 VIXL_ASSERT(allow_macro_instructions_); 3054 VIXL_ASSERT(OutsideITBlock()); 3055 MacroEmissionCheckScope guard(this); 3056 ITScope it_scope(this, &cond); 3057 qdadd(cond, rd, rm, rn); 3058 } 3059 void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } 3060 3061 void Qdsub(Condition cond, Register rd, Register rm, Register rn) { 3062 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3063 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3064 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3065 VIXL_ASSERT(allow_macro_instructions_); 3066 VIXL_ASSERT(OutsideITBlock()); 3067 MacroEmissionCheckScope guard(this); 3068 ITScope it_scope(this, &cond); 3069 qdsub(cond, rd, rm, rn); 3070 } 3071 void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } 3072 3073 void Qsax(Condition cond, Register rd, Register rn, Register rm) { 3074 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3075 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3076 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3077 VIXL_ASSERT(allow_macro_instructions_); 3078 VIXL_ASSERT(OutsideITBlock()); 3079 MacroEmissionCheckScope guard(this); 3080 ITScope it_scope(this, &cond); 3081 qsax(cond, rd, rn, rm); 3082 } 3083 void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } 3084 3085 void Qsub(Condition cond, Register rd, Register rm, Register rn) { 3086 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3087 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3088 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3089 VIXL_ASSERT(allow_macro_instructions_); 3090 VIXL_ASSERT(OutsideITBlock()); 3091 MacroEmissionCheckScope guard(this); 3092 ITScope it_scope(this, &cond); 3093 qsub(cond, rd, rm, rn); 3094 } 3095 void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } 3096 3097 void Qsub16(Condition cond, Register rd, Register rn, Register rm) { 3098 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3099 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3100 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3101 VIXL_ASSERT(allow_macro_instructions_); 3102 VIXL_ASSERT(OutsideITBlock()); 3103 MacroEmissionCheckScope guard(this); 3104 ITScope it_scope(this, &cond); 3105 qsub16(cond, rd, rn, rm); 3106 } 3107 void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } 3108 3109 void Qsub8(Condition cond, Register rd, Register rn, Register rm) { 3110 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3111 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3112 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3113 VIXL_ASSERT(allow_macro_instructions_); 3114 VIXL_ASSERT(OutsideITBlock()); 3115 MacroEmissionCheckScope guard(this); 3116 ITScope it_scope(this, &cond); 3117 qsub8(cond, rd, rn, rm); 3118 } 3119 void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } 3120 3121 void Rbit(Condition cond, Register rd, Register rm) { 3122 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3123 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3124 VIXL_ASSERT(allow_macro_instructions_); 3125 VIXL_ASSERT(OutsideITBlock()); 3126 MacroEmissionCheckScope guard(this); 3127 ITScope it_scope(this, &cond); 3128 rbit(cond, rd, rm); 3129 } 3130 void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } 3131 3132 void Rev(Condition cond, Register rd, Register rm) { 3133 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3134 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3135 VIXL_ASSERT(allow_macro_instructions_); 3136 VIXL_ASSERT(OutsideITBlock()); 3137 MacroEmissionCheckScope guard(this); 3138 ITScope it_scope(this, &cond); 3139 rev(cond, rd, rm); 3140 } 3141 void Rev(Register rd, Register rm) { Rev(al, rd, rm); } 3142 3143 void Rev16(Condition cond, Register rd, Register rm) { 3144 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3145 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3146 VIXL_ASSERT(allow_macro_instructions_); 3147 VIXL_ASSERT(OutsideITBlock()); 3148 MacroEmissionCheckScope guard(this); 3149 ITScope it_scope(this, &cond); 3150 rev16(cond, rd, rm); 3151 } 3152 void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } 3153 3154 void Revsh(Condition cond, Register rd, Register rm) { 3155 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3156 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3157 VIXL_ASSERT(allow_macro_instructions_); 3158 VIXL_ASSERT(OutsideITBlock()); 3159 MacroEmissionCheckScope guard(this); 3160 ITScope it_scope(this, &cond); 3161 revsh(cond, rd, rm); 3162 } 3163 void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } 3164 3165 void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { 3166 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3167 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3168 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 3169 VIXL_ASSERT(allow_macro_instructions_); 3170 VIXL_ASSERT(OutsideITBlock()); 3171 MacroEmissionCheckScope guard(this); 3172 bool can_use_it = 3173 // ROR<c>{<q>} {<Rdm>,} <Rdm>, <Rs> ; T1 3174 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && 3175 operand.GetBaseRegister().IsLow(); 3176 ITScope it_scope(this, &cond, can_use_it); 3177 ror(cond, rd, rm, operand); 3178 } 3179 void Ror(Register rd, Register rm, const Operand& operand) { 3180 Ror(al, rd, rm, operand); 3181 } 3182 void Ror(FlagsUpdate flags, 3183 Condition cond, 3184 Register rd, 3185 Register rm, 3186 const Operand& operand) { 3187 switch (flags) { 3188 case LeaveFlags: 3189 Ror(cond, rd, rm, operand); 3190 break; 3191 case SetFlags: 3192 Rors(cond, rd, rm, operand); 3193 break; 3194 case DontCare: 3195 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && 3196 rm.IsLow() && operand.IsPlainRegister() && 3197 rd.Is(rm); 3198 if (setflags_is_smaller) { 3199 Rors(cond, rd, rm, operand); 3200 } else { 3201 Ror(cond, rd, rm, operand); 3202 } 3203 break; 3204 } 3205 } 3206 void Ror(FlagsUpdate flags, 3207 Register rd, 3208 Register rm, 3209 const Operand& operand) { 3210 Ror(flags, al, rd, rm, operand); 3211 } 3212 3213 void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { 3214 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3215 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3216 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 3217 VIXL_ASSERT(allow_macro_instructions_); 3218 VIXL_ASSERT(OutsideITBlock()); 3219 MacroEmissionCheckScope guard(this); 3220 ITScope it_scope(this, &cond); 3221 rors(cond, rd, rm, operand); 3222 } 3223 void Rors(Register rd, Register rm, const Operand& operand) { 3224 Rors(al, rd, rm, operand); 3225 } 3226 3227 void Rrx(Condition cond, Register rd, Register rm) { 3228 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3229 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3230 VIXL_ASSERT(allow_macro_instructions_); 3231 VIXL_ASSERT(OutsideITBlock()); 3232 MacroEmissionCheckScope guard(this); 3233 ITScope it_scope(this, &cond); 3234 rrx(cond, rd, rm); 3235 } 3236 void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } 3237 void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { 3238 switch (flags) { 3239 case LeaveFlags: 3240 Rrx(cond, rd, rm); 3241 break; 3242 case SetFlags: 3243 Rrxs(cond, rd, rm); 3244 break; 3245 case DontCare: 3246 Rrx(cond, rd, rm); 3247 break; 3248 } 3249 } 3250 void Rrx(FlagsUpdate flags, Register rd, Register rm) { 3251 Rrx(flags, al, rd, rm); 3252 } 3253 3254 void Rrxs(Condition cond, Register rd, Register rm) { 3255 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3256 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3257 VIXL_ASSERT(allow_macro_instructions_); 3258 VIXL_ASSERT(OutsideITBlock()); 3259 MacroEmissionCheckScope guard(this); 3260 ITScope it_scope(this, &cond); 3261 rrxs(cond, rd, rm); 3262 } 3263 void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } 3264 3265 void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { 3266 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3267 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3268 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 3269 VIXL_ASSERT(allow_macro_instructions_); 3270 VIXL_ASSERT(OutsideITBlock()); 3271 MacroEmissionCheckScope guard(this); 3272 bool can_use_it = 3273 // RSB<c>{<q>} {<Rd>, }<Rn>, #0 ; T1 3274 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && 3275 (operand.GetImmediate() == 0); 3276 ITScope it_scope(this, &cond, can_use_it); 3277 rsb(cond, rd, rn, operand); 3278 } 3279 void Rsb(Register rd, Register rn, const Operand& operand) { 3280 Rsb(al, rd, rn, operand); 3281 } 3282 void Rsb(FlagsUpdate flags, 3283 Condition cond, 3284 Register rd, 3285 Register rn, 3286 const Operand& operand) { 3287 switch (flags) { 3288 case LeaveFlags: 3289 Rsb(cond, rd, rn, operand); 3290 break; 3291 case SetFlags: 3292 Rsbs(cond, rd, rn, operand); 3293 break; 3294 case DontCare: 3295 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && 3296 rn.IsLow() && operand.IsImmediate() && 3297 (operand.GetImmediate() == 0); 3298 if (setflags_is_smaller) { 3299 Rsbs(cond, rd, rn, operand); 3300 } else { 3301 Rsb(cond, rd, rn, operand); 3302 } 3303 break; 3304 } 3305 } 3306 void Rsb(FlagsUpdate flags, 3307 Register rd, 3308 Register rn, 3309 const Operand& operand) { 3310 Rsb(flags, al, rd, rn, operand); 3311 } 3312 3313 void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { 3314 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3315 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3316 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 3317 VIXL_ASSERT(allow_macro_instructions_); 3318 VIXL_ASSERT(OutsideITBlock()); 3319 MacroEmissionCheckScope guard(this); 3320 ITScope it_scope(this, &cond); 3321 rsbs(cond, rd, rn, operand); 3322 } 3323 void Rsbs(Register rd, Register rn, const Operand& operand) { 3324 Rsbs(al, rd, rn, operand); 3325 } 3326 3327 void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { 3328 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3329 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3330 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 3331 VIXL_ASSERT(allow_macro_instructions_); 3332 VIXL_ASSERT(OutsideITBlock()); 3333 MacroEmissionCheckScope guard(this); 3334 ITScope it_scope(this, &cond); 3335 rsc(cond, rd, rn, operand); 3336 } 3337 void Rsc(Register rd, Register rn, const Operand& operand) { 3338 Rsc(al, rd, rn, operand); 3339 } 3340 void Rsc(FlagsUpdate flags, 3341 Condition cond, 3342 Register rd, 3343 Register rn, 3344 const Operand& operand) { 3345 switch (flags) { 3346 case LeaveFlags: 3347 Rsc(cond, rd, rn, operand); 3348 break; 3349 case SetFlags: 3350 Rscs(cond, rd, rn, operand); 3351 break; 3352 case DontCare: 3353 Rsc(cond, rd, rn, operand); 3354 break; 3355 } 3356 } 3357 void Rsc(FlagsUpdate flags, 3358 Register rd, 3359 Register rn, 3360 const Operand& operand) { 3361 Rsc(flags, al, rd, rn, operand); 3362 } 3363 3364 void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { 3365 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3366 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3367 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 3368 VIXL_ASSERT(allow_macro_instructions_); 3369 VIXL_ASSERT(OutsideITBlock()); 3370 MacroEmissionCheckScope guard(this); 3371 ITScope it_scope(this, &cond); 3372 rscs(cond, rd, rn, operand); 3373 } 3374 void Rscs(Register rd, Register rn, const Operand& operand) { 3375 Rscs(al, rd, rn, operand); 3376 } 3377 3378 void Sadd16(Condition cond, Register rd, Register rn, Register rm) { 3379 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3380 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3381 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3382 VIXL_ASSERT(allow_macro_instructions_); 3383 VIXL_ASSERT(OutsideITBlock()); 3384 MacroEmissionCheckScope guard(this); 3385 ITScope it_scope(this, &cond); 3386 sadd16(cond, rd, rn, rm); 3387 } 3388 void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } 3389 3390 void Sadd8(Condition cond, Register rd, Register rn, Register rm) { 3391 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3392 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3393 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3394 VIXL_ASSERT(allow_macro_instructions_); 3395 VIXL_ASSERT(OutsideITBlock()); 3396 MacroEmissionCheckScope guard(this); 3397 ITScope it_scope(this, &cond); 3398 sadd8(cond, rd, rn, rm); 3399 } 3400 void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } 3401 3402 void Sasx(Condition cond, Register rd, Register rn, Register rm) { 3403 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3404 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3405 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3406 VIXL_ASSERT(allow_macro_instructions_); 3407 VIXL_ASSERT(OutsideITBlock()); 3408 MacroEmissionCheckScope guard(this); 3409 ITScope it_scope(this, &cond); 3410 sasx(cond, rd, rn, rm); 3411 } 3412 void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } 3413 3414 void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { 3415 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3416 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3417 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 3418 VIXL_ASSERT(allow_macro_instructions_); 3419 VIXL_ASSERT(OutsideITBlock()); 3420 MacroEmissionCheckScope guard(this); 3421 bool can_use_it = 3422 // SBC<c>{<q>} {<Rdn>,} <Rdn>, <Rm> ; T1 3423 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && 3424 operand.GetBaseRegister().IsLow(); 3425 ITScope it_scope(this, &cond, can_use_it); 3426 sbc(cond, rd, rn, operand); 3427 } 3428 void Sbc(Register rd, Register rn, const Operand& operand) { 3429 Sbc(al, rd, rn, operand); 3430 } 3431 void Sbc(FlagsUpdate flags, 3432 Condition cond, 3433 Register rd, 3434 Register rn, 3435 const Operand& operand) { 3436 switch (flags) { 3437 case LeaveFlags: 3438 Sbc(cond, rd, rn, operand); 3439 break; 3440 case SetFlags: 3441 Sbcs(cond, rd, rn, operand); 3442 break; 3443 case DontCare: 3444 bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && 3445 rn.Is(rd) && operand.IsPlainRegister() && 3446 operand.GetBaseRegister().IsLow(); 3447 if (setflags_is_smaller) { 3448 Sbcs(cond, rd, rn, operand); 3449 } else { 3450 Sbc(cond, rd, rn, operand); 3451 } 3452 break; 3453 } 3454 } 3455 void Sbc(FlagsUpdate flags, 3456 Register rd, 3457 Register rn, 3458 const Operand& operand) { 3459 Sbc(flags, al, rd, rn, operand); 3460 } 3461 3462 void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { 3463 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3464 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3465 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 3466 VIXL_ASSERT(allow_macro_instructions_); 3467 VIXL_ASSERT(OutsideITBlock()); 3468 MacroEmissionCheckScope guard(this); 3469 ITScope it_scope(this, &cond); 3470 sbcs(cond, rd, rn, operand); 3471 } 3472 void Sbcs(Register rd, Register rn, const Operand& operand) { 3473 Sbcs(al, rd, rn, operand); 3474 } 3475 3476 void Sbfx(Condition cond, 3477 Register rd, 3478 Register rn, 3479 uint32_t lsb, 3480 const Operand& operand) { 3481 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3482 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3483 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 3484 VIXL_ASSERT(allow_macro_instructions_); 3485 VIXL_ASSERT(OutsideITBlock()); 3486 MacroEmissionCheckScope guard(this); 3487 ITScope it_scope(this, &cond); 3488 sbfx(cond, rd, rn, lsb, operand); 3489 } 3490 void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { 3491 Sbfx(al, rd, rn, lsb, operand); 3492 } 3493 3494 void Sdiv(Condition cond, Register rd, Register rn, Register rm) { 3495 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3496 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3497 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3498 VIXL_ASSERT(allow_macro_instructions_); 3499 VIXL_ASSERT(OutsideITBlock()); 3500 MacroEmissionCheckScope guard(this); 3501 ITScope it_scope(this, &cond); 3502 sdiv(cond, rd, rn, rm); 3503 } 3504 void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } 3505 3506 void Sel(Condition cond, Register rd, Register rn, Register rm) { 3507 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3508 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3509 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3510 VIXL_ASSERT(allow_macro_instructions_); 3511 VIXL_ASSERT(OutsideITBlock()); 3512 MacroEmissionCheckScope guard(this); 3513 ITScope it_scope(this, &cond); 3514 sel(cond, rd, rn, rm); 3515 } 3516 void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } 3517 3518 void Shadd16(Condition cond, Register rd, Register rn, Register rm) { 3519 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3520 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3521 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3522 VIXL_ASSERT(allow_macro_instructions_); 3523 VIXL_ASSERT(OutsideITBlock()); 3524 MacroEmissionCheckScope guard(this); 3525 ITScope it_scope(this, &cond); 3526 shadd16(cond, rd, rn, rm); 3527 } 3528 void Shadd16(Register rd, Register rn, Register rm) { 3529 Shadd16(al, rd, rn, rm); 3530 } 3531 3532 void Shadd8(Condition cond, Register rd, Register rn, Register rm) { 3533 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3534 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3535 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3536 VIXL_ASSERT(allow_macro_instructions_); 3537 VIXL_ASSERT(OutsideITBlock()); 3538 MacroEmissionCheckScope guard(this); 3539 ITScope it_scope(this, &cond); 3540 shadd8(cond, rd, rn, rm); 3541 } 3542 void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } 3543 3544 void Shasx(Condition cond, Register rd, Register rn, Register rm) { 3545 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3546 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3547 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3548 VIXL_ASSERT(allow_macro_instructions_); 3549 VIXL_ASSERT(OutsideITBlock()); 3550 MacroEmissionCheckScope guard(this); 3551 ITScope it_scope(this, &cond); 3552 shasx(cond, rd, rn, rm); 3553 } 3554 void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } 3555 3556 void Shsax(Condition cond, Register rd, Register rn, Register rm) { 3557 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3558 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3559 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3560 VIXL_ASSERT(allow_macro_instructions_); 3561 VIXL_ASSERT(OutsideITBlock()); 3562 MacroEmissionCheckScope guard(this); 3563 ITScope it_scope(this, &cond); 3564 shsax(cond, rd, rn, rm); 3565 } 3566 void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } 3567 3568 void Shsub16(Condition cond, Register rd, Register rn, Register rm) { 3569 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3570 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3571 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3572 VIXL_ASSERT(allow_macro_instructions_); 3573 VIXL_ASSERT(OutsideITBlock()); 3574 MacroEmissionCheckScope guard(this); 3575 ITScope it_scope(this, &cond); 3576 shsub16(cond, rd, rn, rm); 3577 } 3578 void Shsub16(Register rd, Register rn, Register rm) { 3579 Shsub16(al, rd, rn, rm); 3580 } 3581 3582 void Shsub8(Condition cond, Register rd, Register rn, Register rm) { 3583 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3584 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3585 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3586 VIXL_ASSERT(allow_macro_instructions_); 3587 VIXL_ASSERT(OutsideITBlock()); 3588 MacroEmissionCheckScope guard(this); 3589 ITScope it_scope(this, &cond); 3590 shsub8(cond, rd, rn, rm); 3591 } 3592 void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } 3593 3594 void Smlabb( 3595 Condition cond, Register rd, Register rn, Register rm, Register ra) { 3596 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3597 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3598 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3599 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 3600 VIXL_ASSERT(allow_macro_instructions_); 3601 VIXL_ASSERT(OutsideITBlock()); 3602 MacroEmissionCheckScope guard(this); 3603 ITScope it_scope(this, &cond); 3604 smlabb(cond, rd, rn, rm, ra); 3605 } 3606 void Smlabb(Register rd, Register rn, Register rm, Register ra) { 3607 Smlabb(al, rd, rn, rm, ra); 3608 } 3609 3610 void Smlabt( 3611 Condition cond, Register rd, Register rn, Register rm, Register ra) { 3612 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3613 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3614 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3615 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 3616 VIXL_ASSERT(allow_macro_instructions_); 3617 VIXL_ASSERT(OutsideITBlock()); 3618 MacroEmissionCheckScope guard(this); 3619 ITScope it_scope(this, &cond); 3620 smlabt(cond, rd, rn, rm, ra); 3621 } 3622 void Smlabt(Register rd, Register rn, Register rm, Register ra) { 3623 Smlabt(al, rd, rn, rm, ra); 3624 } 3625 3626 void Smlad( 3627 Condition cond, Register rd, Register rn, Register rm, Register ra) { 3628 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3629 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3630 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3631 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 3632 VIXL_ASSERT(allow_macro_instructions_); 3633 VIXL_ASSERT(OutsideITBlock()); 3634 MacroEmissionCheckScope guard(this); 3635 ITScope it_scope(this, &cond); 3636 smlad(cond, rd, rn, rm, ra); 3637 } 3638 void Smlad(Register rd, Register rn, Register rm, Register ra) { 3639 Smlad(al, rd, rn, rm, ra); 3640 } 3641 3642 void Smladx( 3643 Condition cond, Register rd, Register rn, Register rm, Register ra) { 3644 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3645 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3646 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3647 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 3648 VIXL_ASSERT(allow_macro_instructions_); 3649 VIXL_ASSERT(OutsideITBlock()); 3650 MacroEmissionCheckScope guard(this); 3651 ITScope it_scope(this, &cond); 3652 smladx(cond, rd, rn, rm, ra); 3653 } 3654 void Smladx(Register rd, Register rn, Register rm, Register ra) { 3655 Smladx(al, rd, rn, rm, ra); 3656 } 3657 3658 void Smlal( 3659 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 3660 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 3661 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 3662 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3663 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3664 VIXL_ASSERT(allow_macro_instructions_); 3665 VIXL_ASSERT(OutsideITBlock()); 3666 MacroEmissionCheckScope guard(this); 3667 ITScope it_scope(this, &cond); 3668 smlal(cond, rdlo, rdhi, rn, rm); 3669 } 3670 void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { 3671 Smlal(al, rdlo, rdhi, rn, rm); 3672 } 3673 3674 void Smlalbb( 3675 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 3676 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 3677 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 3678 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3679 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3680 VIXL_ASSERT(allow_macro_instructions_); 3681 VIXL_ASSERT(OutsideITBlock()); 3682 MacroEmissionCheckScope guard(this); 3683 ITScope it_scope(this, &cond); 3684 smlalbb(cond, rdlo, rdhi, rn, rm); 3685 } 3686 void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { 3687 Smlalbb(al, rdlo, rdhi, rn, rm); 3688 } 3689 3690 void Smlalbt( 3691 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 3692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 3693 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 3694 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3696 VIXL_ASSERT(allow_macro_instructions_); 3697 VIXL_ASSERT(OutsideITBlock()); 3698 MacroEmissionCheckScope guard(this); 3699 ITScope it_scope(this, &cond); 3700 smlalbt(cond, rdlo, rdhi, rn, rm); 3701 } 3702 void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { 3703 Smlalbt(al, rdlo, rdhi, rn, rm); 3704 } 3705 3706 void Smlald( 3707 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 3708 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 3709 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 3710 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3711 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3712 VIXL_ASSERT(allow_macro_instructions_); 3713 VIXL_ASSERT(OutsideITBlock()); 3714 MacroEmissionCheckScope guard(this); 3715 ITScope it_scope(this, &cond); 3716 smlald(cond, rdlo, rdhi, rn, rm); 3717 } 3718 void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { 3719 Smlald(al, rdlo, rdhi, rn, rm); 3720 } 3721 3722 void Smlaldx( 3723 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 3724 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 3725 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 3726 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3727 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3728 VIXL_ASSERT(allow_macro_instructions_); 3729 VIXL_ASSERT(OutsideITBlock()); 3730 MacroEmissionCheckScope guard(this); 3731 ITScope it_scope(this, &cond); 3732 smlaldx(cond, rdlo, rdhi, rn, rm); 3733 } 3734 void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { 3735 Smlaldx(al, rdlo, rdhi, rn, rm); 3736 } 3737 3738 void Smlals( 3739 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 3740 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 3741 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 3742 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3743 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3744 VIXL_ASSERT(allow_macro_instructions_); 3745 VIXL_ASSERT(OutsideITBlock()); 3746 MacroEmissionCheckScope guard(this); 3747 ITScope it_scope(this, &cond); 3748 smlals(cond, rdlo, rdhi, rn, rm); 3749 } 3750 void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { 3751 Smlals(al, rdlo, rdhi, rn, rm); 3752 } 3753 3754 void Smlaltb( 3755 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 3756 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 3757 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 3758 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3759 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3760 VIXL_ASSERT(allow_macro_instructions_); 3761 VIXL_ASSERT(OutsideITBlock()); 3762 MacroEmissionCheckScope guard(this); 3763 ITScope it_scope(this, &cond); 3764 smlaltb(cond, rdlo, rdhi, rn, rm); 3765 } 3766 void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { 3767 Smlaltb(al, rdlo, rdhi, rn, rm); 3768 } 3769 3770 void Smlaltt( 3771 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 3772 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 3773 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 3774 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3775 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3776 VIXL_ASSERT(allow_macro_instructions_); 3777 VIXL_ASSERT(OutsideITBlock()); 3778 MacroEmissionCheckScope guard(this); 3779 ITScope it_scope(this, &cond); 3780 smlaltt(cond, rdlo, rdhi, rn, rm); 3781 } 3782 void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { 3783 Smlaltt(al, rdlo, rdhi, rn, rm); 3784 } 3785 3786 void Smlatb( 3787 Condition cond, Register rd, Register rn, Register rm, Register ra) { 3788 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3789 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3790 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3791 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 3792 VIXL_ASSERT(allow_macro_instructions_); 3793 VIXL_ASSERT(OutsideITBlock()); 3794 MacroEmissionCheckScope guard(this); 3795 ITScope it_scope(this, &cond); 3796 smlatb(cond, rd, rn, rm, ra); 3797 } 3798 void Smlatb(Register rd, Register rn, Register rm, Register ra) { 3799 Smlatb(al, rd, rn, rm, ra); 3800 } 3801 3802 void Smlatt( 3803 Condition cond, Register rd, Register rn, Register rm, Register ra) { 3804 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3805 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3806 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3807 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 3808 VIXL_ASSERT(allow_macro_instructions_); 3809 VIXL_ASSERT(OutsideITBlock()); 3810 MacroEmissionCheckScope guard(this); 3811 ITScope it_scope(this, &cond); 3812 smlatt(cond, rd, rn, rm, ra); 3813 } 3814 void Smlatt(Register rd, Register rn, Register rm, Register ra) { 3815 Smlatt(al, rd, rn, rm, ra); 3816 } 3817 3818 void Smlawb( 3819 Condition cond, Register rd, Register rn, Register rm, Register ra) { 3820 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3821 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3822 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3823 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 3824 VIXL_ASSERT(allow_macro_instructions_); 3825 VIXL_ASSERT(OutsideITBlock()); 3826 MacroEmissionCheckScope guard(this); 3827 ITScope it_scope(this, &cond); 3828 smlawb(cond, rd, rn, rm, ra); 3829 } 3830 void Smlawb(Register rd, Register rn, Register rm, Register ra) { 3831 Smlawb(al, rd, rn, rm, ra); 3832 } 3833 3834 void Smlawt( 3835 Condition cond, Register rd, Register rn, Register rm, Register ra) { 3836 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3837 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3838 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3839 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 3840 VIXL_ASSERT(allow_macro_instructions_); 3841 VIXL_ASSERT(OutsideITBlock()); 3842 MacroEmissionCheckScope guard(this); 3843 ITScope it_scope(this, &cond); 3844 smlawt(cond, rd, rn, rm, ra); 3845 } 3846 void Smlawt(Register rd, Register rn, Register rm, Register ra) { 3847 Smlawt(al, rd, rn, rm, ra); 3848 } 3849 3850 void Smlsd( 3851 Condition cond, Register rd, Register rn, Register rm, Register ra) { 3852 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3853 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3854 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3855 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 3856 VIXL_ASSERT(allow_macro_instructions_); 3857 VIXL_ASSERT(OutsideITBlock()); 3858 MacroEmissionCheckScope guard(this); 3859 ITScope it_scope(this, &cond); 3860 smlsd(cond, rd, rn, rm, ra); 3861 } 3862 void Smlsd(Register rd, Register rn, Register rm, Register ra) { 3863 Smlsd(al, rd, rn, rm, ra); 3864 } 3865 3866 void Smlsdx( 3867 Condition cond, Register rd, Register rn, Register rm, Register ra) { 3868 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3869 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3870 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3871 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 3872 VIXL_ASSERT(allow_macro_instructions_); 3873 VIXL_ASSERT(OutsideITBlock()); 3874 MacroEmissionCheckScope guard(this); 3875 ITScope it_scope(this, &cond); 3876 smlsdx(cond, rd, rn, rm, ra); 3877 } 3878 void Smlsdx(Register rd, Register rn, Register rm, Register ra) { 3879 Smlsdx(al, rd, rn, rm, ra); 3880 } 3881 3882 void Smlsld( 3883 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 3884 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 3885 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 3886 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3887 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3888 VIXL_ASSERT(allow_macro_instructions_); 3889 VIXL_ASSERT(OutsideITBlock()); 3890 MacroEmissionCheckScope guard(this); 3891 ITScope it_scope(this, &cond); 3892 smlsld(cond, rdlo, rdhi, rn, rm); 3893 } 3894 void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { 3895 Smlsld(al, rdlo, rdhi, rn, rm); 3896 } 3897 3898 void Smlsldx( 3899 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 3900 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 3901 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 3902 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3903 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3904 VIXL_ASSERT(allow_macro_instructions_); 3905 VIXL_ASSERT(OutsideITBlock()); 3906 MacroEmissionCheckScope guard(this); 3907 ITScope it_scope(this, &cond); 3908 smlsldx(cond, rdlo, rdhi, rn, rm); 3909 } 3910 void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { 3911 Smlsldx(al, rdlo, rdhi, rn, rm); 3912 } 3913 3914 void Smmla( 3915 Condition cond, Register rd, Register rn, Register rm, Register ra) { 3916 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3917 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3918 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3919 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 3920 VIXL_ASSERT(allow_macro_instructions_); 3921 VIXL_ASSERT(OutsideITBlock()); 3922 MacroEmissionCheckScope guard(this); 3923 ITScope it_scope(this, &cond); 3924 smmla(cond, rd, rn, rm, ra); 3925 } 3926 void Smmla(Register rd, Register rn, Register rm, Register ra) { 3927 Smmla(al, rd, rn, rm, ra); 3928 } 3929 3930 void Smmlar( 3931 Condition cond, Register rd, Register rn, Register rm, Register ra) { 3932 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3933 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3934 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3935 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 3936 VIXL_ASSERT(allow_macro_instructions_); 3937 VIXL_ASSERT(OutsideITBlock()); 3938 MacroEmissionCheckScope guard(this); 3939 ITScope it_scope(this, &cond); 3940 smmlar(cond, rd, rn, rm, ra); 3941 } 3942 void Smmlar(Register rd, Register rn, Register rm, Register ra) { 3943 Smmlar(al, rd, rn, rm, ra); 3944 } 3945 3946 void Smmls( 3947 Condition cond, Register rd, Register rn, Register rm, Register ra) { 3948 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3949 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3950 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3951 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 3952 VIXL_ASSERT(allow_macro_instructions_); 3953 VIXL_ASSERT(OutsideITBlock()); 3954 MacroEmissionCheckScope guard(this); 3955 ITScope it_scope(this, &cond); 3956 smmls(cond, rd, rn, rm, ra); 3957 } 3958 void Smmls(Register rd, Register rn, Register rm, Register ra) { 3959 Smmls(al, rd, rn, rm, ra); 3960 } 3961 3962 void Smmlsr( 3963 Condition cond, Register rd, Register rn, Register rm, Register ra) { 3964 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3965 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3966 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3967 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 3968 VIXL_ASSERT(allow_macro_instructions_); 3969 VIXL_ASSERT(OutsideITBlock()); 3970 MacroEmissionCheckScope guard(this); 3971 ITScope it_scope(this, &cond); 3972 smmlsr(cond, rd, rn, rm, ra); 3973 } 3974 void Smmlsr(Register rd, Register rn, Register rm, Register ra) { 3975 Smmlsr(al, rd, rn, rm, ra); 3976 } 3977 3978 void Smmul(Condition cond, Register rd, Register rn, Register rm) { 3979 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3980 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3981 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3982 VIXL_ASSERT(allow_macro_instructions_); 3983 VIXL_ASSERT(OutsideITBlock()); 3984 MacroEmissionCheckScope guard(this); 3985 ITScope it_scope(this, &cond); 3986 smmul(cond, rd, rn, rm); 3987 } 3988 void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } 3989 3990 void Smmulr(Condition cond, Register rd, Register rn, Register rm) { 3991 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 3992 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 3993 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 3994 VIXL_ASSERT(allow_macro_instructions_); 3995 VIXL_ASSERT(OutsideITBlock()); 3996 MacroEmissionCheckScope guard(this); 3997 ITScope it_scope(this, &cond); 3998 smmulr(cond, rd, rn, rm); 3999 } 4000 void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } 4001 4002 void Smuad(Condition cond, Register rd, Register rn, Register rm) { 4003 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4004 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4005 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4006 VIXL_ASSERT(allow_macro_instructions_); 4007 VIXL_ASSERT(OutsideITBlock()); 4008 MacroEmissionCheckScope guard(this); 4009 ITScope it_scope(this, &cond); 4010 smuad(cond, rd, rn, rm); 4011 } 4012 void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } 4013 4014 void Smuadx(Condition cond, Register rd, Register rn, Register rm) { 4015 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4016 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4017 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4018 VIXL_ASSERT(allow_macro_instructions_); 4019 VIXL_ASSERT(OutsideITBlock()); 4020 MacroEmissionCheckScope guard(this); 4021 ITScope it_scope(this, &cond); 4022 smuadx(cond, rd, rn, rm); 4023 } 4024 void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } 4025 4026 void Smulbb(Condition cond, Register rd, Register rn, Register rm) { 4027 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4028 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4029 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4030 VIXL_ASSERT(allow_macro_instructions_); 4031 VIXL_ASSERT(OutsideITBlock()); 4032 MacroEmissionCheckScope guard(this); 4033 ITScope it_scope(this, &cond); 4034 smulbb(cond, rd, rn, rm); 4035 } 4036 void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } 4037 4038 void Smulbt(Condition cond, Register rd, Register rn, Register rm) { 4039 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4040 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4041 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4042 VIXL_ASSERT(allow_macro_instructions_); 4043 VIXL_ASSERT(OutsideITBlock()); 4044 MacroEmissionCheckScope guard(this); 4045 ITScope it_scope(this, &cond); 4046 smulbt(cond, rd, rn, rm); 4047 } 4048 void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } 4049 4050 void Smull( 4051 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 4052 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 4053 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 4054 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4055 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4056 VIXL_ASSERT(allow_macro_instructions_); 4057 VIXL_ASSERT(OutsideITBlock()); 4058 MacroEmissionCheckScope guard(this); 4059 ITScope it_scope(this, &cond); 4060 smull(cond, rdlo, rdhi, rn, rm); 4061 } 4062 void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { 4063 Smull(al, rdlo, rdhi, rn, rm); 4064 } 4065 void Smull(FlagsUpdate flags, 4066 Condition cond, 4067 Register rdlo, 4068 Register rdhi, 4069 Register rn, 4070 Register rm) { 4071 switch (flags) { 4072 case LeaveFlags: 4073 Smull(cond, rdlo, rdhi, rn, rm); 4074 break; 4075 case SetFlags: 4076 Smulls(cond, rdlo, rdhi, rn, rm); 4077 break; 4078 case DontCare: 4079 Smull(cond, rdlo, rdhi, rn, rm); 4080 break; 4081 } 4082 } 4083 void Smull(FlagsUpdate flags, 4084 Register rdlo, 4085 Register rdhi, 4086 Register rn, 4087 Register rm) { 4088 Smull(flags, al, rdlo, rdhi, rn, rm); 4089 } 4090 4091 void Smulls( 4092 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 4093 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 4094 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 4095 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4096 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4097 VIXL_ASSERT(allow_macro_instructions_); 4098 VIXL_ASSERT(OutsideITBlock()); 4099 MacroEmissionCheckScope guard(this); 4100 ITScope it_scope(this, &cond); 4101 smulls(cond, rdlo, rdhi, rn, rm); 4102 } 4103 void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { 4104 Smulls(al, rdlo, rdhi, rn, rm); 4105 } 4106 4107 void Smultb(Condition cond, Register rd, Register rn, Register rm) { 4108 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4109 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4110 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4111 VIXL_ASSERT(allow_macro_instructions_); 4112 VIXL_ASSERT(OutsideITBlock()); 4113 MacroEmissionCheckScope guard(this); 4114 ITScope it_scope(this, &cond); 4115 smultb(cond, rd, rn, rm); 4116 } 4117 void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } 4118 4119 void Smultt(Condition cond, Register rd, Register rn, Register rm) { 4120 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4121 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4122 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4123 VIXL_ASSERT(allow_macro_instructions_); 4124 VIXL_ASSERT(OutsideITBlock()); 4125 MacroEmissionCheckScope guard(this); 4126 ITScope it_scope(this, &cond); 4127 smultt(cond, rd, rn, rm); 4128 } 4129 void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } 4130 4131 void Smulwb(Condition cond, Register rd, Register rn, Register rm) { 4132 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4133 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4134 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4135 VIXL_ASSERT(allow_macro_instructions_); 4136 VIXL_ASSERT(OutsideITBlock()); 4137 MacroEmissionCheckScope guard(this); 4138 ITScope it_scope(this, &cond); 4139 smulwb(cond, rd, rn, rm); 4140 } 4141 void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } 4142 4143 void Smulwt(Condition cond, Register rd, Register rn, Register rm) { 4144 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4145 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4146 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4147 VIXL_ASSERT(allow_macro_instructions_); 4148 VIXL_ASSERT(OutsideITBlock()); 4149 MacroEmissionCheckScope guard(this); 4150 ITScope it_scope(this, &cond); 4151 smulwt(cond, rd, rn, rm); 4152 } 4153 void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } 4154 4155 void Smusd(Condition cond, Register rd, Register rn, Register rm) { 4156 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4157 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4158 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4159 VIXL_ASSERT(allow_macro_instructions_); 4160 VIXL_ASSERT(OutsideITBlock()); 4161 MacroEmissionCheckScope guard(this); 4162 ITScope it_scope(this, &cond); 4163 smusd(cond, rd, rn, rm); 4164 } 4165 void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } 4166 4167 void Smusdx(Condition cond, Register rd, Register rn, Register rm) { 4168 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4169 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4170 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4171 VIXL_ASSERT(allow_macro_instructions_); 4172 VIXL_ASSERT(OutsideITBlock()); 4173 MacroEmissionCheckScope guard(this); 4174 ITScope it_scope(this, &cond); 4175 smusdx(cond, rd, rn, rm); 4176 } 4177 void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } 4178 4179 void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { 4180 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4181 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4182 VIXL_ASSERT(allow_macro_instructions_); 4183 VIXL_ASSERT(OutsideITBlock()); 4184 MacroEmissionCheckScope guard(this); 4185 ITScope it_scope(this, &cond); 4186 ssat(cond, rd, imm, operand); 4187 } 4188 void Ssat(Register rd, uint32_t imm, const Operand& operand) { 4189 Ssat(al, rd, imm, operand); 4190 } 4191 4192 void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { 4193 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4194 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4195 VIXL_ASSERT(allow_macro_instructions_); 4196 VIXL_ASSERT(OutsideITBlock()); 4197 MacroEmissionCheckScope guard(this); 4198 ITScope it_scope(this, &cond); 4199 ssat16(cond, rd, imm, rn); 4200 } 4201 void Ssat16(Register rd, uint32_t imm, Register rn) { 4202 Ssat16(al, rd, imm, rn); 4203 } 4204 4205 void Ssax(Condition cond, Register rd, Register rn, Register rm) { 4206 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4207 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4208 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4209 VIXL_ASSERT(allow_macro_instructions_); 4210 VIXL_ASSERT(OutsideITBlock()); 4211 MacroEmissionCheckScope guard(this); 4212 ITScope it_scope(this, &cond); 4213 ssax(cond, rd, rn, rm); 4214 } 4215 void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } 4216 4217 void Ssub16(Condition cond, Register rd, Register rn, Register rm) { 4218 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4219 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4220 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4221 VIXL_ASSERT(allow_macro_instructions_); 4222 VIXL_ASSERT(OutsideITBlock()); 4223 MacroEmissionCheckScope guard(this); 4224 ITScope it_scope(this, &cond); 4225 ssub16(cond, rd, rn, rm); 4226 } 4227 void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } 4228 4229 void Ssub8(Condition cond, Register rd, Register rn, Register rm) { 4230 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4231 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4232 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4233 VIXL_ASSERT(allow_macro_instructions_); 4234 VIXL_ASSERT(OutsideITBlock()); 4235 MacroEmissionCheckScope guard(this); 4236 ITScope it_scope(this, &cond); 4237 ssub8(cond, rd, rn, rm); 4238 } 4239 void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } 4240 4241 void Stl(Condition cond, Register rt, const MemOperand& operand) { 4242 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 4243 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4244 VIXL_ASSERT(allow_macro_instructions_); 4245 VIXL_ASSERT(OutsideITBlock()); 4246 MacroEmissionCheckScope guard(this); 4247 ITScope it_scope(this, &cond); 4248 stl(cond, rt, operand); 4249 } 4250 void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } 4251 4252 void Stlb(Condition cond, Register rt, const MemOperand& operand) { 4253 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 4254 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4255 VIXL_ASSERT(allow_macro_instructions_); 4256 VIXL_ASSERT(OutsideITBlock()); 4257 MacroEmissionCheckScope guard(this); 4258 ITScope it_scope(this, &cond); 4259 stlb(cond, rt, operand); 4260 } 4261 void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } 4262 4263 void Stlex(Condition cond, 4264 Register rd, 4265 Register rt, 4266 const MemOperand& operand) { 4267 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4268 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 4269 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4270 VIXL_ASSERT(allow_macro_instructions_); 4271 VIXL_ASSERT(OutsideITBlock()); 4272 MacroEmissionCheckScope guard(this); 4273 ITScope it_scope(this, &cond); 4274 stlex(cond, rd, rt, operand); 4275 } 4276 void Stlex(Register rd, Register rt, const MemOperand& operand) { 4277 Stlex(al, rd, rt, operand); 4278 } 4279 4280 void Stlexb(Condition cond, 4281 Register rd, 4282 Register rt, 4283 const MemOperand& operand) { 4284 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4285 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 4286 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4287 VIXL_ASSERT(allow_macro_instructions_); 4288 VIXL_ASSERT(OutsideITBlock()); 4289 MacroEmissionCheckScope guard(this); 4290 ITScope it_scope(this, &cond); 4291 stlexb(cond, rd, rt, operand); 4292 } 4293 void Stlexb(Register rd, Register rt, const MemOperand& operand) { 4294 Stlexb(al, rd, rt, operand); 4295 } 4296 4297 void Stlexd(Condition cond, 4298 Register rd, 4299 Register rt, 4300 Register rt2, 4301 const MemOperand& operand) { 4302 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4303 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 4304 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); 4305 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4306 VIXL_ASSERT(allow_macro_instructions_); 4307 VIXL_ASSERT(OutsideITBlock()); 4308 MacroEmissionCheckScope guard(this); 4309 ITScope it_scope(this, &cond); 4310 stlexd(cond, rd, rt, rt2, operand); 4311 } 4312 void Stlexd(Register rd, 4313 Register rt, 4314 Register rt2, 4315 const MemOperand& operand) { 4316 Stlexd(al, rd, rt, rt2, operand); 4317 } 4318 4319 void Stlexh(Condition cond, 4320 Register rd, 4321 Register rt, 4322 const MemOperand& operand) { 4323 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4324 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 4325 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4326 VIXL_ASSERT(allow_macro_instructions_); 4327 VIXL_ASSERT(OutsideITBlock()); 4328 MacroEmissionCheckScope guard(this); 4329 ITScope it_scope(this, &cond); 4330 stlexh(cond, rd, rt, operand); 4331 } 4332 void Stlexh(Register rd, Register rt, const MemOperand& operand) { 4333 Stlexh(al, rd, rt, operand); 4334 } 4335 4336 void Stlh(Condition cond, Register rt, const MemOperand& operand) { 4337 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 4338 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4339 VIXL_ASSERT(allow_macro_instructions_); 4340 VIXL_ASSERT(OutsideITBlock()); 4341 MacroEmissionCheckScope guard(this); 4342 ITScope it_scope(this, &cond); 4343 stlh(cond, rt, operand); 4344 } 4345 void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } 4346 4347 void Stm(Condition cond, 4348 Register rn, 4349 WriteBack write_back, 4350 RegisterList registers) { 4351 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4352 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 4353 VIXL_ASSERT(allow_macro_instructions_); 4354 VIXL_ASSERT(OutsideITBlock()); 4355 MacroEmissionCheckScope guard(this); 4356 ITScope it_scope(this, &cond); 4357 stm(cond, rn, write_back, registers); 4358 } 4359 void Stm(Register rn, WriteBack write_back, RegisterList registers) { 4360 Stm(al, rn, write_back, registers); 4361 } 4362 4363 void Stmda(Condition cond, 4364 Register rn, 4365 WriteBack write_back, 4366 RegisterList registers) { 4367 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4368 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 4369 VIXL_ASSERT(allow_macro_instructions_); 4370 VIXL_ASSERT(OutsideITBlock()); 4371 MacroEmissionCheckScope guard(this); 4372 ITScope it_scope(this, &cond); 4373 stmda(cond, rn, write_back, registers); 4374 } 4375 void Stmda(Register rn, WriteBack write_back, RegisterList registers) { 4376 Stmda(al, rn, write_back, registers); 4377 } 4378 4379 void Stmdb(Condition cond, 4380 Register rn, 4381 WriteBack write_back, 4382 RegisterList registers) { 4383 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4384 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 4385 VIXL_ASSERT(allow_macro_instructions_); 4386 VIXL_ASSERT(OutsideITBlock()); 4387 MacroEmissionCheckScope guard(this); 4388 ITScope it_scope(this, &cond); 4389 stmdb(cond, rn, write_back, registers); 4390 } 4391 void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { 4392 Stmdb(al, rn, write_back, registers); 4393 } 4394 4395 void Stmea(Condition cond, 4396 Register rn, 4397 WriteBack write_back, 4398 RegisterList registers) { 4399 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4400 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 4401 VIXL_ASSERT(allow_macro_instructions_); 4402 VIXL_ASSERT(OutsideITBlock()); 4403 MacroEmissionCheckScope guard(this); 4404 ITScope it_scope(this, &cond); 4405 stmea(cond, rn, write_back, registers); 4406 } 4407 void Stmea(Register rn, WriteBack write_back, RegisterList registers) { 4408 Stmea(al, rn, write_back, registers); 4409 } 4410 4411 void Stmed(Condition cond, 4412 Register rn, 4413 WriteBack write_back, 4414 RegisterList registers) { 4415 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4416 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 4417 VIXL_ASSERT(allow_macro_instructions_); 4418 VIXL_ASSERT(OutsideITBlock()); 4419 MacroEmissionCheckScope guard(this); 4420 ITScope it_scope(this, &cond); 4421 stmed(cond, rn, write_back, registers); 4422 } 4423 void Stmed(Register rn, WriteBack write_back, RegisterList registers) { 4424 Stmed(al, rn, write_back, registers); 4425 } 4426 4427 void Stmfa(Condition cond, 4428 Register rn, 4429 WriteBack write_back, 4430 RegisterList registers) { 4431 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4432 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 4433 VIXL_ASSERT(allow_macro_instructions_); 4434 VIXL_ASSERT(OutsideITBlock()); 4435 MacroEmissionCheckScope guard(this); 4436 ITScope it_scope(this, &cond); 4437 stmfa(cond, rn, write_back, registers); 4438 } 4439 void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { 4440 Stmfa(al, rn, write_back, registers); 4441 } 4442 4443 void Stmfd(Condition cond, 4444 Register rn, 4445 WriteBack write_back, 4446 RegisterList registers) { 4447 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4448 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 4449 VIXL_ASSERT(allow_macro_instructions_); 4450 VIXL_ASSERT(OutsideITBlock()); 4451 MacroEmissionCheckScope guard(this); 4452 ITScope it_scope(this, &cond); 4453 stmfd(cond, rn, write_back, registers); 4454 } 4455 void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { 4456 Stmfd(al, rn, write_back, registers); 4457 } 4458 4459 void Stmib(Condition cond, 4460 Register rn, 4461 WriteBack write_back, 4462 RegisterList registers) { 4463 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4464 VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); 4465 VIXL_ASSERT(allow_macro_instructions_); 4466 VIXL_ASSERT(OutsideITBlock()); 4467 MacroEmissionCheckScope guard(this); 4468 ITScope it_scope(this, &cond); 4469 stmib(cond, rn, write_back, registers); 4470 } 4471 void Stmib(Register rn, WriteBack write_back, RegisterList registers) { 4472 Stmib(al, rn, write_back, registers); 4473 } 4474 4475 void Str(Condition cond, Register rt, const MemOperand& operand) { 4476 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 4477 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4478 VIXL_ASSERT(allow_macro_instructions_); 4479 VIXL_ASSERT(OutsideITBlock()); 4480 MacroEmissionCheckScope guard(this); 4481 bool can_use_it = 4482 // STR{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1 4483 (operand.IsImmediate() && rt.IsLow() && 4484 operand.GetBaseRegister().IsLow() && 4485 operand.IsOffsetImmediateWithinRange(0, 124, 4) && 4486 (operand.GetAddrMode() == Offset)) || 4487 // STR{<c>}{<q>} <Rt>, [SP{, #{+}<imm>}] ; T2 4488 (operand.IsImmediate() && rt.IsLow() && 4489 operand.GetBaseRegister().IsSP() && 4490 operand.IsOffsetImmediateWithinRange(0, 1020, 4) && 4491 (operand.GetAddrMode() == Offset)) || 4492 // STR{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1 4493 (operand.IsPlainRegister() && rt.IsLow() && 4494 operand.GetBaseRegister().IsLow() && 4495 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && 4496 (operand.GetAddrMode() == Offset)); 4497 ITScope it_scope(this, &cond, can_use_it); 4498 str(cond, rt, operand); 4499 } 4500 void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } 4501 4502 void Strb(Condition cond, Register rt, const MemOperand& operand) { 4503 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 4504 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4505 VIXL_ASSERT(allow_macro_instructions_); 4506 VIXL_ASSERT(OutsideITBlock()); 4507 MacroEmissionCheckScope guard(this); 4508 bool can_use_it = 4509 // STRB{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1 4510 (operand.IsImmediate() && rt.IsLow() && 4511 operand.GetBaseRegister().IsLow() && 4512 operand.IsOffsetImmediateWithinRange(0, 31) && 4513 (operand.GetAddrMode() == Offset)) || 4514 // STRB{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1 4515 (operand.IsPlainRegister() && rt.IsLow() && 4516 operand.GetBaseRegister().IsLow() && 4517 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && 4518 (operand.GetAddrMode() == Offset)); 4519 ITScope it_scope(this, &cond, can_use_it); 4520 strb(cond, rt, operand); 4521 } 4522 void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } 4523 4524 void Strd(Condition cond, 4525 Register rt, 4526 Register rt2, 4527 const MemOperand& operand) { 4528 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 4529 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); 4530 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4531 VIXL_ASSERT(allow_macro_instructions_); 4532 VIXL_ASSERT(OutsideITBlock()); 4533 MacroEmissionCheckScope guard(this); 4534 ITScope it_scope(this, &cond); 4535 strd(cond, rt, rt2, operand); 4536 } 4537 void Strd(Register rt, Register rt2, const MemOperand& operand) { 4538 Strd(al, rt, rt2, operand); 4539 } 4540 4541 void Strex(Condition cond, 4542 Register rd, 4543 Register rt, 4544 const MemOperand& operand) { 4545 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4546 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 4547 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4548 VIXL_ASSERT(allow_macro_instructions_); 4549 VIXL_ASSERT(OutsideITBlock()); 4550 MacroEmissionCheckScope guard(this); 4551 ITScope it_scope(this, &cond); 4552 strex(cond, rd, rt, operand); 4553 } 4554 void Strex(Register rd, Register rt, const MemOperand& operand) { 4555 Strex(al, rd, rt, operand); 4556 } 4557 4558 void Strexb(Condition cond, 4559 Register rd, 4560 Register rt, 4561 const MemOperand& operand) { 4562 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 4564 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4565 VIXL_ASSERT(allow_macro_instructions_); 4566 VIXL_ASSERT(OutsideITBlock()); 4567 MacroEmissionCheckScope guard(this); 4568 ITScope it_scope(this, &cond); 4569 strexb(cond, rd, rt, operand); 4570 } 4571 void Strexb(Register rd, Register rt, const MemOperand& operand) { 4572 Strexb(al, rd, rt, operand); 4573 } 4574 4575 void Strexd(Condition cond, 4576 Register rd, 4577 Register rt, 4578 Register rt2, 4579 const MemOperand& operand) { 4580 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4581 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 4582 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); 4583 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4584 VIXL_ASSERT(allow_macro_instructions_); 4585 VIXL_ASSERT(OutsideITBlock()); 4586 MacroEmissionCheckScope guard(this); 4587 ITScope it_scope(this, &cond); 4588 strexd(cond, rd, rt, rt2, operand); 4589 } 4590 void Strexd(Register rd, 4591 Register rt, 4592 Register rt2, 4593 const MemOperand& operand) { 4594 Strexd(al, rd, rt, rt2, operand); 4595 } 4596 4597 void Strexh(Condition cond, 4598 Register rd, 4599 Register rt, 4600 const MemOperand& operand) { 4601 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4602 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 4603 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4604 VIXL_ASSERT(allow_macro_instructions_); 4605 VIXL_ASSERT(OutsideITBlock()); 4606 MacroEmissionCheckScope guard(this); 4607 ITScope it_scope(this, &cond); 4608 strexh(cond, rd, rt, operand); 4609 } 4610 void Strexh(Register rd, Register rt, const MemOperand& operand) { 4611 Strexh(al, rd, rt, operand); 4612 } 4613 4614 void Strh(Condition cond, Register rt, const MemOperand& operand) { 4615 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 4616 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4617 VIXL_ASSERT(allow_macro_instructions_); 4618 VIXL_ASSERT(OutsideITBlock()); 4619 MacroEmissionCheckScope guard(this); 4620 bool can_use_it = 4621 // STRH{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] ; T1 4622 (operand.IsImmediate() && rt.IsLow() && 4623 operand.GetBaseRegister().IsLow() && 4624 operand.IsOffsetImmediateWithinRange(0, 62, 2) && 4625 (operand.GetAddrMode() == Offset)) || 4626 // STRH{<c>}{<q>} <Rt>, [<Rn>, {+}<Rm>] ; T1 4627 (operand.IsPlainRegister() && rt.IsLow() && 4628 operand.GetBaseRegister().IsLow() && 4629 operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && 4630 (operand.GetAddrMode() == Offset)); 4631 ITScope it_scope(this, &cond, can_use_it); 4632 strh(cond, rt, operand); 4633 } 4634 void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } 4635 4636 void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { 4637 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4638 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4639 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4640 VIXL_ASSERT(allow_macro_instructions_); 4641 VIXL_ASSERT(OutsideITBlock()); 4642 MacroEmissionCheckScope guard(this); 4643 if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { 4644 uint32_t immediate = operand.GetImmediate(); 4645 if (immediate == 0) { 4646 return; 4647 } 4648 } 4649 bool can_use_it = 4650 // SUB<c>{<q>} <Rd>, <Rn>, #<imm3> ; T1 4651 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() && 4652 rd.IsLow()) || 4653 // SUB<c>{<q>} {<Rdn>,} <Rdn>, #<imm8> ; T2 4654 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && 4655 rd.IsLow() && rn.Is(rd)) || 4656 // SUB<c>{<q>} <Rd>, <Rn>, <Rm> 4657 (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() && 4658 operand.GetBaseRegister().IsLow()); 4659 ITScope it_scope(this, &cond, can_use_it); 4660 sub(cond, rd, rn, operand); 4661 } 4662 void Sub(Register rd, Register rn, const Operand& operand) { 4663 Sub(al, rd, rn, operand); 4664 } 4665 void Sub(FlagsUpdate flags, 4666 Condition cond, 4667 Register rd, 4668 Register rn, 4669 const Operand& operand) { 4670 switch (flags) { 4671 case LeaveFlags: 4672 Sub(cond, rd, rn, operand); 4673 break; 4674 case SetFlags: 4675 Subs(cond, rd, rn, operand); 4676 break; 4677 case DontCare: 4678 bool setflags_is_smaller = 4679 IsUsingT32() && cond.Is(al) && 4680 ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() && 4681 operand.GetBaseRegister().IsLow()) || 4682 (operand.IsImmediate() && 4683 ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) || 4684 (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256))))); 4685 if (setflags_is_smaller) { 4686 Subs(cond, rd, rn, operand); 4687 } else { 4688 bool changed_op_is_smaller = 4689 operand.IsImmediate() && (operand.GetSignedImmediate() < 0) && 4690 ((rd.IsLow() && rn.IsLow() && 4691 (operand.GetSignedImmediate() >= -7)) || 4692 (rd.IsLow() && rn.Is(rd) && 4693 (operand.GetSignedImmediate() >= -255))); 4694 if (changed_op_is_smaller) { 4695 Adds(cond, rd, rn, -operand.GetSignedImmediate()); 4696 } else { 4697 Sub(cond, rd, rn, operand); 4698 } 4699 } 4700 break; 4701 } 4702 } 4703 void Sub(FlagsUpdate flags, 4704 Register rd, 4705 Register rn, 4706 const Operand& operand) { 4707 Sub(flags, al, rd, rn, operand); 4708 } 4709 4710 void Subs(Condition cond, Register rd, Register rn, const Operand& operand) { 4711 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4712 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4713 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4714 VIXL_ASSERT(allow_macro_instructions_); 4715 VIXL_ASSERT(OutsideITBlock()); 4716 MacroEmissionCheckScope guard(this); 4717 ITScope it_scope(this, &cond); 4718 subs(cond, rd, rn, operand); 4719 } 4720 void Subs(Register rd, Register rn, const Operand& operand) { 4721 Subs(al, rd, rn, operand); 4722 } 4723 4724 void Svc(Condition cond, uint32_t imm) { 4725 VIXL_ASSERT(allow_macro_instructions_); 4726 VIXL_ASSERT(OutsideITBlock()); 4727 MacroEmissionCheckScope guard(this); 4728 ITScope it_scope(this, &cond); 4729 svc(cond, imm); 4730 } 4731 void Svc(uint32_t imm) { Svc(al, imm); } 4732 4733 void Sxtab(Condition cond, Register rd, Register rn, const Operand& operand) { 4734 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4735 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4736 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4737 VIXL_ASSERT(allow_macro_instructions_); 4738 VIXL_ASSERT(OutsideITBlock()); 4739 MacroEmissionCheckScope guard(this); 4740 ITScope it_scope(this, &cond); 4741 sxtab(cond, rd, rn, operand); 4742 } 4743 void Sxtab(Register rd, Register rn, const Operand& operand) { 4744 Sxtab(al, rd, rn, operand); 4745 } 4746 4747 void Sxtab16(Condition cond, 4748 Register rd, 4749 Register rn, 4750 const Operand& operand) { 4751 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4752 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4753 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4754 VIXL_ASSERT(allow_macro_instructions_); 4755 VIXL_ASSERT(OutsideITBlock()); 4756 MacroEmissionCheckScope guard(this); 4757 ITScope it_scope(this, &cond); 4758 sxtab16(cond, rd, rn, operand); 4759 } 4760 void Sxtab16(Register rd, Register rn, const Operand& operand) { 4761 Sxtab16(al, rd, rn, operand); 4762 } 4763 4764 void Sxtah(Condition cond, Register rd, Register rn, const Operand& operand) { 4765 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4766 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4767 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4768 VIXL_ASSERT(allow_macro_instructions_); 4769 VIXL_ASSERT(OutsideITBlock()); 4770 MacroEmissionCheckScope guard(this); 4771 ITScope it_scope(this, &cond); 4772 sxtah(cond, rd, rn, operand); 4773 } 4774 void Sxtah(Register rd, Register rn, const Operand& operand) { 4775 Sxtah(al, rd, rn, operand); 4776 } 4777 4778 void Sxtb(Condition cond, Register rd, const Operand& operand) { 4779 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4780 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4781 VIXL_ASSERT(allow_macro_instructions_); 4782 VIXL_ASSERT(OutsideITBlock()); 4783 MacroEmissionCheckScope guard(this); 4784 ITScope it_scope(this, &cond); 4785 sxtb(cond, rd, operand); 4786 } 4787 void Sxtb(Register rd, const Operand& operand) { Sxtb(al, rd, operand); } 4788 4789 void Sxtb16(Condition cond, Register rd, const Operand& operand) { 4790 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4791 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4792 VIXL_ASSERT(allow_macro_instructions_); 4793 VIXL_ASSERT(OutsideITBlock()); 4794 MacroEmissionCheckScope guard(this); 4795 ITScope it_scope(this, &cond); 4796 sxtb16(cond, rd, operand); 4797 } 4798 void Sxtb16(Register rd, const Operand& operand) { Sxtb16(al, rd, operand); } 4799 4800 void Sxth(Condition cond, Register rd, const Operand& operand) { 4801 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4802 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4803 VIXL_ASSERT(allow_macro_instructions_); 4804 VIXL_ASSERT(OutsideITBlock()); 4805 MacroEmissionCheckScope guard(this); 4806 ITScope it_scope(this, &cond); 4807 sxth(cond, rd, operand); 4808 } 4809 void Sxth(Register rd, const Operand& operand) { Sxth(al, rd, operand); } 4810 4811 void Teq(Condition cond, Register rn, const Operand& operand) { 4812 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4813 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4814 VIXL_ASSERT(allow_macro_instructions_); 4815 VIXL_ASSERT(OutsideITBlock()); 4816 MacroEmissionCheckScope guard(this); 4817 ITScope it_scope(this, &cond); 4818 teq(cond, rn, operand); 4819 } 4820 void Teq(Register rn, const Operand& operand) { Teq(al, rn, operand); } 4821 4822 void Tst(Condition cond, Register rn, const Operand& operand) { 4823 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4824 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4825 VIXL_ASSERT(allow_macro_instructions_); 4826 VIXL_ASSERT(OutsideITBlock()); 4827 MacroEmissionCheckScope guard(this); 4828 bool can_use_it = 4829 // TST{<c>}{<q>} <Rn>, <Rm> ; T1 4830 operand.IsPlainRegister() && rn.IsLow() && 4831 operand.GetBaseRegister().IsLow(); 4832 ITScope it_scope(this, &cond, can_use_it); 4833 tst(cond, rn, operand); 4834 } 4835 void Tst(Register rn, const Operand& operand) { Tst(al, rn, operand); } 4836 4837 void Uadd16(Condition cond, Register rd, Register rn, Register rm) { 4838 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4839 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4840 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4841 VIXL_ASSERT(allow_macro_instructions_); 4842 VIXL_ASSERT(OutsideITBlock()); 4843 MacroEmissionCheckScope guard(this); 4844 ITScope it_scope(this, &cond); 4845 uadd16(cond, rd, rn, rm); 4846 } 4847 void Uadd16(Register rd, Register rn, Register rm) { Uadd16(al, rd, rn, rm); } 4848 4849 void Uadd8(Condition cond, Register rd, Register rn, Register rm) { 4850 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4851 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4852 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4853 VIXL_ASSERT(allow_macro_instructions_); 4854 VIXL_ASSERT(OutsideITBlock()); 4855 MacroEmissionCheckScope guard(this); 4856 ITScope it_scope(this, &cond); 4857 uadd8(cond, rd, rn, rm); 4858 } 4859 void Uadd8(Register rd, Register rn, Register rm) { Uadd8(al, rd, rn, rm); } 4860 4861 void Uasx(Condition cond, Register rd, Register rn, Register rm) { 4862 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4863 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4864 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4865 VIXL_ASSERT(allow_macro_instructions_); 4866 VIXL_ASSERT(OutsideITBlock()); 4867 MacroEmissionCheckScope guard(this); 4868 ITScope it_scope(this, &cond); 4869 uasx(cond, rd, rn, rm); 4870 } 4871 void Uasx(Register rd, Register rn, Register rm) { Uasx(al, rd, rn, rm); } 4872 4873 void Ubfx(Condition cond, 4874 Register rd, 4875 Register rn, 4876 uint32_t lsb, 4877 const Operand& operand) { 4878 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4879 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4880 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 4881 VIXL_ASSERT(allow_macro_instructions_); 4882 VIXL_ASSERT(OutsideITBlock()); 4883 MacroEmissionCheckScope guard(this); 4884 ITScope it_scope(this, &cond); 4885 ubfx(cond, rd, rn, lsb, operand); 4886 } 4887 void Ubfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { 4888 Ubfx(al, rd, rn, lsb, operand); 4889 } 4890 4891 void Udf(Condition cond, uint32_t imm) { 4892 VIXL_ASSERT(allow_macro_instructions_); 4893 VIXL_ASSERT(OutsideITBlock()); 4894 MacroEmissionCheckScope guard(this); 4895 ITScope it_scope(this, &cond); 4896 udf(cond, imm); 4897 } 4898 void Udf(uint32_t imm) { Udf(al, imm); } 4899 4900 void Udiv(Condition cond, Register rd, Register rn, Register rm) { 4901 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4902 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4903 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4904 VIXL_ASSERT(allow_macro_instructions_); 4905 VIXL_ASSERT(OutsideITBlock()); 4906 MacroEmissionCheckScope guard(this); 4907 ITScope it_scope(this, &cond); 4908 udiv(cond, rd, rn, rm); 4909 } 4910 void Udiv(Register rd, Register rn, Register rm) { Udiv(al, rd, rn, rm); } 4911 4912 void Uhadd16(Condition cond, Register rd, Register rn, Register rm) { 4913 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4914 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4915 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4916 VIXL_ASSERT(allow_macro_instructions_); 4917 VIXL_ASSERT(OutsideITBlock()); 4918 MacroEmissionCheckScope guard(this); 4919 ITScope it_scope(this, &cond); 4920 uhadd16(cond, rd, rn, rm); 4921 } 4922 void Uhadd16(Register rd, Register rn, Register rm) { 4923 Uhadd16(al, rd, rn, rm); 4924 } 4925 4926 void Uhadd8(Condition cond, Register rd, Register rn, Register rm) { 4927 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4928 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4929 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4930 VIXL_ASSERT(allow_macro_instructions_); 4931 VIXL_ASSERT(OutsideITBlock()); 4932 MacroEmissionCheckScope guard(this); 4933 ITScope it_scope(this, &cond); 4934 uhadd8(cond, rd, rn, rm); 4935 } 4936 void Uhadd8(Register rd, Register rn, Register rm) { Uhadd8(al, rd, rn, rm); } 4937 4938 void Uhasx(Condition cond, Register rd, Register rn, Register rm) { 4939 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4940 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4941 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4942 VIXL_ASSERT(allow_macro_instructions_); 4943 VIXL_ASSERT(OutsideITBlock()); 4944 MacroEmissionCheckScope guard(this); 4945 ITScope it_scope(this, &cond); 4946 uhasx(cond, rd, rn, rm); 4947 } 4948 void Uhasx(Register rd, Register rn, Register rm) { Uhasx(al, rd, rn, rm); } 4949 4950 void Uhsax(Condition cond, Register rd, Register rn, Register rm) { 4951 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4952 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4953 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4954 VIXL_ASSERT(allow_macro_instructions_); 4955 VIXL_ASSERT(OutsideITBlock()); 4956 MacroEmissionCheckScope guard(this); 4957 ITScope it_scope(this, &cond); 4958 uhsax(cond, rd, rn, rm); 4959 } 4960 void Uhsax(Register rd, Register rn, Register rm) { Uhsax(al, rd, rn, rm); } 4961 4962 void Uhsub16(Condition cond, Register rd, Register rn, Register rm) { 4963 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4964 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4965 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4966 VIXL_ASSERT(allow_macro_instructions_); 4967 VIXL_ASSERT(OutsideITBlock()); 4968 MacroEmissionCheckScope guard(this); 4969 ITScope it_scope(this, &cond); 4970 uhsub16(cond, rd, rn, rm); 4971 } 4972 void Uhsub16(Register rd, Register rn, Register rm) { 4973 Uhsub16(al, rd, rn, rm); 4974 } 4975 4976 void Uhsub8(Condition cond, Register rd, Register rn, Register rm) { 4977 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 4978 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4979 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4980 VIXL_ASSERT(allow_macro_instructions_); 4981 VIXL_ASSERT(OutsideITBlock()); 4982 MacroEmissionCheckScope guard(this); 4983 ITScope it_scope(this, &cond); 4984 uhsub8(cond, rd, rn, rm); 4985 } 4986 void Uhsub8(Register rd, Register rn, Register rm) { Uhsub8(al, rd, rn, rm); } 4987 4988 void Umaal( 4989 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 4990 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 4991 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 4992 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 4993 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 4994 VIXL_ASSERT(allow_macro_instructions_); 4995 VIXL_ASSERT(OutsideITBlock()); 4996 MacroEmissionCheckScope guard(this); 4997 ITScope it_scope(this, &cond); 4998 umaal(cond, rdlo, rdhi, rn, rm); 4999 } 5000 void Umaal(Register rdlo, Register rdhi, Register rn, Register rm) { 5001 Umaal(al, rdlo, rdhi, rn, rm); 5002 } 5003 5004 void Umlal( 5005 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 5006 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 5007 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 5008 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5009 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5010 VIXL_ASSERT(allow_macro_instructions_); 5011 VIXL_ASSERT(OutsideITBlock()); 5012 MacroEmissionCheckScope guard(this); 5013 ITScope it_scope(this, &cond); 5014 umlal(cond, rdlo, rdhi, rn, rm); 5015 } 5016 void Umlal(Register rdlo, Register rdhi, Register rn, Register rm) { 5017 Umlal(al, rdlo, rdhi, rn, rm); 5018 } 5019 void Umlal(FlagsUpdate flags, 5020 Condition cond, 5021 Register rdlo, 5022 Register rdhi, 5023 Register rn, 5024 Register rm) { 5025 switch (flags) { 5026 case LeaveFlags: 5027 Umlal(cond, rdlo, rdhi, rn, rm); 5028 break; 5029 case SetFlags: 5030 Umlals(cond, rdlo, rdhi, rn, rm); 5031 break; 5032 case DontCare: 5033 Umlal(cond, rdlo, rdhi, rn, rm); 5034 break; 5035 } 5036 } 5037 void Umlal(FlagsUpdate flags, 5038 Register rdlo, 5039 Register rdhi, 5040 Register rn, 5041 Register rm) { 5042 Umlal(flags, al, rdlo, rdhi, rn, rm); 5043 } 5044 5045 void Umlals( 5046 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 5047 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 5048 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 5049 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5050 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5051 VIXL_ASSERT(allow_macro_instructions_); 5052 VIXL_ASSERT(OutsideITBlock()); 5053 MacroEmissionCheckScope guard(this); 5054 ITScope it_scope(this, &cond); 5055 umlals(cond, rdlo, rdhi, rn, rm); 5056 } 5057 void Umlals(Register rdlo, Register rdhi, Register rn, Register rm) { 5058 Umlals(al, rdlo, rdhi, rn, rm); 5059 } 5060 5061 void Umull( 5062 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 5063 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 5064 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 5065 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5066 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5067 VIXL_ASSERT(allow_macro_instructions_); 5068 VIXL_ASSERT(OutsideITBlock()); 5069 MacroEmissionCheckScope guard(this); 5070 ITScope it_scope(this, &cond); 5071 umull(cond, rdlo, rdhi, rn, rm); 5072 } 5073 void Umull(Register rdlo, Register rdhi, Register rn, Register rm) { 5074 Umull(al, rdlo, rdhi, rn, rm); 5075 } 5076 void Umull(FlagsUpdate flags, 5077 Condition cond, 5078 Register rdlo, 5079 Register rdhi, 5080 Register rn, 5081 Register rm) { 5082 switch (flags) { 5083 case LeaveFlags: 5084 Umull(cond, rdlo, rdhi, rn, rm); 5085 break; 5086 case SetFlags: 5087 Umulls(cond, rdlo, rdhi, rn, rm); 5088 break; 5089 case DontCare: 5090 Umull(cond, rdlo, rdhi, rn, rm); 5091 break; 5092 } 5093 } 5094 void Umull(FlagsUpdate flags, 5095 Register rdlo, 5096 Register rdhi, 5097 Register rn, 5098 Register rm) { 5099 Umull(flags, al, rdlo, rdhi, rn, rm); 5100 } 5101 5102 void Umulls( 5103 Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { 5104 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); 5105 VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); 5106 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5107 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5108 VIXL_ASSERT(allow_macro_instructions_); 5109 VIXL_ASSERT(OutsideITBlock()); 5110 MacroEmissionCheckScope guard(this); 5111 ITScope it_scope(this, &cond); 5112 umulls(cond, rdlo, rdhi, rn, rm); 5113 } 5114 void Umulls(Register rdlo, Register rdhi, Register rn, Register rm) { 5115 Umulls(al, rdlo, rdhi, rn, rm); 5116 } 5117 5118 void Uqadd16(Condition cond, Register rd, Register rn, Register rm) { 5119 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5120 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5121 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5122 VIXL_ASSERT(allow_macro_instructions_); 5123 VIXL_ASSERT(OutsideITBlock()); 5124 MacroEmissionCheckScope guard(this); 5125 ITScope it_scope(this, &cond); 5126 uqadd16(cond, rd, rn, rm); 5127 } 5128 void Uqadd16(Register rd, Register rn, Register rm) { 5129 Uqadd16(al, rd, rn, rm); 5130 } 5131 5132 void Uqadd8(Condition cond, Register rd, Register rn, Register rm) { 5133 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5134 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5135 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5136 VIXL_ASSERT(allow_macro_instructions_); 5137 VIXL_ASSERT(OutsideITBlock()); 5138 MacroEmissionCheckScope guard(this); 5139 ITScope it_scope(this, &cond); 5140 uqadd8(cond, rd, rn, rm); 5141 } 5142 void Uqadd8(Register rd, Register rn, Register rm) { Uqadd8(al, rd, rn, rm); } 5143 5144 void Uqasx(Condition cond, Register rd, Register rn, Register rm) { 5145 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5146 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5147 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5148 VIXL_ASSERT(allow_macro_instructions_); 5149 VIXL_ASSERT(OutsideITBlock()); 5150 MacroEmissionCheckScope guard(this); 5151 ITScope it_scope(this, &cond); 5152 uqasx(cond, rd, rn, rm); 5153 } 5154 void Uqasx(Register rd, Register rn, Register rm) { Uqasx(al, rd, rn, rm); } 5155 5156 void Uqsax(Condition cond, Register rd, Register rn, Register rm) { 5157 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5158 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5159 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5160 VIXL_ASSERT(allow_macro_instructions_); 5161 VIXL_ASSERT(OutsideITBlock()); 5162 MacroEmissionCheckScope guard(this); 5163 ITScope it_scope(this, &cond); 5164 uqsax(cond, rd, rn, rm); 5165 } 5166 void Uqsax(Register rd, Register rn, Register rm) { Uqsax(al, rd, rn, rm); } 5167 5168 void Uqsub16(Condition cond, Register rd, Register rn, Register rm) { 5169 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5170 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5171 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5172 VIXL_ASSERT(allow_macro_instructions_); 5173 VIXL_ASSERT(OutsideITBlock()); 5174 MacroEmissionCheckScope guard(this); 5175 ITScope it_scope(this, &cond); 5176 uqsub16(cond, rd, rn, rm); 5177 } 5178 void Uqsub16(Register rd, Register rn, Register rm) { 5179 Uqsub16(al, rd, rn, rm); 5180 } 5181 5182 void Uqsub8(Condition cond, Register rd, Register rn, Register rm) { 5183 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5184 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5185 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5186 VIXL_ASSERT(allow_macro_instructions_); 5187 VIXL_ASSERT(OutsideITBlock()); 5188 MacroEmissionCheckScope guard(this); 5189 ITScope it_scope(this, &cond); 5190 uqsub8(cond, rd, rn, rm); 5191 } 5192 void Uqsub8(Register rd, Register rn, Register rm) { Uqsub8(al, rd, rn, rm); } 5193 5194 void Usad8(Condition cond, Register rd, Register rn, Register rm) { 5195 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5196 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5197 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5198 VIXL_ASSERT(allow_macro_instructions_); 5199 VIXL_ASSERT(OutsideITBlock()); 5200 MacroEmissionCheckScope guard(this); 5201 ITScope it_scope(this, &cond); 5202 usad8(cond, rd, rn, rm); 5203 } 5204 void Usad8(Register rd, Register rn, Register rm) { Usad8(al, rd, rn, rm); } 5205 5206 void Usada8( 5207 Condition cond, Register rd, Register rn, Register rm, Register ra) { 5208 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5209 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5210 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5211 VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); 5212 VIXL_ASSERT(allow_macro_instructions_); 5213 VIXL_ASSERT(OutsideITBlock()); 5214 MacroEmissionCheckScope guard(this); 5215 ITScope it_scope(this, &cond); 5216 usada8(cond, rd, rn, rm, ra); 5217 } 5218 void Usada8(Register rd, Register rn, Register rm, Register ra) { 5219 Usada8(al, rd, rn, rm, ra); 5220 } 5221 5222 void Usat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { 5223 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5224 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 5225 VIXL_ASSERT(allow_macro_instructions_); 5226 VIXL_ASSERT(OutsideITBlock()); 5227 MacroEmissionCheckScope guard(this); 5228 ITScope it_scope(this, &cond); 5229 usat(cond, rd, imm, operand); 5230 } 5231 void Usat(Register rd, uint32_t imm, const Operand& operand) { 5232 Usat(al, rd, imm, operand); 5233 } 5234 5235 void Usat16(Condition cond, Register rd, uint32_t imm, Register rn) { 5236 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5237 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5238 VIXL_ASSERT(allow_macro_instructions_); 5239 VIXL_ASSERT(OutsideITBlock()); 5240 MacroEmissionCheckScope guard(this); 5241 ITScope it_scope(this, &cond); 5242 usat16(cond, rd, imm, rn); 5243 } 5244 void Usat16(Register rd, uint32_t imm, Register rn) { 5245 Usat16(al, rd, imm, rn); 5246 } 5247 5248 void Usax(Condition cond, Register rd, Register rn, Register rm) { 5249 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5250 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5251 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5252 VIXL_ASSERT(allow_macro_instructions_); 5253 VIXL_ASSERT(OutsideITBlock()); 5254 MacroEmissionCheckScope guard(this); 5255 ITScope it_scope(this, &cond); 5256 usax(cond, rd, rn, rm); 5257 } 5258 void Usax(Register rd, Register rn, Register rm) { Usax(al, rd, rn, rm); } 5259 5260 void Usub16(Condition cond, Register rd, Register rn, Register rm) { 5261 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5262 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5263 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5264 VIXL_ASSERT(allow_macro_instructions_); 5265 VIXL_ASSERT(OutsideITBlock()); 5266 MacroEmissionCheckScope guard(this); 5267 ITScope it_scope(this, &cond); 5268 usub16(cond, rd, rn, rm); 5269 } 5270 void Usub16(Register rd, Register rn, Register rm) { Usub16(al, rd, rn, rm); } 5271 5272 void Usub8(Condition cond, Register rd, Register rn, Register rm) { 5273 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5274 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5275 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5276 VIXL_ASSERT(allow_macro_instructions_); 5277 VIXL_ASSERT(OutsideITBlock()); 5278 MacroEmissionCheckScope guard(this); 5279 ITScope it_scope(this, &cond); 5280 usub8(cond, rd, rn, rm); 5281 } 5282 void Usub8(Register rd, Register rn, Register rm) { Usub8(al, rd, rn, rm); } 5283 5284 void Uxtab(Condition cond, Register rd, Register rn, const Operand& operand) { 5285 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5286 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5287 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 5288 VIXL_ASSERT(allow_macro_instructions_); 5289 VIXL_ASSERT(OutsideITBlock()); 5290 MacroEmissionCheckScope guard(this); 5291 ITScope it_scope(this, &cond); 5292 uxtab(cond, rd, rn, operand); 5293 } 5294 void Uxtab(Register rd, Register rn, const Operand& operand) { 5295 Uxtab(al, rd, rn, operand); 5296 } 5297 5298 void Uxtab16(Condition cond, 5299 Register rd, 5300 Register rn, 5301 const Operand& operand) { 5302 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5303 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5304 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 5305 VIXL_ASSERT(allow_macro_instructions_); 5306 VIXL_ASSERT(OutsideITBlock()); 5307 MacroEmissionCheckScope guard(this); 5308 ITScope it_scope(this, &cond); 5309 uxtab16(cond, rd, rn, operand); 5310 } 5311 void Uxtab16(Register rd, Register rn, const Operand& operand) { 5312 Uxtab16(al, rd, rn, operand); 5313 } 5314 5315 void Uxtah(Condition cond, Register rd, Register rn, const Operand& operand) { 5316 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5317 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5318 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 5319 VIXL_ASSERT(allow_macro_instructions_); 5320 VIXL_ASSERT(OutsideITBlock()); 5321 MacroEmissionCheckScope guard(this); 5322 ITScope it_scope(this, &cond); 5323 uxtah(cond, rd, rn, operand); 5324 } 5325 void Uxtah(Register rd, Register rn, const Operand& operand) { 5326 Uxtah(al, rd, rn, operand); 5327 } 5328 5329 void Uxtb(Condition cond, Register rd, const Operand& operand) { 5330 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5331 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 5332 VIXL_ASSERT(allow_macro_instructions_); 5333 VIXL_ASSERT(OutsideITBlock()); 5334 MacroEmissionCheckScope guard(this); 5335 ITScope it_scope(this, &cond); 5336 uxtb(cond, rd, operand); 5337 } 5338 void Uxtb(Register rd, const Operand& operand) { Uxtb(al, rd, operand); } 5339 5340 void Uxtb16(Condition cond, Register rd, const Operand& operand) { 5341 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5342 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 5343 VIXL_ASSERT(allow_macro_instructions_); 5344 VIXL_ASSERT(OutsideITBlock()); 5345 MacroEmissionCheckScope guard(this); 5346 ITScope it_scope(this, &cond); 5347 uxtb16(cond, rd, operand); 5348 } 5349 void Uxtb16(Register rd, const Operand& operand) { Uxtb16(al, rd, operand); } 5350 5351 void Uxth(Condition cond, Register rd, const Operand& operand) { 5352 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5353 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 5354 VIXL_ASSERT(allow_macro_instructions_); 5355 VIXL_ASSERT(OutsideITBlock()); 5356 MacroEmissionCheckScope guard(this); 5357 ITScope it_scope(this, &cond); 5358 uxth(cond, rd, operand); 5359 } 5360 void Uxth(Register rd, const Operand& operand) { Uxth(al, rd, operand); } 5361 5362 void Vaba( 5363 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5364 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5365 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5366 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5367 VIXL_ASSERT(allow_macro_instructions_); 5368 VIXL_ASSERT(OutsideITBlock()); 5369 MacroEmissionCheckScope guard(this); 5370 ITScope it_scope(this, &cond); 5371 vaba(cond, dt, rd, rn, rm); 5372 } 5373 void Vaba(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5374 Vaba(al, dt, rd, rn, rm); 5375 } 5376 5377 void Vaba( 5378 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5379 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5380 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5381 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5382 VIXL_ASSERT(allow_macro_instructions_); 5383 VIXL_ASSERT(OutsideITBlock()); 5384 MacroEmissionCheckScope guard(this); 5385 ITScope it_scope(this, &cond); 5386 vaba(cond, dt, rd, rn, rm); 5387 } 5388 void Vaba(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5389 Vaba(al, dt, rd, rn, rm); 5390 } 5391 5392 void Vabal( 5393 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) { 5394 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5395 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5396 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5397 VIXL_ASSERT(allow_macro_instructions_); 5398 VIXL_ASSERT(OutsideITBlock()); 5399 MacroEmissionCheckScope guard(this); 5400 ITScope it_scope(this, &cond); 5401 vabal(cond, dt, rd, rn, rm); 5402 } 5403 void Vabal(DataType dt, QRegister rd, DRegister rn, DRegister rm) { 5404 Vabal(al, dt, rd, rn, rm); 5405 } 5406 5407 void Vabd( 5408 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5409 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5410 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5411 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5412 VIXL_ASSERT(allow_macro_instructions_); 5413 VIXL_ASSERT(OutsideITBlock()); 5414 MacroEmissionCheckScope guard(this); 5415 ITScope it_scope(this, &cond); 5416 vabd(cond, dt, rd, rn, rm); 5417 } 5418 void Vabd(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5419 Vabd(al, dt, rd, rn, rm); 5420 } 5421 5422 void Vabd( 5423 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5424 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5425 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5426 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5427 VIXL_ASSERT(allow_macro_instructions_); 5428 VIXL_ASSERT(OutsideITBlock()); 5429 MacroEmissionCheckScope guard(this); 5430 ITScope it_scope(this, &cond); 5431 vabd(cond, dt, rd, rn, rm); 5432 } 5433 void Vabd(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5434 Vabd(al, dt, rd, rn, rm); 5435 } 5436 5437 void Vabdl( 5438 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) { 5439 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5440 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5441 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5442 VIXL_ASSERT(allow_macro_instructions_); 5443 VIXL_ASSERT(OutsideITBlock()); 5444 MacroEmissionCheckScope guard(this); 5445 ITScope it_scope(this, &cond); 5446 vabdl(cond, dt, rd, rn, rm); 5447 } 5448 void Vabdl(DataType dt, QRegister rd, DRegister rn, DRegister rm) { 5449 Vabdl(al, dt, rd, rn, rm); 5450 } 5451 5452 void Vabs(Condition cond, DataType dt, DRegister rd, DRegister rm) { 5453 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5454 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5455 VIXL_ASSERT(allow_macro_instructions_); 5456 VIXL_ASSERT(OutsideITBlock()); 5457 MacroEmissionCheckScope guard(this); 5458 ITScope it_scope(this, &cond); 5459 vabs(cond, dt, rd, rm); 5460 } 5461 void Vabs(DataType dt, DRegister rd, DRegister rm) { Vabs(al, dt, rd, rm); } 5462 5463 void Vabs(Condition cond, DataType dt, QRegister rd, QRegister rm) { 5464 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5465 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5466 VIXL_ASSERT(allow_macro_instructions_); 5467 VIXL_ASSERT(OutsideITBlock()); 5468 MacroEmissionCheckScope guard(this); 5469 ITScope it_scope(this, &cond); 5470 vabs(cond, dt, rd, rm); 5471 } 5472 void Vabs(DataType dt, QRegister rd, QRegister rm) { Vabs(al, dt, rd, rm); } 5473 5474 void Vabs(Condition cond, DataType dt, SRegister rd, SRegister rm) { 5475 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5476 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5477 VIXL_ASSERT(allow_macro_instructions_); 5478 VIXL_ASSERT(OutsideITBlock()); 5479 MacroEmissionCheckScope guard(this); 5480 ITScope it_scope(this, &cond); 5481 vabs(cond, dt, rd, rm); 5482 } 5483 void Vabs(DataType dt, SRegister rd, SRegister rm) { Vabs(al, dt, rd, rm); } 5484 5485 void Vacge( 5486 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5487 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5488 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5489 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5490 VIXL_ASSERT(allow_macro_instructions_); 5491 VIXL_ASSERT(OutsideITBlock()); 5492 MacroEmissionCheckScope guard(this); 5493 ITScope it_scope(this, &cond); 5494 vacge(cond, dt, rd, rn, rm); 5495 } 5496 void Vacge(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5497 Vacge(al, dt, rd, rn, rm); 5498 } 5499 5500 void Vacge( 5501 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5502 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5503 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5504 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5505 VIXL_ASSERT(allow_macro_instructions_); 5506 VIXL_ASSERT(OutsideITBlock()); 5507 MacroEmissionCheckScope guard(this); 5508 ITScope it_scope(this, &cond); 5509 vacge(cond, dt, rd, rn, rm); 5510 } 5511 void Vacge(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5512 Vacge(al, dt, rd, rn, rm); 5513 } 5514 5515 void Vacgt( 5516 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5517 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5518 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5519 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5520 VIXL_ASSERT(allow_macro_instructions_); 5521 VIXL_ASSERT(OutsideITBlock()); 5522 MacroEmissionCheckScope guard(this); 5523 ITScope it_scope(this, &cond); 5524 vacgt(cond, dt, rd, rn, rm); 5525 } 5526 void Vacgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5527 Vacgt(al, dt, rd, rn, rm); 5528 } 5529 5530 void Vacgt( 5531 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5532 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5533 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5534 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5535 VIXL_ASSERT(allow_macro_instructions_); 5536 VIXL_ASSERT(OutsideITBlock()); 5537 MacroEmissionCheckScope guard(this); 5538 ITScope it_scope(this, &cond); 5539 vacgt(cond, dt, rd, rn, rm); 5540 } 5541 void Vacgt(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5542 Vacgt(al, dt, rd, rn, rm); 5543 } 5544 5545 void Vacle( 5546 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5547 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5548 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5549 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5550 VIXL_ASSERT(allow_macro_instructions_); 5551 VIXL_ASSERT(OutsideITBlock()); 5552 MacroEmissionCheckScope guard(this); 5553 ITScope it_scope(this, &cond); 5554 vacle(cond, dt, rd, rn, rm); 5555 } 5556 void Vacle(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5557 Vacle(al, dt, rd, rn, rm); 5558 } 5559 5560 void Vacle( 5561 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5562 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5564 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5565 VIXL_ASSERT(allow_macro_instructions_); 5566 VIXL_ASSERT(OutsideITBlock()); 5567 MacroEmissionCheckScope guard(this); 5568 ITScope it_scope(this, &cond); 5569 vacle(cond, dt, rd, rn, rm); 5570 } 5571 void Vacle(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5572 Vacle(al, dt, rd, rn, rm); 5573 } 5574 5575 void Vaclt( 5576 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5577 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5578 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5579 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5580 VIXL_ASSERT(allow_macro_instructions_); 5581 VIXL_ASSERT(OutsideITBlock()); 5582 MacroEmissionCheckScope guard(this); 5583 ITScope it_scope(this, &cond); 5584 vaclt(cond, dt, rd, rn, rm); 5585 } 5586 void Vaclt(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5587 Vaclt(al, dt, rd, rn, rm); 5588 } 5589 5590 void Vaclt( 5591 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5592 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5593 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5594 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5595 VIXL_ASSERT(allow_macro_instructions_); 5596 VIXL_ASSERT(OutsideITBlock()); 5597 MacroEmissionCheckScope guard(this); 5598 ITScope it_scope(this, &cond); 5599 vaclt(cond, dt, rd, rn, rm); 5600 } 5601 void Vaclt(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5602 Vaclt(al, dt, rd, rn, rm); 5603 } 5604 5605 void Vadd( 5606 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5607 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5608 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5609 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5610 VIXL_ASSERT(allow_macro_instructions_); 5611 VIXL_ASSERT(OutsideITBlock()); 5612 MacroEmissionCheckScope guard(this); 5613 ITScope it_scope(this, &cond); 5614 vadd(cond, dt, rd, rn, rm); 5615 } 5616 void Vadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5617 Vadd(al, dt, rd, rn, rm); 5618 } 5619 5620 void Vadd( 5621 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5622 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5623 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5624 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5625 VIXL_ASSERT(allow_macro_instructions_); 5626 VIXL_ASSERT(OutsideITBlock()); 5627 MacroEmissionCheckScope guard(this); 5628 ITScope it_scope(this, &cond); 5629 vadd(cond, dt, rd, rn, rm); 5630 } 5631 void Vadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5632 Vadd(al, dt, rd, rn, rm); 5633 } 5634 5635 void Vadd( 5636 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) { 5637 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5638 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5639 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5640 VIXL_ASSERT(allow_macro_instructions_); 5641 VIXL_ASSERT(OutsideITBlock()); 5642 MacroEmissionCheckScope guard(this); 5643 ITScope it_scope(this, &cond); 5644 vadd(cond, dt, rd, rn, rm); 5645 } 5646 void Vadd(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 5647 Vadd(al, dt, rd, rn, rm); 5648 } 5649 5650 void Vaddhn( 5651 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) { 5652 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5653 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5654 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5655 VIXL_ASSERT(allow_macro_instructions_); 5656 VIXL_ASSERT(OutsideITBlock()); 5657 MacroEmissionCheckScope guard(this); 5658 ITScope it_scope(this, &cond); 5659 vaddhn(cond, dt, rd, rn, rm); 5660 } 5661 void Vaddhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) { 5662 Vaddhn(al, dt, rd, rn, rm); 5663 } 5664 5665 void Vaddl( 5666 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) { 5667 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5668 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5669 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5670 VIXL_ASSERT(allow_macro_instructions_); 5671 VIXL_ASSERT(OutsideITBlock()); 5672 MacroEmissionCheckScope guard(this); 5673 ITScope it_scope(this, &cond); 5674 vaddl(cond, dt, rd, rn, rm); 5675 } 5676 void Vaddl(DataType dt, QRegister rd, DRegister rn, DRegister rm) { 5677 Vaddl(al, dt, rd, rn, rm); 5678 } 5679 5680 void Vaddw( 5681 Condition cond, DataType dt, QRegister rd, QRegister rn, DRegister rm) { 5682 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5683 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5684 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5685 VIXL_ASSERT(allow_macro_instructions_); 5686 VIXL_ASSERT(OutsideITBlock()); 5687 MacroEmissionCheckScope guard(this); 5688 ITScope it_scope(this, &cond); 5689 vaddw(cond, dt, rd, rn, rm); 5690 } 5691 void Vaddw(DataType dt, QRegister rd, QRegister rn, DRegister rm) { 5692 Vaddw(al, dt, rd, rn, rm); 5693 } 5694 5695 void Vand(Condition cond, 5696 DataType dt, 5697 DRegister rd, 5698 DRegister rn, 5699 const DOperand& operand) { 5700 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5701 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5702 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 5703 VIXL_ASSERT(allow_macro_instructions_); 5704 VIXL_ASSERT(OutsideITBlock()); 5705 MacroEmissionCheckScope guard(this); 5706 ITScope it_scope(this, &cond); 5707 vand(cond, dt, rd, rn, operand); 5708 } 5709 void Vand(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) { 5710 Vand(al, dt, rd, rn, operand); 5711 } 5712 5713 void Vand(Condition cond, 5714 DataType dt, 5715 QRegister rd, 5716 QRegister rn, 5717 const QOperand& operand) { 5718 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5719 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5720 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 5721 VIXL_ASSERT(allow_macro_instructions_); 5722 VIXL_ASSERT(OutsideITBlock()); 5723 MacroEmissionCheckScope guard(this); 5724 ITScope it_scope(this, &cond); 5725 vand(cond, dt, rd, rn, operand); 5726 } 5727 void Vand(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) { 5728 Vand(al, dt, rd, rn, operand); 5729 } 5730 5731 void Vbic(Condition cond, 5732 DataType dt, 5733 DRegister rd, 5734 DRegister rn, 5735 const DOperand& operand) { 5736 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5737 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5738 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 5739 VIXL_ASSERT(allow_macro_instructions_); 5740 VIXL_ASSERT(OutsideITBlock()); 5741 MacroEmissionCheckScope guard(this); 5742 ITScope it_scope(this, &cond); 5743 vbic(cond, dt, rd, rn, operand); 5744 } 5745 void Vbic(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) { 5746 Vbic(al, dt, rd, rn, operand); 5747 } 5748 5749 void Vbic(Condition cond, 5750 DataType dt, 5751 QRegister rd, 5752 QRegister rn, 5753 const QOperand& operand) { 5754 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5755 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5756 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 5757 VIXL_ASSERT(allow_macro_instructions_); 5758 VIXL_ASSERT(OutsideITBlock()); 5759 MacroEmissionCheckScope guard(this); 5760 ITScope it_scope(this, &cond); 5761 vbic(cond, dt, rd, rn, operand); 5762 } 5763 void Vbic(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) { 5764 Vbic(al, dt, rd, rn, operand); 5765 } 5766 5767 void Vbif( 5768 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5769 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5770 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5771 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5772 VIXL_ASSERT(allow_macro_instructions_); 5773 VIXL_ASSERT(OutsideITBlock()); 5774 MacroEmissionCheckScope guard(this); 5775 ITScope it_scope(this, &cond); 5776 vbif(cond, dt, rd, rn, rm); 5777 } 5778 void Vbif(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5779 Vbif(al, dt, rd, rn, rm); 5780 } 5781 void Vbif(Condition cond, DRegister rd, DRegister rn, DRegister rm) { 5782 Vbif(cond, kDataTypeValueNone, rd, rn, rm); 5783 } 5784 void Vbif(DRegister rd, DRegister rn, DRegister rm) { 5785 Vbif(al, kDataTypeValueNone, rd, rn, rm); 5786 } 5787 5788 void Vbif( 5789 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5790 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5791 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5792 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5793 VIXL_ASSERT(allow_macro_instructions_); 5794 VIXL_ASSERT(OutsideITBlock()); 5795 MacroEmissionCheckScope guard(this); 5796 ITScope it_scope(this, &cond); 5797 vbif(cond, dt, rd, rn, rm); 5798 } 5799 void Vbif(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5800 Vbif(al, dt, rd, rn, rm); 5801 } 5802 void Vbif(Condition cond, QRegister rd, QRegister rn, QRegister rm) { 5803 Vbif(cond, kDataTypeValueNone, rd, rn, rm); 5804 } 5805 void Vbif(QRegister rd, QRegister rn, QRegister rm) { 5806 Vbif(al, kDataTypeValueNone, rd, rn, rm); 5807 } 5808 5809 void Vbit( 5810 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5811 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5812 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5813 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5814 VIXL_ASSERT(allow_macro_instructions_); 5815 VIXL_ASSERT(OutsideITBlock()); 5816 MacroEmissionCheckScope guard(this); 5817 ITScope it_scope(this, &cond); 5818 vbit(cond, dt, rd, rn, rm); 5819 } 5820 void Vbit(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5821 Vbit(al, dt, rd, rn, rm); 5822 } 5823 void Vbit(Condition cond, DRegister rd, DRegister rn, DRegister rm) { 5824 Vbit(cond, kDataTypeValueNone, rd, rn, rm); 5825 } 5826 void Vbit(DRegister rd, DRegister rn, DRegister rm) { 5827 Vbit(al, kDataTypeValueNone, rd, rn, rm); 5828 } 5829 5830 void Vbit( 5831 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5832 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5833 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5834 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5835 VIXL_ASSERT(allow_macro_instructions_); 5836 VIXL_ASSERT(OutsideITBlock()); 5837 MacroEmissionCheckScope guard(this); 5838 ITScope it_scope(this, &cond); 5839 vbit(cond, dt, rd, rn, rm); 5840 } 5841 void Vbit(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5842 Vbit(al, dt, rd, rn, rm); 5843 } 5844 void Vbit(Condition cond, QRegister rd, QRegister rn, QRegister rm) { 5845 Vbit(cond, kDataTypeValueNone, rd, rn, rm); 5846 } 5847 void Vbit(QRegister rd, QRegister rn, QRegister rm) { 5848 Vbit(al, kDataTypeValueNone, rd, rn, rm); 5849 } 5850 5851 void Vbsl( 5852 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5853 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5854 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5855 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5856 VIXL_ASSERT(allow_macro_instructions_); 5857 VIXL_ASSERT(OutsideITBlock()); 5858 MacroEmissionCheckScope guard(this); 5859 ITScope it_scope(this, &cond); 5860 vbsl(cond, dt, rd, rn, rm); 5861 } 5862 void Vbsl(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5863 Vbsl(al, dt, rd, rn, rm); 5864 } 5865 void Vbsl(Condition cond, DRegister rd, DRegister rn, DRegister rm) { 5866 Vbsl(cond, kDataTypeValueNone, rd, rn, rm); 5867 } 5868 void Vbsl(DRegister rd, DRegister rn, DRegister rm) { 5869 Vbsl(al, kDataTypeValueNone, rd, rn, rm); 5870 } 5871 5872 void Vbsl( 5873 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5874 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5875 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5876 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5877 VIXL_ASSERT(allow_macro_instructions_); 5878 VIXL_ASSERT(OutsideITBlock()); 5879 MacroEmissionCheckScope guard(this); 5880 ITScope it_scope(this, &cond); 5881 vbsl(cond, dt, rd, rn, rm); 5882 } 5883 void Vbsl(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5884 Vbsl(al, dt, rd, rn, rm); 5885 } 5886 void Vbsl(Condition cond, QRegister rd, QRegister rn, QRegister rm) { 5887 Vbsl(cond, kDataTypeValueNone, rd, rn, rm); 5888 } 5889 void Vbsl(QRegister rd, QRegister rn, QRegister rm) { 5890 Vbsl(al, kDataTypeValueNone, rd, rn, rm); 5891 } 5892 5893 void Vceq(Condition cond, 5894 DataType dt, 5895 DRegister rd, 5896 DRegister rm, 5897 const DOperand& operand) { 5898 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5899 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5900 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 5901 VIXL_ASSERT(allow_macro_instructions_); 5902 VIXL_ASSERT(OutsideITBlock()); 5903 MacroEmissionCheckScope guard(this); 5904 ITScope it_scope(this, &cond); 5905 vceq(cond, dt, rd, rm, operand); 5906 } 5907 void Vceq(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) { 5908 Vceq(al, dt, rd, rm, operand); 5909 } 5910 5911 void Vceq(Condition cond, 5912 DataType dt, 5913 QRegister rd, 5914 QRegister rm, 5915 const QOperand& operand) { 5916 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5917 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5918 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 5919 VIXL_ASSERT(allow_macro_instructions_); 5920 VIXL_ASSERT(OutsideITBlock()); 5921 MacroEmissionCheckScope guard(this); 5922 ITScope it_scope(this, &cond); 5923 vceq(cond, dt, rd, rm, operand); 5924 } 5925 void Vceq(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) { 5926 Vceq(al, dt, rd, rm, operand); 5927 } 5928 5929 void Vceq( 5930 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5931 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5932 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5933 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5934 VIXL_ASSERT(allow_macro_instructions_); 5935 VIXL_ASSERT(OutsideITBlock()); 5936 MacroEmissionCheckScope guard(this); 5937 ITScope it_scope(this, &cond); 5938 vceq(cond, dt, rd, rn, rm); 5939 } 5940 void Vceq(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5941 Vceq(al, dt, rd, rn, rm); 5942 } 5943 5944 void Vceq( 5945 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5946 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5947 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5948 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5949 VIXL_ASSERT(allow_macro_instructions_); 5950 VIXL_ASSERT(OutsideITBlock()); 5951 MacroEmissionCheckScope guard(this); 5952 ITScope it_scope(this, &cond); 5953 vceq(cond, dt, rd, rn, rm); 5954 } 5955 void Vceq(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 5956 Vceq(al, dt, rd, rn, rm); 5957 } 5958 5959 void Vcge(Condition cond, 5960 DataType dt, 5961 DRegister rd, 5962 DRegister rm, 5963 const DOperand& operand) { 5964 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5965 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5966 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 5967 VIXL_ASSERT(allow_macro_instructions_); 5968 VIXL_ASSERT(OutsideITBlock()); 5969 MacroEmissionCheckScope guard(this); 5970 ITScope it_scope(this, &cond); 5971 vcge(cond, dt, rd, rm, operand); 5972 } 5973 void Vcge(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) { 5974 Vcge(al, dt, rd, rm, operand); 5975 } 5976 5977 void Vcge(Condition cond, 5978 DataType dt, 5979 QRegister rd, 5980 QRegister rm, 5981 const QOperand& operand) { 5982 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5983 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 5984 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 5985 VIXL_ASSERT(allow_macro_instructions_); 5986 VIXL_ASSERT(OutsideITBlock()); 5987 MacroEmissionCheckScope guard(this); 5988 ITScope it_scope(this, &cond); 5989 vcge(cond, dt, rd, rm, operand); 5990 } 5991 void Vcge(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) { 5992 Vcge(al, dt, rd, rm, operand); 5993 } 5994 5995 void Vcge( 5996 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 5997 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 5998 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 5999 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6000 VIXL_ASSERT(allow_macro_instructions_); 6001 VIXL_ASSERT(OutsideITBlock()); 6002 MacroEmissionCheckScope guard(this); 6003 ITScope it_scope(this, &cond); 6004 vcge(cond, dt, rd, rn, rm); 6005 } 6006 void Vcge(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 6007 Vcge(al, dt, rd, rn, rm); 6008 } 6009 6010 void Vcge( 6011 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 6012 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6013 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 6014 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6015 VIXL_ASSERT(allow_macro_instructions_); 6016 VIXL_ASSERT(OutsideITBlock()); 6017 MacroEmissionCheckScope guard(this); 6018 ITScope it_scope(this, &cond); 6019 vcge(cond, dt, rd, rn, rm); 6020 } 6021 void Vcge(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 6022 Vcge(al, dt, rd, rn, rm); 6023 } 6024 6025 void Vcgt(Condition cond, 6026 DataType dt, 6027 DRegister rd, 6028 DRegister rm, 6029 const DOperand& operand) { 6030 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6031 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6032 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 6033 VIXL_ASSERT(allow_macro_instructions_); 6034 VIXL_ASSERT(OutsideITBlock()); 6035 MacroEmissionCheckScope guard(this); 6036 ITScope it_scope(this, &cond); 6037 vcgt(cond, dt, rd, rm, operand); 6038 } 6039 void Vcgt(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) { 6040 Vcgt(al, dt, rd, rm, operand); 6041 } 6042 6043 void Vcgt(Condition cond, 6044 DataType dt, 6045 QRegister rd, 6046 QRegister rm, 6047 const QOperand& operand) { 6048 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6049 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6050 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 6051 VIXL_ASSERT(allow_macro_instructions_); 6052 VIXL_ASSERT(OutsideITBlock()); 6053 MacroEmissionCheckScope guard(this); 6054 ITScope it_scope(this, &cond); 6055 vcgt(cond, dt, rd, rm, operand); 6056 } 6057 void Vcgt(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) { 6058 Vcgt(al, dt, rd, rm, operand); 6059 } 6060 6061 void Vcgt( 6062 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 6063 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6064 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 6065 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6066 VIXL_ASSERT(allow_macro_instructions_); 6067 VIXL_ASSERT(OutsideITBlock()); 6068 MacroEmissionCheckScope guard(this); 6069 ITScope it_scope(this, &cond); 6070 vcgt(cond, dt, rd, rn, rm); 6071 } 6072 void Vcgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 6073 Vcgt(al, dt, rd, rn, rm); 6074 } 6075 6076 void Vcgt( 6077 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 6078 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6079 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 6080 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6081 VIXL_ASSERT(allow_macro_instructions_); 6082 VIXL_ASSERT(OutsideITBlock()); 6083 MacroEmissionCheckScope guard(this); 6084 ITScope it_scope(this, &cond); 6085 vcgt(cond, dt, rd, rn, rm); 6086 } 6087 void Vcgt(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 6088 Vcgt(al, dt, rd, rn, rm); 6089 } 6090 6091 void Vcle(Condition cond, 6092 DataType dt, 6093 DRegister rd, 6094 DRegister rm, 6095 const DOperand& operand) { 6096 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6097 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6098 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 6099 VIXL_ASSERT(allow_macro_instructions_); 6100 VIXL_ASSERT(OutsideITBlock()); 6101 MacroEmissionCheckScope guard(this); 6102 ITScope it_scope(this, &cond); 6103 vcle(cond, dt, rd, rm, operand); 6104 } 6105 void Vcle(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) { 6106 Vcle(al, dt, rd, rm, operand); 6107 } 6108 6109 void Vcle(Condition cond, 6110 DataType dt, 6111 QRegister rd, 6112 QRegister rm, 6113 const QOperand& operand) { 6114 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6115 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6116 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 6117 VIXL_ASSERT(allow_macro_instructions_); 6118 VIXL_ASSERT(OutsideITBlock()); 6119 MacroEmissionCheckScope guard(this); 6120 ITScope it_scope(this, &cond); 6121 vcle(cond, dt, rd, rm, operand); 6122 } 6123 void Vcle(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) { 6124 Vcle(al, dt, rd, rm, operand); 6125 } 6126 6127 void Vcle( 6128 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 6129 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6130 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 6131 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6132 VIXL_ASSERT(allow_macro_instructions_); 6133 VIXL_ASSERT(OutsideITBlock()); 6134 MacroEmissionCheckScope guard(this); 6135 ITScope it_scope(this, &cond); 6136 vcle(cond, dt, rd, rn, rm); 6137 } 6138 void Vcle(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 6139 Vcle(al, dt, rd, rn, rm); 6140 } 6141 6142 void Vcle( 6143 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 6144 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6145 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 6146 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6147 VIXL_ASSERT(allow_macro_instructions_); 6148 VIXL_ASSERT(OutsideITBlock()); 6149 MacroEmissionCheckScope guard(this); 6150 ITScope it_scope(this, &cond); 6151 vcle(cond, dt, rd, rn, rm); 6152 } 6153 void Vcle(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 6154 Vcle(al, dt, rd, rn, rm); 6155 } 6156 6157 void Vcls(Condition cond, DataType dt, DRegister rd, DRegister rm) { 6158 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6159 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6160 VIXL_ASSERT(allow_macro_instructions_); 6161 VIXL_ASSERT(OutsideITBlock()); 6162 MacroEmissionCheckScope guard(this); 6163 ITScope it_scope(this, &cond); 6164 vcls(cond, dt, rd, rm); 6165 } 6166 void Vcls(DataType dt, DRegister rd, DRegister rm) { Vcls(al, dt, rd, rm); } 6167 6168 void Vcls(Condition cond, DataType dt, QRegister rd, QRegister rm) { 6169 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6170 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6171 VIXL_ASSERT(allow_macro_instructions_); 6172 VIXL_ASSERT(OutsideITBlock()); 6173 MacroEmissionCheckScope guard(this); 6174 ITScope it_scope(this, &cond); 6175 vcls(cond, dt, rd, rm); 6176 } 6177 void Vcls(DataType dt, QRegister rd, QRegister rm) { Vcls(al, dt, rd, rm); } 6178 6179 void Vclt(Condition cond, 6180 DataType dt, 6181 DRegister rd, 6182 DRegister rm, 6183 const DOperand& operand) { 6184 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6185 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6186 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 6187 VIXL_ASSERT(allow_macro_instructions_); 6188 VIXL_ASSERT(OutsideITBlock()); 6189 MacroEmissionCheckScope guard(this); 6190 ITScope it_scope(this, &cond); 6191 vclt(cond, dt, rd, rm, operand); 6192 } 6193 void Vclt(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) { 6194 Vclt(al, dt, rd, rm, operand); 6195 } 6196 6197 void Vclt(Condition cond, 6198 DataType dt, 6199 QRegister rd, 6200 QRegister rm, 6201 const QOperand& operand) { 6202 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6203 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6204 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 6205 VIXL_ASSERT(allow_macro_instructions_); 6206 VIXL_ASSERT(OutsideITBlock()); 6207 MacroEmissionCheckScope guard(this); 6208 ITScope it_scope(this, &cond); 6209 vclt(cond, dt, rd, rm, operand); 6210 } 6211 void Vclt(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) { 6212 Vclt(al, dt, rd, rm, operand); 6213 } 6214 6215 void Vclt( 6216 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 6217 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6218 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 6219 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6220 VIXL_ASSERT(allow_macro_instructions_); 6221 VIXL_ASSERT(OutsideITBlock()); 6222 MacroEmissionCheckScope guard(this); 6223 ITScope it_scope(this, &cond); 6224 vclt(cond, dt, rd, rn, rm); 6225 } 6226 void Vclt(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 6227 Vclt(al, dt, rd, rn, rm); 6228 } 6229 6230 void Vclt( 6231 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 6232 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6233 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 6234 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6235 VIXL_ASSERT(allow_macro_instructions_); 6236 VIXL_ASSERT(OutsideITBlock()); 6237 MacroEmissionCheckScope guard(this); 6238 ITScope it_scope(this, &cond); 6239 vclt(cond, dt, rd, rn, rm); 6240 } 6241 void Vclt(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 6242 Vclt(al, dt, rd, rn, rm); 6243 } 6244 6245 void Vclz(Condition cond, DataType dt, DRegister rd, DRegister rm) { 6246 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6247 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6248 VIXL_ASSERT(allow_macro_instructions_); 6249 VIXL_ASSERT(OutsideITBlock()); 6250 MacroEmissionCheckScope guard(this); 6251 ITScope it_scope(this, &cond); 6252 vclz(cond, dt, rd, rm); 6253 } 6254 void Vclz(DataType dt, DRegister rd, DRegister rm) { Vclz(al, dt, rd, rm); } 6255 6256 void Vclz(Condition cond, DataType dt, QRegister rd, QRegister rm) { 6257 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6258 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6259 VIXL_ASSERT(allow_macro_instructions_); 6260 VIXL_ASSERT(OutsideITBlock()); 6261 MacroEmissionCheckScope guard(this); 6262 ITScope it_scope(this, &cond); 6263 vclz(cond, dt, rd, rm); 6264 } 6265 void Vclz(DataType dt, QRegister rd, QRegister rm) { Vclz(al, dt, rd, rm); } 6266 6267 void Vcmp(Condition cond, DataType dt, SRegister rd, SRegister rm) { 6268 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6269 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6270 VIXL_ASSERT(allow_macro_instructions_); 6271 VIXL_ASSERT(OutsideITBlock()); 6272 MacroEmissionCheckScope guard(this); 6273 ITScope it_scope(this, &cond); 6274 vcmp(cond, dt, rd, rm); 6275 } 6276 void Vcmp(DataType dt, SRegister rd, SRegister rm) { Vcmp(al, dt, rd, rm); } 6277 6278 void Vcmp(Condition cond, DataType dt, DRegister rd, DRegister rm) { 6279 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6280 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6281 VIXL_ASSERT(allow_macro_instructions_); 6282 VIXL_ASSERT(OutsideITBlock()); 6283 MacroEmissionCheckScope guard(this); 6284 ITScope it_scope(this, &cond); 6285 vcmp(cond, dt, rd, rm); 6286 } 6287 void Vcmp(DataType dt, DRegister rd, DRegister rm) { Vcmp(al, dt, rd, rm); } 6288 6289 void Vcmp(Condition cond, DataType dt, SRegister rd, double imm) { 6290 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6291 VIXL_ASSERT(allow_macro_instructions_); 6292 VIXL_ASSERT(OutsideITBlock()); 6293 MacroEmissionCheckScope guard(this); 6294 ITScope it_scope(this, &cond); 6295 vcmp(cond, dt, rd, imm); 6296 } 6297 void Vcmp(DataType dt, SRegister rd, double imm) { Vcmp(al, dt, rd, imm); } 6298 6299 void Vcmp(Condition cond, DataType dt, DRegister rd, double imm) { 6300 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6301 VIXL_ASSERT(allow_macro_instructions_); 6302 VIXL_ASSERT(OutsideITBlock()); 6303 MacroEmissionCheckScope guard(this); 6304 ITScope it_scope(this, &cond); 6305 vcmp(cond, dt, rd, imm); 6306 } 6307 void Vcmp(DataType dt, DRegister rd, double imm) { Vcmp(al, dt, rd, imm); } 6308 6309 void Vcmpe(Condition cond, DataType dt, SRegister rd, SRegister rm) { 6310 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6311 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6312 VIXL_ASSERT(allow_macro_instructions_); 6313 VIXL_ASSERT(OutsideITBlock()); 6314 MacroEmissionCheckScope guard(this); 6315 ITScope it_scope(this, &cond); 6316 vcmpe(cond, dt, rd, rm); 6317 } 6318 void Vcmpe(DataType dt, SRegister rd, SRegister rm) { Vcmpe(al, dt, rd, rm); } 6319 6320 void Vcmpe(Condition cond, DataType dt, DRegister rd, DRegister rm) { 6321 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6322 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6323 VIXL_ASSERT(allow_macro_instructions_); 6324 VIXL_ASSERT(OutsideITBlock()); 6325 MacroEmissionCheckScope guard(this); 6326 ITScope it_scope(this, &cond); 6327 vcmpe(cond, dt, rd, rm); 6328 } 6329 void Vcmpe(DataType dt, DRegister rd, DRegister rm) { Vcmpe(al, dt, rd, rm); } 6330 6331 void Vcmpe(Condition cond, DataType dt, SRegister rd, double imm) { 6332 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6333 VIXL_ASSERT(allow_macro_instructions_); 6334 VIXL_ASSERT(OutsideITBlock()); 6335 MacroEmissionCheckScope guard(this); 6336 ITScope it_scope(this, &cond); 6337 vcmpe(cond, dt, rd, imm); 6338 } 6339 void Vcmpe(DataType dt, SRegister rd, double imm) { Vcmpe(al, dt, rd, imm); } 6340 6341 void Vcmpe(Condition cond, DataType dt, DRegister rd, double imm) { 6342 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6343 VIXL_ASSERT(allow_macro_instructions_); 6344 VIXL_ASSERT(OutsideITBlock()); 6345 MacroEmissionCheckScope guard(this); 6346 ITScope it_scope(this, &cond); 6347 vcmpe(cond, dt, rd, imm); 6348 } 6349 void Vcmpe(DataType dt, DRegister rd, double imm) { Vcmpe(al, dt, rd, imm); } 6350 6351 void Vcnt(Condition cond, DataType dt, DRegister rd, DRegister rm) { 6352 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6353 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6354 VIXL_ASSERT(allow_macro_instructions_); 6355 VIXL_ASSERT(OutsideITBlock()); 6356 MacroEmissionCheckScope guard(this); 6357 ITScope it_scope(this, &cond); 6358 vcnt(cond, dt, rd, rm); 6359 } 6360 void Vcnt(DataType dt, DRegister rd, DRegister rm) { Vcnt(al, dt, rd, rm); } 6361 6362 void Vcnt(Condition cond, DataType dt, QRegister rd, QRegister rm) { 6363 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6364 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6365 VIXL_ASSERT(allow_macro_instructions_); 6366 VIXL_ASSERT(OutsideITBlock()); 6367 MacroEmissionCheckScope guard(this); 6368 ITScope it_scope(this, &cond); 6369 vcnt(cond, dt, rd, rm); 6370 } 6371 void Vcnt(DataType dt, QRegister rd, QRegister rm) { Vcnt(al, dt, rd, rm); } 6372 6373 void Vcvt( 6374 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) { 6375 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6376 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6377 VIXL_ASSERT(allow_macro_instructions_); 6378 VIXL_ASSERT(OutsideITBlock()); 6379 MacroEmissionCheckScope guard(this); 6380 ITScope it_scope(this, &cond); 6381 vcvt(cond, dt1, dt2, rd, rm); 6382 } 6383 void Vcvt(DataType dt1, DataType dt2, DRegister rd, SRegister rm) { 6384 Vcvt(al, dt1, dt2, rd, rm); 6385 } 6386 6387 void Vcvt( 6388 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) { 6389 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6390 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6391 VIXL_ASSERT(allow_macro_instructions_); 6392 VIXL_ASSERT(OutsideITBlock()); 6393 MacroEmissionCheckScope guard(this); 6394 ITScope it_scope(this, &cond); 6395 vcvt(cond, dt1, dt2, rd, rm); 6396 } 6397 void Vcvt(DataType dt1, DataType dt2, SRegister rd, DRegister rm) { 6398 Vcvt(al, dt1, dt2, rd, rm); 6399 } 6400 6401 void Vcvt(Condition cond, 6402 DataType dt1, 6403 DataType dt2, 6404 DRegister rd, 6405 DRegister rm, 6406 int32_t fbits) { 6407 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6408 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6409 VIXL_ASSERT(allow_macro_instructions_); 6410 VIXL_ASSERT(OutsideITBlock()); 6411 MacroEmissionCheckScope guard(this); 6412 ITScope it_scope(this, &cond); 6413 vcvt(cond, dt1, dt2, rd, rm, fbits); 6414 } 6415 void Vcvt( 6416 DataType dt1, DataType dt2, DRegister rd, DRegister rm, int32_t fbits) { 6417 Vcvt(al, dt1, dt2, rd, rm, fbits); 6418 } 6419 6420 void Vcvt(Condition cond, 6421 DataType dt1, 6422 DataType dt2, 6423 QRegister rd, 6424 QRegister rm, 6425 int32_t fbits) { 6426 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6427 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6428 VIXL_ASSERT(allow_macro_instructions_); 6429 VIXL_ASSERT(OutsideITBlock()); 6430 MacroEmissionCheckScope guard(this); 6431 ITScope it_scope(this, &cond); 6432 vcvt(cond, dt1, dt2, rd, rm, fbits); 6433 } 6434 void Vcvt( 6435 DataType dt1, DataType dt2, QRegister rd, QRegister rm, int32_t fbits) { 6436 Vcvt(al, dt1, dt2, rd, rm, fbits); 6437 } 6438 6439 void Vcvt(Condition cond, 6440 DataType dt1, 6441 DataType dt2, 6442 SRegister rd, 6443 SRegister rm, 6444 int32_t fbits) { 6445 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6446 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6447 VIXL_ASSERT(allow_macro_instructions_); 6448 VIXL_ASSERT(OutsideITBlock()); 6449 MacroEmissionCheckScope guard(this); 6450 ITScope it_scope(this, &cond); 6451 vcvt(cond, dt1, dt2, rd, rm, fbits); 6452 } 6453 void Vcvt( 6454 DataType dt1, DataType dt2, SRegister rd, SRegister rm, int32_t fbits) { 6455 Vcvt(al, dt1, dt2, rd, rm, fbits); 6456 } 6457 6458 void Vcvt( 6459 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) { 6460 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6461 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6462 VIXL_ASSERT(allow_macro_instructions_); 6463 VIXL_ASSERT(OutsideITBlock()); 6464 MacroEmissionCheckScope guard(this); 6465 ITScope it_scope(this, &cond); 6466 vcvt(cond, dt1, dt2, rd, rm); 6467 } 6468 void Vcvt(DataType dt1, DataType dt2, DRegister rd, DRegister rm) { 6469 Vcvt(al, dt1, dt2, rd, rm); 6470 } 6471 6472 void Vcvt( 6473 Condition cond, DataType dt1, DataType dt2, QRegister rd, QRegister rm) { 6474 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6475 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6476 VIXL_ASSERT(allow_macro_instructions_); 6477 VIXL_ASSERT(OutsideITBlock()); 6478 MacroEmissionCheckScope guard(this); 6479 ITScope it_scope(this, &cond); 6480 vcvt(cond, dt1, dt2, rd, rm); 6481 } 6482 void Vcvt(DataType dt1, DataType dt2, QRegister rd, QRegister rm) { 6483 Vcvt(al, dt1, dt2, rd, rm); 6484 } 6485 6486 void Vcvt( 6487 Condition cond, DataType dt1, DataType dt2, DRegister rd, QRegister rm) { 6488 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6489 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6490 VIXL_ASSERT(allow_macro_instructions_); 6491 VIXL_ASSERT(OutsideITBlock()); 6492 MacroEmissionCheckScope guard(this); 6493 ITScope it_scope(this, &cond); 6494 vcvt(cond, dt1, dt2, rd, rm); 6495 } 6496 void Vcvt(DataType dt1, DataType dt2, DRegister rd, QRegister rm) { 6497 Vcvt(al, dt1, dt2, rd, rm); 6498 } 6499 6500 void Vcvt( 6501 Condition cond, DataType dt1, DataType dt2, QRegister rd, DRegister rm) { 6502 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6503 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6504 VIXL_ASSERT(allow_macro_instructions_); 6505 VIXL_ASSERT(OutsideITBlock()); 6506 MacroEmissionCheckScope guard(this); 6507 ITScope it_scope(this, &cond); 6508 vcvt(cond, dt1, dt2, rd, rm); 6509 } 6510 void Vcvt(DataType dt1, DataType dt2, QRegister rd, DRegister rm) { 6511 Vcvt(al, dt1, dt2, rd, rm); 6512 } 6513 6514 void Vcvt( 6515 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 6516 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6517 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6518 VIXL_ASSERT(allow_macro_instructions_); 6519 VIXL_ASSERT(OutsideITBlock()); 6520 MacroEmissionCheckScope guard(this); 6521 ITScope it_scope(this, &cond); 6522 vcvt(cond, dt1, dt2, rd, rm); 6523 } 6524 void Vcvt(DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 6525 Vcvt(al, dt1, dt2, rd, rm); 6526 } 6527 6528 void Vcvta(DataType dt1, DataType dt2, DRegister rd, DRegister rm) { 6529 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6530 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6531 VIXL_ASSERT(allow_macro_instructions_); 6532 VIXL_ASSERT(OutsideITBlock()); 6533 MacroEmissionCheckScope guard(this); 6534 vcvta(dt1, dt2, rd, rm); 6535 } 6536 6537 void Vcvta(DataType dt1, DataType dt2, QRegister rd, QRegister rm) { 6538 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6539 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6540 VIXL_ASSERT(allow_macro_instructions_); 6541 VIXL_ASSERT(OutsideITBlock()); 6542 MacroEmissionCheckScope guard(this); 6543 vcvta(dt1, dt2, rd, rm); 6544 } 6545 6546 void Vcvta(DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 6547 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6548 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6549 VIXL_ASSERT(allow_macro_instructions_); 6550 VIXL_ASSERT(OutsideITBlock()); 6551 MacroEmissionCheckScope guard(this); 6552 vcvta(dt1, dt2, rd, rm); 6553 } 6554 6555 void Vcvta(DataType dt1, DataType dt2, SRegister rd, DRegister rm) { 6556 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6557 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6558 VIXL_ASSERT(allow_macro_instructions_); 6559 VIXL_ASSERT(OutsideITBlock()); 6560 MacroEmissionCheckScope guard(this); 6561 vcvta(dt1, dt2, rd, rm); 6562 } 6563 6564 void Vcvtb( 6565 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 6566 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6567 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6568 VIXL_ASSERT(allow_macro_instructions_); 6569 VIXL_ASSERT(OutsideITBlock()); 6570 MacroEmissionCheckScope guard(this); 6571 ITScope it_scope(this, &cond); 6572 vcvtb(cond, dt1, dt2, rd, rm); 6573 } 6574 void Vcvtb(DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 6575 Vcvtb(al, dt1, dt2, rd, rm); 6576 } 6577 6578 void Vcvtb( 6579 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) { 6580 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6581 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6582 VIXL_ASSERT(allow_macro_instructions_); 6583 VIXL_ASSERT(OutsideITBlock()); 6584 MacroEmissionCheckScope guard(this); 6585 ITScope it_scope(this, &cond); 6586 vcvtb(cond, dt1, dt2, rd, rm); 6587 } 6588 void Vcvtb(DataType dt1, DataType dt2, DRegister rd, SRegister rm) { 6589 Vcvtb(al, dt1, dt2, rd, rm); 6590 } 6591 6592 void Vcvtb( 6593 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) { 6594 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6595 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6596 VIXL_ASSERT(allow_macro_instructions_); 6597 VIXL_ASSERT(OutsideITBlock()); 6598 MacroEmissionCheckScope guard(this); 6599 ITScope it_scope(this, &cond); 6600 vcvtb(cond, dt1, dt2, rd, rm); 6601 } 6602 void Vcvtb(DataType dt1, DataType dt2, SRegister rd, DRegister rm) { 6603 Vcvtb(al, dt1, dt2, rd, rm); 6604 } 6605 6606 void Vcvtm(DataType dt1, DataType dt2, DRegister rd, DRegister rm) { 6607 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6608 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6609 VIXL_ASSERT(allow_macro_instructions_); 6610 VIXL_ASSERT(OutsideITBlock()); 6611 MacroEmissionCheckScope guard(this); 6612 vcvtm(dt1, dt2, rd, rm); 6613 } 6614 6615 void Vcvtm(DataType dt1, DataType dt2, QRegister rd, QRegister rm) { 6616 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6617 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6618 VIXL_ASSERT(allow_macro_instructions_); 6619 VIXL_ASSERT(OutsideITBlock()); 6620 MacroEmissionCheckScope guard(this); 6621 vcvtm(dt1, dt2, rd, rm); 6622 } 6623 6624 void Vcvtm(DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 6625 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6626 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6627 VIXL_ASSERT(allow_macro_instructions_); 6628 VIXL_ASSERT(OutsideITBlock()); 6629 MacroEmissionCheckScope guard(this); 6630 vcvtm(dt1, dt2, rd, rm); 6631 } 6632 6633 void Vcvtm(DataType dt1, DataType dt2, SRegister rd, DRegister rm) { 6634 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6635 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6636 VIXL_ASSERT(allow_macro_instructions_); 6637 VIXL_ASSERT(OutsideITBlock()); 6638 MacroEmissionCheckScope guard(this); 6639 vcvtm(dt1, dt2, rd, rm); 6640 } 6641 6642 void Vcvtn(DataType dt1, DataType dt2, DRegister rd, DRegister rm) { 6643 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6644 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6645 VIXL_ASSERT(allow_macro_instructions_); 6646 VIXL_ASSERT(OutsideITBlock()); 6647 MacroEmissionCheckScope guard(this); 6648 vcvtn(dt1, dt2, rd, rm); 6649 } 6650 6651 void Vcvtn(DataType dt1, DataType dt2, QRegister rd, QRegister rm) { 6652 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6653 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6654 VIXL_ASSERT(allow_macro_instructions_); 6655 VIXL_ASSERT(OutsideITBlock()); 6656 MacroEmissionCheckScope guard(this); 6657 vcvtn(dt1, dt2, rd, rm); 6658 } 6659 6660 void Vcvtn(DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 6661 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6662 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6663 VIXL_ASSERT(allow_macro_instructions_); 6664 VIXL_ASSERT(OutsideITBlock()); 6665 MacroEmissionCheckScope guard(this); 6666 vcvtn(dt1, dt2, rd, rm); 6667 } 6668 6669 void Vcvtn(DataType dt1, DataType dt2, SRegister rd, DRegister rm) { 6670 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6671 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6672 VIXL_ASSERT(allow_macro_instructions_); 6673 VIXL_ASSERT(OutsideITBlock()); 6674 MacroEmissionCheckScope guard(this); 6675 vcvtn(dt1, dt2, rd, rm); 6676 } 6677 6678 void Vcvtp(DataType dt1, DataType dt2, DRegister rd, DRegister rm) { 6679 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6680 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6681 VIXL_ASSERT(allow_macro_instructions_); 6682 VIXL_ASSERT(OutsideITBlock()); 6683 MacroEmissionCheckScope guard(this); 6684 vcvtp(dt1, dt2, rd, rm); 6685 } 6686 6687 void Vcvtp(DataType dt1, DataType dt2, QRegister rd, QRegister rm) { 6688 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6689 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6690 VIXL_ASSERT(allow_macro_instructions_); 6691 VIXL_ASSERT(OutsideITBlock()); 6692 MacroEmissionCheckScope guard(this); 6693 vcvtp(dt1, dt2, rd, rm); 6694 } 6695 6696 void Vcvtp(DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 6697 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6698 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6699 VIXL_ASSERT(allow_macro_instructions_); 6700 VIXL_ASSERT(OutsideITBlock()); 6701 MacroEmissionCheckScope guard(this); 6702 vcvtp(dt1, dt2, rd, rm); 6703 } 6704 6705 void Vcvtp(DataType dt1, DataType dt2, SRegister rd, DRegister rm) { 6706 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6707 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6708 VIXL_ASSERT(allow_macro_instructions_); 6709 VIXL_ASSERT(OutsideITBlock()); 6710 MacroEmissionCheckScope guard(this); 6711 vcvtp(dt1, dt2, rd, rm); 6712 } 6713 6714 void Vcvtr( 6715 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 6716 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6717 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6718 VIXL_ASSERT(allow_macro_instructions_); 6719 VIXL_ASSERT(OutsideITBlock()); 6720 MacroEmissionCheckScope guard(this); 6721 ITScope it_scope(this, &cond); 6722 vcvtr(cond, dt1, dt2, rd, rm); 6723 } 6724 void Vcvtr(DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 6725 Vcvtr(al, dt1, dt2, rd, rm); 6726 } 6727 6728 void Vcvtr( 6729 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) { 6730 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6731 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6732 VIXL_ASSERT(allow_macro_instructions_); 6733 VIXL_ASSERT(OutsideITBlock()); 6734 MacroEmissionCheckScope guard(this); 6735 ITScope it_scope(this, &cond); 6736 vcvtr(cond, dt1, dt2, rd, rm); 6737 } 6738 void Vcvtr(DataType dt1, DataType dt2, SRegister rd, DRegister rm) { 6739 Vcvtr(al, dt1, dt2, rd, rm); 6740 } 6741 6742 void Vcvtt( 6743 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 6744 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6745 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6746 VIXL_ASSERT(allow_macro_instructions_); 6747 VIXL_ASSERT(OutsideITBlock()); 6748 MacroEmissionCheckScope guard(this); 6749 ITScope it_scope(this, &cond); 6750 vcvtt(cond, dt1, dt2, rd, rm); 6751 } 6752 void Vcvtt(DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 6753 Vcvtt(al, dt1, dt2, rd, rm); 6754 } 6755 6756 void Vcvtt( 6757 Condition cond, DataType dt1, DataType dt2, DRegister rd, SRegister rm) { 6758 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6759 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6760 VIXL_ASSERT(allow_macro_instructions_); 6761 VIXL_ASSERT(OutsideITBlock()); 6762 MacroEmissionCheckScope guard(this); 6763 ITScope it_scope(this, &cond); 6764 vcvtt(cond, dt1, dt2, rd, rm); 6765 } 6766 void Vcvtt(DataType dt1, DataType dt2, DRegister rd, SRegister rm) { 6767 Vcvtt(al, dt1, dt2, rd, rm); 6768 } 6769 6770 void Vcvtt( 6771 Condition cond, DataType dt1, DataType dt2, SRegister rd, DRegister rm) { 6772 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6773 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6774 VIXL_ASSERT(allow_macro_instructions_); 6775 VIXL_ASSERT(OutsideITBlock()); 6776 MacroEmissionCheckScope guard(this); 6777 ITScope it_scope(this, &cond); 6778 vcvtt(cond, dt1, dt2, rd, rm); 6779 } 6780 void Vcvtt(DataType dt1, DataType dt2, SRegister rd, DRegister rm) { 6781 Vcvtt(al, dt1, dt2, rd, rm); 6782 } 6783 6784 void Vdiv( 6785 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) { 6786 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6787 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 6788 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6789 VIXL_ASSERT(allow_macro_instructions_); 6790 VIXL_ASSERT(OutsideITBlock()); 6791 MacroEmissionCheckScope guard(this); 6792 ITScope it_scope(this, &cond); 6793 vdiv(cond, dt, rd, rn, rm); 6794 } 6795 void Vdiv(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 6796 Vdiv(al, dt, rd, rn, rm); 6797 } 6798 6799 void Vdiv( 6800 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 6801 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6802 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 6803 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6804 VIXL_ASSERT(allow_macro_instructions_); 6805 VIXL_ASSERT(OutsideITBlock()); 6806 MacroEmissionCheckScope guard(this); 6807 ITScope it_scope(this, &cond); 6808 vdiv(cond, dt, rd, rn, rm); 6809 } 6810 void Vdiv(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 6811 Vdiv(al, dt, rd, rn, rm); 6812 } 6813 6814 void Vdup(Condition cond, DataType dt, QRegister rd, Register rt) { 6815 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6816 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 6817 VIXL_ASSERT(allow_macro_instructions_); 6818 VIXL_ASSERT(OutsideITBlock()); 6819 MacroEmissionCheckScope guard(this); 6820 ITScope it_scope(this, &cond); 6821 vdup(cond, dt, rd, rt); 6822 } 6823 void Vdup(DataType dt, QRegister rd, Register rt) { Vdup(al, dt, rd, rt); } 6824 6825 void Vdup(Condition cond, DataType dt, DRegister rd, Register rt) { 6826 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6827 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 6828 VIXL_ASSERT(allow_macro_instructions_); 6829 VIXL_ASSERT(OutsideITBlock()); 6830 MacroEmissionCheckScope guard(this); 6831 ITScope it_scope(this, &cond); 6832 vdup(cond, dt, rd, rt); 6833 } 6834 void Vdup(DataType dt, DRegister rd, Register rt) { Vdup(al, dt, rd, rt); } 6835 6836 void Vdup(Condition cond, DataType dt, DRegister rd, DRegisterLane rm) { 6837 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6838 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6839 VIXL_ASSERT(allow_macro_instructions_); 6840 VIXL_ASSERT(OutsideITBlock()); 6841 MacroEmissionCheckScope guard(this); 6842 ITScope it_scope(this, &cond); 6843 vdup(cond, dt, rd, rm); 6844 } 6845 void Vdup(DataType dt, DRegister rd, DRegisterLane rm) { 6846 Vdup(al, dt, rd, rm); 6847 } 6848 6849 void Vdup(Condition cond, DataType dt, QRegister rd, DRegisterLane rm) { 6850 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6851 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6852 VIXL_ASSERT(allow_macro_instructions_); 6853 VIXL_ASSERT(OutsideITBlock()); 6854 MacroEmissionCheckScope guard(this); 6855 ITScope it_scope(this, &cond); 6856 vdup(cond, dt, rd, rm); 6857 } 6858 void Vdup(DataType dt, QRegister rd, DRegisterLane rm) { 6859 Vdup(al, dt, rd, rm); 6860 } 6861 6862 void Veor( 6863 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 6864 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6865 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 6866 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6867 VIXL_ASSERT(allow_macro_instructions_); 6868 VIXL_ASSERT(OutsideITBlock()); 6869 MacroEmissionCheckScope guard(this); 6870 ITScope it_scope(this, &cond); 6871 veor(cond, dt, rd, rn, rm); 6872 } 6873 void Veor(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 6874 Veor(al, dt, rd, rn, rm); 6875 } 6876 void Veor(Condition cond, DRegister rd, DRegister rn, DRegister rm) { 6877 Veor(cond, kDataTypeValueNone, rd, rn, rm); 6878 } 6879 void Veor(DRegister rd, DRegister rn, DRegister rm) { 6880 Veor(al, kDataTypeValueNone, rd, rn, rm); 6881 } 6882 6883 void Veor( 6884 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 6885 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6886 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 6887 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6888 VIXL_ASSERT(allow_macro_instructions_); 6889 VIXL_ASSERT(OutsideITBlock()); 6890 MacroEmissionCheckScope guard(this); 6891 ITScope it_scope(this, &cond); 6892 veor(cond, dt, rd, rn, rm); 6893 } 6894 void Veor(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 6895 Veor(al, dt, rd, rn, rm); 6896 } 6897 void Veor(Condition cond, QRegister rd, QRegister rn, QRegister rm) { 6898 Veor(cond, kDataTypeValueNone, rd, rn, rm); 6899 } 6900 void Veor(QRegister rd, QRegister rn, QRegister rm) { 6901 Veor(al, kDataTypeValueNone, rd, rn, rm); 6902 } 6903 6904 void Vext(Condition cond, 6905 DataType dt, 6906 DRegister rd, 6907 DRegister rn, 6908 DRegister rm, 6909 const DOperand& operand) { 6910 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6911 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 6912 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6913 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 6914 VIXL_ASSERT(allow_macro_instructions_); 6915 VIXL_ASSERT(OutsideITBlock()); 6916 MacroEmissionCheckScope guard(this); 6917 ITScope it_scope(this, &cond); 6918 vext(cond, dt, rd, rn, rm, operand); 6919 } 6920 void Vext(DataType dt, 6921 DRegister rd, 6922 DRegister rn, 6923 DRegister rm, 6924 const DOperand& operand) { 6925 Vext(al, dt, rd, rn, rm, operand); 6926 } 6927 6928 void Vext(Condition cond, 6929 DataType dt, 6930 QRegister rd, 6931 QRegister rn, 6932 QRegister rm, 6933 const QOperand& operand) { 6934 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6935 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 6936 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6937 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 6938 VIXL_ASSERT(allow_macro_instructions_); 6939 VIXL_ASSERT(OutsideITBlock()); 6940 MacroEmissionCheckScope guard(this); 6941 ITScope it_scope(this, &cond); 6942 vext(cond, dt, rd, rn, rm, operand); 6943 } 6944 void Vext(DataType dt, 6945 QRegister rd, 6946 QRegister rn, 6947 QRegister rm, 6948 const QOperand& operand) { 6949 Vext(al, dt, rd, rn, rm, operand); 6950 } 6951 6952 void Vfma( 6953 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 6954 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6955 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 6956 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6957 VIXL_ASSERT(allow_macro_instructions_); 6958 VIXL_ASSERT(OutsideITBlock()); 6959 MacroEmissionCheckScope guard(this); 6960 ITScope it_scope(this, &cond); 6961 vfma(cond, dt, rd, rn, rm); 6962 } 6963 void Vfma(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 6964 Vfma(al, dt, rd, rn, rm); 6965 } 6966 6967 void Vfma( 6968 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 6969 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6970 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 6971 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6972 VIXL_ASSERT(allow_macro_instructions_); 6973 VIXL_ASSERT(OutsideITBlock()); 6974 MacroEmissionCheckScope guard(this); 6975 ITScope it_scope(this, &cond); 6976 vfma(cond, dt, rd, rn, rm); 6977 } 6978 void Vfma(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 6979 Vfma(al, dt, rd, rn, rm); 6980 } 6981 6982 void Vfma( 6983 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) { 6984 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 6985 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 6986 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 6987 VIXL_ASSERT(allow_macro_instructions_); 6988 VIXL_ASSERT(OutsideITBlock()); 6989 MacroEmissionCheckScope guard(this); 6990 ITScope it_scope(this, &cond); 6991 vfma(cond, dt, rd, rn, rm); 6992 } 6993 void Vfma(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 6994 Vfma(al, dt, rd, rn, rm); 6995 } 6996 6997 void Vfms( 6998 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 6999 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7000 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7001 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7002 VIXL_ASSERT(allow_macro_instructions_); 7003 VIXL_ASSERT(OutsideITBlock()); 7004 MacroEmissionCheckScope guard(this); 7005 ITScope it_scope(this, &cond); 7006 vfms(cond, dt, rd, rn, rm); 7007 } 7008 void Vfms(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7009 Vfms(al, dt, rd, rn, rm); 7010 } 7011 7012 void Vfms( 7013 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 7014 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7015 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7016 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7017 VIXL_ASSERT(allow_macro_instructions_); 7018 VIXL_ASSERT(OutsideITBlock()); 7019 MacroEmissionCheckScope guard(this); 7020 ITScope it_scope(this, &cond); 7021 vfms(cond, dt, rd, rn, rm); 7022 } 7023 void Vfms(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 7024 Vfms(al, dt, rd, rn, rm); 7025 } 7026 7027 void Vfms( 7028 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) { 7029 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7030 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7031 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7032 VIXL_ASSERT(allow_macro_instructions_); 7033 VIXL_ASSERT(OutsideITBlock()); 7034 MacroEmissionCheckScope guard(this); 7035 ITScope it_scope(this, &cond); 7036 vfms(cond, dt, rd, rn, rm); 7037 } 7038 void Vfms(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 7039 Vfms(al, dt, rd, rn, rm); 7040 } 7041 7042 void Vfnma( 7043 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) { 7044 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7045 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7046 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7047 VIXL_ASSERT(allow_macro_instructions_); 7048 VIXL_ASSERT(OutsideITBlock()); 7049 MacroEmissionCheckScope guard(this); 7050 ITScope it_scope(this, &cond); 7051 vfnma(cond, dt, rd, rn, rm); 7052 } 7053 void Vfnma(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 7054 Vfnma(al, dt, rd, rn, rm); 7055 } 7056 7057 void Vfnma( 7058 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7059 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7060 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7061 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7062 VIXL_ASSERT(allow_macro_instructions_); 7063 VIXL_ASSERT(OutsideITBlock()); 7064 MacroEmissionCheckScope guard(this); 7065 ITScope it_scope(this, &cond); 7066 vfnma(cond, dt, rd, rn, rm); 7067 } 7068 void Vfnma(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7069 Vfnma(al, dt, rd, rn, rm); 7070 } 7071 7072 void Vfnms( 7073 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) { 7074 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7075 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7076 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7077 VIXL_ASSERT(allow_macro_instructions_); 7078 VIXL_ASSERT(OutsideITBlock()); 7079 MacroEmissionCheckScope guard(this); 7080 ITScope it_scope(this, &cond); 7081 vfnms(cond, dt, rd, rn, rm); 7082 } 7083 void Vfnms(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 7084 Vfnms(al, dt, rd, rn, rm); 7085 } 7086 7087 void Vfnms( 7088 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7089 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7090 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7091 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7092 VIXL_ASSERT(allow_macro_instructions_); 7093 VIXL_ASSERT(OutsideITBlock()); 7094 MacroEmissionCheckScope guard(this); 7095 ITScope it_scope(this, &cond); 7096 vfnms(cond, dt, rd, rn, rm); 7097 } 7098 void Vfnms(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7099 Vfnms(al, dt, rd, rn, rm); 7100 } 7101 7102 void Vhadd( 7103 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7104 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7105 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7106 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7107 VIXL_ASSERT(allow_macro_instructions_); 7108 VIXL_ASSERT(OutsideITBlock()); 7109 MacroEmissionCheckScope guard(this); 7110 ITScope it_scope(this, &cond); 7111 vhadd(cond, dt, rd, rn, rm); 7112 } 7113 void Vhadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7114 Vhadd(al, dt, rd, rn, rm); 7115 } 7116 7117 void Vhadd( 7118 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 7119 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7120 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7121 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7122 VIXL_ASSERT(allow_macro_instructions_); 7123 VIXL_ASSERT(OutsideITBlock()); 7124 MacroEmissionCheckScope guard(this); 7125 ITScope it_scope(this, &cond); 7126 vhadd(cond, dt, rd, rn, rm); 7127 } 7128 void Vhadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 7129 Vhadd(al, dt, rd, rn, rm); 7130 } 7131 7132 void Vhsub( 7133 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7134 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7135 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7136 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7137 VIXL_ASSERT(allow_macro_instructions_); 7138 VIXL_ASSERT(OutsideITBlock()); 7139 MacroEmissionCheckScope guard(this); 7140 ITScope it_scope(this, &cond); 7141 vhsub(cond, dt, rd, rn, rm); 7142 } 7143 void Vhsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7144 Vhsub(al, dt, rd, rn, rm); 7145 } 7146 7147 void Vhsub( 7148 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 7149 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7150 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7151 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7152 VIXL_ASSERT(allow_macro_instructions_); 7153 VIXL_ASSERT(OutsideITBlock()); 7154 MacroEmissionCheckScope guard(this); 7155 ITScope it_scope(this, &cond); 7156 vhsub(cond, dt, rd, rn, rm); 7157 } 7158 void Vhsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 7159 Vhsub(al, dt, rd, rn, rm); 7160 } 7161 7162 void Vld1(Condition cond, 7163 DataType dt, 7164 const NeonRegisterList& nreglist, 7165 const AlignedMemOperand& operand) { 7166 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist)); 7167 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 7168 VIXL_ASSERT(allow_macro_instructions_); 7169 VIXL_ASSERT(OutsideITBlock()); 7170 MacroEmissionCheckScope guard(this); 7171 ITScope it_scope(this, &cond); 7172 vld1(cond, dt, nreglist, operand); 7173 } 7174 void Vld1(DataType dt, 7175 const NeonRegisterList& nreglist, 7176 const AlignedMemOperand& operand) { 7177 Vld1(al, dt, nreglist, operand); 7178 } 7179 7180 void Vld2(Condition cond, 7181 DataType dt, 7182 const NeonRegisterList& nreglist, 7183 const AlignedMemOperand& operand) { 7184 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist)); 7185 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 7186 VIXL_ASSERT(allow_macro_instructions_); 7187 VIXL_ASSERT(OutsideITBlock()); 7188 MacroEmissionCheckScope guard(this); 7189 ITScope it_scope(this, &cond); 7190 vld2(cond, dt, nreglist, operand); 7191 } 7192 void Vld2(DataType dt, 7193 const NeonRegisterList& nreglist, 7194 const AlignedMemOperand& operand) { 7195 Vld2(al, dt, nreglist, operand); 7196 } 7197 7198 void Vld3(Condition cond, 7199 DataType dt, 7200 const NeonRegisterList& nreglist, 7201 const AlignedMemOperand& operand) { 7202 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist)); 7203 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 7204 VIXL_ASSERT(allow_macro_instructions_); 7205 VIXL_ASSERT(OutsideITBlock()); 7206 MacroEmissionCheckScope guard(this); 7207 ITScope it_scope(this, &cond); 7208 vld3(cond, dt, nreglist, operand); 7209 } 7210 void Vld3(DataType dt, 7211 const NeonRegisterList& nreglist, 7212 const AlignedMemOperand& operand) { 7213 Vld3(al, dt, nreglist, operand); 7214 } 7215 7216 void Vld3(Condition cond, 7217 DataType dt, 7218 const NeonRegisterList& nreglist, 7219 const MemOperand& operand) { 7220 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist)); 7221 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 7222 VIXL_ASSERT(allow_macro_instructions_); 7223 VIXL_ASSERT(OutsideITBlock()); 7224 MacroEmissionCheckScope guard(this); 7225 ITScope it_scope(this, &cond); 7226 vld3(cond, dt, nreglist, operand); 7227 } 7228 void Vld3(DataType dt, 7229 const NeonRegisterList& nreglist, 7230 const MemOperand& operand) { 7231 Vld3(al, dt, nreglist, operand); 7232 } 7233 7234 void Vld4(Condition cond, 7235 DataType dt, 7236 const NeonRegisterList& nreglist, 7237 const AlignedMemOperand& operand) { 7238 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist)); 7239 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 7240 VIXL_ASSERT(allow_macro_instructions_); 7241 VIXL_ASSERT(OutsideITBlock()); 7242 MacroEmissionCheckScope guard(this); 7243 ITScope it_scope(this, &cond); 7244 vld4(cond, dt, nreglist, operand); 7245 } 7246 void Vld4(DataType dt, 7247 const NeonRegisterList& nreglist, 7248 const AlignedMemOperand& operand) { 7249 Vld4(al, dt, nreglist, operand); 7250 } 7251 7252 void Vldm(Condition cond, 7253 DataType dt, 7254 Register rn, 7255 WriteBack write_back, 7256 DRegisterList dreglist) { 7257 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7258 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); 7259 VIXL_ASSERT(allow_macro_instructions_); 7260 VIXL_ASSERT(OutsideITBlock()); 7261 MacroEmissionCheckScope guard(this); 7262 ITScope it_scope(this, &cond); 7263 vldm(cond, dt, rn, write_back, dreglist); 7264 } 7265 void Vldm(DataType dt, 7266 Register rn, 7267 WriteBack write_back, 7268 DRegisterList dreglist) { 7269 Vldm(al, dt, rn, write_back, dreglist); 7270 } 7271 void Vldm(Condition cond, 7272 Register rn, 7273 WriteBack write_back, 7274 DRegisterList dreglist) { 7275 Vldm(cond, kDataTypeValueNone, rn, write_back, dreglist); 7276 } 7277 void Vldm(Register rn, WriteBack write_back, DRegisterList dreglist) { 7278 Vldm(al, kDataTypeValueNone, rn, write_back, dreglist); 7279 } 7280 7281 void Vldm(Condition cond, 7282 DataType dt, 7283 Register rn, 7284 WriteBack write_back, 7285 SRegisterList sreglist) { 7286 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7287 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist)); 7288 VIXL_ASSERT(allow_macro_instructions_); 7289 VIXL_ASSERT(OutsideITBlock()); 7290 MacroEmissionCheckScope guard(this); 7291 ITScope it_scope(this, &cond); 7292 vldm(cond, dt, rn, write_back, sreglist); 7293 } 7294 void Vldm(DataType dt, 7295 Register rn, 7296 WriteBack write_back, 7297 SRegisterList sreglist) { 7298 Vldm(al, dt, rn, write_back, sreglist); 7299 } 7300 void Vldm(Condition cond, 7301 Register rn, 7302 WriteBack write_back, 7303 SRegisterList sreglist) { 7304 Vldm(cond, kDataTypeValueNone, rn, write_back, sreglist); 7305 } 7306 void Vldm(Register rn, WriteBack write_back, SRegisterList sreglist) { 7307 Vldm(al, kDataTypeValueNone, rn, write_back, sreglist); 7308 } 7309 7310 void Vldmdb(Condition cond, 7311 DataType dt, 7312 Register rn, 7313 WriteBack write_back, 7314 DRegisterList dreglist) { 7315 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7316 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); 7317 VIXL_ASSERT(allow_macro_instructions_); 7318 VIXL_ASSERT(OutsideITBlock()); 7319 MacroEmissionCheckScope guard(this); 7320 ITScope it_scope(this, &cond); 7321 vldmdb(cond, dt, rn, write_back, dreglist); 7322 } 7323 void Vldmdb(DataType dt, 7324 Register rn, 7325 WriteBack write_back, 7326 DRegisterList dreglist) { 7327 Vldmdb(al, dt, rn, write_back, dreglist); 7328 } 7329 void Vldmdb(Condition cond, 7330 Register rn, 7331 WriteBack write_back, 7332 DRegisterList dreglist) { 7333 Vldmdb(cond, kDataTypeValueNone, rn, write_back, dreglist); 7334 } 7335 void Vldmdb(Register rn, WriteBack write_back, DRegisterList dreglist) { 7336 Vldmdb(al, kDataTypeValueNone, rn, write_back, dreglist); 7337 } 7338 7339 void Vldmdb(Condition cond, 7340 DataType dt, 7341 Register rn, 7342 WriteBack write_back, 7343 SRegisterList sreglist) { 7344 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7345 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist)); 7346 VIXL_ASSERT(allow_macro_instructions_); 7347 VIXL_ASSERT(OutsideITBlock()); 7348 MacroEmissionCheckScope guard(this); 7349 ITScope it_scope(this, &cond); 7350 vldmdb(cond, dt, rn, write_back, sreglist); 7351 } 7352 void Vldmdb(DataType dt, 7353 Register rn, 7354 WriteBack write_back, 7355 SRegisterList sreglist) { 7356 Vldmdb(al, dt, rn, write_back, sreglist); 7357 } 7358 void Vldmdb(Condition cond, 7359 Register rn, 7360 WriteBack write_back, 7361 SRegisterList sreglist) { 7362 Vldmdb(cond, kDataTypeValueNone, rn, write_back, sreglist); 7363 } 7364 void Vldmdb(Register rn, WriteBack write_back, SRegisterList sreglist) { 7365 Vldmdb(al, kDataTypeValueNone, rn, write_back, sreglist); 7366 } 7367 7368 void Vldmia(Condition cond, 7369 DataType dt, 7370 Register rn, 7371 WriteBack write_back, 7372 DRegisterList dreglist) { 7373 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7374 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); 7375 VIXL_ASSERT(allow_macro_instructions_); 7376 VIXL_ASSERT(OutsideITBlock()); 7377 MacroEmissionCheckScope guard(this); 7378 ITScope it_scope(this, &cond); 7379 vldmia(cond, dt, rn, write_back, dreglist); 7380 } 7381 void Vldmia(DataType dt, 7382 Register rn, 7383 WriteBack write_back, 7384 DRegisterList dreglist) { 7385 Vldmia(al, dt, rn, write_back, dreglist); 7386 } 7387 void Vldmia(Condition cond, 7388 Register rn, 7389 WriteBack write_back, 7390 DRegisterList dreglist) { 7391 Vldmia(cond, kDataTypeValueNone, rn, write_back, dreglist); 7392 } 7393 void Vldmia(Register rn, WriteBack write_back, DRegisterList dreglist) { 7394 Vldmia(al, kDataTypeValueNone, rn, write_back, dreglist); 7395 } 7396 7397 void Vldmia(Condition cond, 7398 DataType dt, 7399 Register rn, 7400 WriteBack write_back, 7401 SRegisterList sreglist) { 7402 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7403 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist)); 7404 VIXL_ASSERT(allow_macro_instructions_); 7405 VIXL_ASSERT(OutsideITBlock()); 7406 MacroEmissionCheckScope guard(this); 7407 ITScope it_scope(this, &cond); 7408 vldmia(cond, dt, rn, write_back, sreglist); 7409 } 7410 void Vldmia(DataType dt, 7411 Register rn, 7412 WriteBack write_back, 7413 SRegisterList sreglist) { 7414 Vldmia(al, dt, rn, write_back, sreglist); 7415 } 7416 void Vldmia(Condition cond, 7417 Register rn, 7418 WriteBack write_back, 7419 SRegisterList sreglist) { 7420 Vldmia(cond, kDataTypeValueNone, rn, write_back, sreglist); 7421 } 7422 void Vldmia(Register rn, WriteBack write_back, SRegisterList sreglist) { 7423 Vldmia(al, kDataTypeValueNone, rn, write_back, sreglist); 7424 } 7425 7426 7427 void Vldr(Condition cond, 7428 DataType dt, 7429 DRegister rd, 7430 const MemOperand& operand) { 7431 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7432 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 7433 VIXL_ASSERT(allow_macro_instructions_); 7434 VIXL_ASSERT(OutsideITBlock()); 7435 MacroEmissionCheckScope guard(this); 7436 ITScope it_scope(this, &cond); 7437 vldr(cond, dt, rd, operand); 7438 } 7439 void Vldr(DataType dt, DRegister rd, const MemOperand& operand) { 7440 Vldr(al, dt, rd, operand); 7441 } 7442 void Vldr(Condition cond, DRegister rd, const MemOperand& operand) { 7443 Vldr(cond, Untyped64, rd, operand); 7444 } 7445 void Vldr(DRegister rd, const MemOperand& operand) { 7446 Vldr(al, Untyped64, rd, operand); 7447 } 7448 7449 7450 void Vldr(Condition cond, 7451 DataType dt, 7452 SRegister rd, 7453 const MemOperand& operand) { 7454 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7455 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 7456 VIXL_ASSERT(allow_macro_instructions_); 7457 VIXL_ASSERT(OutsideITBlock()); 7458 MacroEmissionCheckScope guard(this); 7459 ITScope it_scope(this, &cond); 7460 vldr(cond, dt, rd, operand); 7461 } 7462 void Vldr(DataType dt, SRegister rd, const MemOperand& operand) { 7463 Vldr(al, dt, rd, operand); 7464 } 7465 void Vldr(Condition cond, SRegister rd, const MemOperand& operand) { 7466 Vldr(cond, Untyped32, rd, operand); 7467 } 7468 void Vldr(SRegister rd, const MemOperand& operand) { 7469 Vldr(al, Untyped32, rd, operand); 7470 } 7471 7472 void Vmax( 7473 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7474 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7475 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7476 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7477 VIXL_ASSERT(allow_macro_instructions_); 7478 VIXL_ASSERT(OutsideITBlock()); 7479 MacroEmissionCheckScope guard(this); 7480 ITScope it_scope(this, &cond); 7481 vmax(cond, dt, rd, rn, rm); 7482 } 7483 void Vmax(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7484 Vmax(al, dt, rd, rn, rm); 7485 } 7486 7487 void Vmax( 7488 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 7489 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7490 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7491 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7492 VIXL_ASSERT(allow_macro_instructions_); 7493 VIXL_ASSERT(OutsideITBlock()); 7494 MacroEmissionCheckScope guard(this); 7495 ITScope it_scope(this, &cond); 7496 vmax(cond, dt, rd, rn, rm); 7497 } 7498 void Vmax(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 7499 Vmax(al, dt, rd, rn, rm); 7500 } 7501 7502 void Vmaxnm(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7503 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7504 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7505 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7506 VIXL_ASSERT(allow_macro_instructions_); 7507 VIXL_ASSERT(OutsideITBlock()); 7508 MacroEmissionCheckScope guard(this); 7509 vmaxnm(dt, rd, rn, rm); 7510 } 7511 7512 void Vmaxnm(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 7513 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7514 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7515 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7516 VIXL_ASSERT(allow_macro_instructions_); 7517 VIXL_ASSERT(OutsideITBlock()); 7518 MacroEmissionCheckScope guard(this); 7519 vmaxnm(dt, rd, rn, rm); 7520 } 7521 7522 void Vmaxnm(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 7523 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7524 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7525 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7526 VIXL_ASSERT(allow_macro_instructions_); 7527 VIXL_ASSERT(OutsideITBlock()); 7528 MacroEmissionCheckScope guard(this); 7529 vmaxnm(dt, rd, rn, rm); 7530 } 7531 7532 void Vmin( 7533 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7534 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7535 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7536 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7537 VIXL_ASSERT(allow_macro_instructions_); 7538 VIXL_ASSERT(OutsideITBlock()); 7539 MacroEmissionCheckScope guard(this); 7540 ITScope it_scope(this, &cond); 7541 vmin(cond, dt, rd, rn, rm); 7542 } 7543 void Vmin(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7544 Vmin(al, dt, rd, rn, rm); 7545 } 7546 7547 void Vmin( 7548 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 7549 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7550 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7551 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7552 VIXL_ASSERT(allow_macro_instructions_); 7553 VIXL_ASSERT(OutsideITBlock()); 7554 MacroEmissionCheckScope guard(this); 7555 ITScope it_scope(this, &cond); 7556 vmin(cond, dt, rd, rn, rm); 7557 } 7558 void Vmin(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 7559 Vmin(al, dt, rd, rn, rm); 7560 } 7561 7562 void Vminnm(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7563 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7564 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7565 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7566 VIXL_ASSERT(allow_macro_instructions_); 7567 VIXL_ASSERT(OutsideITBlock()); 7568 MacroEmissionCheckScope guard(this); 7569 vminnm(dt, rd, rn, rm); 7570 } 7571 7572 void Vminnm(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 7573 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7574 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7575 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7576 VIXL_ASSERT(allow_macro_instructions_); 7577 VIXL_ASSERT(OutsideITBlock()); 7578 MacroEmissionCheckScope guard(this); 7579 vminnm(dt, rd, rn, rm); 7580 } 7581 7582 void Vminnm(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 7583 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7584 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7585 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7586 VIXL_ASSERT(allow_macro_instructions_); 7587 VIXL_ASSERT(OutsideITBlock()); 7588 MacroEmissionCheckScope guard(this); 7589 vminnm(dt, rd, rn, rm); 7590 } 7591 7592 void Vmla(Condition cond, 7593 DataType dt, 7594 DRegister rd, 7595 DRegister rn, 7596 DRegisterLane rm) { 7597 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7598 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7599 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7600 VIXL_ASSERT(allow_macro_instructions_); 7601 VIXL_ASSERT(OutsideITBlock()); 7602 MacroEmissionCheckScope guard(this); 7603 ITScope it_scope(this, &cond); 7604 vmla(cond, dt, rd, rn, rm); 7605 } 7606 void Vmla(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) { 7607 Vmla(al, dt, rd, rn, rm); 7608 } 7609 7610 void Vmla(Condition cond, 7611 DataType dt, 7612 QRegister rd, 7613 QRegister rn, 7614 DRegisterLane rm) { 7615 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7616 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7617 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7618 VIXL_ASSERT(allow_macro_instructions_); 7619 VIXL_ASSERT(OutsideITBlock()); 7620 MacroEmissionCheckScope guard(this); 7621 ITScope it_scope(this, &cond); 7622 vmla(cond, dt, rd, rn, rm); 7623 } 7624 void Vmla(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) { 7625 Vmla(al, dt, rd, rn, rm); 7626 } 7627 7628 void Vmla( 7629 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7630 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7631 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7632 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7633 VIXL_ASSERT(allow_macro_instructions_); 7634 VIXL_ASSERT(OutsideITBlock()); 7635 MacroEmissionCheckScope guard(this); 7636 ITScope it_scope(this, &cond); 7637 vmla(cond, dt, rd, rn, rm); 7638 } 7639 void Vmla(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7640 Vmla(al, dt, rd, rn, rm); 7641 } 7642 7643 void Vmla( 7644 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 7645 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7646 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7647 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7648 VIXL_ASSERT(allow_macro_instructions_); 7649 VIXL_ASSERT(OutsideITBlock()); 7650 MacroEmissionCheckScope guard(this); 7651 ITScope it_scope(this, &cond); 7652 vmla(cond, dt, rd, rn, rm); 7653 } 7654 void Vmla(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 7655 Vmla(al, dt, rd, rn, rm); 7656 } 7657 7658 void Vmla( 7659 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) { 7660 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7661 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7662 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7663 VIXL_ASSERT(allow_macro_instructions_); 7664 VIXL_ASSERT(OutsideITBlock()); 7665 MacroEmissionCheckScope guard(this); 7666 ITScope it_scope(this, &cond); 7667 vmla(cond, dt, rd, rn, rm); 7668 } 7669 void Vmla(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 7670 Vmla(al, dt, rd, rn, rm); 7671 } 7672 7673 void Vmlal(Condition cond, 7674 DataType dt, 7675 QRegister rd, 7676 DRegister rn, 7677 DRegisterLane rm) { 7678 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7679 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7680 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7681 VIXL_ASSERT(allow_macro_instructions_); 7682 VIXL_ASSERT(OutsideITBlock()); 7683 MacroEmissionCheckScope guard(this); 7684 ITScope it_scope(this, &cond); 7685 vmlal(cond, dt, rd, rn, rm); 7686 } 7687 void Vmlal(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) { 7688 Vmlal(al, dt, rd, rn, rm); 7689 } 7690 7691 void Vmlal( 7692 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) { 7693 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7694 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7696 VIXL_ASSERT(allow_macro_instructions_); 7697 VIXL_ASSERT(OutsideITBlock()); 7698 MacroEmissionCheckScope guard(this); 7699 ITScope it_scope(this, &cond); 7700 vmlal(cond, dt, rd, rn, rm); 7701 } 7702 void Vmlal(DataType dt, QRegister rd, DRegister rn, DRegister rm) { 7703 Vmlal(al, dt, rd, rn, rm); 7704 } 7705 7706 void Vmls(Condition cond, 7707 DataType dt, 7708 DRegister rd, 7709 DRegister rn, 7710 DRegisterLane rm) { 7711 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7712 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7713 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7714 VIXL_ASSERT(allow_macro_instructions_); 7715 VIXL_ASSERT(OutsideITBlock()); 7716 MacroEmissionCheckScope guard(this); 7717 ITScope it_scope(this, &cond); 7718 vmls(cond, dt, rd, rn, rm); 7719 } 7720 void Vmls(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) { 7721 Vmls(al, dt, rd, rn, rm); 7722 } 7723 7724 void Vmls(Condition cond, 7725 DataType dt, 7726 QRegister rd, 7727 QRegister rn, 7728 DRegisterLane rm) { 7729 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7730 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7731 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7732 VIXL_ASSERT(allow_macro_instructions_); 7733 VIXL_ASSERT(OutsideITBlock()); 7734 MacroEmissionCheckScope guard(this); 7735 ITScope it_scope(this, &cond); 7736 vmls(cond, dt, rd, rn, rm); 7737 } 7738 void Vmls(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) { 7739 Vmls(al, dt, rd, rn, rm); 7740 } 7741 7742 void Vmls( 7743 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7744 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7745 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7746 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7747 VIXL_ASSERT(allow_macro_instructions_); 7748 VIXL_ASSERT(OutsideITBlock()); 7749 MacroEmissionCheckScope guard(this); 7750 ITScope it_scope(this, &cond); 7751 vmls(cond, dt, rd, rn, rm); 7752 } 7753 void Vmls(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 7754 Vmls(al, dt, rd, rn, rm); 7755 } 7756 7757 void Vmls( 7758 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 7759 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7760 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7761 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7762 VIXL_ASSERT(allow_macro_instructions_); 7763 VIXL_ASSERT(OutsideITBlock()); 7764 MacroEmissionCheckScope guard(this); 7765 ITScope it_scope(this, &cond); 7766 vmls(cond, dt, rd, rn, rm); 7767 } 7768 void Vmls(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 7769 Vmls(al, dt, rd, rn, rm); 7770 } 7771 7772 void Vmls( 7773 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) { 7774 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7775 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7776 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7777 VIXL_ASSERT(allow_macro_instructions_); 7778 VIXL_ASSERT(OutsideITBlock()); 7779 MacroEmissionCheckScope guard(this); 7780 ITScope it_scope(this, &cond); 7781 vmls(cond, dt, rd, rn, rm); 7782 } 7783 void Vmls(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 7784 Vmls(al, dt, rd, rn, rm); 7785 } 7786 7787 void Vmlsl(Condition cond, 7788 DataType dt, 7789 QRegister rd, 7790 DRegister rn, 7791 DRegisterLane rm) { 7792 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7793 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7794 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7795 VIXL_ASSERT(allow_macro_instructions_); 7796 VIXL_ASSERT(OutsideITBlock()); 7797 MacroEmissionCheckScope guard(this); 7798 ITScope it_scope(this, &cond); 7799 vmlsl(cond, dt, rd, rn, rm); 7800 } 7801 void Vmlsl(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) { 7802 Vmlsl(al, dt, rd, rn, rm); 7803 } 7804 7805 void Vmlsl( 7806 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) { 7807 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7808 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7809 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7810 VIXL_ASSERT(allow_macro_instructions_); 7811 VIXL_ASSERT(OutsideITBlock()); 7812 MacroEmissionCheckScope guard(this); 7813 ITScope it_scope(this, &cond); 7814 vmlsl(cond, dt, rd, rn, rm); 7815 } 7816 void Vmlsl(DataType dt, QRegister rd, DRegister rn, DRegister rm) { 7817 Vmlsl(al, dt, rd, rn, rm); 7818 } 7819 7820 void Vmov(Condition cond, Register rt, SRegister rn) { 7821 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 7822 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7823 VIXL_ASSERT(allow_macro_instructions_); 7824 VIXL_ASSERT(OutsideITBlock()); 7825 MacroEmissionCheckScope guard(this); 7826 ITScope it_scope(this, &cond); 7827 vmov(cond, rt, rn); 7828 } 7829 void Vmov(Register rt, SRegister rn) { Vmov(al, rt, rn); } 7830 7831 void Vmov(Condition cond, SRegister rn, Register rt) { 7832 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7833 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 7834 VIXL_ASSERT(allow_macro_instructions_); 7835 VIXL_ASSERT(OutsideITBlock()); 7836 MacroEmissionCheckScope guard(this); 7837 ITScope it_scope(this, &cond); 7838 vmov(cond, rn, rt); 7839 } 7840 void Vmov(SRegister rn, Register rt) { Vmov(al, rn, rt); } 7841 7842 void Vmov(Condition cond, Register rt, Register rt2, DRegister rm) { 7843 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 7844 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); 7845 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7846 VIXL_ASSERT(allow_macro_instructions_); 7847 VIXL_ASSERT(OutsideITBlock()); 7848 MacroEmissionCheckScope guard(this); 7849 ITScope it_scope(this, &cond); 7850 vmov(cond, rt, rt2, rm); 7851 } 7852 void Vmov(Register rt, Register rt2, DRegister rm) { Vmov(al, rt, rt2, rm); } 7853 7854 void Vmov(Condition cond, DRegister rm, Register rt, Register rt2) { 7855 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7856 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 7857 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); 7858 VIXL_ASSERT(allow_macro_instructions_); 7859 VIXL_ASSERT(OutsideITBlock()); 7860 MacroEmissionCheckScope guard(this); 7861 ITScope it_scope(this, &cond); 7862 vmov(cond, rm, rt, rt2); 7863 } 7864 void Vmov(DRegister rm, Register rt, Register rt2) { Vmov(al, rm, rt, rt2); } 7865 7866 void Vmov( 7867 Condition cond, Register rt, Register rt2, SRegister rm, SRegister rm1) { 7868 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 7869 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); 7870 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7871 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm1)); 7872 VIXL_ASSERT(allow_macro_instructions_); 7873 VIXL_ASSERT(OutsideITBlock()); 7874 MacroEmissionCheckScope guard(this); 7875 ITScope it_scope(this, &cond); 7876 vmov(cond, rt, rt2, rm, rm1); 7877 } 7878 void Vmov(Register rt, Register rt2, SRegister rm, SRegister rm1) { 7879 Vmov(al, rt, rt2, rm, rm1); 7880 } 7881 7882 void Vmov( 7883 Condition cond, SRegister rm, SRegister rm1, Register rt, Register rt2) { 7884 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7885 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm1)); 7886 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 7887 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); 7888 VIXL_ASSERT(allow_macro_instructions_); 7889 VIXL_ASSERT(OutsideITBlock()); 7890 MacroEmissionCheckScope guard(this); 7891 ITScope it_scope(this, &cond); 7892 vmov(cond, rm, rm1, rt, rt2); 7893 } 7894 void Vmov(SRegister rm, SRegister rm1, Register rt, Register rt2) { 7895 Vmov(al, rm, rm1, rt, rt2); 7896 } 7897 7898 void Vmov(Condition cond, DataType dt, DRegisterLane rd, Register rt) { 7899 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7900 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 7901 VIXL_ASSERT(allow_macro_instructions_); 7902 VIXL_ASSERT(OutsideITBlock()); 7903 MacroEmissionCheckScope guard(this); 7904 ITScope it_scope(this, &cond); 7905 vmov(cond, dt, rd, rt); 7906 } 7907 void Vmov(DataType dt, DRegisterLane rd, Register rt) { 7908 Vmov(al, dt, rd, rt); 7909 } 7910 void Vmov(Condition cond, DRegisterLane rd, Register rt) { 7911 Vmov(cond, kDataTypeValueNone, rd, rt); 7912 } 7913 void Vmov(DRegisterLane rd, Register rt) { 7914 Vmov(al, kDataTypeValueNone, rd, rt); 7915 } 7916 7917 void Vmov(Condition cond, 7918 DataType dt, 7919 DRegister rd, 7920 const DOperand& operand) { 7921 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7922 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 7923 VIXL_ASSERT(allow_macro_instructions_); 7924 VIXL_ASSERT(OutsideITBlock()); 7925 MacroEmissionCheckScope guard(this); 7926 ITScope it_scope(this, &cond); 7927 vmov(cond, dt, rd, operand); 7928 } 7929 void Vmov(DataType dt, DRegister rd, const DOperand& operand) { 7930 Vmov(al, dt, rd, operand); 7931 } 7932 7933 void Vmov(Condition cond, 7934 DataType dt, 7935 QRegister rd, 7936 const QOperand& operand) { 7937 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7938 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 7939 VIXL_ASSERT(allow_macro_instructions_); 7940 VIXL_ASSERT(OutsideITBlock()); 7941 MacroEmissionCheckScope guard(this); 7942 ITScope it_scope(this, &cond); 7943 vmov(cond, dt, rd, operand); 7944 } 7945 void Vmov(DataType dt, QRegister rd, const QOperand& operand) { 7946 Vmov(al, dt, rd, operand); 7947 } 7948 7949 void Vmov(Condition cond, 7950 DataType dt, 7951 SRegister rd, 7952 const SOperand& operand) { 7953 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7954 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 7955 VIXL_ASSERT(allow_macro_instructions_); 7956 VIXL_ASSERT(OutsideITBlock()); 7957 MacroEmissionCheckScope guard(this); 7958 ITScope it_scope(this, &cond); 7959 vmov(cond, dt, rd, operand); 7960 } 7961 void Vmov(DataType dt, SRegister rd, const SOperand& operand) { 7962 Vmov(al, dt, rd, operand); 7963 } 7964 7965 void Vmov(Condition cond, DataType dt, Register rt, DRegisterLane rn) { 7966 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 7967 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 7968 VIXL_ASSERT(allow_macro_instructions_); 7969 VIXL_ASSERT(OutsideITBlock()); 7970 MacroEmissionCheckScope guard(this); 7971 ITScope it_scope(this, &cond); 7972 vmov(cond, dt, rt, rn); 7973 } 7974 void Vmov(DataType dt, Register rt, DRegisterLane rn) { 7975 Vmov(al, dt, rt, rn); 7976 } 7977 void Vmov(Condition cond, Register rt, DRegisterLane rn) { 7978 Vmov(cond, kDataTypeValueNone, rt, rn); 7979 } 7980 void Vmov(Register rt, DRegisterLane rn) { 7981 Vmov(al, kDataTypeValueNone, rt, rn); 7982 } 7983 7984 void Vmovl(Condition cond, DataType dt, QRegister rd, DRegister rm) { 7985 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7986 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7987 VIXL_ASSERT(allow_macro_instructions_); 7988 VIXL_ASSERT(OutsideITBlock()); 7989 MacroEmissionCheckScope guard(this); 7990 ITScope it_scope(this, &cond); 7991 vmovl(cond, dt, rd, rm); 7992 } 7993 void Vmovl(DataType dt, QRegister rd, DRegister rm) { Vmovl(al, dt, rd, rm); } 7994 7995 void Vmovn(Condition cond, DataType dt, DRegister rd, QRegister rm) { 7996 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 7997 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 7998 VIXL_ASSERT(allow_macro_instructions_); 7999 VIXL_ASSERT(OutsideITBlock()); 8000 MacroEmissionCheckScope guard(this); 8001 ITScope it_scope(this, &cond); 8002 vmovn(cond, dt, rd, rm); 8003 } 8004 void Vmovn(DataType dt, DRegister rd, QRegister rm) { Vmovn(al, dt, rd, rm); } 8005 8006 void Vmrs(Condition cond, 8007 RegisterOrAPSR_nzcv rt, 8008 SpecialFPRegister spec_reg) { 8009 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 8010 VIXL_ASSERT(allow_macro_instructions_); 8011 VIXL_ASSERT(OutsideITBlock()); 8012 MacroEmissionCheckScope guard(this); 8013 ITScope it_scope(this, &cond); 8014 vmrs(cond, rt, spec_reg); 8015 } 8016 void Vmrs(RegisterOrAPSR_nzcv rt, SpecialFPRegister spec_reg) { 8017 Vmrs(al, rt, spec_reg); 8018 } 8019 8020 void Vmsr(Condition cond, SpecialFPRegister spec_reg, Register rt) { 8021 VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); 8022 VIXL_ASSERT(allow_macro_instructions_); 8023 VIXL_ASSERT(OutsideITBlock()); 8024 MacroEmissionCheckScope guard(this); 8025 ITScope it_scope(this, &cond); 8026 vmsr(cond, spec_reg, rt); 8027 } 8028 void Vmsr(SpecialFPRegister spec_reg, Register rt) { Vmsr(al, spec_reg, rt); } 8029 8030 void Vmul(Condition cond, 8031 DataType dt, 8032 DRegister rd, 8033 DRegister rn, 8034 DRegister dm, 8035 unsigned index) { 8036 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8037 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8038 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm)); 8039 VIXL_ASSERT(allow_macro_instructions_); 8040 VIXL_ASSERT(OutsideITBlock()); 8041 MacroEmissionCheckScope guard(this); 8042 ITScope it_scope(this, &cond); 8043 vmul(cond, dt, rd, rn, dm, index); 8044 } 8045 void Vmul( 8046 DataType dt, DRegister rd, DRegister rn, DRegister dm, unsigned index) { 8047 Vmul(al, dt, rd, rn, dm, index); 8048 } 8049 8050 void Vmul(Condition cond, 8051 DataType dt, 8052 QRegister rd, 8053 QRegister rn, 8054 DRegister dm, 8055 unsigned index) { 8056 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8057 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8058 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm)); 8059 VIXL_ASSERT(allow_macro_instructions_); 8060 VIXL_ASSERT(OutsideITBlock()); 8061 MacroEmissionCheckScope guard(this); 8062 ITScope it_scope(this, &cond); 8063 vmul(cond, dt, rd, rn, dm, index); 8064 } 8065 void Vmul( 8066 DataType dt, QRegister rd, QRegister rn, DRegister dm, unsigned index) { 8067 Vmul(al, dt, rd, rn, dm, index); 8068 } 8069 8070 void Vmul( 8071 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8072 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8073 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8074 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8075 VIXL_ASSERT(allow_macro_instructions_); 8076 VIXL_ASSERT(OutsideITBlock()); 8077 MacroEmissionCheckScope guard(this); 8078 ITScope it_scope(this, &cond); 8079 vmul(cond, dt, rd, rn, rm); 8080 } 8081 void Vmul(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8082 Vmul(al, dt, rd, rn, rm); 8083 } 8084 8085 void Vmul( 8086 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 8087 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8088 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8089 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8090 VIXL_ASSERT(allow_macro_instructions_); 8091 VIXL_ASSERT(OutsideITBlock()); 8092 MacroEmissionCheckScope guard(this); 8093 ITScope it_scope(this, &cond); 8094 vmul(cond, dt, rd, rn, rm); 8095 } 8096 void Vmul(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 8097 Vmul(al, dt, rd, rn, rm); 8098 } 8099 8100 void Vmul( 8101 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) { 8102 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8103 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8104 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8105 VIXL_ASSERT(allow_macro_instructions_); 8106 VIXL_ASSERT(OutsideITBlock()); 8107 MacroEmissionCheckScope guard(this); 8108 ITScope it_scope(this, &cond); 8109 vmul(cond, dt, rd, rn, rm); 8110 } 8111 void Vmul(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 8112 Vmul(al, dt, rd, rn, rm); 8113 } 8114 8115 void Vmull(Condition cond, 8116 DataType dt, 8117 QRegister rd, 8118 DRegister rn, 8119 DRegister dm, 8120 unsigned index) { 8121 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8122 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8123 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm)); 8124 VIXL_ASSERT(allow_macro_instructions_); 8125 VIXL_ASSERT(OutsideITBlock()); 8126 MacroEmissionCheckScope guard(this); 8127 ITScope it_scope(this, &cond); 8128 vmull(cond, dt, rd, rn, dm, index); 8129 } 8130 void Vmull( 8131 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) { 8132 Vmull(al, dt, rd, rn, dm, index); 8133 } 8134 8135 void Vmull( 8136 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) { 8137 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8138 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8139 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8140 VIXL_ASSERT(allow_macro_instructions_); 8141 VIXL_ASSERT(OutsideITBlock()); 8142 MacroEmissionCheckScope guard(this); 8143 ITScope it_scope(this, &cond); 8144 vmull(cond, dt, rd, rn, rm); 8145 } 8146 void Vmull(DataType dt, QRegister rd, DRegister rn, DRegister rm) { 8147 Vmull(al, dt, rd, rn, rm); 8148 } 8149 8150 void Vmvn(Condition cond, 8151 DataType dt, 8152 DRegister rd, 8153 const DOperand& operand) { 8154 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8155 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 8156 VIXL_ASSERT(allow_macro_instructions_); 8157 VIXL_ASSERT(OutsideITBlock()); 8158 MacroEmissionCheckScope guard(this); 8159 ITScope it_scope(this, &cond); 8160 vmvn(cond, dt, rd, operand); 8161 } 8162 void Vmvn(DataType dt, DRegister rd, const DOperand& operand) { 8163 Vmvn(al, dt, rd, operand); 8164 } 8165 8166 void Vmvn(Condition cond, 8167 DataType dt, 8168 QRegister rd, 8169 const QOperand& operand) { 8170 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8171 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 8172 VIXL_ASSERT(allow_macro_instructions_); 8173 VIXL_ASSERT(OutsideITBlock()); 8174 MacroEmissionCheckScope guard(this); 8175 ITScope it_scope(this, &cond); 8176 vmvn(cond, dt, rd, operand); 8177 } 8178 void Vmvn(DataType dt, QRegister rd, const QOperand& operand) { 8179 Vmvn(al, dt, rd, operand); 8180 } 8181 8182 void Vneg(Condition cond, DataType dt, DRegister rd, DRegister rm) { 8183 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8184 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8185 VIXL_ASSERT(allow_macro_instructions_); 8186 VIXL_ASSERT(OutsideITBlock()); 8187 MacroEmissionCheckScope guard(this); 8188 ITScope it_scope(this, &cond); 8189 vneg(cond, dt, rd, rm); 8190 } 8191 void Vneg(DataType dt, DRegister rd, DRegister rm) { Vneg(al, dt, rd, rm); } 8192 8193 void Vneg(Condition cond, DataType dt, QRegister rd, QRegister rm) { 8194 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8195 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8196 VIXL_ASSERT(allow_macro_instructions_); 8197 VIXL_ASSERT(OutsideITBlock()); 8198 MacroEmissionCheckScope guard(this); 8199 ITScope it_scope(this, &cond); 8200 vneg(cond, dt, rd, rm); 8201 } 8202 void Vneg(DataType dt, QRegister rd, QRegister rm) { Vneg(al, dt, rd, rm); } 8203 8204 void Vneg(Condition cond, DataType dt, SRegister rd, SRegister rm) { 8205 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8206 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8207 VIXL_ASSERT(allow_macro_instructions_); 8208 VIXL_ASSERT(OutsideITBlock()); 8209 MacroEmissionCheckScope guard(this); 8210 ITScope it_scope(this, &cond); 8211 vneg(cond, dt, rd, rm); 8212 } 8213 void Vneg(DataType dt, SRegister rd, SRegister rm) { Vneg(al, dt, rd, rm); } 8214 8215 void Vnmla( 8216 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) { 8217 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8218 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8219 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8220 VIXL_ASSERT(allow_macro_instructions_); 8221 VIXL_ASSERT(OutsideITBlock()); 8222 MacroEmissionCheckScope guard(this); 8223 ITScope it_scope(this, &cond); 8224 vnmla(cond, dt, rd, rn, rm); 8225 } 8226 void Vnmla(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 8227 Vnmla(al, dt, rd, rn, rm); 8228 } 8229 8230 void Vnmla( 8231 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8232 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8233 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8234 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8235 VIXL_ASSERT(allow_macro_instructions_); 8236 VIXL_ASSERT(OutsideITBlock()); 8237 MacroEmissionCheckScope guard(this); 8238 ITScope it_scope(this, &cond); 8239 vnmla(cond, dt, rd, rn, rm); 8240 } 8241 void Vnmla(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8242 Vnmla(al, dt, rd, rn, rm); 8243 } 8244 8245 void Vnmls( 8246 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) { 8247 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8248 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8249 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8250 VIXL_ASSERT(allow_macro_instructions_); 8251 VIXL_ASSERT(OutsideITBlock()); 8252 MacroEmissionCheckScope guard(this); 8253 ITScope it_scope(this, &cond); 8254 vnmls(cond, dt, rd, rn, rm); 8255 } 8256 void Vnmls(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 8257 Vnmls(al, dt, rd, rn, rm); 8258 } 8259 8260 void Vnmls( 8261 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8262 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8263 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8264 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8265 VIXL_ASSERT(allow_macro_instructions_); 8266 VIXL_ASSERT(OutsideITBlock()); 8267 MacroEmissionCheckScope guard(this); 8268 ITScope it_scope(this, &cond); 8269 vnmls(cond, dt, rd, rn, rm); 8270 } 8271 void Vnmls(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8272 Vnmls(al, dt, rd, rn, rm); 8273 } 8274 8275 void Vnmul( 8276 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) { 8277 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8278 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8279 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8280 VIXL_ASSERT(allow_macro_instructions_); 8281 VIXL_ASSERT(OutsideITBlock()); 8282 MacroEmissionCheckScope guard(this); 8283 ITScope it_scope(this, &cond); 8284 vnmul(cond, dt, rd, rn, rm); 8285 } 8286 void Vnmul(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 8287 Vnmul(al, dt, rd, rn, rm); 8288 } 8289 8290 void Vnmul( 8291 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8292 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8293 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8294 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8295 VIXL_ASSERT(allow_macro_instructions_); 8296 VIXL_ASSERT(OutsideITBlock()); 8297 MacroEmissionCheckScope guard(this); 8298 ITScope it_scope(this, &cond); 8299 vnmul(cond, dt, rd, rn, rm); 8300 } 8301 void Vnmul(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8302 Vnmul(al, dt, rd, rn, rm); 8303 } 8304 8305 void Vorn(Condition cond, 8306 DataType dt, 8307 DRegister rd, 8308 DRegister rn, 8309 const DOperand& operand) { 8310 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8311 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8312 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 8313 VIXL_ASSERT(allow_macro_instructions_); 8314 VIXL_ASSERT(OutsideITBlock()); 8315 MacroEmissionCheckScope guard(this); 8316 ITScope it_scope(this, &cond); 8317 vorn(cond, dt, rd, rn, operand); 8318 } 8319 void Vorn(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) { 8320 Vorn(al, dt, rd, rn, operand); 8321 } 8322 8323 void Vorn(Condition cond, 8324 DataType dt, 8325 QRegister rd, 8326 QRegister rn, 8327 const QOperand& operand) { 8328 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8329 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8330 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 8331 VIXL_ASSERT(allow_macro_instructions_); 8332 VIXL_ASSERT(OutsideITBlock()); 8333 MacroEmissionCheckScope guard(this); 8334 ITScope it_scope(this, &cond); 8335 vorn(cond, dt, rd, rn, operand); 8336 } 8337 void Vorn(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) { 8338 Vorn(al, dt, rd, rn, operand); 8339 } 8340 8341 void Vorr(Condition cond, 8342 DataType dt, 8343 DRegister rd, 8344 DRegister rn, 8345 const DOperand& operand) { 8346 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8347 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8348 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 8349 VIXL_ASSERT(allow_macro_instructions_); 8350 VIXL_ASSERT(OutsideITBlock()); 8351 MacroEmissionCheckScope guard(this); 8352 ITScope it_scope(this, &cond); 8353 vorr(cond, dt, rd, rn, operand); 8354 } 8355 void Vorr(DataType dt, DRegister rd, DRegister rn, const DOperand& operand) { 8356 Vorr(al, dt, rd, rn, operand); 8357 } 8358 void Vorr(Condition cond, 8359 DRegister rd, 8360 DRegister rn, 8361 const DOperand& operand) { 8362 Vorr(cond, kDataTypeValueNone, rd, rn, operand); 8363 } 8364 void Vorr(DRegister rd, DRegister rn, const DOperand& operand) { 8365 Vorr(al, kDataTypeValueNone, rd, rn, operand); 8366 } 8367 8368 void Vorr(Condition cond, 8369 DataType dt, 8370 QRegister rd, 8371 QRegister rn, 8372 const QOperand& operand) { 8373 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8374 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8375 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 8376 VIXL_ASSERT(allow_macro_instructions_); 8377 VIXL_ASSERT(OutsideITBlock()); 8378 MacroEmissionCheckScope guard(this); 8379 ITScope it_scope(this, &cond); 8380 vorr(cond, dt, rd, rn, operand); 8381 } 8382 void Vorr(DataType dt, QRegister rd, QRegister rn, const QOperand& operand) { 8383 Vorr(al, dt, rd, rn, operand); 8384 } 8385 void Vorr(Condition cond, 8386 QRegister rd, 8387 QRegister rn, 8388 const QOperand& operand) { 8389 Vorr(cond, kDataTypeValueNone, rd, rn, operand); 8390 } 8391 void Vorr(QRegister rd, QRegister rn, const QOperand& operand) { 8392 Vorr(al, kDataTypeValueNone, rd, rn, operand); 8393 } 8394 8395 void Vpadal(Condition cond, DataType dt, DRegister rd, DRegister rm) { 8396 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8397 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8398 VIXL_ASSERT(allow_macro_instructions_); 8399 VIXL_ASSERT(OutsideITBlock()); 8400 MacroEmissionCheckScope guard(this); 8401 ITScope it_scope(this, &cond); 8402 vpadal(cond, dt, rd, rm); 8403 } 8404 void Vpadal(DataType dt, DRegister rd, DRegister rm) { 8405 Vpadal(al, dt, rd, rm); 8406 } 8407 8408 void Vpadal(Condition cond, DataType dt, QRegister rd, QRegister rm) { 8409 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8410 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8411 VIXL_ASSERT(allow_macro_instructions_); 8412 VIXL_ASSERT(OutsideITBlock()); 8413 MacroEmissionCheckScope guard(this); 8414 ITScope it_scope(this, &cond); 8415 vpadal(cond, dt, rd, rm); 8416 } 8417 void Vpadal(DataType dt, QRegister rd, QRegister rm) { 8418 Vpadal(al, dt, rd, rm); 8419 } 8420 8421 void Vpadd( 8422 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8423 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8424 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8425 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8426 VIXL_ASSERT(allow_macro_instructions_); 8427 VIXL_ASSERT(OutsideITBlock()); 8428 MacroEmissionCheckScope guard(this); 8429 ITScope it_scope(this, &cond); 8430 vpadd(cond, dt, rd, rn, rm); 8431 } 8432 void Vpadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8433 Vpadd(al, dt, rd, rn, rm); 8434 } 8435 8436 void Vpaddl(Condition cond, DataType dt, DRegister rd, DRegister rm) { 8437 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8438 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8439 VIXL_ASSERT(allow_macro_instructions_); 8440 VIXL_ASSERT(OutsideITBlock()); 8441 MacroEmissionCheckScope guard(this); 8442 ITScope it_scope(this, &cond); 8443 vpaddl(cond, dt, rd, rm); 8444 } 8445 void Vpaddl(DataType dt, DRegister rd, DRegister rm) { 8446 Vpaddl(al, dt, rd, rm); 8447 } 8448 8449 void Vpaddl(Condition cond, DataType dt, QRegister rd, QRegister rm) { 8450 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8451 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8452 VIXL_ASSERT(allow_macro_instructions_); 8453 VIXL_ASSERT(OutsideITBlock()); 8454 MacroEmissionCheckScope guard(this); 8455 ITScope it_scope(this, &cond); 8456 vpaddl(cond, dt, rd, rm); 8457 } 8458 void Vpaddl(DataType dt, QRegister rd, QRegister rm) { 8459 Vpaddl(al, dt, rd, rm); 8460 } 8461 8462 void Vpmax( 8463 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8464 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8465 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8466 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8467 VIXL_ASSERT(allow_macro_instructions_); 8468 VIXL_ASSERT(OutsideITBlock()); 8469 MacroEmissionCheckScope guard(this); 8470 ITScope it_scope(this, &cond); 8471 vpmax(cond, dt, rd, rn, rm); 8472 } 8473 void Vpmax(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8474 Vpmax(al, dt, rd, rn, rm); 8475 } 8476 8477 void Vpmin( 8478 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8479 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8480 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8481 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8482 VIXL_ASSERT(allow_macro_instructions_); 8483 VIXL_ASSERT(OutsideITBlock()); 8484 MacroEmissionCheckScope guard(this); 8485 ITScope it_scope(this, &cond); 8486 vpmin(cond, dt, rd, rn, rm); 8487 } 8488 void Vpmin(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8489 Vpmin(al, dt, rd, rn, rm); 8490 } 8491 8492 void Vpop(Condition cond, DataType dt, DRegisterList dreglist) { 8493 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); 8494 VIXL_ASSERT(allow_macro_instructions_); 8495 VIXL_ASSERT(OutsideITBlock()); 8496 MacroEmissionCheckScope guard(this); 8497 ITScope it_scope(this, &cond); 8498 vpop(cond, dt, dreglist); 8499 } 8500 void Vpop(DataType dt, DRegisterList dreglist) { Vpop(al, dt, dreglist); } 8501 void Vpop(Condition cond, DRegisterList dreglist) { 8502 Vpop(cond, kDataTypeValueNone, dreglist); 8503 } 8504 void Vpop(DRegisterList dreglist) { Vpop(al, kDataTypeValueNone, dreglist); } 8505 8506 void Vpop(Condition cond, DataType dt, SRegisterList sreglist) { 8507 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist)); 8508 VIXL_ASSERT(allow_macro_instructions_); 8509 VIXL_ASSERT(OutsideITBlock()); 8510 MacroEmissionCheckScope guard(this); 8511 ITScope it_scope(this, &cond); 8512 vpop(cond, dt, sreglist); 8513 } 8514 void Vpop(DataType dt, SRegisterList sreglist) { Vpop(al, dt, sreglist); } 8515 void Vpop(Condition cond, SRegisterList sreglist) { 8516 Vpop(cond, kDataTypeValueNone, sreglist); 8517 } 8518 void Vpop(SRegisterList sreglist) { Vpop(al, kDataTypeValueNone, sreglist); } 8519 8520 void Vpush(Condition cond, DataType dt, DRegisterList dreglist) { 8521 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); 8522 VIXL_ASSERT(allow_macro_instructions_); 8523 VIXL_ASSERT(OutsideITBlock()); 8524 MacroEmissionCheckScope guard(this); 8525 ITScope it_scope(this, &cond); 8526 vpush(cond, dt, dreglist); 8527 } 8528 void Vpush(DataType dt, DRegisterList dreglist) { Vpush(al, dt, dreglist); } 8529 void Vpush(Condition cond, DRegisterList dreglist) { 8530 Vpush(cond, kDataTypeValueNone, dreglist); 8531 } 8532 void Vpush(DRegisterList dreglist) { 8533 Vpush(al, kDataTypeValueNone, dreglist); 8534 } 8535 8536 void Vpush(Condition cond, DataType dt, SRegisterList sreglist) { 8537 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist)); 8538 VIXL_ASSERT(allow_macro_instructions_); 8539 VIXL_ASSERT(OutsideITBlock()); 8540 MacroEmissionCheckScope guard(this); 8541 ITScope it_scope(this, &cond); 8542 vpush(cond, dt, sreglist); 8543 } 8544 void Vpush(DataType dt, SRegisterList sreglist) { Vpush(al, dt, sreglist); } 8545 void Vpush(Condition cond, SRegisterList sreglist) { 8546 Vpush(cond, kDataTypeValueNone, sreglist); 8547 } 8548 void Vpush(SRegisterList sreglist) { 8549 Vpush(al, kDataTypeValueNone, sreglist); 8550 } 8551 8552 void Vqabs(Condition cond, DataType dt, DRegister rd, DRegister rm) { 8553 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8554 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8555 VIXL_ASSERT(allow_macro_instructions_); 8556 VIXL_ASSERT(OutsideITBlock()); 8557 MacroEmissionCheckScope guard(this); 8558 ITScope it_scope(this, &cond); 8559 vqabs(cond, dt, rd, rm); 8560 } 8561 void Vqabs(DataType dt, DRegister rd, DRegister rm) { Vqabs(al, dt, rd, rm); } 8562 8563 void Vqabs(Condition cond, DataType dt, QRegister rd, QRegister rm) { 8564 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8565 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8566 VIXL_ASSERT(allow_macro_instructions_); 8567 VIXL_ASSERT(OutsideITBlock()); 8568 MacroEmissionCheckScope guard(this); 8569 ITScope it_scope(this, &cond); 8570 vqabs(cond, dt, rd, rm); 8571 } 8572 void Vqabs(DataType dt, QRegister rd, QRegister rm) { Vqabs(al, dt, rd, rm); } 8573 8574 void Vqadd( 8575 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8576 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8577 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8578 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8579 VIXL_ASSERT(allow_macro_instructions_); 8580 VIXL_ASSERT(OutsideITBlock()); 8581 MacroEmissionCheckScope guard(this); 8582 ITScope it_scope(this, &cond); 8583 vqadd(cond, dt, rd, rn, rm); 8584 } 8585 void Vqadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8586 Vqadd(al, dt, rd, rn, rm); 8587 } 8588 8589 void Vqadd( 8590 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 8591 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8592 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8593 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8594 VIXL_ASSERT(allow_macro_instructions_); 8595 VIXL_ASSERT(OutsideITBlock()); 8596 MacroEmissionCheckScope guard(this); 8597 ITScope it_scope(this, &cond); 8598 vqadd(cond, dt, rd, rn, rm); 8599 } 8600 void Vqadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 8601 Vqadd(al, dt, rd, rn, rm); 8602 } 8603 8604 void Vqdmlal( 8605 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) { 8606 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8607 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8608 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8609 VIXL_ASSERT(allow_macro_instructions_); 8610 VIXL_ASSERT(OutsideITBlock()); 8611 MacroEmissionCheckScope guard(this); 8612 ITScope it_scope(this, &cond); 8613 vqdmlal(cond, dt, rd, rn, rm); 8614 } 8615 void Vqdmlal(DataType dt, QRegister rd, DRegister rn, DRegister rm) { 8616 Vqdmlal(al, dt, rd, rn, rm); 8617 } 8618 8619 void Vqdmlal(Condition cond, 8620 DataType dt, 8621 QRegister rd, 8622 DRegister rn, 8623 DRegister dm, 8624 unsigned index) { 8625 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8626 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8627 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm)); 8628 VIXL_ASSERT(allow_macro_instructions_); 8629 VIXL_ASSERT(OutsideITBlock()); 8630 MacroEmissionCheckScope guard(this); 8631 ITScope it_scope(this, &cond); 8632 vqdmlal(cond, dt, rd, rn, dm, index); 8633 } 8634 void Vqdmlal( 8635 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) { 8636 Vqdmlal(al, dt, rd, rn, dm, index); 8637 } 8638 8639 void Vqdmlsl( 8640 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) { 8641 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8642 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8643 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8644 VIXL_ASSERT(allow_macro_instructions_); 8645 VIXL_ASSERT(OutsideITBlock()); 8646 MacroEmissionCheckScope guard(this); 8647 ITScope it_scope(this, &cond); 8648 vqdmlsl(cond, dt, rd, rn, rm); 8649 } 8650 void Vqdmlsl(DataType dt, QRegister rd, DRegister rn, DRegister rm) { 8651 Vqdmlsl(al, dt, rd, rn, rm); 8652 } 8653 8654 void Vqdmlsl(Condition cond, 8655 DataType dt, 8656 QRegister rd, 8657 DRegister rn, 8658 DRegister dm, 8659 unsigned index) { 8660 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8661 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8662 VIXL_ASSERT(!AliasesAvailableScratchRegister(dm)); 8663 VIXL_ASSERT(allow_macro_instructions_); 8664 VIXL_ASSERT(OutsideITBlock()); 8665 MacroEmissionCheckScope guard(this); 8666 ITScope it_scope(this, &cond); 8667 vqdmlsl(cond, dt, rd, rn, dm, index); 8668 } 8669 void Vqdmlsl( 8670 DataType dt, QRegister rd, DRegister rn, DRegister dm, unsigned index) { 8671 Vqdmlsl(al, dt, rd, rn, dm, index); 8672 } 8673 8674 void Vqdmulh( 8675 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8676 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8677 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8678 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8679 VIXL_ASSERT(allow_macro_instructions_); 8680 VIXL_ASSERT(OutsideITBlock()); 8681 MacroEmissionCheckScope guard(this); 8682 ITScope it_scope(this, &cond); 8683 vqdmulh(cond, dt, rd, rn, rm); 8684 } 8685 void Vqdmulh(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8686 Vqdmulh(al, dt, rd, rn, rm); 8687 } 8688 8689 void Vqdmulh( 8690 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 8691 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8692 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8693 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8694 VIXL_ASSERT(allow_macro_instructions_); 8695 VIXL_ASSERT(OutsideITBlock()); 8696 MacroEmissionCheckScope guard(this); 8697 ITScope it_scope(this, &cond); 8698 vqdmulh(cond, dt, rd, rn, rm); 8699 } 8700 void Vqdmulh(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 8701 Vqdmulh(al, dt, rd, rn, rm); 8702 } 8703 8704 void Vqdmulh(Condition cond, 8705 DataType dt, 8706 DRegister rd, 8707 DRegister rn, 8708 DRegisterLane rm) { 8709 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8710 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8711 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8712 VIXL_ASSERT(allow_macro_instructions_); 8713 VIXL_ASSERT(OutsideITBlock()); 8714 MacroEmissionCheckScope guard(this); 8715 ITScope it_scope(this, &cond); 8716 vqdmulh(cond, dt, rd, rn, rm); 8717 } 8718 void Vqdmulh(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) { 8719 Vqdmulh(al, dt, rd, rn, rm); 8720 } 8721 8722 void Vqdmulh(Condition cond, 8723 DataType dt, 8724 QRegister rd, 8725 QRegister rn, 8726 DRegisterLane rm) { 8727 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8728 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8729 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8730 VIXL_ASSERT(allow_macro_instructions_); 8731 VIXL_ASSERT(OutsideITBlock()); 8732 MacroEmissionCheckScope guard(this); 8733 ITScope it_scope(this, &cond); 8734 vqdmulh(cond, dt, rd, rn, rm); 8735 } 8736 void Vqdmulh(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) { 8737 Vqdmulh(al, dt, rd, rn, rm); 8738 } 8739 8740 void Vqdmull( 8741 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) { 8742 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8743 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8744 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8745 VIXL_ASSERT(allow_macro_instructions_); 8746 VIXL_ASSERT(OutsideITBlock()); 8747 MacroEmissionCheckScope guard(this); 8748 ITScope it_scope(this, &cond); 8749 vqdmull(cond, dt, rd, rn, rm); 8750 } 8751 void Vqdmull(DataType dt, QRegister rd, DRegister rn, DRegister rm) { 8752 Vqdmull(al, dt, rd, rn, rm); 8753 } 8754 8755 void Vqdmull(Condition cond, 8756 DataType dt, 8757 QRegister rd, 8758 DRegister rn, 8759 DRegisterLane rm) { 8760 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8761 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8762 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8763 VIXL_ASSERT(allow_macro_instructions_); 8764 VIXL_ASSERT(OutsideITBlock()); 8765 MacroEmissionCheckScope guard(this); 8766 ITScope it_scope(this, &cond); 8767 vqdmull(cond, dt, rd, rn, rm); 8768 } 8769 void Vqdmull(DataType dt, QRegister rd, DRegister rn, DRegisterLane rm) { 8770 Vqdmull(al, dt, rd, rn, rm); 8771 } 8772 8773 void Vqmovn(Condition cond, DataType dt, DRegister rd, QRegister rm) { 8774 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8775 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8776 VIXL_ASSERT(allow_macro_instructions_); 8777 VIXL_ASSERT(OutsideITBlock()); 8778 MacroEmissionCheckScope guard(this); 8779 ITScope it_scope(this, &cond); 8780 vqmovn(cond, dt, rd, rm); 8781 } 8782 void Vqmovn(DataType dt, DRegister rd, QRegister rm) { 8783 Vqmovn(al, dt, rd, rm); 8784 } 8785 8786 void Vqmovun(Condition cond, DataType dt, DRegister rd, QRegister rm) { 8787 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8788 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8789 VIXL_ASSERT(allow_macro_instructions_); 8790 VIXL_ASSERT(OutsideITBlock()); 8791 MacroEmissionCheckScope guard(this); 8792 ITScope it_scope(this, &cond); 8793 vqmovun(cond, dt, rd, rm); 8794 } 8795 void Vqmovun(DataType dt, DRegister rd, QRegister rm) { 8796 Vqmovun(al, dt, rd, rm); 8797 } 8798 8799 void Vqneg(Condition cond, DataType dt, DRegister rd, DRegister rm) { 8800 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8801 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8802 VIXL_ASSERT(allow_macro_instructions_); 8803 VIXL_ASSERT(OutsideITBlock()); 8804 MacroEmissionCheckScope guard(this); 8805 ITScope it_scope(this, &cond); 8806 vqneg(cond, dt, rd, rm); 8807 } 8808 void Vqneg(DataType dt, DRegister rd, DRegister rm) { Vqneg(al, dt, rd, rm); } 8809 8810 void Vqneg(Condition cond, DataType dt, QRegister rd, QRegister rm) { 8811 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8812 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8813 VIXL_ASSERT(allow_macro_instructions_); 8814 VIXL_ASSERT(OutsideITBlock()); 8815 MacroEmissionCheckScope guard(this); 8816 ITScope it_scope(this, &cond); 8817 vqneg(cond, dt, rd, rm); 8818 } 8819 void Vqneg(DataType dt, QRegister rd, QRegister rm) { Vqneg(al, dt, rd, rm); } 8820 8821 void Vqrdmulh( 8822 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8823 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8824 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8825 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8826 VIXL_ASSERT(allow_macro_instructions_); 8827 VIXL_ASSERT(OutsideITBlock()); 8828 MacroEmissionCheckScope guard(this); 8829 ITScope it_scope(this, &cond); 8830 vqrdmulh(cond, dt, rd, rn, rm); 8831 } 8832 void Vqrdmulh(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 8833 Vqrdmulh(al, dt, rd, rn, rm); 8834 } 8835 8836 void Vqrdmulh( 8837 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 8838 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8839 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8840 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8841 VIXL_ASSERT(allow_macro_instructions_); 8842 VIXL_ASSERT(OutsideITBlock()); 8843 MacroEmissionCheckScope guard(this); 8844 ITScope it_scope(this, &cond); 8845 vqrdmulh(cond, dt, rd, rn, rm); 8846 } 8847 void Vqrdmulh(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 8848 Vqrdmulh(al, dt, rd, rn, rm); 8849 } 8850 8851 void Vqrdmulh(Condition cond, 8852 DataType dt, 8853 DRegister rd, 8854 DRegister rn, 8855 DRegisterLane rm) { 8856 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8857 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8858 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8859 VIXL_ASSERT(allow_macro_instructions_); 8860 VIXL_ASSERT(OutsideITBlock()); 8861 MacroEmissionCheckScope guard(this); 8862 ITScope it_scope(this, &cond); 8863 vqrdmulh(cond, dt, rd, rn, rm); 8864 } 8865 void Vqrdmulh(DataType dt, DRegister rd, DRegister rn, DRegisterLane rm) { 8866 Vqrdmulh(al, dt, rd, rn, rm); 8867 } 8868 8869 void Vqrdmulh(Condition cond, 8870 DataType dt, 8871 QRegister rd, 8872 QRegister rn, 8873 DRegisterLane rm) { 8874 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8875 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8876 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8877 VIXL_ASSERT(allow_macro_instructions_); 8878 VIXL_ASSERT(OutsideITBlock()); 8879 MacroEmissionCheckScope guard(this); 8880 ITScope it_scope(this, &cond); 8881 vqrdmulh(cond, dt, rd, rn, rm); 8882 } 8883 void Vqrdmulh(DataType dt, QRegister rd, QRegister rn, DRegisterLane rm) { 8884 Vqrdmulh(al, dt, rd, rn, rm); 8885 } 8886 8887 void Vqrshl( 8888 Condition cond, DataType dt, DRegister rd, DRegister rm, DRegister rn) { 8889 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8890 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8891 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8892 VIXL_ASSERT(allow_macro_instructions_); 8893 VIXL_ASSERT(OutsideITBlock()); 8894 MacroEmissionCheckScope guard(this); 8895 ITScope it_scope(this, &cond); 8896 vqrshl(cond, dt, rd, rm, rn); 8897 } 8898 void Vqrshl(DataType dt, DRegister rd, DRegister rm, DRegister rn) { 8899 Vqrshl(al, dt, rd, rm, rn); 8900 } 8901 8902 void Vqrshl( 8903 Condition cond, DataType dt, QRegister rd, QRegister rm, QRegister rn) { 8904 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8905 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8906 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 8907 VIXL_ASSERT(allow_macro_instructions_); 8908 VIXL_ASSERT(OutsideITBlock()); 8909 MacroEmissionCheckScope guard(this); 8910 ITScope it_scope(this, &cond); 8911 vqrshl(cond, dt, rd, rm, rn); 8912 } 8913 void Vqrshl(DataType dt, QRegister rd, QRegister rm, QRegister rn) { 8914 Vqrshl(al, dt, rd, rm, rn); 8915 } 8916 8917 void Vqrshrn(Condition cond, 8918 DataType dt, 8919 DRegister rd, 8920 QRegister rm, 8921 const QOperand& operand) { 8922 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8923 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8924 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 8925 VIXL_ASSERT(allow_macro_instructions_); 8926 VIXL_ASSERT(OutsideITBlock()); 8927 MacroEmissionCheckScope guard(this); 8928 ITScope it_scope(this, &cond); 8929 vqrshrn(cond, dt, rd, rm, operand); 8930 } 8931 void Vqrshrn(DataType dt, 8932 DRegister rd, 8933 QRegister rm, 8934 const QOperand& operand) { 8935 Vqrshrn(al, dt, rd, rm, operand); 8936 } 8937 8938 void Vqrshrun(Condition cond, 8939 DataType dt, 8940 DRegister rd, 8941 QRegister rm, 8942 const QOperand& operand) { 8943 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8945 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 8946 VIXL_ASSERT(allow_macro_instructions_); 8947 VIXL_ASSERT(OutsideITBlock()); 8948 MacroEmissionCheckScope guard(this); 8949 ITScope it_scope(this, &cond); 8950 vqrshrun(cond, dt, rd, rm, operand); 8951 } 8952 void Vqrshrun(DataType dt, 8953 DRegister rd, 8954 QRegister rm, 8955 const QOperand& operand) { 8956 Vqrshrun(al, dt, rd, rm, operand); 8957 } 8958 8959 void Vqshl(Condition cond, 8960 DataType dt, 8961 DRegister rd, 8962 DRegister rm, 8963 const DOperand& operand) { 8964 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8965 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8966 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 8967 VIXL_ASSERT(allow_macro_instructions_); 8968 VIXL_ASSERT(OutsideITBlock()); 8969 MacroEmissionCheckScope guard(this); 8970 ITScope it_scope(this, &cond); 8971 vqshl(cond, dt, rd, rm, operand); 8972 } 8973 void Vqshl(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) { 8974 Vqshl(al, dt, rd, rm, operand); 8975 } 8976 8977 void Vqshl(Condition cond, 8978 DataType dt, 8979 QRegister rd, 8980 QRegister rm, 8981 const QOperand& operand) { 8982 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 8983 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 8984 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 8985 VIXL_ASSERT(allow_macro_instructions_); 8986 VIXL_ASSERT(OutsideITBlock()); 8987 MacroEmissionCheckScope guard(this); 8988 ITScope it_scope(this, &cond); 8989 vqshl(cond, dt, rd, rm, operand); 8990 } 8991 void Vqshl(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) { 8992 Vqshl(al, dt, rd, rm, operand); 8993 } 8994 8995 void Vqshlu(Condition cond, 8996 DataType dt, 8997 DRegister rd, 8998 DRegister rm, 8999 const DOperand& operand) { 9000 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9001 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9002 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9003 VIXL_ASSERT(allow_macro_instructions_); 9004 VIXL_ASSERT(OutsideITBlock()); 9005 MacroEmissionCheckScope guard(this); 9006 ITScope it_scope(this, &cond); 9007 vqshlu(cond, dt, rd, rm, operand); 9008 } 9009 void Vqshlu(DataType dt, 9010 DRegister rd, 9011 DRegister rm, 9012 const DOperand& operand) { 9013 Vqshlu(al, dt, rd, rm, operand); 9014 } 9015 9016 void Vqshlu(Condition cond, 9017 DataType dt, 9018 QRegister rd, 9019 QRegister rm, 9020 const QOperand& operand) { 9021 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9022 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9023 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9024 VIXL_ASSERT(allow_macro_instructions_); 9025 VIXL_ASSERT(OutsideITBlock()); 9026 MacroEmissionCheckScope guard(this); 9027 ITScope it_scope(this, &cond); 9028 vqshlu(cond, dt, rd, rm, operand); 9029 } 9030 void Vqshlu(DataType dt, 9031 QRegister rd, 9032 QRegister rm, 9033 const QOperand& operand) { 9034 Vqshlu(al, dt, rd, rm, operand); 9035 } 9036 9037 void Vqshrn(Condition cond, 9038 DataType dt, 9039 DRegister rd, 9040 QRegister rm, 9041 const QOperand& operand) { 9042 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9043 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9044 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9045 VIXL_ASSERT(allow_macro_instructions_); 9046 VIXL_ASSERT(OutsideITBlock()); 9047 MacroEmissionCheckScope guard(this); 9048 ITScope it_scope(this, &cond); 9049 vqshrn(cond, dt, rd, rm, operand); 9050 } 9051 void Vqshrn(DataType dt, 9052 DRegister rd, 9053 QRegister rm, 9054 const QOperand& operand) { 9055 Vqshrn(al, dt, rd, rm, operand); 9056 } 9057 9058 void Vqshrun(Condition cond, 9059 DataType dt, 9060 DRegister rd, 9061 QRegister rm, 9062 const QOperand& operand) { 9063 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9064 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9065 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9066 VIXL_ASSERT(allow_macro_instructions_); 9067 VIXL_ASSERT(OutsideITBlock()); 9068 MacroEmissionCheckScope guard(this); 9069 ITScope it_scope(this, &cond); 9070 vqshrun(cond, dt, rd, rm, operand); 9071 } 9072 void Vqshrun(DataType dt, 9073 DRegister rd, 9074 QRegister rm, 9075 const QOperand& operand) { 9076 Vqshrun(al, dt, rd, rm, operand); 9077 } 9078 9079 void Vqsub( 9080 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 9081 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9082 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9083 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9084 VIXL_ASSERT(allow_macro_instructions_); 9085 VIXL_ASSERT(OutsideITBlock()); 9086 MacroEmissionCheckScope guard(this); 9087 ITScope it_scope(this, &cond); 9088 vqsub(cond, dt, rd, rn, rm); 9089 } 9090 void Vqsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 9091 Vqsub(al, dt, rd, rn, rm); 9092 } 9093 9094 void Vqsub( 9095 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 9096 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9097 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9098 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9099 VIXL_ASSERT(allow_macro_instructions_); 9100 VIXL_ASSERT(OutsideITBlock()); 9101 MacroEmissionCheckScope guard(this); 9102 ITScope it_scope(this, &cond); 9103 vqsub(cond, dt, rd, rn, rm); 9104 } 9105 void Vqsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 9106 Vqsub(al, dt, rd, rn, rm); 9107 } 9108 9109 void Vraddhn( 9110 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) { 9111 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9112 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9113 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9114 VIXL_ASSERT(allow_macro_instructions_); 9115 VIXL_ASSERT(OutsideITBlock()); 9116 MacroEmissionCheckScope guard(this); 9117 ITScope it_scope(this, &cond); 9118 vraddhn(cond, dt, rd, rn, rm); 9119 } 9120 void Vraddhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) { 9121 Vraddhn(al, dt, rd, rn, rm); 9122 } 9123 9124 void Vrecpe(Condition cond, DataType dt, DRegister rd, DRegister rm) { 9125 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9126 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9127 VIXL_ASSERT(allow_macro_instructions_); 9128 VIXL_ASSERT(OutsideITBlock()); 9129 MacroEmissionCheckScope guard(this); 9130 ITScope it_scope(this, &cond); 9131 vrecpe(cond, dt, rd, rm); 9132 } 9133 void Vrecpe(DataType dt, DRegister rd, DRegister rm) { 9134 Vrecpe(al, dt, rd, rm); 9135 } 9136 9137 void Vrecpe(Condition cond, DataType dt, QRegister rd, QRegister rm) { 9138 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9139 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9140 VIXL_ASSERT(allow_macro_instructions_); 9141 VIXL_ASSERT(OutsideITBlock()); 9142 MacroEmissionCheckScope guard(this); 9143 ITScope it_scope(this, &cond); 9144 vrecpe(cond, dt, rd, rm); 9145 } 9146 void Vrecpe(DataType dt, QRegister rd, QRegister rm) { 9147 Vrecpe(al, dt, rd, rm); 9148 } 9149 9150 void Vrecps( 9151 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 9152 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9153 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9154 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9155 VIXL_ASSERT(allow_macro_instructions_); 9156 VIXL_ASSERT(OutsideITBlock()); 9157 MacroEmissionCheckScope guard(this); 9158 ITScope it_scope(this, &cond); 9159 vrecps(cond, dt, rd, rn, rm); 9160 } 9161 void Vrecps(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 9162 Vrecps(al, dt, rd, rn, rm); 9163 } 9164 9165 void Vrecps( 9166 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 9167 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9168 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9169 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9170 VIXL_ASSERT(allow_macro_instructions_); 9171 VIXL_ASSERT(OutsideITBlock()); 9172 MacroEmissionCheckScope guard(this); 9173 ITScope it_scope(this, &cond); 9174 vrecps(cond, dt, rd, rn, rm); 9175 } 9176 void Vrecps(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 9177 Vrecps(al, dt, rd, rn, rm); 9178 } 9179 9180 void Vrev16(Condition cond, DataType dt, DRegister rd, DRegister rm) { 9181 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9182 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9183 VIXL_ASSERT(allow_macro_instructions_); 9184 VIXL_ASSERT(OutsideITBlock()); 9185 MacroEmissionCheckScope guard(this); 9186 ITScope it_scope(this, &cond); 9187 vrev16(cond, dt, rd, rm); 9188 } 9189 void Vrev16(DataType dt, DRegister rd, DRegister rm) { 9190 Vrev16(al, dt, rd, rm); 9191 } 9192 9193 void Vrev16(Condition cond, DataType dt, QRegister rd, QRegister rm) { 9194 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9195 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9196 VIXL_ASSERT(allow_macro_instructions_); 9197 VIXL_ASSERT(OutsideITBlock()); 9198 MacroEmissionCheckScope guard(this); 9199 ITScope it_scope(this, &cond); 9200 vrev16(cond, dt, rd, rm); 9201 } 9202 void Vrev16(DataType dt, QRegister rd, QRegister rm) { 9203 Vrev16(al, dt, rd, rm); 9204 } 9205 9206 void Vrev32(Condition cond, DataType dt, DRegister rd, DRegister rm) { 9207 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9208 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9209 VIXL_ASSERT(allow_macro_instructions_); 9210 VIXL_ASSERT(OutsideITBlock()); 9211 MacroEmissionCheckScope guard(this); 9212 ITScope it_scope(this, &cond); 9213 vrev32(cond, dt, rd, rm); 9214 } 9215 void Vrev32(DataType dt, DRegister rd, DRegister rm) { 9216 Vrev32(al, dt, rd, rm); 9217 } 9218 9219 void Vrev32(Condition cond, DataType dt, QRegister rd, QRegister rm) { 9220 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9221 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9222 VIXL_ASSERT(allow_macro_instructions_); 9223 VIXL_ASSERT(OutsideITBlock()); 9224 MacroEmissionCheckScope guard(this); 9225 ITScope it_scope(this, &cond); 9226 vrev32(cond, dt, rd, rm); 9227 } 9228 void Vrev32(DataType dt, QRegister rd, QRegister rm) { 9229 Vrev32(al, dt, rd, rm); 9230 } 9231 9232 void Vrev64(Condition cond, DataType dt, DRegister rd, DRegister rm) { 9233 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9234 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9235 VIXL_ASSERT(allow_macro_instructions_); 9236 VIXL_ASSERT(OutsideITBlock()); 9237 MacroEmissionCheckScope guard(this); 9238 ITScope it_scope(this, &cond); 9239 vrev64(cond, dt, rd, rm); 9240 } 9241 void Vrev64(DataType dt, DRegister rd, DRegister rm) { 9242 Vrev64(al, dt, rd, rm); 9243 } 9244 9245 void Vrev64(Condition cond, DataType dt, QRegister rd, QRegister rm) { 9246 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9247 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9248 VIXL_ASSERT(allow_macro_instructions_); 9249 VIXL_ASSERT(OutsideITBlock()); 9250 MacroEmissionCheckScope guard(this); 9251 ITScope it_scope(this, &cond); 9252 vrev64(cond, dt, rd, rm); 9253 } 9254 void Vrev64(DataType dt, QRegister rd, QRegister rm) { 9255 Vrev64(al, dt, rd, rm); 9256 } 9257 9258 void Vrhadd( 9259 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 9260 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9261 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9262 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9263 VIXL_ASSERT(allow_macro_instructions_); 9264 VIXL_ASSERT(OutsideITBlock()); 9265 MacroEmissionCheckScope guard(this); 9266 ITScope it_scope(this, &cond); 9267 vrhadd(cond, dt, rd, rn, rm); 9268 } 9269 void Vrhadd(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 9270 Vrhadd(al, dt, rd, rn, rm); 9271 } 9272 9273 void Vrhadd( 9274 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 9275 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9276 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9277 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9278 VIXL_ASSERT(allow_macro_instructions_); 9279 VIXL_ASSERT(OutsideITBlock()); 9280 MacroEmissionCheckScope guard(this); 9281 ITScope it_scope(this, &cond); 9282 vrhadd(cond, dt, rd, rn, rm); 9283 } 9284 void Vrhadd(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 9285 Vrhadd(al, dt, rd, rn, rm); 9286 } 9287 9288 void Vrinta(DataType dt1, DataType dt2, DRegister rd, DRegister rm) { 9289 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9290 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9291 VIXL_ASSERT(allow_macro_instructions_); 9292 VIXL_ASSERT(OutsideITBlock()); 9293 MacroEmissionCheckScope guard(this); 9294 vrinta(dt1, dt2, rd, rm); 9295 } 9296 9297 void Vrinta(DataType dt1, DataType dt2, QRegister rd, QRegister rm) { 9298 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9299 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9300 VIXL_ASSERT(allow_macro_instructions_); 9301 VIXL_ASSERT(OutsideITBlock()); 9302 MacroEmissionCheckScope guard(this); 9303 vrinta(dt1, dt2, rd, rm); 9304 } 9305 9306 void Vrinta(DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 9307 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9308 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9309 VIXL_ASSERT(allow_macro_instructions_); 9310 VIXL_ASSERT(OutsideITBlock()); 9311 MacroEmissionCheckScope guard(this); 9312 vrinta(dt1, dt2, rd, rm); 9313 } 9314 9315 void Vrintm(DataType dt1, DataType dt2, DRegister rd, DRegister rm) { 9316 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9317 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9318 VIXL_ASSERT(allow_macro_instructions_); 9319 VIXL_ASSERT(OutsideITBlock()); 9320 MacroEmissionCheckScope guard(this); 9321 vrintm(dt1, dt2, rd, rm); 9322 } 9323 9324 void Vrintm(DataType dt1, DataType dt2, QRegister rd, QRegister rm) { 9325 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9326 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9327 VIXL_ASSERT(allow_macro_instructions_); 9328 VIXL_ASSERT(OutsideITBlock()); 9329 MacroEmissionCheckScope guard(this); 9330 vrintm(dt1, dt2, rd, rm); 9331 } 9332 9333 void Vrintm(DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 9334 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9335 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9336 VIXL_ASSERT(allow_macro_instructions_); 9337 VIXL_ASSERT(OutsideITBlock()); 9338 MacroEmissionCheckScope guard(this); 9339 vrintm(dt1, dt2, rd, rm); 9340 } 9341 9342 void Vrintn(DataType dt1, DataType dt2, DRegister rd, DRegister rm) { 9343 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9344 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9345 VIXL_ASSERT(allow_macro_instructions_); 9346 VIXL_ASSERT(OutsideITBlock()); 9347 MacroEmissionCheckScope guard(this); 9348 vrintn(dt1, dt2, rd, rm); 9349 } 9350 9351 void Vrintn(DataType dt1, DataType dt2, QRegister rd, QRegister rm) { 9352 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9353 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9354 VIXL_ASSERT(allow_macro_instructions_); 9355 VIXL_ASSERT(OutsideITBlock()); 9356 MacroEmissionCheckScope guard(this); 9357 vrintn(dt1, dt2, rd, rm); 9358 } 9359 9360 void Vrintn(DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 9361 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9362 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9363 VIXL_ASSERT(allow_macro_instructions_); 9364 VIXL_ASSERT(OutsideITBlock()); 9365 MacroEmissionCheckScope guard(this); 9366 vrintn(dt1, dt2, rd, rm); 9367 } 9368 9369 void Vrintp(DataType dt1, DataType dt2, DRegister rd, DRegister rm) { 9370 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9371 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9372 VIXL_ASSERT(allow_macro_instructions_); 9373 VIXL_ASSERT(OutsideITBlock()); 9374 MacroEmissionCheckScope guard(this); 9375 vrintp(dt1, dt2, rd, rm); 9376 } 9377 9378 void Vrintp(DataType dt1, DataType dt2, QRegister rd, QRegister rm) { 9379 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9380 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9381 VIXL_ASSERT(allow_macro_instructions_); 9382 VIXL_ASSERT(OutsideITBlock()); 9383 MacroEmissionCheckScope guard(this); 9384 vrintp(dt1, dt2, rd, rm); 9385 } 9386 9387 void Vrintp(DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 9388 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9389 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9390 VIXL_ASSERT(allow_macro_instructions_); 9391 VIXL_ASSERT(OutsideITBlock()); 9392 MacroEmissionCheckScope guard(this); 9393 vrintp(dt1, dt2, rd, rm); 9394 } 9395 9396 void Vrintr( 9397 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 9398 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9399 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9400 VIXL_ASSERT(allow_macro_instructions_); 9401 VIXL_ASSERT(OutsideITBlock()); 9402 MacroEmissionCheckScope guard(this); 9403 ITScope it_scope(this, &cond); 9404 vrintr(cond, dt1, dt2, rd, rm); 9405 } 9406 void Vrintr(DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 9407 Vrintr(al, dt1, dt2, rd, rm); 9408 } 9409 9410 void Vrintr( 9411 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) { 9412 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9413 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9414 VIXL_ASSERT(allow_macro_instructions_); 9415 VIXL_ASSERT(OutsideITBlock()); 9416 MacroEmissionCheckScope guard(this); 9417 ITScope it_scope(this, &cond); 9418 vrintr(cond, dt1, dt2, rd, rm); 9419 } 9420 void Vrintr(DataType dt1, DataType dt2, DRegister rd, DRegister rm) { 9421 Vrintr(al, dt1, dt2, rd, rm); 9422 } 9423 9424 void Vrintx( 9425 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) { 9426 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9427 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9428 VIXL_ASSERT(allow_macro_instructions_); 9429 VIXL_ASSERT(OutsideITBlock()); 9430 MacroEmissionCheckScope guard(this); 9431 ITScope it_scope(this, &cond); 9432 vrintx(cond, dt1, dt2, rd, rm); 9433 } 9434 void Vrintx(DataType dt1, DataType dt2, DRegister rd, DRegister rm) { 9435 Vrintx(al, dt1, dt2, rd, rm); 9436 } 9437 9438 void Vrintx(DataType dt1, DataType dt2, QRegister rd, QRegister rm) { 9439 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9440 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9441 VIXL_ASSERT(allow_macro_instructions_); 9442 VIXL_ASSERT(OutsideITBlock()); 9443 MacroEmissionCheckScope guard(this); 9444 vrintx(dt1, dt2, rd, rm); 9445 } 9446 9447 void Vrintx( 9448 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 9449 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9450 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9451 VIXL_ASSERT(allow_macro_instructions_); 9452 VIXL_ASSERT(OutsideITBlock()); 9453 MacroEmissionCheckScope guard(this); 9454 ITScope it_scope(this, &cond); 9455 vrintx(cond, dt1, dt2, rd, rm); 9456 } 9457 void Vrintx(DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 9458 Vrintx(al, dt1, dt2, rd, rm); 9459 } 9460 9461 void Vrintz( 9462 Condition cond, DataType dt1, DataType dt2, DRegister rd, DRegister rm) { 9463 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9464 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9465 VIXL_ASSERT(allow_macro_instructions_); 9466 VIXL_ASSERT(OutsideITBlock()); 9467 MacroEmissionCheckScope guard(this); 9468 ITScope it_scope(this, &cond); 9469 vrintz(cond, dt1, dt2, rd, rm); 9470 } 9471 void Vrintz(DataType dt1, DataType dt2, DRegister rd, DRegister rm) { 9472 Vrintz(al, dt1, dt2, rd, rm); 9473 } 9474 9475 void Vrintz(DataType dt1, DataType dt2, QRegister rd, QRegister rm) { 9476 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9477 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9478 VIXL_ASSERT(allow_macro_instructions_); 9479 VIXL_ASSERT(OutsideITBlock()); 9480 MacroEmissionCheckScope guard(this); 9481 vrintz(dt1, dt2, rd, rm); 9482 } 9483 9484 void Vrintz( 9485 Condition cond, DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 9486 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9487 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9488 VIXL_ASSERT(allow_macro_instructions_); 9489 VIXL_ASSERT(OutsideITBlock()); 9490 MacroEmissionCheckScope guard(this); 9491 ITScope it_scope(this, &cond); 9492 vrintz(cond, dt1, dt2, rd, rm); 9493 } 9494 void Vrintz(DataType dt1, DataType dt2, SRegister rd, SRegister rm) { 9495 Vrintz(al, dt1, dt2, rd, rm); 9496 } 9497 9498 void Vrshl( 9499 Condition cond, DataType dt, DRegister rd, DRegister rm, DRegister rn) { 9500 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9501 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9502 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9503 VIXL_ASSERT(allow_macro_instructions_); 9504 VIXL_ASSERT(OutsideITBlock()); 9505 MacroEmissionCheckScope guard(this); 9506 ITScope it_scope(this, &cond); 9507 vrshl(cond, dt, rd, rm, rn); 9508 } 9509 void Vrshl(DataType dt, DRegister rd, DRegister rm, DRegister rn) { 9510 Vrshl(al, dt, rd, rm, rn); 9511 } 9512 9513 void Vrshl( 9514 Condition cond, DataType dt, QRegister rd, QRegister rm, QRegister rn) { 9515 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9516 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9517 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9518 VIXL_ASSERT(allow_macro_instructions_); 9519 VIXL_ASSERT(OutsideITBlock()); 9520 MacroEmissionCheckScope guard(this); 9521 ITScope it_scope(this, &cond); 9522 vrshl(cond, dt, rd, rm, rn); 9523 } 9524 void Vrshl(DataType dt, QRegister rd, QRegister rm, QRegister rn) { 9525 Vrshl(al, dt, rd, rm, rn); 9526 } 9527 9528 void Vrshr(Condition cond, 9529 DataType dt, 9530 DRegister rd, 9531 DRegister rm, 9532 const DOperand& operand) { 9533 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9534 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9535 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9536 VIXL_ASSERT(allow_macro_instructions_); 9537 VIXL_ASSERT(OutsideITBlock()); 9538 MacroEmissionCheckScope guard(this); 9539 ITScope it_scope(this, &cond); 9540 vrshr(cond, dt, rd, rm, operand); 9541 } 9542 void Vrshr(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) { 9543 Vrshr(al, dt, rd, rm, operand); 9544 } 9545 9546 void Vrshr(Condition cond, 9547 DataType dt, 9548 QRegister rd, 9549 QRegister rm, 9550 const QOperand& operand) { 9551 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9552 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9553 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9554 VIXL_ASSERT(allow_macro_instructions_); 9555 VIXL_ASSERT(OutsideITBlock()); 9556 MacroEmissionCheckScope guard(this); 9557 ITScope it_scope(this, &cond); 9558 vrshr(cond, dt, rd, rm, operand); 9559 } 9560 void Vrshr(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) { 9561 Vrshr(al, dt, rd, rm, operand); 9562 } 9563 9564 void Vrshrn(Condition cond, 9565 DataType dt, 9566 DRegister rd, 9567 QRegister rm, 9568 const QOperand& operand) { 9569 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9570 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9571 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9572 VIXL_ASSERT(allow_macro_instructions_); 9573 VIXL_ASSERT(OutsideITBlock()); 9574 MacroEmissionCheckScope guard(this); 9575 ITScope it_scope(this, &cond); 9576 vrshrn(cond, dt, rd, rm, operand); 9577 } 9578 void Vrshrn(DataType dt, 9579 DRegister rd, 9580 QRegister rm, 9581 const QOperand& operand) { 9582 Vrshrn(al, dt, rd, rm, operand); 9583 } 9584 9585 void Vrsqrte(Condition cond, DataType dt, DRegister rd, DRegister rm) { 9586 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9587 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9588 VIXL_ASSERT(allow_macro_instructions_); 9589 VIXL_ASSERT(OutsideITBlock()); 9590 MacroEmissionCheckScope guard(this); 9591 ITScope it_scope(this, &cond); 9592 vrsqrte(cond, dt, rd, rm); 9593 } 9594 void Vrsqrte(DataType dt, DRegister rd, DRegister rm) { 9595 Vrsqrte(al, dt, rd, rm); 9596 } 9597 9598 void Vrsqrte(Condition cond, DataType dt, QRegister rd, QRegister rm) { 9599 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9600 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9601 VIXL_ASSERT(allow_macro_instructions_); 9602 VIXL_ASSERT(OutsideITBlock()); 9603 MacroEmissionCheckScope guard(this); 9604 ITScope it_scope(this, &cond); 9605 vrsqrte(cond, dt, rd, rm); 9606 } 9607 void Vrsqrte(DataType dt, QRegister rd, QRegister rm) { 9608 Vrsqrte(al, dt, rd, rm); 9609 } 9610 9611 void Vrsqrts( 9612 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 9613 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9614 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9615 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9616 VIXL_ASSERT(allow_macro_instructions_); 9617 VIXL_ASSERT(OutsideITBlock()); 9618 MacroEmissionCheckScope guard(this); 9619 ITScope it_scope(this, &cond); 9620 vrsqrts(cond, dt, rd, rn, rm); 9621 } 9622 void Vrsqrts(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 9623 Vrsqrts(al, dt, rd, rn, rm); 9624 } 9625 9626 void Vrsqrts( 9627 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 9628 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9629 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9630 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9631 VIXL_ASSERT(allow_macro_instructions_); 9632 VIXL_ASSERT(OutsideITBlock()); 9633 MacroEmissionCheckScope guard(this); 9634 ITScope it_scope(this, &cond); 9635 vrsqrts(cond, dt, rd, rn, rm); 9636 } 9637 void Vrsqrts(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 9638 Vrsqrts(al, dt, rd, rn, rm); 9639 } 9640 9641 void Vrsra(Condition cond, 9642 DataType dt, 9643 DRegister rd, 9644 DRegister rm, 9645 const DOperand& operand) { 9646 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9647 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9648 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9649 VIXL_ASSERT(allow_macro_instructions_); 9650 VIXL_ASSERT(OutsideITBlock()); 9651 MacroEmissionCheckScope guard(this); 9652 ITScope it_scope(this, &cond); 9653 vrsra(cond, dt, rd, rm, operand); 9654 } 9655 void Vrsra(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) { 9656 Vrsra(al, dt, rd, rm, operand); 9657 } 9658 9659 void Vrsra(Condition cond, 9660 DataType dt, 9661 QRegister rd, 9662 QRegister rm, 9663 const QOperand& operand) { 9664 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9665 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9666 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9667 VIXL_ASSERT(allow_macro_instructions_); 9668 VIXL_ASSERT(OutsideITBlock()); 9669 MacroEmissionCheckScope guard(this); 9670 ITScope it_scope(this, &cond); 9671 vrsra(cond, dt, rd, rm, operand); 9672 } 9673 void Vrsra(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) { 9674 Vrsra(al, dt, rd, rm, operand); 9675 } 9676 9677 void Vrsubhn( 9678 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) { 9679 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9680 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9681 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9682 VIXL_ASSERT(allow_macro_instructions_); 9683 VIXL_ASSERT(OutsideITBlock()); 9684 MacroEmissionCheckScope guard(this); 9685 ITScope it_scope(this, &cond); 9686 vrsubhn(cond, dt, rd, rn, rm); 9687 } 9688 void Vrsubhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) { 9689 Vrsubhn(al, dt, rd, rn, rm); 9690 } 9691 9692 void Vseleq(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 9693 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9694 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9695 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9696 VIXL_ASSERT(allow_macro_instructions_); 9697 VIXL_ASSERT(OutsideITBlock()); 9698 MacroEmissionCheckScope guard(this); 9699 vseleq(dt, rd, rn, rm); 9700 } 9701 9702 void Vseleq(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 9703 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9704 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9705 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9706 VIXL_ASSERT(allow_macro_instructions_); 9707 VIXL_ASSERT(OutsideITBlock()); 9708 MacroEmissionCheckScope guard(this); 9709 vseleq(dt, rd, rn, rm); 9710 } 9711 9712 void Vselge(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 9713 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9714 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9715 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9716 VIXL_ASSERT(allow_macro_instructions_); 9717 VIXL_ASSERT(OutsideITBlock()); 9718 MacroEmissionCheckScope guard(this); 9719 vselge(dt, rd, rn, rm); 9720 } 9721 9722 void Vselge(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 9723 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9724 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9725 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9726 VIXL_ASSERT(allow_macro_instructions_); 9727 VIXL_ASSERT(OutsideITBlock()); 9728 MacroEmissionCheckScope guard(this); 9729 vselge(dt, rd, rn, rm); 9730 } 9731 9732 void Vselgt(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 9733 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9734 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9735 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9736 VIXL_ASSERT(allow_macro_instructions_); 9737 VIXL_ASSERT(OutsideITBlock()); 9738 MacroEmissionCheckScope guard(this); 9739 vselgt(dt, rd, rn, rm); 9740 } 9741 9742 void Vselgt(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 9743 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9744 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9745 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9746 VIXL_ASSERT(allow_macro_instructions_); 9747 VIXL_ASSERT(OutsideITBlock()); 9748 MacroEmissionCheckScope guard(this); 9749 vselgt(dt, rd, rn, rm); 9750 } 9751 9752 void Vselvs(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 9753 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9754 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9755 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9756 VIXL_ASSERT(allow_macro_instructions_); 9757 VIXL_ASSERT(OutsideITBlock()); 9758 MacroEmissionCheckScope guard(this); 9759 vselvs(dt, rd, rn, rm); 9760 } 9761 9762 void Vselvs(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 9763 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9764 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 9765 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9766 VIXL_ASSERT(allow_macro_instructions_); 9767 VIXL_ASSERT(OutsideITBlock()); 9768 MacroEmissionCheckScope guard(this); 9769 vselvs(dt, rd, rn, rm); 9770 } 9771 9772 void Vshl(Condition cond, 9773 DataType dt, 9774 DRegister rd, 9775 DRegister rm, 9776 const DOperand& operand) { 9777 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9778 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9779 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9780 VIXL_ASSERT(allow_macro_instructions_); 9781 VIXL_ASSERT(OutsideITBlock()); 9782 MacroEmissionCheckScope guard(this); 9783 ITScope it_scope(this, &cond); 9784 vshl(cond, dt, rd, rm, operand); 9785 } 9786 void Vshl(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) { 9787 Vshl(al, dt, rd, rm, operand); 9788 } 9789 9790 void Vshl(Condition cond, 9791 DataType dt, 9792 QRegister rd, 9793 QRegister rm, 9794 const QOperand& operand) { 9795 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9796 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9797 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9798 VIXL_ASSERT(allow_macro_instructions_); 9799 VIXL_ASSERT(OutsideITBlock()); 9800 MacroEmissionCheckScope guard(this); 9801 ITScope it_scope(this, &cond); 9802 vshl(cond, dt, rd, rm, operand); 9803 } 9804 void Vshl(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) { 9805 Vshl(al, dt, rd, rm, operand); 9806 } 9807 9808 void Vshll(Condition cond, 9809 DataType dt, 9810 QRegister rd, 9811 DRegister rm, 9812 const DOperand& operand) { 9813 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9814 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9815 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9816 VIXL_ASSERT(allow_macro_instructions_); 9817 VIXL_ASSERT(OutsideITBlock()); 9818 MacroEmissionCheckScope guard(this); 9819 ITScope it_scope(this, &cond); 9820 vshll(cond, dt, rd, rm, operand); 9821 } 9822 void Vshll(DataType dt, QRegister rd, DRegister rm, const DOperand& operand) { 9823 Vshll(al, dt, rd, rm, operand); 9824 } 9825 9826 void Vshr(Condition cond, 9827 DataType dt, 9828 DRegister rd, 9829 DRegister rm, 9830 const DOperand& operand) { 9831 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9832 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9833 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9834 VIXL_ASSERT(allow_macro_instructions_); 9835 VIXL_ASSERT(OutsideITBlock()); 9836 MacroEmissionCheckScope guard(this); 9837 ITScope it_scope(this, &cond); 9838 vshr(cond, dt, rd, rm, operand); 9839 } 9840 void Vshr(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) { 9841 Vshr(al, dt, rd, rm, operand); 9842 } 9843 9844 void Vshr(Condition cond, 9845 DataType dt, 9846 QRegister rd, 9847 QRegister rm, 9848 const QOperand& operand) { 9849 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9850 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9851 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9852 VIXL_ASSERT(allow_macro_instructions_); 9853 VIXL_ASSERT(OutsideITBlock()); 9854 MacroEmissionCheckScope guard(this); 9855 ITScope it_scope(this, &cond); 9856 vshr(cond, dt, rd, rm, operand); 9857 } 9858 void Vshr(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) { 9859 Vshr(al, dt, rd, rm, operand); 9860 } 9861 9862 void Vshrn(Condition cond, 9863 DataType dt, 9864 DRegister rd, 9865 QRegister rm, 9866 const QOperand& operand) { 9867 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9868 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9869 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9870 VIXL_ASSERT(allow_macro_instructions_); 9871 VIXL_ASSERT(OutsideITBlock()); 9872 MacroEmissionCheckScope guard(this); 9873 ITScope it_scope(this, &cond); 9874 vshrn(cond, dt, rd, rm, operand); 9875 } 9876 void Vshrn(DataType dt, DRegister rd, QRegister rm, const QOperand& operand) { 9877 Vshrn(al, dt, rd, rm, operand); 9878 } 9879 9880 void Vsli(Condition cond, 9881 DataType dt, 9882 DRegister rd, 9883 DRegister rm, 9884 const DOperand& operand) { 9885 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9886 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9887 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9888 VIXL_ASSERT(allow_macro_instructions_); 9889 VIXL_ASSERT(OutsideITBlock()); 9890 MacroEmissionCheckScope guard(this); 9891 ITScope it_scope(this, &cond); 9892 vsli(cond, dt, rd, rm, operand); 9893 } 9894 void Vsli(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) { 9895 Vsli(al, dt, rd, rm, operand); 9896 } 9897 9898 void Vsli(Condition cond, 9899 DataType dt, 9900 QRegister rd, 9901 QRegister rm, 9902 const QOperand& operand) { 9903 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9904 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9905 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9906 VIXL_ASSERT(allow_macro_instructions_); 9907 VIXL_ASSERT(OutsideITBlock()); 9908 MacroEmissionCheckScope guard(this); 9909 ITScope it_scope(this, &cond); 9910 vsli(cond, dt, rd, rm, operand); 9911 } 9912 void Vsli(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) { 9913 Vsli(al, dt, rd, rm, operand); 9914 } 9915 9916 void Vsqrt(Condition cond, DataType dt, SRegister rd, SRegister rm) { 9917 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9918 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9919 VIXL_ASSERT(allow_macro_instructions_); 9920 VIXL_ASSERT(OutsideITBlock()); 9921 MacroEmissionCheckScope guard(this); 9922 ITScope it_scope(this, &cond); 9923 vsqrt(cond, dt, rd, rm); 9924 } 9925 void Vsqrt(DataType dt, SRegister rd, SRegister rm) { Vsqrt(al, dt, rd, rm); } 9926 9927 void Vsqrt(Condition cond, DataType dt, DRegister rd, DRegister rm) { 9928 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9929 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9930 VIXL_ASSERT(allow_macro_instructions_); 9931 VIXL_ASSERT(OutsideITBlock()); 9932 MacroEmissionCheckScope guard(this); 9933 ITScope it_scope(this, &cond); 9934 vsqrt(cond, dt, rd, rm); 9935 } 9936 void Vsqrt(DataType dt, DRegister rd, DRegister rm) { Vsqrt(al, dt, rd, rm); } 9937 9938 void Vsra(Condition cond, 9939 DataType dt, 9940 DRegister rd, 9941 DRegister rm, 9942 const DOperand& operand) { 9943 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9944 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9945 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9946 VIXL_ASSERT(allow_macro_instructions_); 9947 VIXL_ASSERT(OutsideITBlock()); 9948 MacroEmissionCheckScope guard(this); 9949 ITScope it_scope(this, &cond); 9950 vsra(cond, dt, rd, rm, operand); 9951 } 9952 void Vsra(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) { 9953 Vsra(al, dt, rd, rm, operand); 9954 } 9955 9956 void Vsra(Condition cond, 9957 DataType dt, 9958 QRegister rd, 9959 QRegister rm, 9960 const QOperand& operand) { 9961 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9962 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9963 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9964 VIXL_ASSERT(allow_macro_instructions_); 9965 VIXL_ASSERT(OutsideITBlock()); 9966 MacroEmissionCheckScope guard(this); 9967 ITScope it_scope(this, &cond); 9968 vsra(cond, dt, rd, rm, operand); 9969 } 9970 void Vsra(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) { 9971 Vsra(al, dt, rd, rm, operand); 9972 } 9973 9974 void Vsri(Condition cond, 9975 DataType dt, 9976 DRegister rd, 9977 DRegister rm, 9978 const DOperand& operand) { 9979 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9980 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9981 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 9982 VIXL_ASSERT(allow_macro_instructions_); 9983 VIXL_ASSERT(OutsideITBlock()); 9984 MacroEmissionCheckScope guard(this); 9985 ITScope it_scope(this, &cond); 9986 vsri(cond, dt, rd, rm, operand); 9987 } 9988 void Vsri(DataType dt, DRegister rd, DRegister rm, const DOperand& operand) { 9989 Vsri(al, dt, rd, rm, operand); 9990 } 9991 9992 void Vsri(Condition cond, 9993 DataType dt, 9994 QRegister rd, 9995 QRegister rm, 9996 const QOperand& operand) { 9997 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 9998 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 9999 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 10000 VIXL_ASSERT(allow_macro_instructions_); 10001 VIXL_ASSERT(OutsideITBlock()); 10002 MacroEmissionCheckScope guard(this); 10003 ITScope it_scope(this, &cond); 10004 vsri(cond, dt, rd, rm, operand); 10005 } 10006 void Vsri(DataType dt, QRegister rd, QRegister rm, const QOperand& operand) { 10007 Vsri(al, dt, rd, rm, operand); 10008 } 10009 10010 void Vst1(Condition cond, 10011 DataType dt, 10012 const NeonRegisterList& nreglist, 10013 const AlignedMemOperand& operand) { 10014 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist)); 10015 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 10016 VIXL_ASSERT(allow_macro_instructions_); 10017 VIXL_ASSERT(OutsideITBlock()); 10018 MacroEmissionCheckScope guard(this); 10019 ITScope it_scope(this, &cond); 10020 vst1(cond, dt, nreglist, operand); 10021 } 10022 void Vst1(DataType dt, 10023 const NeonRegisterList& nreglist, 10024 const AlignedMemOperand& operand) { 10025 Vst1(al, dt, nreglist, operand); 10026 } 10027 10028 void Vst2(Condition cond, 10029 DataType dt, 10030 const NeonRegisterList& nreglist, 10031 const AlignedMemOperand& operand) { 10032 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist)); 10033 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 10034 VIXL_ASSERT(allow_macro_instructions_); 10035 VIXL_ASSERT(OutsideITBlock()); 10036 MacroEmissionCheckScope guard(this); 10037 ITScope it_scope(this, &cond); 10038 vst2(cond, dt, nreglist, operand); 10039 } 10040 void Vst2(DataType dt, 10041 const NeonRegisterList& nreglist, 10042 const AlignedMemOperand& operand) { 10043 Vst2(al, dt, nreglist, operand); 10044 } 10045 10046 void Vst3(Condition cond, 10047 DataType dt, 10048 const NeonRegisterList& nreglist, 10049 const AlignedMemOperand& operand) { 10050 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist)); 10051 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 10052 VIXL_ASSERT(allow_macro_instructions_); 10053 VIXL_ASSERT(OutsideITBlock()); 10054 MacroEmissionCheckScope guard(this); 10055 ITScope it_scope(this, &cond); 10056 vst3(cond, dt, nreglist, operand); 10057 } 10058 void Vst3(DataType dt, 10059 const NeonRegisterList& nreglist, 10060 const AlignedMemOperand& operand) { 10061 Vst3(al, dt, nreglist, operand); 10062 } 10063 10064 void Vst3(Condition cond, 10065 DataType dt, 10066 const NeonRegisterList& nreglist, 10067 const MemOperand& operand) { 10068 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist)); 10069 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 10070 VIXL_ASSERT(allow_macro_instructions_); 10071 VIXL_ASSERT(OutsideITBlock()); 10072 MacroEmissionCheckScope guard(this); 10073 ITScope it_scope(this, &cond); 10074 vst3(cond, dt, nreglist, operand); 10075 } 10076 void Vst3(DataType dt, 10077 const NeonRegisterList& nreglist, 10078 const MemOperand& operand) { 10079 Vst3(al, dt, nreglist, operand); 10080 } 10081 10082 void Vst4(Condition cond, 10083 DataType dt, 10084 const NeonRegisterList& nreglist, 10085 const AlignedMemOperand& operand) { 10086 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist)); 10087 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 10088 VIXL_ASSERT(allow_macro_instructions_); 10089 VIXL_ASSERT(OutsideITBlock()); 10090 MacroEmissionCheckScope guard(this); 10091 ITScope it_scope(this, &cond); 10092 vst4(cond, dt, nreglist, operand); 10093 } 10094 void Vst4(DataType dt, 10095 const NeonRegisterList& nreglist, 10096 const AlignedMemOperand& operand) { 10097 Vst4(al, dt, nreglist, operand); 10098 } 10099 10100 void Vstm(Condition cond, 10101 DataType dt, 10102 Register rn, 10103 WriteBack write_back, 10104 DRegisterList dreglist) { 10105 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 10106 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); 10107 VIXL_ASSERT(allow_macro_instructions_); 10108 VIXL_ASSERT(OutsideITBlock()); 10109 MacroEmissionCheckScope guard(this); 10110 ITScope it_scope(this, &cond); 10111 vstm(cond, dt, rn, write_back, dreglist); 10112 } 10113 void Vstm(DataType dt, 10114 Register rn, 10115 WriteBack write_back, 10116 DRegisterList dreglist) { 10117 Vstm(al, dt, rn, write_back, dreglist); 10118 } 10119 void Vstm(Condition cond, 10120 Register rn, 10121 WriteBack write_back, 10122 DRegisterList dreglist) { 10123 Vstm(cond, kDataTypeValueNone, rn, write_back, dreglist); 10124 } 10125 void Vstm(Register rn, WriteBack write_back, DRegisterList dreglist) { 10126 Vstm(al, kDataTypeValueNone, rn, write_back, dreglist); 10127 } 10128 10129 void Vstm(Condition cond, 10130 DataType dt, 10131 Register rn, 10132 WriteBack write_back, 10133 SRegisterList sreglist) { 10134 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 10135 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist)); 10136 VIXL_ASSERT(allow_macro_instructions_); 10137 VIXL_ASSERT(OutsideITBlock()); 10138 MacroEmissionCheckScope guard(this); 10139 ITScope it_scope(this, &cond); 10140 vstm(cond, dt, rn, write_back, sreglist); 10141 } 10142 void Vstm(DataType dt, 10143 Register rn, 10144 WriteBack write_back, 10145 SRegisterList sreglist) { 10146 Vstm(al, dt, rn, write_back, sreglist); 10147 } 10148 void Vstm(Condition cond, 10149 Register rn, 10150 WriteBack write_back, 10151 SRegisterList sreglist) { 10152 Vstm(cond, kDataTypeValueNone, rn, write_back, sreglist); 10153 } 10154 void Vstm(Register rn, WriteBack write_back, SRegisterList sreglist) { 10155 Vstm(al, kDataTypeValueNone, rn, write_back, sreglist); 10156 } 10157 10158 void Vstmdb(Condition cond, 10159 DataType dt, 10160 Register rn, 10161 WriteBack write_back, 10162 DRegisterList dreglist) { 10163 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 10164 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); 10165 VIXL_ASSERT(allow_macro_instructions_); 10166 VIXL_ASSERT(OutsideITBlock()); 10167 MacroEmissionCheckScope guard(this); 10168 ITScope it_scope(this, &cond); 10169 vstmdb(cond, dt, rn, write_back, dreglist); 10170 } 10171 void Vstmdb(DataType dt, 10172 Register rn, 10173 WriteBack write_back, 10174 DRegisterList dreglist) { 10175 Vstmdb(al, dt, rn, write_back, dreglist); 10176 } 10177 void Vstmdb(Condition cond, 10178 Register rn, 10179 WriteBack write_back, 10180 DRegisterList dreglist) { 10181 Vstmdb(cond, kDataTypeValueNone, rn, write_back, dreglist); 10182 } 10183 void Vstmdb(Register rn, WriteBack write_back, DRegisterList dreglist) { 10184 Vstmdb(al, kDataTypeValueNone, rn, write_back, dreglist); 10185 } 10186 10187 void Vstmdb(Condition cond, 10188 DataType dt, 10189 Register rn, 10190 WriteBack write_back, 10191 SRegisterList sreglist) { 10192 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 10193 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist)); 10194 VIXL_ASSERT(allow_macro_instructions_); 10195 VIXL_ASSERT(OutsideITBlock()); 10196 MacroEmissionCheckScope guard(this); 10197 ITScope it_scope(this, &cond); 10198 vstmdb(cond, dt, rn, write_back, sreglist); 10199 } 10200 void Vstmdb(DataType dt, 10201 Register rn, 10202 WriteBack write_back, 10203 SRegisterList sreglist) { 10204 Vstmdb(al, dt, rn, write_back, sreglist); 10205 } 10206 void Vstmdb(Condition cond, 10207 Register rn, 10208 WriteBack write_back, 10209 SRegisterList sreglist) { 10210 Vstmdb(cond, kDataTypeValueNone, rn, write_back, sreglist); 10211 } 10212 void Vstmdb(Register rn, WriteBack write_back, SRegisterList sreglist) { 10213 Vstmdb(al, kDataTypeValueNone, rn, write_back, sreglist); 10214 } 10215 10216 void Vstmia(Condition cond, 10217 DataType dt, 10218 Register rn, 10219 WriteBack write_back, 10220 DRegisterList dreglist) { 10221 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 10222 VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); 10223 VIXL_ASSERT(allow_macro_instructions_); 10224 VIXL_ASSERT(OutsideITBlock()); 10225 MacroEmissionCheckScope guard(this); 10226 ITScope it_scope(this, &cond); 10227 vstmia(cond, dt, rn, write_back, dreglist); 10228 } 10229 void Vstmia(DataType dt, 10230 Register rn, 10231 WriteBack write_back, 10232 DRegisterList dreglist) { 10233 Vstmia(al, dt, rn, write_back, dreglist); 10234 } 10235 void Vstmia(Condition cond, 10236 Register rn, 10237 WriteBack write_back, 10238 DRegisterList dreglist) { 10239 Vstmia(cond, kDataTypeValueNone, rn, write_back, dreglist); 10240 } 10241 void Vstmia(Register rn, WriteBack write_back, DRegisterList dreglist) { 10242 Vstmia(al, kDataTypeValueNone, rn, write_back, dreglist); 10243 } 10244 10245 void Vstmia(Condition cond, 10246 DataType dt, 10247 Register rn, 10248 WriteBack write_back, 10249 SRegisterList sreglist) { 10250 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 10251 VIXL_ASSERT(!AliasesAvailableScratchRegister(sreglist)); 10252 VIXL_ASSERT(allow_macro_instructions_); 10253 VIXL_ASSERT(OutsideITBlock()); 10254 MacroEmissionCheckScope guard(this); 10255 ITScope it_scope(this, &cond); 10256 vstmia(cond, dt, rn, write_back, sreglist); 10257 } 10258 void Vstmia(DataType dt, 10259 Register rn, 10260 WriteBack write_back, 10261 SRegisterList sreglist) { 10262 Vstmia(al, dt, rn, write_back, sreglist); 10263 } 10264 void Vstmia(Condition cond, 10265 Register rn, 10266 WriteBack write_back, 10267 SRegisterList sreglist) { 10268 Vstmia(cond, kDataTypeValueNone, rn, write_back, sreglist); 10269 } 10270 void Vstmia(Register rn, WriteBack write_back, SRegisterList sreglist) { 10271 Vstmia(al, kDataTypeValueNone, rn, write_back, sreglist); 10272 } 10273 10274 void Vstr(Condition cond, 10275 DataType dt, 10276 DRegister rd, 10277 const MemOperand& operand) { 10278 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10279 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 10280 VIXL_ASSERT(allow_macro_instructions_); 10281 VIXL_ASSERT(OutsideITBlock()); 10282 MacroEmissionCheckScope guard(this); 10283 ITScope it_scope(this, &cond); 10284 vstr(cond, dt, rd, operand); 10285 } 10286 void Vstr(DataType dt, DRegister rd, const MemOperand& operand) { 10287 Vstr(al, dt, rd, operand); 10288 } 10289 void Vstr(Condition cond, DRegister rd, const MemOperand& operand) { 10290 Vstr(cond, Untyped64, rd, operand); 10291 } 10292 void Vstr(DRegister rd, const MemOperand& operand) { 10293 Vstr(al, Untyped64, rd, operand); 10294 } 10295 10296 void Vstr(Condition cond, 10297 DataType dt, 10298 SRegister rd, 10299 const MemOperand& operand) { 10300 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10301 VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); 10302 VIXL_ASSERT(allow_macro_instructions_); 10303 VIXL_ASSERT(OutsideITBlock()); 10304 MacroEmissionCheckScope guard(this); 10305 ITScope it_scope(this, &cond); 10306 vstr(cond, dt, rd, operand); 10307 } 10308 void Vstr(DataType dt, SRegister rd, const MemOperand& operand) { 10309 Vstr(al, dt, rd, operand); 10310 } 10311 void Vstr(Condition cond, SRegister rd, const MemOperand& operand) { 10312 Vstr(cond, Untyped32, rd, operand); 10313 } 10314 void Vstr(SRegister rd, const MemOperand& operand) { 10315 Vstr(al, Untyped32, rd, operand); 10316 } 10317 10318 void Vsub( 10319 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 10320 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10321 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 10322 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10323 VIXL_ASSERT(allow_macro_instructions_); 10324 VIXL_ASSERT(OutsideITBlock()); 10325 MacroEmissionCheckScope guard(this); 10326 ITScope it_scope(this, &cond); 10327 vsub(cond, dt, rd, rn, rm); 10328 } 10329 void Vsub(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 10330 Vsub(al, dt, rd, rn, rm); 10331 } 10332 10333 void Vsub( 10334 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 10335 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10336 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 10337 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10338 VIXL_ASSERT(allow_macro_instructions_); 10339 VIXL_ASSERT(OutsideITBlock()); 10340 MacroEmissionCheckScope guard(this); 10341 ITScope it_scope(this, &cond); 10342 vsub(cond, dt, rd, rn, rm); 10343 } 10344 void Vsub(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 10345 Vsub(al, dt, rd, rn, rm); 10346 } 10347 10348 void Vsub( 10349 Condition cond, DataType dt, SRegister rd, SRegister rn, SRegister rm) { 10350 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10351 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 10352 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10353 VIXL_ASSERT(allow_macro_instructions_); 10354 VIXL_ASSERT(OutsideITBlock()); 10355 MacroEmissionCheckScope guard(this); 10356 ITScope it_scope(this, &cond); 10357 vsub(cond, dt, rd, rn, rm); 10358 } 10359 void Vsub(DataType dt, SRegister rd, SRegister rn, SRegister rm) { 10360 Vsub(al, dt, rd, rn, rm); 10361 } 10362 10363 void Vsubhn( 10364 Condition cond, DataType dt, DRegister rd, QRegister rn, QRegister rm) { 10365 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10366 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 10367 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10368 VIXL_ASSERT(allow_macro_instructions_); 10369 VIXL_ASSERT(OutsideITBlock()); 10370 MacroEmissionCheckScope guard(this); 10371 ITScope it_scope(this, &cond); 10372 vsubhn(cond, dt, rd, rn, rm); 10373 } 10374 void Vsubhn(DataType dt, DRegister rd, QRegister rn, QRegister rm) { 10375 Vsubhn(al, dt, rd, rn, rm); 10376 } 10377 10378 void Vsubl( 10379 Condition cond, DataType dt, QRegister rd, DRegister rn, DRegister rm) { 10380 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10381 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 10382 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10383 VIXL_ASSERT(allow_macro_instructions_); 10384 VIXL_ASSERT(OutsideITBlock()); 10385 MacroEmissionCheckScope guard(this); 10386 ITScope it_scope(this, &cond); 10387 vsubl(cond, dt, rd, rn, rm); 10388 } 10389 void Vsubl(DataType dt, QRegister rd, DRegister rn, DRegister rm) { 10390 Vsubl(al, dt, rd, rn, rm); 10391 } 10392 10393 void Vsubw( 10394 Condition cond, DataType dt, QRegister rd, QRegister rn, DRegister rm) { 10395 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10396 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 10397 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10398 VIXL_ASSERT(allow_macro_instructions_); 10399 VIXL_ASSERT(OutsideITBlock()); 10400 MacroEmissionCheckScope guard(this); 10401 ITScope it_scope(this, &cond); 10402 vsubw(cond, dt, rd, rn, rm); 10403 } 10404 void Vsubw(DataType dt, QRegister rd, QRegister rn, DRegister rm) { 10405 Vsubw(al, dt, rd, rn, rm); 10406 } 10407 10408 void Vswp(Condition cond, DataType dt, DRegister rd, DRegister rm) { 10409 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10410 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10411 VIXL_ASSERT(allow_macro_instructions_); 10412 VIXL_ASSERT(OutsideITBlock()); 10413 MacroEmissionCheckScope guard(this); 10414 ITScope it_scope(this, &cond); 10415 vswp(cond, dt, rd, rm); 10416 } 10417 void Vswp(DataType dt, DRegister rd, DRegister rm) { Vswp(al, dt, rd, rm); } 10418 void Vswp(Condition cond, DRegister rd, DRegister rm) { 10419 Vswp(cond, kDataTypeValueNone, rd, rm); 10420 } 10421 void Vswp(DRegister rd, DRegister rm) { 10422 Vswp(al, kDataTypeValueNone, rd, rm); 10423 } 10424 10425 void Vswp(Condition cond, DataType dt, QRegister rd, QRegister rm) { 10426 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10427 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10428 VIXL_ASSERT(allow_macro_instructions_); 10429 VIXL_ASSERT(OutsideITBlock()); 10430 MacroEmissionCheckScope guard(this); 10431 ITScope it_scope(this, &cond); 10432 vswp(cond, dt, rd, rm); 10433 } 10434 void Vswp(DataType dt, QRegister rd, QRegister rm) { Vswp(al, dt, rd, rm); } 10435 void Vswp(Condition cond, QRegister rd, QRegister rm) { 10436 Vswp(cond, kDataTypeValueNone, rd, rm); 10437 } 10438 void Vswp(QRegister rd, QRegister rm) { 10439 Vswp(al, kDataTypeValueNone, rd, rm); 10440 } 10441 10442 void Vtbl(Condition cond, 10443 DataType dt, 10444 DRegister rd, 10445 const NeonRegisterList& nreglist, 10446 DRegister rm) { 10447 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10448 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist)); 10449 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10450 VIXL_ASSERT(allow_macro_instructions_); 10451 VIXL_ASSERT(OutsideITBlock()); 10452 MacroEmissionCheckScope guard(this); 10453 ITScope it_scope(this, &cond); 10454 vtbl(cond, dt, rd, nreglist, rm); 10455 } 10456 void Vtbl(DataType dt, 10457 DRegister rd, 10458 const NeonRegisterList& nreglist, 10459 DRegister rm) { 10460 Vtbl(al, dt, rd, nreglist, rm); 10461 } 10462 10463 void Vtbx(Condition cond, 10464 DataType dt, 10465 DRegister rd, 10466 const NeonRegisterList& nreglist, 10467 DRegister rm) { 10468 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10469 VIXL_ASSERT(!AliasesAvailableScratchRegister(nreglist)); 10470 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10471 VIXL_ASSERT(allow_macro_instructions_); 10472 VIXL_ASSERT(OutsideITBlock()); 10473 MacroEmissionCheckScope guard(this); 10474 ITScope it_scope(this, &cond); 10475 vtbx(cond, dt, rd, nreglist, rm); 10476 } 10477 void Vtbx(DataType dt, 10478 DRegister rd, 10479 const NeonRegisterList& nreglist, 10480 DRegister rm) { 10481 Vtbx(al, dt, rd, nreglist, rm); 10482 } 10483 10484 void Vtrn(Condition cond, DataType dt, DRegister rd, DRegister rm) { 10485 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10486 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10487 VIXL_ASSERT(allow_macro_instructions_); 10488 VIXL_ASSERT(OutsideITBlock()); 10489 MacroEmissionCheckScope guard(this); 10490 ITScope it_scope(this, &cond); 10491 vtrn(cond, dt, rd, rm); 10492 } 10493 void Vtrn(DataType dt, DRegister rd, DRegister rm) { Vtrn(al, dt, rd, rm); } 10494 10495 void Vtrn(Condition cond, DataType dt, QRegister rd, QRegister rm) { 10496 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10497 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10498 VIXL_ASSERT(allow_macro_instructions_); 10499 VIXL_ASSERT(OutsideITBlock()); 10500 MacroEmissionCheckScope guard(this); 10501 ITScope it_scope(this, &cond); 10502 vtrn(cond, dt, rd, rm); 10503 } 10504 void Vtrn(DataType dt, QRegister rd, QRegister rm) { Vtrn(al, dt, rd, rm); } 10505 10506 void Vtst( 10507 Condition cond, DataType dt, DRegister rd, DRegister rn, DRegister rm) { 10508 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10509 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 10510 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10511 VIXL_ASSERT(allow_macro_instructions_); 10512 VIXL_ASSERT(OutsideITBlock()); 10513 MacroEmissionCheckScope guard(this); 10514 ITScope it_scope(this, &cond); 10515 vtst(cond, dt, rd, rn, rm); 10516 } 10517 void Vtst(DataType dt, DRegister rd, DRegister rn, DRegister rm) { 10518 Vtst(al, dt, rd, rn, rm); 10519 } 10520 10521 void Vtst( 10522 Condition cond, DataType dt, QRegister rd, QRegister rn, QRegister rm) { 10523 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10524 VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); 10525 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10526 VIXL_ASSERT(allow_macro_instructions_); 10527 VIXL_ASSERT(OutsideITBlock()); 10528 MacroEmissionCheckScope guard(this); 10529 ITScope it_scope(this, &cond); 10530 vtst(cond, dt, rd, rn, rm); 10531 } 10532 void Vtst(DataType dt, QRegister rd, QRegister rn, QRegister rm) { 10533 Vtst(al, dt, rd, rn, rm); 10534 } 10535 10536 void Vuzp(Condition cond, DataType dt, DRegister rd, DRegister rm) { 10537 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10538 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10539 VIXL_ASSERT(allow_macro_instructions_); 10540 VIXL_ASSERT(OutsideITBlock()); 10541 MacroEmissionCheckScope guard(this); 10542 ITScope it_scope(this, &cond); 10543 vuzp(cond, dt, rd, rm); 10544 } 10545 void Vuzp(DataType dt, DRegister rd, DRegister rm) { Vuzp(al, dt, rd, rm); } 10546 10547 void Vuzp(Condition cond, DataType dt, QRegister rd, QRegister rm) { 10548 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10549 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10550 VIXL_ASSERT(allow_macro_instructions_); 10551 VIXL_ASSERT(OutsideITBlock()); 10552 MacroEmissionCheckScope guard(this); 10553 ITScope it_scope(this, &cond); 10554 vuzp(cond, dt, rd, rm); 10555 } 10556 void Vuzp(DataType dt, QRegister rd, QRegister rm) { Vuzp(al, dt, rd, rm); } 10557 10558 void Vzip(Condition cond, DataType dt, DRegister rd, DRegister rm) { 10559 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10560 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10561 VIXL_ASSERT(allow_macro_instructions_); 10562 VIXL_ASSERT(OutsideITBlock()); 10563 MacroEmissionCheckScope guard(this); 10564 ITScope it_scope(this, &cond); 10565 vzip(cond, dt, rd, rm); 10566 } 10567 void Vzip(DataType dt, DRegister rd, DRegister rm) { Vzip(al, dt, rd, rm); } 10568 10569 void Vzip(Condition cond, DataType dt, QRegister rd, QRegister rm) { 10570 VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); 10571 VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); 10572 VIXL_ASSERT(allow_macro_instructions_); 10573 VIXL_ASSERT(OutsideITBlock()); 10574 MacroEmissionCheckScope guard(this); 10575 ITScope it_scope(this, &cond); 10576 vzip(cond, dt, rd, rm); 10577 } 10578 void Vzip(DataType dt, QRegister rd, QRegister rm) { Vzip(al, dt, rd, rm); } 10579 10580 void Yield(Condition cond) { 10581 VIXL_ASSERT(allow_macro_instructions_); 10582 VIXL_ASSERT(OutsideITBlock()); 10583 MacroEmissionCheckScope guard(this); 10584 ITScope it_scope(this, &cond); 10585 yield(cond); 10586 } 10587 void Yield() { Yield(al); } 10588 void Vabs(Condition cond, VRegister rd, VRegister rm) { 10589 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10590 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10591 if (rd.IsS()) { 10592 Vabs(cond, F32, rd.S(), rm.S()); 10593 } else { 10594 Vabs(cond, F64, rd.D(), rm.D()); 10595 } 10596 } 10597 void Vabs(VRegister rd, VRegister rm) { Vabs(al, rd, rm); } 10598 void Vadd(Condition cond, VRegister rd, VRegister rn, VRegister rm) { 10599 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10600 VIXL_ASSERT(rd.GetType() == rn.GetType()); 10601 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10602 if (rd.IsS()) { 10603 Vadd(cond, F32, rd.S(), rn.S(), rm.S()); 10604 } else { 10605 Vadd(cond, F64, rd.D(), rn.D(), rm.D()); 10606 } 10607 } 10608 void Vadd(VRegister rd, VRegister rn, VRegister rm) { Vadd(al, rd, rn, rm); } 10609 void Vcmp(Condition cond, VRegister rd, VRegister rm) { 10610 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10611 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10612 if (rd.IsS()) { 10613 Vcmp(cond, F32, rd.S(), rm.S()); 10614 } else { 10615 Vcmp(cond, F64, rd.D(), rm.D()); 10616 } 10617 } 10618 void Vcmp(VRegister rd, VRegister rm) { Vcmp(al, rd, rm); } 10619 void Vcmpe(Condition cond, VRegister rd, VRegister rm) { 10620 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10621 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10622 if (rd.IsS()) { 10623 Vcmpe(cond, F32, rd.S(), rm.S()); 10624 } else { 10625 Vcmpe(cond, F64, rd.D(), rm.D()); 10626 } 10627 } 10628 void Vcmpe(VRegister rd, VRegister rm) { Vcmpe(al, rd, rm); } 10629 void Vdiv(Condition cond, VRegister rd, VRegister rn, VRegister rm) { 10630 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10631 VIXL_ASSERT(rd.GetType() == rn.GetType()); 10632 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10633 if (rd.IsS()) { 10634 Vdiv(cond, F32, rd.S(), rn.S(), rm.S()); 10635 } else { 10636 Vdiv(cond, F64, rd.D(), rn.D(), rm.D()); 10637 } 10638 } 10639 void Vdiv(VRegister rd, VRegister rn, VRegister rm) { Vdiv(al, rd, rn, rm); } 10640 void Vfma(Condition cond, VRegister rd, VRegister rn, VRegister rm) { 10641 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10642 VIXL_ASSERT(rd.GetType() == rn.GetType()); 10643 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10644 if (rd.IsS()) { 10645 Vfma(cond, F32, rd.S(), rn.S(), rm.S()); 10646 } else { 10647 Vfma(cond, F64, rd.D(), rn.D(), rm.D()); 10648 } 10649 } 10650 void Vfma(VRegister rd, VRegister rn, VRegister rm) { Vfma(al, rd, rn, rm); } 10651 void Vfms(Condition cond, VRegister rd, VRegister rn, VRegister rm) { 10652 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10653 VIXL_ASSERT(rd.GetType() == rn.GetType()); 10654 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10655 if (rd.IsS()) { 10656 Vfms(cond, F32, rd.S(), rn.S(), rm.S()); 10657 } else { 10658 Vfms(cond, F64, rd.D(), rn.D(), rm.D()); 10659 } 10660 } 10661 void Vfms(VRegister rd, VRegister rn, VRegister rm) { Vfms(al, rd, rn, rm); } 10662 void Vfnma(Condition cond, VRegister rd, VRegister rn, VRegister rm) { 10663 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10664 VIXL_ASSERT(rd.GetType() == rn.GetType()); 10665 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10666 if (rd.IsS()) { 10667 Vfnma(cond, F32, rd.S(), rn.S(), rm.S()); 10668 } else { 10669 Vfnma(cond, F64, rd.D(), rn.D(), rm.D()); 10670 } 10671 } 10672 void Vfnma(VRegister rd, VRegister rn, VRegister rm) { 10673 Vfnma(al, rd, rn, rm); 10674 } 10675 void Vfnms(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 Vfnms(cond, F32, rd.S(), rn.S(), rm.S()); 10681 } else { 10682 Vfnms(cond, F64, rd.D(), rn.D(), rm.D()); 10683 } 10684 } 10685 void Vfnms(VRegister rd, VRegister rn, VRegister rm) { 10686 Vfnms(al, rd, rn, rm); 10687 } 10688 void Vmaxnm(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 Vmaxnm(F32, rd.S(), rn.S(), rm.S()); 10694 } else { 10695 Vmaxnm(F64, rd.D(), rn.D(), rm.D()); 10696 } 10697 } 10698 void Vminnm(VRegister rd, VRegister rn, VRegister rm) { 10699 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10700 VIXL_ASSERT(rd.GetType() == rn.GetType()); 10701 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10702 if (rd.IsS()) { 10703 Vminnm(F32, rd.S(), rn.S(), rm.S()); 10704 } else { 10705 Vminnm(F64, rd.D(), rn.D(), rm.D()); 10706 } 10707 } 10708 void Vmla(Condition cond, VRegister rd, VRegister rn, VRegister rm) { 10709 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10710 VIXL_ASSERT(rd.GetType() == rn.GetType()); 10711 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10712 if (rd.IsS()) { 10713 Vmla(cond, F32, rd.S(), rn.S(), rm.S()); 10714 } else { 10715 Vmla(cond, F64, rd.D(), rn.D(), rm.D()); 10716 } 10717 } 10718 void Vmla(VRegister rd, VRegister rn, VRegister rm) { Vmla(al, rd, rn, rm); } 10719 void Vmls(Condition cond, VRegister rd, VRegister rn, VRegister rm) { 10720 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10721 VIXL_ASSERT(rd.GetType() == rn.GetType()); 10722 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10723 if (rd.IsS()) { 10724 Vmls(cond, F32, rd.S(), rn.S(), rm.S()); 10725 } else { 10726 Vmls(cond, F64, rd.D(), rn.D(), rm.D()); 10727 } 10728 } 10729 void Vmls(VRegister rd, VRegister rn, VRegister rm) { Vmls(al, rd, rn, rm); } 10730 void Vmov(Condition cond, VRegister rd, VRegister rm) { 10731 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10732 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10733 if (rd.IsS()) { 10734 Vmov(cond, F32, rd.S(), rm.S()); 10735 } else { 10736 Vmov(cond, F64, rd.D(), rm.D()); 10737 } 10738 } 10739 void Vmov(VRegister rd, VRegister rm) { Vmov(al, rd, rm); } 10740 void Vmul(Condition cond, VRegister rd, VRegister rn, VRegister rm) { 10741 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10742 VIXL_ASSERT(rd.GetType() == rn.GetType()); 10743 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10744 if (rd.IsS()) { 10745 Vmul(cond, F32, rd.S(), rn.S(), rm.S()); 10746 } else { 10747 Vmul(cond, F64, rd.D(), rn.D(), rm.D()); 10748 } 10749 } 10750 void Vmul(VRegister rd, VRegister rn, VRegister rm) { Vmul(al, rd, rn, rm); } 10751 void Vneg(Condition cond, VRegister rd, VRegister rm) { 10752 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10753 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10754 if (rd.IsS()) { 10755 Vneg(cond, F32, rd.S(), rm.S()); 10756 } else { 10757 Vneg(cond, F64, rd.D(), rm.D()); 10758 } 10759 } 10760 void Vneg(VRegister rd, VRegister rm) { Vneg(al, rd, rm); } 10761 void Vnmla(Condition cond, VRegister rd, VRegister rn, VRegister rm) { 10762 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10763 VIXL_ASSERT(rd.GetType() == rn.GetType()); 10764 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10765 if (rd.IsS()) { 10766 Vnmla(cond, F32, rd.S(), rn.S(), rm.S()); 10767 } else { 10768 Vnmla(cond, F64, rd.D(), rn.D(), rm.D()); 10769 } 10770 } 10771 void Vnmla(VRegister rd, VRegister rn, VRegister rm) { 10772 Vnmla(al, rd, rn, rm); 10773 } 10774 void Vnmls(Condition cond, VRegister rd, VRegister rn, VRegister rm) { 10775 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10776 VIXL_ASSERT(rd.GetType() == rn.GetType()); 10777 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10778 if (rd.IsS()) { 10779 Vnmls(cond, F32, rd.S(), rn.S(), rm.S()); 10780 } else { 10781 Vnmls(cond, F64, rd.D(), rn.D(), rm.D()); 10782 } 10783 } 10784 void Vnmls(VRegister rd, VRegister rn, VRegister rm) { 10785 Vnmls(al, rd, rn, rm); 10786 } 10787 void Vnmul(Condition cond, VRegister rd, VRegister rn, VRegister rm) { 10788 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10789 VIXL_ASSERT(rd.GetType() == rn.GetType()); 10790 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10791 if (rd.IsS()) { 10792 Vnmul(cond, F32, rd.S(), rn.S(), rm.S()); 10793 } else { 10794 Vnmul(cond, F64, rd.D(), rn.D(), rm.D()); 10795 } 10796 } 10797 void Vnmul(VRegister rd, VRegister rn, VRegister rm) { 10798 Vnmul(al, rd, rn, rm); 10799 } 10800 void Vseleq(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 Vseleq(F32, rd.S(), rn.S(), rm.S()); 10806 } else { 10807 Vseleq(F64, rd.D(), rn.D(), rm.D()); 10808 } 10809 } 10810 void Vselge(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 Vselge(F32, rd.S(), rn.S(), rm.S()); 10816 } else { 10817 Vselge(F64, rd.D(), rn.D(), rm.D()); 10818 } 10819 } 10820 void Vselgt(VRegister rd, VRegister rn, VRegister rm) { 10821 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10822 VIXL_ASSERT(rd.GetType() == rn.GetType()); 10823 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10824 if (rd.IsS()) { 10825 Vselgt(F32, rd.S(), rn.S(), rm.S()); 10826 } else { 10827 Vselgt(F64, rd.D(), rn.D(), rm.D()); 10828 } 10829 } 10830 void Vselvs(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 Vselvs(F32, rd.S(), rn.S(), rm.S()); 10836 } else { 10837 Vselvs(F64, rd.D(), rn.D(), rm.D()); 10838 } 10839 } 10840 void Vsqrt(Condition cond, VRegister rd, VRegister rm) { 10841 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10842 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10843 if (rd.IsS()) { 10844 Vsqrt(cond, F32, rd.S(), rm.S()); 10845 } else { 10846 Vsqrt(cond, F64, rd.D(), rm.D()); 10847 } 10848 } 10849 void Vsqrt(VRegister rd, VRegister rm) { Vsqrt(al, rd, rm); } 10850 void Vsub(Condition cond, VRegister rd, VRegister rn, VRegister rm) { 10851 VIXL_ASSERT(rd.IsS() || rd.IsD()); 10852 VIXL_ASSERT(rd.GetType() == rn.GetType()); 10853 VIXL_ASSERT(rd.GetType() == rm.GetType()); 10854 if (rd.IsS()) { 10855 Vsub(cond, F32, rd.S(), rn.S(), rm.S()); 10856 } else { 10857 Vsub(cond, F64, rd.D(), rn.D(), rm.D()); 10858 } 10859 } 10860 void Vsub(VRegister rd, VRegister rn, VRegister rm) { Vsub(al, rd, rn, rm); } 10861 // End of generated code. 10862 10863 virtual bool AllowUnpredictable() VIXL_OVERRIDE { 10864 VIXL_ABORT_WITH_MSG("Unpredictable instruction.\n"); 10865 return false; 10866 } 10867 virtual bool AllowStronglyDiscouraged() VIXL_OVERRIDE { 10868 VIXL_ABORT_WITH_MSG( 10869 "ARM strongly recommends to not use this instruction.\n"); 10870 return false; 10871 } 10872 10873 private: 10874 RegisterList available_; 10875 VRegisterList available_vfp_; 10876 UseScratchRegisterScope* current_scratch_scope_; 10877 MacroAssemblerContext context_; 10878 Label::Offset checkpoint_; 10879 LiteralPoolManager literal_pool_manager_; 10880 VeneerPoolManager veneer_pool_manager_; 10881 bool generate_simulator_code_; 10882 bool allow_macro_instructions_; 10883 }; 10884 10885 // This scope utility allows scratch registers to be managed safely. The 10886 // MacroAssembler's GetScratchRegisterList() is used as a pool of scratch 10887 // registers. These registers can be allocated on demand, and will be returned 10888 // at the end of the scope. 10889 // 10890 // When the scope ends, the MacroAssembler's lists will be restored to their 10891 // original state, even if the lists were modified by some other means. 10892 // 10893 // Scopes must nest perfectly. That is, they must be destructed in reverse 10894 // construction order. Otherwise, it is not clear how to handle cases where one 10895 // scope acquires a register that was included in a now-closing scope. With 10896 // perfect nesting, this cannot occur. 10897 class UseScratchRegisterScope { 10898 public: 10899 // This constructor implicitly calls the `Open` function to initialise the 10900 // scope, so it is ready to use immediately after it has been constructed. 10901 explicit UseScratchRegisterScope(MacroAssembler* masm) 10902 : masm_(NULL), parent_(NULL), old_available_(0), old_available_vfp_(0) { 10903 Open(masm); 10904 } 10905 // This constructor allows deferred and optional initialisation of the scope. 10906 // The user is required to explicitly call the `Open` function before using 10907 // the scope. 10908 UseScratchRegisterScope() 10909 : masm_(NULL), parent_(NULL), old_available_(0), old_available_vfp_(0) {} 10910 10911 // This function performs the actual initialisation work. 10912 void Open(MacroAssembler* masm); 10913 10914 // The destructor always implicitly calls the `Close` function. 10915 ~UseScratchRegisterScope() { Close(); } 10916 10917 // This function performs the cleaning-up work. It must succeed even if the 10918 // scope has not been opened. It is safe to call multiple times. 10919 void Close(); 10920 10921 bool IsAvailable(const Register& reg) const; 10922 bool IsAvailable(const VRegister& reg) const; 10923 10924 // Take a register from the temp list. It will be returned automatically when 10925 // the scope ends. 10926 Register Acquire(); 10927 VRegister AcquireV(unsigned size_in_bits); 10928 QRegister AcquireQ(); 10929 DRegister AcquireD(); 10930 SRegister AcquireS(); 10931 10932 // Explicitly release an acquired (or excluded) register, putting it back in 10933 // the temp list. 10934 void Release(const Register& reg); 10935 void Release(const VRegister& reg); 10936 10937 // Make the specified registers available as scratch registers for the 10938 // duration of this scope. 10939 void Include(const RegisterList& list); 10940 void Include(const Register& reg1, 10941 const Register& reg2 = NoReg, 10942 const Register& reg3 = NoReg, 10943 const Register& reg4 = NoReg) { 10944 Include(RegisterList(reg1, reg2, reg3, reg4)); 10945 } 10946 void Include(const VRegisterList& list); 10947 void Include(const VRegister& reg1, 10948 const VRegister& reg2 = NoVReg, 10949 const VRegister& reg3 = NoVReg, 10950 const VRegister& reg4 = NoVReg) { 10951 Include(VRegisterList(reg1, reg2, reg3, reg4)); 10952 } 10953 10954 // Make sure that the specified registers are not available in this scope. 10955 // This can be used to prevent helper functions from using sensitive 10956 // registers, for example. 10957 void Exclude(const RegisterList& list); 10958 void Exclude(const Register& reg1, 10959 const Register& reg2 = NoReg, 10960 const Register& reg3 = NoReg, 10961 const Register& reg4 = NoReg) { 10962 Exclude(RegisterList(reg1, reg2, reg3, reg4)); 10963 } 10964 void Exclude(const VRegisterList& list); 10965 void Exclude(const VRegister& reg1, 10966 const VRegister& reg2 = NoVReg, 10967 const VRegister& reg3 = NoVReg, 10968 const VRegister& reg4 = NoVReg) { 10969 Exclude(VRegisterList(reg1, reg2, reg3, reg4)); 10970 } 10971 10972 // A convenience helper to exclude any registers used by the operand. 10973 void Exclude(const Operand& operand); 10974 10975 // Prevent any scratch registers from being used in this scope. 10976 void ExcludeAll(); 10977 10978 private: 10979 // The MacroAssembler maintains a list of available scratch registers, and 10980 // also keeps track of the most recently-opened scope so that on destruction 10981 // we can check that scopes do not outlive their parents. 10982 MacroAssembler* masm_; 10983 UseScratchRegisterScope* parent_; 10984 10985 // The state of the available lists at the start of this scope. 10986 uint32_t old_available_; // kRRegister 10987 uint64_t old_available_vfp_; // kVRegister 10988 10989 VIXL_DEBUG_NO_RETURN UseScratchRegisterScope(const UseScratchRegisterScope&) { 10990 VIXL_UNREACHABLE(); 10991 } 10992 VIXL_DEBUG_NO_RETURN void operator=(const UseScratchRegisterScope&) { 10993 VIXL_UNREACHABLE(); 10994 } 10995 }; 10996 10997 10998 } // namespace aarch32 10999 } // namespace vixl 11000 11001 #endif // VIXL_AARCH32_MACRO_ASSEMBLER_AARCH32_H_ 11002